🚨 few fixes

This commit is contained in:
Ondrej Samohel 2023-03-08 16:48:14 +01:00
parent fbf1b9e659
commit b2a936a790
No known key found for this signature in database
GPG key ID: 02376E18990A97C6
3 changed files with 12 additions and 13 deletions

View file

@ -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 + [

View file

@ -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]]

View file

@ -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"] = []