From 822fa2c745132861b97d64a7b60f51807af7e83c Mon Sep 17 00:00:00 2001 From: wikoreman Date: Thu, 13 Sep 2018 10:50:58 +0200 Subject: [PATCH] Added collect animation plugin --- .../houdini/publish/collection_animation.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 colorbleed/plugins/houdini/publish/collection_animation.py diff --git a/colorbleed/plugins/houdini/publish/collection_animation.py b/colorbleed/plugins/houdini/publish/collection_animation.py new file mode 100644 index 0000000000..a959d9d5c6 --- /dev/null +++ b/colorbleed/plugins/houdini/publish/collection_animation.py @@ -0,0 +1,30 @@ +import pyblish.api + + +class CollectAnimation(pyblish.api.InstancePlugin): + """Collect the animation data for the data base + + Data collected: + - start frame + - end frame + - nr of steps + + """ + + label = "Collect Animation" + families = ["colorbleed.pointcache"] + + def process(self, instance): + + node = instance[0] + + # Get animation parameters for data + parameters = {"f1": "startFrame", + "f2": "endFrame", + "f3": "steps"} + + data = {} + for par, translation in parameters.items(): + data[translation] = node.parm(par).eval() + + instance.data.update(data)