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

Houdini: add model family (initial support) #486

Merged
merged 12 commits into from
May 23, 2024

Conversation

MustafaJafar
Copy link
Contributor

@MustafaJafar MustafaJafar commented May 3, 2024

Changelog Description

Adding model family to Houdini.
The main purpose to support Maya (load/publish model from maya to/from houdini).

Additional info

Currently, The new creator plugin is almost the same as 'create_pointcache.py'
But renaming the product type to 'model'.
It's considered to support multiple representations in the future.

Additional info 2

This PR uses collect_instances_type.py to abc family to publish families of Model instances.

Testing notes:

  1. Create Model Family
  2. Publish Local and on farm.

@ynbot ynbot added size/S type: enhancement Improvement of existing functionality or minor addition host: Houdini labels May 3, 2024
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.

it errors out integrate.py after exporting the object.
image

@MustafaJafar
Copy link
Contributor Author

it errors out integrate.py after exporting the object.

Yes, the PR needs small addition to work. I added that info to additional info in the PR description.

I can't decide what solution is favored:

Also, this comment #486 (comment) should be considered because it affects the execution flow of publishing models.

@moonyuet
Copy link
Member

moonyuet commented May 9, 2024

it errors out integrate.py after exporting the object.

Yes, the PR needs small addition to work. I added that info to additional info in the PR description.

I can't decide what solution is favored:

Also, this comment #486 (comment) should be considered because it affects the execution flow of publishing models.

If you talk about the solution two, you can consider the code below for the model creator. You just need to make sure the identifier is neither io.openpype.creators.houdini.pointcache nor io.openpype.creators.houdini.bgeo. And you can add one more condition to add abc as part of instance.data["families"] if identifier is "io.openpype.creators.houdini.model". Of course, the collector needs better naming after this (maybe rename it as collect_instance_types.py instead of collect_pointcache_type.py)

class ExtractModelABC(ExtractAlembic):
    """Extract model as ABC."""
    identifier = "io.openpype.creators.houdini.model"
    label = "Extract Alembic (Model)"
    families = ["model"]

    # Driven by settings
    optional = True

For solution one, I slightly look at how the creator built in the maya host, guess the published families somehow need to be decided during creating the instance. not sure if we can do some tricks on settings(some multiselection one) to let user decide which families type they want to publish?(not sure if it is a good idea.)

@MustafaJafar
Copy link
Contributor Author

MustafaJafar commented May 9, 2024

For solution one, I slightly look at how the creator built in the maya host, guess the published families somehow need to be decided during creating the instance. not sure if we can do some tricks on settings(some multiselection one) to let user decide which families type they want to publish?(not sure if it is a good idea.)

suppose we are allowed to publish multiple representations per product.
Let's take this example I think it can help us:
In publisher UI I'm able to select publishing my model as (we can select them all)

  • alembic
  • fbx
  • usd

For development,
we'd need to add families based on my selection.
So, does get_publish_families support such a scenario ? maybe @BigRoy can tell us ?

Personally, I'd prefer to use get_publish_families because the logic would be saved in one place which is easier to maintain.
That logic only specifies which publish families to use based on the creator attributes.


I think we should move this discussion to a dedicated place.
As it's not a necessity for this PR to work.

@MustafaJafar MustafaJafar requested review from moonyuet and BigRoy May 9, 2024 12:06
@MustafaJafar
Copy link
Contributor Author

In this 475d1db I've added @moonyuet's suggestion about using a collector to add abc to families.

I didn't update extractor because it already runs on Model instances as they already have abc in families list.

class ExtractAlembic(publish.Extractor):
order = pyblish.api.ExtractorOrder
label = "Extract Alembic"
hosts = ["houdini"]
families = ["abc", "camera"]

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.

General model family publishing looks good
image

@MustafaJafar MustafaJafar requested a review from fabiaserra May 10, 2024 17:07
@MustafaJafar MustafaJafar requested a review from iLLiCiTiT May 23, 2024 09:35
Copy link
Member

@antirotor antirotor left a comment

Choose a reason for hiding this comment

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

Did a model roundtrip between Houdini and Maya without any issue

@antirotor antirotor merged commit c9287b1 into develop May 23, 2024
3 checks passed
@antirotor antirotor deleted the enhancement/AY-4085_Houdini-adding-model-family branch May 23, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
host: Houdini size/S type: enhancement Improvement of existing functionality or minor addition
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants