-
Notifications
You must be signed in to change notification settings - Fork 8
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
Validate clashing sibling names when strip namespaces
is enabled
#112
Validate clashing sibling names when strip namespaces
is enabled
#112
Conversation
f"{report_list}", | ||
description=self.get_description()) | ||
|
||
def is_strip_namespaces_enabled(self, instance) -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iLLiCiTiT this really seems like madness - but I'm admittedly not entirely sure how to do this better. Many of these plugins can be enabled/disabled, they can be optional and hence disabled for the instance only, they can either have exposed publish attributes for stripNamespaces
or have it locked down and defined by settings as defaults.
Only way to simplify that is maybe moving this to a singular 'toggle' to a dedicated Collector which puts it in instance.data
? But it'd not be backwards compatible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That actually sounds more legit to me. Single plugin that is capable of showing all the input fields and based on the checked fields adds families (or different data) to instance. But that is a lot of work, so I don't know if should be handled in this PR.
OptionalPyblishPluginMixin
was not really meant that it is dependent on other plugins. BTW shouldn't the other plugin add something to instance data (for now) instead of having this logic dependent on current state of instance (might not represent state of instance at the moment the other plugin was processed)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OptionalPyblishPluginMixin was not really meant that it is dependent on other plugins. BTW shouldn't the other plugin add something to instance data (for now) instead of having this logic dependent on current state of instance (might not represent state of instance at the moment the other plugin was processed)?
The other plugins are Extractors - they run after the validators and hence the data is not there yet, so I'd need to move those to a Collector instead - which means we get into the shitshow of backwards compatibilities, etc. :)
This logic here is the best I could think of to support it now without refactoring everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do agree "correct implementation" would require massive refactor to allow it. I'll let @antirotor to decide.
@moonyuet Hard to tell from your screenshots whether the So please validate with the Alembic and USD exports - disregard the FBX ones. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well, been tested on pointcache
product with multiple scenarios (strip namespaces globally on/off, exposed strip namespaces as override etc)
note: there could possibly be super rare edge case with model
outputted also into Alembic
as now the validator doesnt kick in (even when having Strip namespaces ON) but there are other Validators which takes care about Namespaces
within the model content and Suffix Naming Conventions
forbidding names with ":" inside...so this would happen only when those 2 validators disabled...leading into Alembic with non unique naming when stripping on.
client/ayon_maya/plugins/publish/validate_clashing_sibling_names.py
Outdated
Show resolved
Hide resolved
…es.py Co-authored-by: Jakub Trllo <[email protected]>
Changelog Description
When exporting siblings that with stripped namespaces share the same name, validate it directly instead of erroring on extraction.
Additional info
Avoids this error on ExtractUSD:
Avoids this error on ExtractAlembic:
Testing notes:
Create an hierarchy like:
pCube1
would share same full path and clash on export.