Skip to content

Commit

Permalink
Merge pull request #6177 from murraystevenson/renderPassMenu
Browse files Browse the repository at this point in the history
Render Pass Menu
  • Loading branch information
johnhaddon authored Jan 17, 2025
2 parents e32af24 + 742eb0d commit 867c9cc
Show file tree
Hide file tree
Showing 16 changed files with 843 additions and 72 deletions.
8 changes: 8 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Features
--------

- PrimitiveVariableTweaks : Added node for tweaking primitive variables. Can affect just part of a primitive based on ids or a mask.
- Menu Bar : Added a "Render Pass" menu to the Menu Bar that can be used to choose the current render pass from those provided by the focus node.

Improvements
------------
Expand All @@ -17,6 +18,12 @@ Improvements
- The shading mode menu icon now updates to indicate when a non-default shading mode is in use.
- Added the ability to toggle between default shading and the last selected shading mode by <kbd>Ctrl</kbd> + clicking the shading mode menu button.
- PythonEditor : Added workaround for slow code completion caused by poorly performing Python property getters.
- PlugLayout :
- A warning widget is now displayed when an invalid custom widget is registered.
- `layout:customWidget:<name>:width` and `layout:customWidget:<name>:minimumWidth` metadata registrations are now supported for custom widgets.
- RenderPassEditor :
- Render passes deleted or disabled by render adaptors registered to `client = "RenderPassWedge"` are now shown as disabled. To differentiate these from user disabled render passes, an orange dot is shown in the corner of the disabled icon and the tooltip describes them as automatically disabled.
- Changing the current render pass is now undoable.

Fixes
-----
Expand All @@ -42,6 +49,7 @@ API
- Backward compatibility is not trivial to maintain in this case.
- PlugAlgo : Added `contextSensitiveSource()` method.
- ShaderPlug : Added Python binding for `parameterSource()` method.
- ScriptNodeAlgo : Added `setCurrentRenderPass()`, `getCurrentRenderPass()`, and `acquireRenderPassPlug()` methods.

1.5.2.0 (relative to 1.5.1.0)
=======
Expand Down
11 changes: 11 additions & 0 deletions include/GafferSceneUI/ScriptNodeAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

#include "GafferScene/VisibleSet.h"

#include "Gaffer/NameValuePlug.h"
#include "Gaffer/Signals.h"

#include "IECore/PathMatcher.h"
Expand Down Expand Up @@ -112,6 +113,16 @@ GAFFERSCENEUI_API std::vector<IECore::InternedString> getLastSelectedPath( const
/// Returns a signal emitted when either the selected paths or last selected path change for `script`.
GAFFERSCENEUI_API ChangedSignal &selectedPathsChangedSignal( Gaffer::ScriptNode *script );

/// Render Passes
/// =============

/// Acquires a plug used to specify the current render pass for the script.
GAFFERSCENEUI_API Gaffer::NameValuePlug *acquireRenderPassPlug( Gaffer::ScriptNode *script, bool createIfMissing = true );
/// Sets the current render pass for the script.
GAFFERSCENEUI_API void setCurrentRenderPass( Gaffer::ScriptNode *script, std::string renderPass );
/// Returns the current render pass for the script.
GAFFERSCENEUI_API std::string getCurrentRenderPass( const Gaffer::ScriptNode *script );

} // namespace ScriptNodeAlgo

} // namespace GafferSceneUI
Loading

0 comments on commit 867c9cc

Please sign in to comment.