Merge pull request #459 from ynput/bugfix/maya_placeholder_set

Maya: Account for no placeholder set.
This commit is contained in:
Ondřej Samohel 2024-04-30 14:47:42 +02:00 committed by GitHub
commit e4c946611b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -187,6 +187,11 @@ class MayaPlaceholderLoadPlugin(PlaceholderPlugin, PlaceholderLoadMixin):
# Hide placeholder and add them to placeholder set
node = placeholder.scene_identifier
# If we just populate the placeholders from current scene, the
# placeholder set will not be created so account for that.
if not cmds.objExists(PLACEHOLDER_SET):
cmds.sets(name=PLACEHOLDER_SET, empty=True)
cmds.sets(node, addElement=PLACEHOLDER_SET)
cmds.hide(node)
cmds.setAttr(node + ".hiddenInOutliner", True)