From 0492a85f718310c693f80c72884fa728c0adc00d Mon Sep 17 00:00:00 2001 From: Bogdan Nagirniak Date: Thu, 23 Mar 2023 13:32:36 +0200 Subject: [PATCH] Added plugin/usd/hdStorm --- hydra_storm/engine.py | 12 ++++++++-- hydra_storm/plugin/plugInfo.json | 3 +++ .../usd/hdStorm/resources/plugInfo.json | 22 +++++++++++++++++++ hydra_storm/plugin/usd/plugInfo.json | 3 +++ 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 hydra_storm/plugin/plugInfo.json create mode 100644 hydra_storm/plugin/usd/hdStorm/resources/plugInfo.json create mode 100644 hydra_storm/plugin/usd/plugInfo.json diff --git a/hydra_storm/engine.py b/hydra_storm/engine.py index 909908c7e..5fc1cab7f 100644 --- a/hydra_storm/engine.py +++ b/hydra_storm/engine.py @@ -3,11 +3,13 @@ # +from pathlib import Path + import bpy -from bpy_hydra import HydraRenderEngine +import bpy_hydra -class StormHydraRenderEngine(HydraRenderEngine): +class StormHydraRenderEngine(bpy_hydra.HydraRenderEngine): bl_idname = 'StormHydraRenderEngine' bl_label = "Hydra: Storm" bl_info = "Hydra Storm (OpenGL) render delegate" @@ -17,6 +19,12 @@ class StormHydraRenderEngine(HydraRenderEngine): delegate_id = 'HdStormRendererPlugin' + @classmethod + def register(cls): + super().register() + + bpy_hydra.register_plugins([str(Path(__file__).parent / "plugin")], []) + def get_delegate_settings(self, engine_type): settings = bpy.context.scene.hydra_storm return { diff --git a/hydra_storm/plugin/plugInfo.json b/hydra_storm/plugin/plugInfo.json new file mode 100644 index 000000000..45968d6c1 --- /dev/null +++ b/hydra_storm/plugin/plugInfo.json @@ -0,0 +1,3 @@ +{ + "Includes": [ "usd/*/resources/" ] +} \ No newline at end of file diff --git a/hydra_storm/plugin/usd/hdStorm/resources/plugInfo.json b/hydra_storm/plugin/usd/hdStorm/resources/plugInfo.json new file mode 100644 index 000000000..cd4ab743d --- /dev/null +++ b/hydra_storm/plugin/usd/hdStorm/resources/plugInfo.json @@ -0,0 +1,22 @@ +{ + "Plugins": [ + { + "Info": { + "Types": { + "HdStormRendererPlugin": { + "bases": [ + "HdRendererPlugin" + ], + "displayName": "GL", + "priority": 0 + } + } + }, + "LibraryPath": "", + "Name": "hdStorm", + "ResourcePath": "resources", + "Root": "..", + "Type": "library" + } + ] +} diff --git a/hydra_storm/plugin/usd/plugInfo.json b/hydra_storm/plugin/usd/plugInfo.json new file mode 100644 index 000000000..2e20f3d66 --- /dev/null +++ b/hydra_storm/plugin/usd/plugInfo.json @@ -0,0 +1,3 @@ +{ + "Includes": [ "*/resources/" ] +} -- 2.30.2