mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 13:24:54 +01:00
revert changes in HDA plugins
This commit is contained in:
parent
03d1f85660
commit
60ec86206f
2 changed files with 5 additions and 23 deletions
|
|
@ -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
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue