revert changes in HDA plugins

This commit is contained in:
MustafaJafar 2024-06-27 11:23:56 +03:00
parent 03d1f85660
commit 60ec86206f
2 changed files with 5 additions and 23 deletions

View file

@ -61,24 +61,3 @@ class CollectFrames(plugin.HoudiniInstancePlugin):
frame_collection.indexes.clear()
frame_collection.indexes.update(list(range(start_frame, (end_frame + 1))))
instance.data["frames"] = list(frame_collection)
class CollectHDAFrames(plugin.HoudiniInstancePlugin):
"""Collect all frames which would be saved from HDA nodes"""
order = pyblish.api.CollectorOrder
label = "Collect Frames"
families = ["hda"]
def process(self, instance):
hda_node = hou.node(instance.data.get("instance_node"))
hda_def = hda_node.type().definition()
file_name = os.path.basename(hda_def.libraryFilePath())
staging_dir = os.path.dirname(hda_def.libraryFilePath())
instance.data.update({
"frames": file_name, # Set frames to the file name by default.
"stagingDir": staging_dir
})

View file

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
import os
from pprint import pformat
import hou
import pyblish.api
@ -27,12 +28,14 @@ class ExtractHDA(plugin.HoudiniExtractorPlugin):
if "representations" not in instance.data:
instance.data["representations"] = []
file = os.path.basename(hda_def.libraryFilePath())
staging_dir = os.path.dirname(hda_def.libraryFilePath())
self.log.info("Using HDA from {}".format(hda_def.libraryFilePath()))
representation = {
'name': 'hda',
'ext': 'hda',
'files': instance.data["frames"],
"stagingDir": instance.data["stagingDir"],
'files': file,
"stagingDir": staging_dir,
}
instance.data["representations"].append(representation)