Fix #110562: Crash animating node property affecting socket visibility #119221

Merged
Member

For various reasons, the animation system can't properly update the node tree
so that the socket availability caused by changing node enum properties
propagates completely. So animating node properties that affect
socket visibility to change isn't possible without issues like crashes.
Unfortunately that wasn't disallowed before.


We could choose to disallow animating just the enum values that cause
crashes (sockets that cause visibility changes), or we could disallow animation
on all sockets that might be changed to cause visibility updates in the future
so users don't depend on it when it might not work. Both approaches are
"conservative" in different ways, I'm not sure which to take.

For various reasons, the animation system can't properly update the node tree so that the socket availability caused by changing node enum properties propagates completely. So animating node properties that affect socket visibility to change isn't possible without issues like crashes. Unfortunately that wasn't disallowed before. --- We could choose to disallow animating just the enum values that cause crashes (sockets that cause visibility changes), or we could disallow animation on all sockets that might be changed to cause visibility updates in the future so users don't depend on it when it might not work. Both approaches are "conservative" in different ways, I'm not sure which to take.
Hans Goudey requested review from Jacques Lucke 2024-03-08 19:36:16 +01:00
Hans Goudey added this to the Nodes & Physics project 2024-03-08 19:36:22 +01:00
Hans Goudey added the
Interest
Geometry Nodes
label 2024-03-08 19:37:07 +01:00
HooglyBoogly changed target branch from main to blender-v4.1-release 2024-03-08 19:38:55 +01:00
Hans Goudey force-pushed fix-node-socket-availability-animation from 859f09f2e2 to 18a9dc442a 2024-03-08 19:38:57 +01:00 Compare
Jacques Lucke approved these changes 2024-03-08 19:39:07 +01:00
Dismissed
Jacques Lucke left a comment
Member

I'm fine with just disabling animating enums that don't work currently.

I'm fine with just disabling animating enums that don't work currently.
Author
Member

I'm fine with just disabling animating enums that don't work currently.

To be clear, you mean just the enums that affect socket availability currently?

>I'm fine with just disabling animating enums that don't work currently. To be clear, you mean just the enums that affect socket availability currently?
Member

Can you check if there are cases that currently work even if they change socket availability?

Can you check if there are cases that currently work even if they change socket availability?
Author
Member

I don't know how it would work honestly, that would mean the socket is not "available" as far as the evaluator knows, but its value would be requested.

Currently I'm going through all the enum inputs trying to find a balance.

I don't know how it would work honestly, that would mean the socket is not "available" as far as the evaluator knows, but its value would be requested. Currently I'm going through all the enum inputs trying to find a balance.
Member

I think so too. So any enum that affects socket visibility should not be animateable right now.

I think so too. So any enum that affects socket visibility should not be animateable right now.
Hans Goudey added 1 commit 2024-03-08 20:06:07 +01:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
c9e17cf879
Reenable animating of some enums
Author
Member

@blender-bot build

@blender-bot build
Hans Goudey added 1 commit 2024-03-08 20:18:02 +01:00
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
b57018d8a5
Fix build error
Author
Member

@blender-bot build

@blender-bot build
Jacques Lucke requested changes 2024-03-10 12:55:29 +01:00
Dismissed
@ -38,6 +39,7 @@ PropertyRNA *RNA_def_node_enum(StructRNA *srna,
RNA_def_property_enum_default(prop, *default_value);
}
RNA_def_property_ui_text(prop, ui_name, ui_description);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
Member

That doesn't even check if allow_animation is set. It seems like it might be good to clear this flag on the call-site instead of inside this function.

That doesn't even check if `allow_animation` is set. It seems like it might be good to clear this flag on the call-site instead of inside this function.
Author
Member

Ah sorry, I was going back and forth a bit and forgot to check the final state. I did it in here on purpose since this is a higher level wrapper around RNA property registration and because allowing animation influences which update function is necessary.

Ah sorry, I was going back and forth a bit and forgot to check the final state. I did it in here on purpose since this is a higher level wrapper around RNA property registration and because allowing animation influences which update function is necessary.
HooglyBoogly marked this conversation as resolved
Hans Goudey added 2 commits 2024-03-11 18:54:33 +01:00
Hans Goudey added 1 commit 2024-03-11 19:18:41 +01:00
Jacques Lucke approved these changes 2024-03-11 19:20:01 +01:00
Hans Goudey merged commit dc9249c97f into blender-v4.1-release 2024-03-11 19:27:08 +01:00
Hans Goudey deleted branch fix-node-socket-availability-animation 2024-03-11 19:27:14 +01:00
Sign in to join this conversation.
No reviewers
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 Assignees
2 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#119221
No description provided.