From b2a936a7902be9392cb81ee01715145226e3596a Mon Sep 17 00:00:00 2001 From: Ondrej Samohel Date: Wed, 8 Mar 2023 16:48:14 +0100 Subject: [PATCH] :rotating_light: few fixes --- openpype/hosts/houdini/plugins/create/create_bgeo.py | 12 ++++++------ .../hosts/houdini/plugins/publish/collect_frames.py | 6 +++--- .../hosts/houdini/plugins/publish/extract_bgeo.py | 7 +++---- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/openpype/hosts/houdini/plugins/create/create_bgeo.py b/openpype/hosts/houdini/plugins/create/create_bgeo.py index 38e63dbc9f..1ca2ce36a0 100644 --- a/openpype/hosts/houdini/plugins/create/create_bgeo.py +++ b/openpype/hosts/houdini/plugins/create/create_bgeo.py @@ -52,12 +52,12 @@ class CreateBGEO(plugin.HoudiniCreator): def get_pre_create_attr_defs(self): attrs = super().get_pre_create_attr_defs() bgeo_enum = [ - {"option": "bgeo", "value": "bgeo", "label": "uncompressed bgeo (.bgeo)"}, - {"option": "bgeosc", "value": "bgeosc", "label": "BLOSC compressed bgeo (.bgeosc)"}, - {"option": "bgeo.sc", "value": "bgeo.sc", "label": "BLOSC compressed bgeo (.bgeo.sc)"}, - {"option": "bgeo.gz", "value": "bgeo.gz", "label": "GZ compressed bgeo (.bgeo.gz)"}, - {"option": "bgeo.lzma", "value": "bgeo.lzma", "label": "LZMA compressed bgeo (.bgeo.lzma)"}, - {"option": "bgeo.bz2", "value": "bgeo.bz2", "label": "BZip2 compressed bgeo (.bgeo.bz2)"} + {"value": "bgeo", "label": "uncompressed bgeo (.bgeo)"}, + {"value": "bgeosc", "label": "BLOSC compressed bgeo (.bgeosc)"}, + {"value": "bgeo.sc", "label": "BLOSC compressed bgeo (.bgeo.sc)"}, + {"value": "bgeo.gz", "label": "GZ compressed bgeo (.bgeo.gz)"}, + {"value": "bgeo.lzma", "label": "LZMA compressed bgeo (.bgeo.lzma)"}, + {"value": "bgeo.bz2", "label": "BZip2 compressed bgeo (.bgeo.bz2)"} ] return attrs + [ diff --git a/openpype/hosts/houdini/plugins/publish/collect_frames.py b/openpype/hosts/houdini/plugins/publish/collect_frames.py index f0264b10a6..0c2915552a 100644 --- a/openpype/hosts/houdini/plugins/publish/collect_frames.py +++ b/openpype/hosts/houdini/plugins/publish/collect_frames.py @@ -33,8 +33,8 @@ class CollectFrames(pyblish.api.InstancePlugin): self.log.warning("Using current frame: {}".format(hou.frame())) output = output_parm.eval() - _, ext = lib.splitext(output, - allowed_multidot_extensions=[ + _, ext = lib.splitext( + output, allowed_multidot_extensions=[ ".ass.gz", ".bgeo.sc", ".bgeo.gz", ".bgeo.lzma", ".bgeo.bz2"]) file_name = os.path.basename(output) @@ -78,7 +78,7 @@ class CollectFrames(pyblish.api.InstancePlugin): frame = match.group(1) padding = len(frame) - # Get the parts of the filename surrounding the frame number + # Get the parts of the filename surrounding the frame number, # so we can put our own frame numbers in. span = match.span(1) prefix = match.string[: span[0]] diff --git a/openpype/hosts/houdini/plugins/publish/extract_bgeo.py b/openpype/hosts/houdini/plugins/publish/extract_bgeo.py index 8b14ca7418..5e022bc9c0 100644 --- a/openpype/hosts/houdini/plugins/publish/extract_bgeo.py +++ b/openpype/hosts/houdini/plugins/publish/extract_bgeo.py @@ -27,14 +27,13 @@ class ExtractBGEO(publish.Extractor): file_name = os.path.basename(output) # We run the render - self.log.info("Writing bgeo files '%s' to '%s'" % (file_name, - staging_dir)) + self.log.info("Writing bgeo files '{}' to '{}'.".format( + file_name, staging_dir)) # write files - ropnode.parm("execute").pressButton() + render_rop(ropnode) output = instance.data["frames"] - self.log.debug(f"output: {output}") if "representations" not in instance.data: instance.data["representations"] = []