Skip to content

Commit

Permalink
space switch context menu bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
morganloomis committed Apr 23, 2017
1 parent 0f5a1d5 commit 486c7ad
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ml_puppet.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# / __ `__ \/ / Licensed under Creative Commons BY-SA
# / / / / / / / http://creativecommons.org/licenses/by-sa/3.0/
# /_/ /_/ /_/_/ _________
# /_________/ Revision 15, 2017-04-06
# /_________/ Revision 16, 2017-04-23
# _______________________________
# - -/__ Installing Python Scripts __/- - - - - - - - - - - - - - - - - - - -
#
Expand Down Expand Up @@ -44,7 +44,7 @@
__author__ = 'Morgan Loomis'
__license__ = 'Creative Commons Attribution-ShareAlike'
__category__ = 'animationScripts'
__revision__ = 15
__revision__ = 16

import maya.cmds as mc
import maya.mel as mm
Expand Down Expand Up @@ -853,11 +853,11 @@ def getSpaceSwitchData(node):
enumValues = mc.attributeQuery(spaceEnum, node=node, listEnum=True)
elif 'SpaceSwitch' in attr:
baseName = attr.replace('SpaceSwitch','')
if mc.attributeQuery(baseName+'Space', node=node, exists=True):
if baseName + 'Space' in attrs:
spaceEnum = baseName+'Space'
elif not 'spaceSwitch' in ssAttrs and 'space' in attrs:
spaceEnum = 'space'
if spaceEnum:
else:
spaceEnum = attr
if spaceEnum in attrs and mc.attributeQuery(spaceEnum, node=node, attributeType=True) == 'enum':
enumValues = mc.attributeQuery(spaceEnum, node=node, listEnum=True)
if not enumValues:
continue
Expand Down Expand Up @@ -1277,3 +1277,5 @@ def flipAnimation(nodes, *args):
# Revision 14: 2017-03-28 : removing hide all sets, maya not allow
#
# Revision 15: 2017-04-06 : Context menu bug fixes and additional features.
#
# Revision 16: 2017-04-23 : Space Switch context menu bug fix

0 comments on commit 486c7ad

Please sign in to comment.