From 5d53b2d890bb7df72eaed74b02af1122c7f3a35f Mon Sep 17 00:00:00 2001 From: ivanimanishi Date: Thu, 31 Oct 2024 09:42:07 -0700 Subject: [PATCH] renderCompatibility : Add default node name Provides compatibility with previously supported notation to create render nodes, like `GafferArnold.ArnoldRender()`. --- Changes.md | 5 +++++ startup/GafferArnold/renderCompatibility.py | 4 ++-- startup/GafferCycles/renderCompatibility.py | 4 ++-- startup/GafferDelight/renderCompatibility.py | 4 ++-- startup/GafferScene/renderCompatibility.py | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Changes.md b/Changes.md index f2d97dd7d4a..cf47c8b5ae6 100644 --- a/Changes.md +++ b/Changes.md @@ -6,6 +6,11 @@ Improvements - Instancer : Added support for 64 bit ints for ids ( matching what is loaded from USD ). +Fixes +----- + +- Render, InteractiveRender : Added default node name arguments to the compatibility shims for removed subclasses such as ArnoldRender. + 1.5.0.1 (relative to 1.5.0.0) ======= diff --git a/startup/GafferArnold/renderCompatibility.py b/startup/GafferArnold/renderCompatibility.py index b1d86079eb5..c557fcc2fb7 100644 --- a/startup/GafferArnold/renderCompatibility.py +++ b/startup/GafferArnold/renderCompatibility.py @@ -37,7 +37,7 @@ import GafferScene import GafferArnold -def __arnoldRender( name ) : +def __arnoldRender( name = "ArnoldRender" ) : node = GafferScene.Render( name ) node["renderer"].setValue( "Arnold" ) @@ -45,7 +45,7 @@ def __arnoldRender( name ) : GafferArnold.ArnoldRender = __arnoldRender -def __interactiveArnoldRender( name ) : +def __interactiveArnoldRender( name = "InteractiveArnoldRender" ) : node = GafferScene.InteractiveRender( name ) node["renderer"].setValue( "Arnold" ) diff --git a/startup/GafferCycles/renderCompatibility.py b/startup/GafferCycles/renderCompatibility.py index bf459c53746..91b94ba1e55 100644 --- a/startup/GafferCycles/renderCompatibility.py +++ b/startup/GafferCycles/renderCompatibility.py @@ -37,7 +37,7 @@ import GafferScene import GafferCycles -def __cyclesRender( name ) : +def __cyclesRender( name = "CyclesRender" ) : node = GafferScene.Render( name ) node["renderer"].setValue( "Cycles" ) @@ -45,7 +45,7 @@ def __cyclesRender( name ) : GafferCycles.CyclesRender = __cyclesRender -def __interactiveCyclesRender( name ) : +def __interactiveCyclesRender( name = "InteractiveCyclesRender" ) : node = GafferScene.InteractiveRender( name ) node["renderer"].setValue( "Cycles" ) diff --git a/startup/GafferDelight/renderCompatibility.py b/startup/GafferDelight/renderCompatibility.py index f624a3408e2..f389c1e80be 100644 --- a/startup/GafferDelight/renderCompatibility.py +++ b/startup/GafferDelight/renderCompatibility.py @@ -37,7 +37,7 @@ import GafferScene import GafferDelight -def __delightRender( name ) : +def __delightRender( name = "DelightRender" ) : node = GafferScene.Render( name ) node["renderer"].setValue( "3Delight" ) @@ -45,7 +45,7 @@ def __delightRender( name ) : GafferDelight.DelightRender = __delightRender -def __interactiveDelightRender( name ) : +def __interactiveDelightRender( name = "InteractiveDelightRender" ) : node = GafferScene.InteractiveRender( name ) node["renderer"].setValue( "3Delight" ) diff --git a/startup/GafferScene/renderCompatibility.py b/startup/GafferScene/renderCompatibility.py index 37f78ada664..62498785926 100644 --- a/startup/GafferScene/renderCompatibility.py +++ b/startup/GafferScene/renderCompatibility.py @@ -36,7 +36,7 @@ import GafferScene -def __openGLRender( name ) : +def __openGLRender( name = "OpenGLRender" ) : node = GafferScene.Render( name ) node["renderer"].setValue( "OpenGL" )