Refactoring: Geometry Nodes: Generalize enum source sockets #117608
No reviewers
Labels
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
2 Participants
Notifications
Due Date
No due date set.
Blocks
#117609 Geometry Nodes: Enum socket for Evaluate on Domain node
blender/blender
Reference: blender/blender#117608
Loading…
Reference in New Issue
No description provided.
Delete Branch "mod_moder/blender:tmp_refactor_enum_source"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal of this refactoring is to represent enumerations of socket via its declaration.
Instead of support some certain nodes with definition of enum in its, propagate
enum references from source sockets which is know its own enum.
Now, to add new enum definition to node ui, declaration of socket just required.
Generally i like the idea, but requested some changes/clarification.
@ -315,6 +315,9 @@ bool SocketValueVariant::valid_for_socket(eNodeSocketDatatype socket_type) const
if (kind_ == Kind::None) {
return false;
}
if (ELEM(SOCK_INT, socket_type_, socket_type) && ELEM(SOCK_MENU, socket_type_, socket_type)) {
Is this a fix for a different problem? I don't see how it's related to the enum items propagation below. Why is it here?
This was mistakenly include this change in this branch.
@ -811,3 +812,3 @@
* definition to use for menu sockets. */
for (bNode *node : ntree.toposort_right_to_left()) {
const bool node_updated = this->should_update_individual_node(ntree, *node);
// const bool node_updated = this->should_update_individual_node(ntree, *node);
This flag is currently used to avoid unnecessary updates when the node hasn't actually changed. A node tree update can happen for any number of reasons, and if the enum items haven't been changed it should not cause ripple effects by propagating "new" enum definitions. I don't see an equivalent check in the new code. Should be possible to include this after the
is_enum_source
condition?Generally, there is needed some kind flag of nodes to propagate changes state from updated node with enum-source socket.
At the current state of PR, i am not sure if such simple check is enough.
Checkout
From your project repository, check out a new branch and test the changes.