Skip to content

Commit

Permalink
use opengl family instead of review
Browse files Browse the repository at this point in the history
  • Loading branch information
MustafaJafar committed Oct 29, 2024
1 parent 9b8af39 commit 227abd5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 46 deletions.
7 changes: 5 additions & 2 deletions client/ayon_houdini/plugins/create/create_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ class CreateReview(plugin.HoudiniCreator):
"""Review with OpenGL ROP"""

identifier = "io.openpype.creators.houdini.review"
label = "Review"
label = "Review (OpenGL)"
product_type = "review"
icon = "video-camera"
review_color_space = ""


def get_publish_families(self):
return ["review", "opengl"]

def apply_settings(self, project_settings):
super(CreateReview, self).apply_settings(project_settings)
# workfile settings added in '0.2.13'
Expand Down
21 changes: 1 addition & 20 deletions client/ayon_houdini/plugins/publish/extract_rop.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,7 @@ class ExtractOpenGL(ExtractROP,

order = pyblish.api.ExtractorOrder - 0.01
label = "Extract OpenGL"
families = ["review"]

def process(self, instance):
# This plugin is triggered when marking render as reviewable.
# Therefore, this plugin will run 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.
instance_node = instance.data.get("instance_node")
if not instance_node:
self.log.debug("Skipping instance without instance node.")
return

rop_node = hou.node(instance_node)
if rop_node.type().name() != "opengl":
self.log.debug("Skipping OpenGl extraction. Rop node {} "
"is not an OpenGl node.".format(rop_node.path()))
return

super(ExtractOpenGL, self).process(instance)
families = ["opengl"]

def update_representation_data(self,
instance: pyblish.api.Instance,
Expand Down
16 changes: 3 additions & 13 deletions client/ayon_houdini/plugins/publish/validate_review_colorspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ValidateReviewColorspace(plugin.HoudiniInstancePlugin,
"""

order = pyblish.api.ValidatorOrder + 0.1
families = ["review"]
families = ["opengl"]
label = "Validate Review Colorspace"
actions = [ResetViewSpaceAction, SelectROPAction]

Expand All @@ -57,18 +57,6 @@ def apply_settings(cls, project_settings):

def process(self, instance):

rop_node = hou.node(instance.data["instance_node"])

# 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() != "opengl":
self.log.debug("Skipping Validation. Rop node {} "
"is not an OpenGl node.".format(rop_node.path()))
return

if not self.is_active(instance.data):
return

Expand All @@ -78,6 +66,8 @@ def process(self, instance):
" skipping check.."
)
return

rop_node = hou.node(instance.data["instance_node"])

if rop_node.evalParm("colorcorrect") != 2:
# any colorspace settings other than default requires
Expand Down
12 changes: 1 addition & 11 deletions client/ayon_houdini/plugins/publish/validate_scene_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,14 @@ class ValidateSceneReview(plugin.HoudiniInstancePlugin):
"""

order = pyblish.api.ValidatorOrder
families = ["review"]
families = ["opengl"]
label = "Scene Setting for review"

def process(self, instance):

report = []
instance_node = hou.node(instance.data.get("instance_node"))

# 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 instance_node.type().name() != "opengl":
self.log.debug("Skipping Validation. Rop node {} "
"is not an OpenGl node.".format(instance_node.path()))
return

invalid = self.get_invalid_scene_path(instance_node)
if invalid:
report.append(invalid)
Expand Down

0 comments on commit 227abd5

Please sign in to comment.