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

Support new flipbook node for reviews #167

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

MustafaJafar
Copy link
Contributor

@MustafaJafar MustafaJafar commented Nov 8, 2024

Changelog Description

resolve #85

This PR enhances the current review plugins to add support for the new flipbook node.
image

Additional Info

Flipbook node behaves a lot similar to opengl node.
one interesting change is the Color Correction setting which can choose (color space) or (display and view).
which may change a bit the color space validation and collection to properly support the flipbook node.

Testing notes:

  1. Create review instance using Review creator
  2. Try different node types
  3. Publish Reviews

@MustafaJafar MustafaJafar added the sponsored This is directly sponsored by a client or community member label Nov 8, 2024
@MustafaJafar MustafaJafar self-assigned this Nov 8, 2024
@MustafaJafar
Copy link
Contributor Author

Should this PR adds support for publishing reviews from LOPs?
Adding this for reference ynput/OpenPype#4890

@BigRoy
Copy link
Contributor

BigRoy commented Nov 8, 2024

Should this PR adds support for publishing reviews from LOPs?
Adding this for reference ynput/OpenPype#4890

I'd say that yes, we should fix that... but it doesn't need to be part of this PR. Instead I see that irrelevant to this because it's already relevant to the OpenGL ROP too. I thought we had an issue for that, but I can't find it 🤦

@MustafaJafar
Copy link
Contributor Author

I thought we had an issue for that, but I can't find it 🤦

We have this one #23

@BigRoy
Copy link
Contributor

BigRoy commented Nov 10, 2024

I thought we had an issue for that, but I can't find it 🤦

We have this one #23

Yup, saw that one - but unfortunately it's not about supporting cameras IN LOPS - but that is requesting to support lopimportcamera which is still at geometry level.


Created issue: #170

@BigRoy
Copy link
Contributor

BigRoy commented Nov 13, 2024

Let's see if we can get this one #148 merged first - so that this PR is slightly simplified and works with the changes made there.

@moonyuet
Copy link
Member

I slightly tested on the PR and find out that it's not working for the elder version of Houdini. Shall we introduce the condition so that users would know it only supports for Houdini 20.5? Or we can do it with some scripts in elder version?
I find a simple script from this website for creating flipbook animation for the elder version of Houdini: https://www.sidefx.com/docs/houdini/anim/flipbook.html

@BigRoy
Copy link
Contributor

BigRoy commented Nov 13, 2024

I slightly tested on the PR and find out that it's not working for the elder version of Houdini. Shall we introduce the condition so that users would know it only supports for Houdini 20.5?

We could enforce the enabled state of the Creator to False in an older version of Houdini than 20.5?

Or we can do it with some scripts in elder version?
I find a simple script from this website for creating flipbook animation for the elder version of Houdini: https://www.sidefx.com/docs/houdini/anim/flipbook.html

No please. That flipbook would just be the OpenGL review we already have.

default_factory=list,
)
node_type: str = SettingsField(
Title="Default Node Type",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No idea why the title doesn't show the word Default
image

Copy link
Contributor

Choose a reason for hiding this comment

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

It's the capital T ;)

Suggested change
Title="Default Node Type",
title="Default Node Type",

Comment on lines +34 to +39
self.node_type = pre_create_data.get("node_type")
hou_version = hou.applicationVersionString()
if self.node_type == "flipbook" and not hou_version.startswith("20.5"):
self.log.debug("The Flipbook node type isn't supported in Houdini versions below 20.5."
" Switching to the OpenGL node type instead.")
self.node_type = "opengl"
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove this here - and just keep the flipbook entry out of the Enum? if houdini < 20.5

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, we should not be updating the self.node_type value - it makes no sense to change the class attribute from here.

Comment on lines +134 to +136
node_type_enum = [
"opengl", "flipbook"
]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
node_type_enum = [
"opengl", "flipbook"
]
node_type_enum = ["opengl"]
if hou.applicationVersion() >= (20, 5, 0):
node_type_enum.append("flipbook")


order = pyblish.api.ExtractorOrder - 0.01
label = "Extract OpenGL"
label = "Extract Review (OpenGL & Flipbook)"
families = ["rop.opengl"]
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not too sure about both these node types going through rop.opengl family - they should each get their own family so that we could potentially still target just one of the two if we get to any specific validations down the line. Not critical for this PR - but worth a low prio backlog issue.

"is not an OpenGl node.".format(rop_node.path()))
return

super(ExtractOpenGLAndFlipbook, self).process(instance)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
super(ExtractOpenGLAndFlipbook, self).process(instance)
super().process(instance)

Comment on lines +62 to +70
# This plugin is triggered when marking render as reviewable.
# Therefore, this plugin will run on over wrong instances.
# TODO: Don't run this plugin on wrong instances.
# This plugin should run only on review product type
# with instance node of opengl type.
if rop_node.type().name() not in {"opengl", "flipbook"}:
self.log.debug("Skipping Validation. Rop node {} "
"is not an `opengl` or `flipbook` node.".format(rop_node.path()))
return
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed? This is not the case anymore right? Now it triggers on rop.opengl family?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sponsored This is directly sponsored by a client or community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AY-6687_Houdini 20.5: Support new "Flipbook" node for reviews
3 participants