You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the publish instance has both a parent and a child inside the instance then Alembic will fail to extract the data when Include Parent Hierarchy is set to False.
Alembic failing to extract makes sense because this case of exporting isn't defined explicitly. When excluding the parent hierarchy from the export and exporting e.g. this:
parent > child
With parent, child both directly in the instance. Then would you want child to still be inside parent in the export. Or without parent hierarchy on its own? Should the data be duplicated (exist both within and outside?)
To Reproduce
importavalon.apifromopenpype.hosts.maya.api.libimportmaintained_selectionimportpyblish.utilimportopenpype.libfrommayaimportcmdsdefcreate(Creator, name, members=None):
"""Create creator for current asset with name + add members"""# note: the create method does not "return" the publish instance so for now # we use "useSelection" to add the members - since otherwise it's non trivial.options= {"useSelection": True}
asset=avalon.api.Session["AVALON_ASSET"]
withmaintained_selection():
cmds.select(members, replace=True, noExpand=True)
container=avalon.api.create(Creator,
name=name,
asset=asset,
options=options)
cube=cmds.polyCube(constructionHistory=False)[0]
grp=cmds.group(cube, name="group")
cube=cmds.listRelatives(grp, fullPath=True)[0]
# Create instanceCreator=openpype.lib.get_creator_by_name("CreatePointcache")
create(Creator, name="pointcacheMain", members=[grp, cube])
Script Editor log:
Alembic Job Arguments : -selection -uvWrite -eulerFilter -dataFormat ogawa -step 1.0 -attr cbId -writeVisibility -worldSpace -root |group -root |group|pCube1 -writeUVSets -frameRange 1001.0 1100.0 -autoSubd -file "C:/Users/Roy/AppData/Local/Temp/pyblish_tmp_8_f5vrol/pointcacheMain.abc"
// Error: pyblish.plugin : Traceback (most recent call last):
File "S:\openpype\OpenPype\.venv\lib\site-packages\pyblish\plugin.py", line 522, in __explicit_process
runner(*args)
File "S:\openpype\OpenPype\openpype\hosts\maya\plugins\publish\extract_pointcache.py", line 82, in process
File "S:\openpype\OpenPype\openpype\hosts\maya\api\lib.py", line 1233, in extract_alembic
cmds.AbcExport(j=job_str, verbose=verbose)
File "S:\openpype\OpenPype\openpype\hosts\maya\plugins\publish\extract_pointcache.py", line 2, in AbcExport
RuntimeError: |group and |group|pCube1 have parenting relationships
|group and |group|pCube1 have an ancestor relationship.
Traceback (most recent call last):
File "S:\openpype\OpenPype\.venv\lib\site-packages\pyblish\plugin.py", line 522, in __explicit_process
runner(*args)
File "<string>", line 82, in process
File "S:\openpype\OpenPype\openpype\hosts\maya\api\lib.py", line 1233, in extract_alembic
cmds.AbcExport(j=job_str, verbose=verbose)
File "<string>", line 2, in AbcExport
RuntimeError: |group and |group|pCube1 have parenting relationships
|group and |group|pCube1 have an ancestor relationship.
//
Expected behavior
We should add a Validator so that it errors much earlier - and also so we can provide a clear error message to the user as to what is going on and what potential solutions to the problem would be. E.g. we could provide an automatic repair to allow removing children from the publish instance directly - to clean up?
Or we could instead in the Extractor ignore any children that were in the instance and always only consider the highest nodes in the hierarchies as root nodes. This might reduce less "struggle" to the end user?
Describe the bug
When the publish instance has both a parent and a child inside the instance then Alembic will fail to extract the data when Include Parent Hierarchy is set to False.
Alembic failing to extract makes sense because this case of exporting isn't defined explicitly. When excluding the parent hierarchy from the export and exporting e.g. this:
With
parent, child
both directly in the instance. Then would you want child to still be insideparent
in the export. Or without parent hierarchy on its own? Should the data be duplicated (exist both within and outside?)To Reproduce
Script Editor log:
Expected behavior
We should add a Validator so that it errors much earlier - and also so we can provide a clear error message to the user as to what is going on and what potential solutions to the problem would be. E.g. we could provide an automatic repair to allow removing children from the publish instance directly - to clean up?
Or we could instead in the Extractor ignore any children that were in the instance and always only consider the highest nodes in the hierarchies as root nodes. This might reduce less "struggle" to the end user?
[cuID:OP-2978]
The text was updated successfully, but these errors were encountered: