Skip to content

Instantly share code, notes, and snippets.

'''
Renaming systems with muliptle pads
'''
# Getting Selected
# Determin if you want to work on selected or hierarchy.
@mclavan
mclavan / renaming_04.py
Created July 3, 2022 14:00
Loops - Using the range command
'''
Renaming Padding Systems
Loops - using the range command
'''
print('Using Range.')
# for loop using range
for i in range(10):
'''
# Joint Naming
# - This one is a bit harder because the last name will change from 'bind' to 'waste'
# Naming Convention
# orientation, name, count, suffix
# ct_back_01_bind -> ct_back_02_waste
Gist Link:
'''
Renaming Part 2 - selection and loops
- Provided Scene (bloop_rename_01.ma)
'''
# Cluster Naming Convention
# SystemName_clusterName_count_suffix
# ctBack_crvClust_01_clust
# Cluster Naming Convention
# SystemName_clusterName_count_suffix
# ctBack_crvClust_01_clust
system_name = 'ctBack'
cluster_name = 'crvClust'
count = 1
suffix = 'clust'
#new_name = system_name + '_' + cluster_name
@mclavan
mclavan / coding_session_part2_6_12_21.py
Created June 13, 2021 00:36
coding session 6/12/21 part 2
import pymel.core as pm
ori = ['lt', 'rt']
name = ['index', 'ring', 'middle', 'pinky']
finger_name = 'lt_index_01_bind'
hand_icon = 'lt_hand_icon'
@mclavan
mclavan / codingSession_6_12_21.py
Created June 13, 2021 00:35
coding session 6/12/21
import pymel.core as pm
# pm.Callback(get_hand_icon, min, max, dv)
win_width = 200
hand_icon = ''
finger_joint = ''
finger_attr = 'index_curl'
def gui():
@mclavan
mclavan / nHair.py
Last active September 17, 2021 18:58
import pymel.core as pm
class Hair_System:
'''
This is where helpfull info goes.
'''
def __init__(self):
'''
@mclavan
mclavan / codeSession10_17_20.py
Last active October 18, 2020 00:13
Coding Session 10/17/2020
# Creating an world FK Control system
# Create 4 World FK Controls
# Get Target Joint(s)
#current_joint = 'joint9'
# Get Selection
import pymel.core as pm
# Get Selection Driver and Driven(s)
selection = pm.ls(sl=True)
driver = selection[0]
driven = selection[1:]
# Transfer the UVs
#pm.transferAttributes(driver, driven[0], flipUVs=0, transferPositions=0, transferUVs=2, sourceUvSpace="map1", searchMethod=3, transferNormals=0, transferColors=2, targetUvSpace="map1", colorBorders=1, sampleSpace=5)