From 2fdd3c8c64b2c294ad1c28adb1b1318435cfae19 Mon Sep 17 00:00:00 2001 From: wijnand Date: Tue, 27 Mar 2018 16:23:24 +0200 Subject: [PATCH 1/6] Added register_launcher_action --- colorbleed/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/colorbleed/__init__.py b/colorbleed/__init__.py index f29597a297..6a1699a030 100644 --- a/colorbleed/__init__.py +++ b/colorbleed/__init__.py @@ -1,5 +1,6 @@ import os from pyblish import api as pyblish +from avalon import api, pipeline PACKAGE_DIR = os.path.dirname(__file__) PLUGINS_DIR = os.path.join(PACKAGE_DIR, "plugins") @@ -16,3 +17,11 @@ def install(): def uninstall(): pyblish.deregister_plugin_path(PUBLISH_PATH) + +def register_launcher_actions(): + """Register specific actions which should be accessible in the launcher""" + + # Register fusion actions + from .fusion import rendernode + pipeline.register_plugin(api.Action, rendernode.FusionRenderNode) + From cc7124a1ba2328d1071fe0be7746874b12bdcd86 Mon Sep 17 00:00:00 2001 From: wijnand Date: Tue, 27 Mar 2018 16:24:33 +0200 Subject: [PATCH 2/6] FusionRenderNode action for launcher --- colorbleed/fusion/rendernode.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 colorbleed/fusion/rendernode.py diff --git a/colorbleed/fusion/rendernode.py b/colorbleed/fusion/rendernode.py new file mode 100644 index 0000000000..21ed091ad7 --- /dev/null +++ b/colorbleed/fusion/rendernode.py @@ -0,0 +1,23 @@ +import os +from avalon import api, lib + +# TODO: get fusion render node exe from somewhere else +FRN = "C:/Program Files/Blackmagic Design/Fusion Render Node 9/FusionRenderNode.exe" + + +class FusionRenderNode(api.Action): + + name = "fusionrendernode" + label = "F9 Render Node" + icon = "object-group" + order = 997 + + def is_compatible(self, session): + """Return whether the action is compatible with the session""" + return True + + def process(self, session, **kwargs): + """Implement the behavior for when the action is triggered""" + return lib.launch(executable=FRN, + args=[], + environment=os.environ.update(session)) From afaf4a6194271ef3995dbff6dd9a90ad4118e790 Mon Sep 17 00:00:00 2001 From: wijnand Date: Tue, 24 Apr 2018 12:11:31 +0200 Subject: [PATCH 3/6] Remove unneeded module --- colorbleed/fusion/rendernode.py | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 colorbleed/fusion/rendernode.py diff --git a/colorbleed/fusion/rendernode.py b/colorbleed/fusion/rendernode.py deleted file mode 100644 index 21ed091ad7..0000000000 --- a/colorbleed/fusion/rendernode.py +++ /dev/null @@ -1,23 +0,0 @@ -import os -from avalon import api, lib - -# TODO: get fusion render node exe from somewhere else -FRN = "C:/Program Files/Blackmagic Design/Fusion Render Node 9/FusionRenderNode.exe" - - -class FusionRenderNode(api.Action): - - name = "fusionrendernode" - label = "F9 Render Node" - icon = "object-group" - order = 997 - - def is_compatible(self, session): - """Return whether the action is compatible with the session""" - return True - - def process(self, session, **kwargs): - """Implement the behavior for when the action is triggered""" - return lib.launch(executable=FRN, - args=[], - environment=os.environ.update(session)) From 438b15715b7b4ee43d242a16a14e20d1566e5c1b Mon Sep 17 00:00:00 2001 From: wijnand Date: Wed, 25 Apr 2018 11:59:34 +0200 Subject: [PATCH 4/6] Added VRay Displacement Viewer --- colorbleed/maya/menu.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/colorbleed/maya/menu.json b/colorbleed/maya/menu.json index 9141b82ac6..65c458a71c 100644 --- a/colorbleed/maya/menu.json +++ b/colorbleed/maya/menu.json @@ -829,6 +829,21 @@ "title": "Look Manager", "tooltip": "Open the Look Manager UI for look assignment" }, + { + "type": "action", + "command": "$COLORBLEED_SCRIPTS\\shading\\vdviewer_ui.py", + "sourcetype": "file", + "tags": [ + "shading", + "look", + "vray", + "displacement", + "shaders", + "auto" + ], + "title": "VRay Displ Viewer", + "tooltip": "Open the VRay Displacement Viewer, select and control the content of the set" + }, { "type": "action", "command": "$COLORBLEED_SCRIPTS\\shading\\LightLinkUi.py", From a74601a5aee5859d29d91de62b83abacc7527b81 Mon Sep 17 00:00:00 2001 From: wijnand Date: Wed, 25 Apr 2018 12:02:59 +0200 Subject: [PATCH 5/6] Revert VRay Displacement Viewer --- colorbleed/maya/menu.json | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/colorbleed/maya/menu.json b/colorbleed/maya/menu.json index 65c458a71c..9141b82ac6 100644 --- a/colorbleed/maya/menu.json +++ b/colorbleed/maya/menu.json @@ -829,21 +829,6 @@ "title": "Look Manager", "tooltip": "Open the Look Manager UI for look assignment" }, - { - "type": "action", - "command": "$COLORBLEED_SCRIPTS\\shading\\vdviewer_ui.py", - "sourcetype": "file", - "tags": [ - "shading", - "look", - "vray", - "displacement", - "shaders", - "auto" - ], - "title": "VRay Displ Viewer", - "tooltip": "Open the VRay Displacement Viewer, select and control the content of the set" - }, { "type": "action", "command": "$COLORBLEED_SCRIPTS\\shading\\LightLinkUi.py", From a29f5f177ab48951b04616c282bf3bd9689ff823 Mon Sep 17 00:00:00 2001 From: wijnand Date: Wed, 25 Apr 2018 12:03:48 +0200 Subject: [PATCH 6/6] Addedd VRay Displacement Viewer --- colorbleed/maya/menu.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/colorbleed/maya/menu.json b/colorbleed/maya/menu.json index 9141b82ac6..a1d2b426d4 100644 --- a/colorbleed/maya/menu.json +++ b/colorbleed/maya/menu.json @@ -855,6 +855,21 @@ "title": "Set Texture Preview To CLRImage", "tooltip": "" }, + { + "type": "action", + "command": "$COLORBLEED_SCRIPTS\\shading\\vdviewer_ui.py", + "sourcetype": "file", + "tags": [ + "shading", + "look", + "vray", + "displacement", + "shaders", + "auto" + ], + "title": "VRay Displ Viewer", + "tooltip": "Open the VRay Displacement Viewer, select and control the content of the set" + }, { "type": "action", "command": "$COLORBLEED_SCRIPTS\\shading\\fixDefaultShaderSetBehavior.py",