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

Recursive Instancer Other Approach #6200

Conversation

danieldresser-ie
Copy link
Contributor

As requested on #6194, here is an absolutely minimal set of changes to allow recursive instancing. This does allow using a single node to adapt a USD scene with instancing of instancers ( by plugging the output of an Instancer back into it's prototypes ), but I don't yet see a path to actually deploying it. Currently there is nothing to prevent a casual user from accidentally connecting a cycle into prototypes, and if that connection goes through even a dot, then the special case for a direct loop in hashBranchSetNames won't trigger, resulting in an immediate crash.

@johnhaddon
Copy link
Member

Since our main motivation is to make a USD adaptor rather than a general-purpose feature of the Gaffer Instancer, I wonder if this even more minimal approach has merit : johnhaddon@e8dca96#diff-180b29d3aeae7ca4102faf9df42363b8126779e833e2889870ed38ca33639515R3200-R3207. Seems like we could actually implement this hack entirely in Python?

@johnhaddon
Copy link
Member

Closing, since I think our new plan is to use the pure-python approach outlined in the comment above.

@johnhaddon johnhaddon closed this Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants