Add thumbnail toggle and set-all pin-display toolbar icons
Material editor toolbar gets an eye icon to hide/show node thumbnails (skips the reserved space and decode/render work, not just the visual) and a 3-dot icon that broadcasts a pin-display mode (All / Connected / Collapsed) to every node in the open material at once. The dot icon is shared with the per-node toggle via a parameterized DrawPinDisplayModeIcon, with dot radius/spacing scaled to fit the toolbar's fixed icon-button size instead of overflowing it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -169,6 +169,8 @@ private:
|
||||
bool IsPinVisible(const ShaderGraphNode& node, const std::string& pinName, bool isOutput) const;
|
||||
/// Cycles a node's display mode: All -> Connected -> Collapsed -> All.
|
||||
void CyclePinDisplayMode(const pxr::SdfPath& nodePath);
|
||||
/// Sets every node currently in m_graph to mode (toolbar "set all" button).
|
||||
void ApplyPinDisplayModeToAllNodes(PinDisplayMode mode);
|
||||
/// Authors the node's current PinDisplayOverride into USD customData via
|
||||
/// an undoable command, mirroring PersistNodePosition. No-op unless
|
||||
/// m_keepGraphNodeViewSettingsInUsd is set.
|
||||
@@ -249,6 +251,15 @@ private:
|
||||
bool m_openPinPickMenu = false;
|
||||
PendingPinPick m_pendingPinPick;
|
||||
|
||||
/// Toolbar toggle: whether node thumbnails (texture images / material
|
||||
/// shader-ball renders) are shown at all. Off skips the reserved space
|
||||
/// and the decode/render work entirely, not just the visual.
|
||||
bool m_showNodeThumbnails = true;
|
||||
/// Toolbar "set all nodes" pin-display button: the mode last broadcast
|
||||
/// to every node (and the icon/tooltip shown), independent of what any
|
||||
/// individual node is actually in after the user tweaks one by hand.
|
||||
PinDisplayMode m_toolbarPinDisplayMode = PinDisplayMode::All;
|
||||
|
||||
/// Column widths of the browser (left) and preview (right) sections,
|
||||
/// user-adjustable via the splitters between them and the canvas.
|
||||
float m_browserWidth = 220.0f;
|
||||
|
||||
Reference in New Issue
Block a user