Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3dsmax: enhance alembic loader update function #4387

Merged

Conversation

antirotor
Copy link
Member

Enhancement

This PR is adding update/switch ability to pointcache/alembic loader in 3dsmax and fixing wrong tool shown when clicking on "Manage" item on OpenPype menu, that is now correctly Scene Inventory (but was Subset Manager).

Alembic update has still one caveat - it doesn't cope with changed number of object inside alembic, since loading alembic in max involves creating all those objects as first class nodes. So it will keep the objects in scene, just update path to alembic file on them.

@antirotor antirotor added type: enhancement Enhancements to existing functionality host: 3dsmax Autodesk 3dsmax labels Jan 27, 2023
@antirotor antirotor self-assigned this Jan 27, 2023
def get_container_children(parent, type_name):
from pymxs import runtime as rt

def list_children(node):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel get_all_children would be a more explicit name?

@moonyuet
Copy link
Member

"Manage" Item correctly points to the Scene Inventory widget
image
But when I update the version to the latest in Scene Inventory, the object doesn't seem to update to the latest published abc as expected.
image

antirotor and others added 2 commits January 27, 2023 12:01
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The manage item in the OP menu correctly opens Scene Inventory window.

After loading abc animation cache in latest version v007 tested switching to older one v005 sucesfully as seen on pic below
4387_ABC_versions01

Then saving and reopening the shot and update abc animation to latest v007 via Scene Inventory worked ok as well.
4387_ABC_versions02

@antirotor
Copy link
Member Author

But when I update the version to the latest in Scene Inventory, the object doesn't seem to update to the latest published abc as expected.

Might be related to one limitation I've mentioned - when you load alembic in 3dsmax for first time, it will create node for every geometry paths inside the alembic. So if you have:

/obj/foo
/obj/boo
/bla

Then if you update version to alembic with different hierarchy, it will update the paths only on already existing nodes, not creating new one or deleting invalid. I left it like this semi-intentionally because the only option to do this properly would be to really delete everything and re-import it, but that would also delete any edits and associations with those nodes.

There might be way around this by crawling over the original nodes, serializing any changes and then reapplying them on newly imported nodes but hell.... that's for another PR.

Copy link
Member

@moonyuet moonyuet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that there is some limitations with the abc import (but also others like fbx import), we can always go back to enhance the update function.

@mkolar
Copy link
Member

mkolar commented Jan 30, 2023

Similar problem as what Blender has with dealing with ABCs.... I'd go for it in current state.

@mkolar mkolar merged commit 6f68527 into develop Jan 30, 2023
@mkolar mkolar deleted the enhancement/3dsmax-pointcache-and-scene-inventory-fixes branch January 30, 2023 10:46
@github-actions github-actions bot added this to the next-patch milestone Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
host: 3dsmax Autodesk 3dsmax type: enhancement Enhancements to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants