mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
added explanaition for split, ensure unique namespace
This commit is contained in:
parent
31e02669ab
commit
a712214f4c
1 changed files with 10 additions and 2 deletions
|
|
@ -23,7 +23,16 @@ class AbcLoader(api.Loader):
|
|||
# Create unique namespace for the cameras
|
||||
|
||||
# Get name from asset being loaded
|
||||
namespace = "{name}_abc".format(name=name)
|
||||
# Assuming name is subset name from the animation, we split the number
|
||||
# suffix from the name to ensure the namespace is unique
|
||||
name = name.split("_")[0]
|
||||
namespace = maya.unique_namespace("{}_".format(name),
|
||||
format="%03d",
|
||||
suffix="_abc")
|
||||
|
||||
# hero_001 (abc)
|
||||
# asset_counter{optional}
|
||||
|
||||
nodes = cmds.file(self.fname,
|
||||
namespace=namespace,
|
||||
sharedReferenceFile=False,
|
||||
|
|
@ -33,7 +42,6 @@ class AbcLoader(api.Loader):
|
|||
returnNewNodes=True)
|
||||
|
||||
# load colorbleed ID attribute
|
||||
|
||||
self[:] = nodes
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue