Skip to content

Commit

Permalink
Added "World" option to Space Switches
Browse files Browse the repository at this point in the history
  • Loading branch information
janberger committed Nov 28, 2024
1 parent fbf4b7c commit d87fcb6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions aniMeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -9004,12 +9004,14 @@ def createWorldOrient(node, root, value):

feet_iks = [ controls[ 'Foot_IK_'+SIDE+'_Ctrl' ] ]

root_path = self.get_path(rootNode)

for node in feet_iks:
self.create_multi_space_switch(
node,
[ controls[ 'Main_Ctr_Ctrl'], controls[ 'Hips_Ctr_Ctrl'], controls[ 'Torso_Ctr_Ctrl'] ],
[ controls[ 'Main_Ctr_Ctrl'], controls[ 'Hips_Ctr_Ctrl'], controls[ 'Torso_Ctr_Ctrl'], root_path ],
attrName='space',
attrNameList=['Main', 'Hips', 'Torso']
attrNameList=['Main', 'Hips', 'Torso', 'World']
)

# Leg
Expand Down Expand Up @@ -9161,13 +9163,15 @@ def createWorldOrient(node, root, value):
for node in hand_space_switch_list:
hand_space_ctrls.append( controls[node] )

root_path = self.get_path(rootNode)

# Space Switch
for node in [ controls['Hand_IK_'+SIDE+'_Ctrl'], controls['ArmPole_IK_'+SIDE+'_Ctrl'] ]:
for node in [ controls['Hand_IK_'+SIDE+'_Ctrl'], controls['ArmPole_IK_'+SIDE+'_Ctrl'], root_path ]:
self.create_multi_space_switch(
node,
hand_space_ctrls,
attrName='space',
attrNameList=['Main', 'Head', 'Chest', 'Hips', 'Torso']
attrNameList=['Main', 'Head', 'Chest', 'Hips', 'Torso', 'World']
)
# Hide the attribute on the pole Vector
#ArmPoleVecIK_Ctrl[0] = self.find_node( rootNode, ArmPoleVecIK_Ctrl[0] )
Expand Down

0 comments on commit d87fcb6

Please sign in to comment.