From c4ddc45fd6611dbc4b6067f39f58f3dd45f6c160 Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Wed, 18 Sep 2024 11:34:39 +1000 Subject: [PATCH] Inspector : Use "edit scope" in noneditable reasons As EditScope nodes are often named "EditScope#", we now refer to an "edit scope" to prevent sentences full of "EditScope". Preferring "The target edit scope EditScope..." to "The target EditScope (EditScope)...". --- python/GafferSceneUITest/AttributeInspectorTest.py | 10 +++++----- python/GafferSceneUITest/OptionInspectorTest.py | 10 +++++----- python/GafferSceneUITest/ParameterInspectorTest.py | 10 +++++----- python/GafferSceneUITest/SetMembershipInspectorTest.py | 4 ++-- src/GafferSceneUI/Inspector.cpp | 4 ++-- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/python/GafferSceneUITest/AttributeInspectorTest.py b/python/GafferSceneUITest/AttributeInspectorTest.py index 3e1e415224..2c2ab6b8e7 100644 --- a/python/GafferSceneUITest/AttributeInspectorTest.py +++ b/python/GafferSceneUITest/AttributeInspectorTest.py @@ -219,7 +219,7 @@ def testSourceAndEdits( self ) : source = s["light"]["visualiserAttributes"]["scale"], sourceType = SourceType.Other, editable=False, - nonEditableReason = "The target EditScope (editScope1) is not in the scene history." + nonEditableReason = "The target edit scope editScope1 is not in the scene history." ) # If it is in the history though, and we're told to use it, then we will. @@ -369,7 +369,7 @@ def testSourceAndEdits( self ) : source = independentAttributeTweakPlug, sourceType = SourceType.Downstream, editable = False, - nonEditableReason = "The target EditScope (editScope2) is disabled." + nonEditableReason = "The target edit scope editScope2 is disabled." ) s["editScope2"]["enabled"].setValue( True ) @@ -455,7 +455,7 @@ def testEditScopeNotInHistory( self ) : source = light["visualiserAttributes"]["scale"], sourceType = SourceType.Other, editable = False, - nonEditableReason = "The target EditScope (EditScope) is not in the scene history." + nonEditableReason = "The target edit scope EditScope is not in the scene history." ) self.__assertExpectedResult( @@ -471,7 +471,7 @@ def testEditScopeNotInHistory( self ) : source = attributeTweaks["tweaks"][0], sourceType = SourceType.Other, editable = False, - nonEditableReason = "The target EditScope (EditScope) is not in the scene history." + nonEditableReason = "The target edit scope EditScope is not in the scene history." ) def testDisabledTweaks( self ) : @@ -893,7 +893,7 @@ def testDisableEdit( self ) : inspection = self.__inspect( s["editScope1"]["out"], "/group/light", "gl:visualiser:scale", s["editScope2"] ) self.assertFalse( inspection.canDisableEdit() ) - self.assertEqual( inspection.nonDisableableReason(), "The target EditScope (editScope2) is not in the scene history." ) + self.assertEqual( inspection.nonDisableableReason(), "The target edit scope editScope2 is not in the scene history." ) inspection = self.__inspect( s["editScope2"]["out"], "/group/light", "gl:visualiser:scale", s["editScope2"] ) self.assertFalse( inspection.canDisableEdit() ) diff --git a/python/GafferSceneUITest/OptionInspectorTest.py b/python/GafferSceneUITest/OptionInspectorTest.py index aeea69f43b..016a61967e 100644 --- a/python/GafferSceneUITest/OptionInspectorTest.py +++ b/python/GafferSceneUITest/OptionInspectorTest.py @@ -162,7 +162,7 @@ def testSourceAndEdits( self ) : source = s["standardOptions"]["options"]["renderCamera"], sourceType = SourceType.Other, editable = False, - nonEditableReason = "The target EditScope (editScope1) is not in the scene history." + nonEditableReason = "The target edit scope editScope1 is not in the scene history." ) # If it is in the history though, and we're told to use it, then we will. @@ -285,7 +285,7 @@ def testSourceAndEdits( self ) : source = s["independentOptions"]["options"]["renderCamera"], sourceType = SourceType.Downstream, editable = False, - nonEditableReason = "The target EditScope (editScope2) is disabled." + nonEditableReason = "The target edit scope editScope2 is disabled." ) s["editScope2"]["enabled"].setValue( True ) @@ -561,7 +561,7 @@ def testRenderPassSourceAndEdits( self ) : source = s["standardOptions"]["options"]["renderCamera"], sourceType = SourceType.Other, editable = False, - nonEditableReason = "The target EditScope (editScope1) is not in the scene history." + nonEditableReason = "The target edit scope editScope1 is not in the scene history." ) # If it is in the history though, and we're told to use it, then we will. @@ -684,7 +684,7 @@ def testRenderPassSourceAndEdits( self ) : source = s["independentOptions"]["options"]["renderCamera"], sourceType = SourceType.Downstream, editable = False, - nonEditableReason = "The target EditScope (editScope2) is disabled." + nonEditableReason = "The target edit scope editScope2 is disabled." ) s["editScope2"]["enabled"].setValue( True ) @@ -967,7 +967,7 @@ def testDisableEdit( self ) : inspection = self.__inspect( s["editScope1"]["out"], "render:camera", s["editScope2"] ) self.assertFalse( inspection.canDisableEdit() ) - self.assertEqual( inspection.nonDisableableReason(), "The target EditScope (editScope2) is not in the scene history." ) + self.assertEqual( inspection.nonDisableableReason(), "The target edit scope editScope2 is not in the scene history." ) inspection = self.__inspect( s["editScope2"]["out"], "render:camera", s["editScope2"] ) self.assertFalse( inspection.canDisableEdit() ) diff --git a/python/GafferSceneUITest/ParameterInspectorTest.py b/python/GafferSceneUITest/ParameterInspectorTest.py index ea50b39a05..f37651b572 100644 --- a/python/GafferSceneUITest/ParameterInspectorTest.py +++ b/python/GafferSceneUITest/ParameterInspectorTest.py @@ -156,7 +156,7 @@ def testSourceAndEdits( self ) : self.__assertExpectedResult( self.__inspect( s["group"]["out"], "/group/light", "intensity", s["editScope1"] ), source = s["light"]["parameters"]["intensity"], sourceType = SourceType.Other, - editable = False, nonEditableReason = "The target EditScope (editScope1) is not in the scene history." + editable = False, nonEditableReason = "The target edit scope editScope1 is not in the scene history." ) # If it is in the history though, and we're told to use it, then we will. @@ -302,7 +302,7 @@ def testSourceAndEdits( self ) : self.__assertExpectedResult( self.__inspect( s["independentLightTweak"]["out"], "/group/light", "intensity", s["editScope2"] ), source = independentLightTweakPlug, sourceType = SourceType.Downstream, - editable = False, nonEditableReason = "The target EditScope (editScope2) is disabled." + editable = False, nonEditableReason = "The target edit scope editScope2 is disabled." ) s["editScope2"]["enabled"].setValue( True ) @@ -378,7 +378,7 @@ def testEditScopeNotInHistory( self ) : self.__assertExpectedResult( self.__inspect( light["out"], "/light", "exposure", editScope ), source = light["parameters"]["exposure"], sourceType = SourceType.Other, - editable = False, nonEditableReason = "The target EditScope (EditScope) is not in the scene history." + editable = False, nonEditableReason = "The target edit scope EditScope is not in the scene history." ) self.__assertExpectedResult( @@ -390,7 +390,7 @@ def testEditScopeNotInHistory( self ) : self.__assertExpectedResult( self.__inspect( shaderTweaks["out"], "/light", "exposure", editScope ), source = shaderTweaks["tweaks"][0], sourceType = SourceType.Other, - editable = False, nonEditableReason = "The target EditScope (EditScope) is not in the scene history." + editable = False, nonEditableReason = "The target edit scope EditScope is not in the scene history." ) def testAcquireEditCreateIfNecessary( self ) : @@ -467,7 +467,7 @@ def testDisableEdit( self ) : inspection = self.__inspect( s["editScope"]["out"], "/light", "exposure", s["editScope2"] ) self.assertFalse( inspection.canDisableEdit() ) - self.assertEqual( inspection.nonDisableableReason(), "The target EditScope (editScope2) is not in the scene history." ) + self.assertEqual( inspection.nonDisableableReason(), "The target edit scope editScope2 is not in the scene history." ) inspection = self.__inspect( s["editScope2"]["out"], "/light", "exposure", s["editScope2"] ) self.assertFalse( inspection.canDisableEdit() ) diff --git a/python/GafferSceneUITest/SetMembershipInspectorTest.py b/python/GafferSceneUITest/SetMembershipInspectorTest.py index dc8200ae9f..d16f991cf2 100644 --- a/python/GafferSceneUITest/SetMembershipInspectorTest.py +++ b/python/GafferSceneUITest/SetMembershipInspectorTest.py @@ -192,7 +192,7 @@ def testSourceAndEdits( self ) : source = s["plane"]["sets"], sourceType = SourceType.Other, editable = False, - nonEditableReason = "The target EditScope (editScope1) is not in the scene history." + nonEditableReason = "The target edit scope editScope1 is not in the scene history." ) # If it is in the history though, and we're told to use it, then we will. @@ -329,7 +329,7 @@ def testSourceAndEdits( self ) : source = s["independentSet"]["name"], sourceType = SourceType.Downstream, editable = False, - nonEditableReason = "The target EditScope (editScope2) is disabled." + nonEditableReason = "The target edit scope editScope2 is disabled." ) s["editScope2"]["enabled"].setValue( True ) diff --git a/src/GafferSceneUI/Inspector.cpp b/src/GafferSceneUI/Inspector.cpp index abd264dc43..8ce8c28f61 100644 --- a/src/GafferSceneUI/Inspector.cpp +++ b/src/GafferSceneUI/Inspector.cpp @@ -213,7 +213,7 @@ Inspector::ResultPtr Inspector::inspect() const if( result->editScope() && !result->m_editScopeInHistory ) { const std::string nonEditableReason = fmt::format( - "The target EditScope ({}) is not in the scene history.", + "The target edit scope {} is not in the scene history.", result->editScope()->relativeName( result->editScope()->scriptNode() ) ); result->m_editFunction = nonEditableReason; @@ -357,7 +357,7 @@ void Inspector::inspectHistoryWalk( const GafferScene::SceneAlgo::History *histo else { result->m_editFunction = fmt::format( - "The target EditScope ({}) is disabled.", + "The target edit scope {} is disabled.", editScope->relativeName( editScope->scriptNode() ) ); }