Skip to content

Commit

Permalink
load ornatrix cache needs to select to show on HairStackDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
moonyuet committed Jul 17, 2024
1 parent ea2736f commit f678160
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/ayon_maya/plugins/load/load_ornatrix_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ def load(self, context, name=None, namespace=None, data=None):

path = self.filepath_from_context(context)
settings = self.read_settings(path)
# read the fursettings
nodes = []
for setting in settings["nodes"]:
nodes.extend(self.create_node(namespace, path, setting))

# Show dialog so the user can directly start working with the
# newly created nodes.
# Select the node and show dialog so the user can directly
# start working with the newly created nodes.
cmds.select(nodes)
cmds.OxShowHairStackDialog()

self[:] = nodes
Expand Down Expand Up @@ -70,6 +70,7 @@ def update(self, container, context):
for node in cmds.ls(nodes, type="HairFromGuidesNode"):
cmds.setAttr(f"{node}.cacheFilePath", path, type="string")

cmds.select(nodes)
# Update the representation
cmds.setAttr(
container["objectName"] + ".representation",
Expand Down

0 comments on commit f678160

Please sign in to comment.