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

Maya: Allow to disable exporting of custom user attributes from maya nodes #1076

Open
BigRoy opened this issue Oct 4, 2022 · 2 comments
Open

Comments

@BigRoy
Copy link

BigRoy commented Oct 4, 2022

Issue

The exporter currently always includes custom user attributes on nodes as extras.{attribute} on each node.
In some cases you might want to exclude certain extra attributes from export instead of needing to remove these from your scenes prior to that.

Solution

Add an extra parameters which would allow to disable the writing of extras.

Extra nice would be to be able to include only certain extra attributes (or even maya native attributes) like a attribute parameter which would e.g. be a string like "myAttribute otherAttribute primaryVisibility" to include only those attributes as extras if it matches that name.

Or potentially allow more complex expressions for the attributes (like Houdini groups) "* ^myAttribute" to include all (*) and then exclude (^) the myAttribute named attribute. Or match custom_* to match all attributes that start with custom_ like custom_myAttribute or custom_exportData.

Additional Info

The export logic for Custom Attributes is done through BabylonExporter.CustomAttributes.cs

We would need to expose an extra parameter for the exporter and filter the custom attributes around here using e.g. this.exportParameters.exportCustomAttributes and implement a filtering like described above.

@bghgary
Copy link
Contributor

bghgary commented Oct 4, 2022

Would you be willing to make a contribution?

@BigRoy
Copy link
Author

BigRoy commented Oct 4, 2022

It's not necessarily my forte (nor do I have plenty of time on the side) - so I had hoped that by potentially pointing to the relevant code areas someone familiar with the code base would be able to do it easily.

Anyway, if I do find myself with spare time I'd be happy to take a look into this. But in practice having spare time rarely works out.

Do you happen to know a simple pattern matching that's artist-friendly but trivial for C# to filter the list against? I really like Houdini's way for grouping but not sure how to best translate that to C#. For what it's worth, allowing a list of regex filter strings would also be fine.

@thomlucc thomlucc added this to the Future milestone Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants