ynput / ayon-houdini

Houdini addon for AYON
Apache License 2.0
6 stars 2 forks source link

Enhancement: Houdini Pointcache (Alembic) allow to publish object level paths #22

Open BigRoy opened 1 year ago

BigRoy commented 1 year ago

Is there an existing issue for this?

Please describe the feature you have in mind and explain what the current shortcomings are?

The Houdini Alembic ROP supports exporting object level paths, like locators however OpenPype does not allow it due to the validators that are in place.

Currently OpenPype only support the Use SOP Path enabled exports where a SOP path is used. However this does not allow exporting e.g. Houdini locators or alike to alembic which might be useful for certain type of technical exports.

Here's a screenshot of how the node could be configured if Use SOP Path is disabled:

alembic_no_sop_path

How would you imagine the implementation of the feature?

Allow to have Use SOP Path disabled and separate the validators for those that validate the SOP paths and the once that validate the object level entries.

Are there any labels you wish to add?

Describe alternatives you've considered:

No response

Additional context:

No response

[cuID:OP-6367]

MustafaJafar commented 1 year ago

I think it will require few modifications in

last but not least : Regarding path checking validators both validate_abc_primitive_to_detail.py, validate_primitive_hierarchy_paths.py will be skipped so, they won't interrupt publishing.

so, any ideas ?

BigRoy commented 1 year ago

I think we might be best of collecting a specific additional family if either SOP path is enabled or not like:

if use_sop_path:
    instance.data["families"].append("abc.sop")
else:
    instance.data["families"].append("abc.obj")

That would be collected in a dedicated collector plugin.

So that the validators that only apply to SOP path instances are set to run over families ["abc.sop"] and the validations for the object level alembic rop run over ["abc.obj"] or alike. That way each particular in itself doesn't have to start individually checking all the cases for if use sop path is enabled or not - the plugins then only run if its enabled or not. It's both faster in plugin processing, more explicit and easier to maintain.

So that'd mean on the existing validators only change the family it targets and then add new validators for the object path setting.


Other than that you seem to be pretty spot on. :)