UI: Add Mute property to node panel #108634

Closed
Colin Basnett wants to merge 2 commits from cmbasnett/bdk-blender:add-mute-to-node-panel into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

This adds the Mute property to the Node panel. This also aligns all the properties in columns similar to other panels.

Before:

nodebeforemute.png

After:

nodeaftermute.png

This adds the `Mute` property to the Node panel. This also aligns all the properties in columns similar to other panels. Before: ![nodebeforemute.png](/attachments/ab251783-a1f2-41b3-8f76-bcf30233f424) After: ![nodeaftermute.png](/attachments/9d9d1f8d-c2a2-4ea3-aa40-8db3b5864d11)
Colin Basnett added 1 commit 2023-06-05 21:04:20 +02:00
Colin Basnett added the
Interest
Nodes & Physics
Interest
User Interface
labels 2023-06-05 21:04:42 +02:00
Colin Basnett requested review from Pablo Vazquez 2023-06-05 21:05:01 +02:00
Colin Basnett added the
Module
User Interface
label 2023-06-05 21:06:28 +02:00

Hello, i see (?) reason for this, but i really not sure if such node state should be exposed to user as button in panel. Is there use case?

Hello, i see (?) reason for this, but i really not sure if such node state should be exposed to user as button in panel. Is there use case?
Author
Member

Yes, my specific use case was that I wanted to inspect the driver on the mute property (i.e., right click, edit driver). Without this property being exposed, I had to go and manually find it in the driver editor which is not ideal.

Yes, my specific use case was that I wanted to inspect the driver on the mute property (i.e., right click, edit driver). Without this property being exposed, I had to go and manually find it in the driver editor which is not ideal.
Member

Didn't look into this much now, but it's probably worth making sure this addresses the issue from this old patch: https://archive.blender.org/developer/differential/0013/0013486/index.html

Didn't look into this much now, but it's probably worth making sure this addresses the issue from this old patch: https://archive.blender.org/developer/differential/0013/0013486/index.html
Colin Basnett changed title from UI: Add Mute property to node panel to WIP: UI: Add Mute property to node panel 2023-06-05 23:01:01 +02:00
Colin Basnett added 1 commit 2023-06-06 03:47:50 +02:00
Colin Basnett changed title from WIP: UI: Add Mute property to node panel to UI: Add Mute property to node panel 2023-06-06 03:48:08 +02:00
Author
Member

@HooglyBoogly I've added the mute_supported as a read-only property for the Node type and have hidden the mute option when muting is not allowed, as per the previous diff.

@HooglyBoogly I've added the `mute_supported` as a read-only property for the `Node` type and have hidden the `mute` option when muting is not allowed, as per the previous diff.

What's the point of animating a muted node? It sounds like commenting out the code with a flag macro...

What's the point of animating a muted node? It sounds like commenting out the code with a flag macro...
Author
Member

I am developing an add-on that provides the user a way to create a complex geometry node setup through a simpler interface.

The hide buttons here are controlling the mute property of certain nodes of the generated node tree.

I am developing an add-on that provides the user a way to create a complex geometry node setup through a simpler interface. The hide buttons here are controlling the mute property of certain nodes of the generated node tree. <video src="/attachments/612d66b7-3ccb-4a40-bcd2-663d72f0a088" title="2023-06-06 00-40-35.mp4" controls></video>
Colin Basnett requested review from Hans Goudey 2023-06-06 21:57:09 +02:00
Colin Basnett requested review from Brecht Van Lommel 2023-06-06 21:57:17 +02:00

I'm fine with the Mute property showing in the UI, but I don't know that it should be possible to animate or drive it. For two reasons:

  • In general it's the wrong solution for the use case here, as it affects all instances of a node group. It would be better to expose this as parameter of a node group. There may be limitations in the node groups that make the UI unideal right now though.
  • For optimization purposes, I would rather not allow the node graph topology to be animated or driven. If sockets are animated then for animation playback we can do optimizations to keep it interactive. However if the topology is animated that is harder, and means we may have to recompile e.g. GPU shaders from scratch every frame.

It's also unclear why an add-on would need drivers for this, as it could just run code to mute/unmute the nodes?

I'm fine with the Mute property showing in the UI, but I don't know that it should be possible to animate or drive it. For two reasons: * In general it's the wrong solution for the use case here, as it affects all instances of a node group. It would be better to expose this as parameter of a node group. There may be limitations in the node groups that make the UI unideal right now though. * For optimization purposes, I would rather not allow the node graph topology to be animated or driven. If sockets are animated then for animation playback we can do optimizations to keep it interactive. However if the topology is animated that is harder, and means we may have to recompile e.g. GPU shaders from scratch every frame. It's also unclear why an add-on would need drivers for this, as it could just run code to mute/unmute the nodes?
Author
Member

It's also unclear why an add-on would need drivers for this, as it could just run code to mute/unmute the nodes?

I was doing it more out of convenience, in that I can set & forget the driver and not have to manage a reference to the relevant node in my own property group. I could attach the driver to a socket value and it would work just as well.

I'm fine with the Mute property showing in the UI, but I don't know that it should be possible to animate or drive it. For two reasons:

  • In general it's the wrong solution for the use case here, as it affects all instances of a node group. It would be better to expose this as parameter of a node group. There may be limitations in the node groups that make the UI unideal right now though.
  • For optimization purposes, I would rather not allow the node graph topology to be animated or driven. If sockets are animated then for animation playback we can do optimizations to keep it interactive. However if the topology is animated that is harder, and means we may have to recompile e.g. GPU shaders from scratch every frame.

Yea, those are both good points. Do you think the animatable flag should be removed from the mute property? If so, I can make another PR to do just that.

> It's also unclear why an add-on would need drivers for this, as it could just run code to mute/unmute the nodes? I was doing it more out of convenience, in that I can set & forget the driver and not have to manage a reference to the relevant node in my own property group. I could attach the driver to a socket value and it would work just as well. > I'm fine with the Mute property showing in the UI, but I don't know that it should be possible to animate or drive it. For two reasons: > > * In general it's the wrong solution for the use case here, as it affects all instances of a node group. It would be better to expose this as parameter of a node group. There may be limitations in the node groups that make the UI unideal right now though. > * For optimization purposes, I would rather not allow the node graph topology to be animated or driven. If sockets are animated then for animation playback we can do optimizations to keep it interactive. However if the topology is animated that is harder, and means we may have to recompile e.g. GPU shaders from scratch every frame. Yea, those are both good points. Do you think the animatable flag should be removed from the `mute` property? If so, I can make another PR to do just that.

It seemed to me that it was rather sugar, which was needed for a quick check.
And not when I thought about his support as something that is subject to animation. Even just remote control through drivers.
If I wanted to do this, it would be a switch node just...

It seemed to me that it was rather sugar, which was needed for a quick check. And not when I thought about his support as something that is subject to animation. Even just remote control through drivers. If I wanted to do this, it would be a switch node just...

I'd be fine with a PR that disables animation/drivers for the mute property.

I'd be fine with a PR that disables animation/drivers for the mute property.
Author
Member

@brecht #108849 removes the animatable flag from the mute property.

@brecht https://projects.blender.org/blender/blender/pulls/108849 removes the animatable flag from the mute property.
Author
Member

Abandoning this since the original purpose is now moot as of #108849.

Abandoning this since the original purpose is now moot as of #108849.
Colin Basnett closed this pull request 2023-07-21 06:59:34 +02:00

Pull request closed

Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#108634
No description provided.