Refactoring: Nodes: Dynamic declaration for dynamically-typed nodes #113553
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.
Dependencies
No dependencies set.
Reference: blender/blender#113553
Loading…
Reference in New Issue
No description provided.
Delete Branch "mod_moder/blender:refacoring_node_declarations"
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?
Refactoring of nodes. Replacing of declarations with all supported sockets by dynamic declarations.
All dynamically-typed socket is created for each node now individually. No more
_001
-like names.All hidden socket also deleted now. See: #104126.
GEO_NODE_ACCUMULATE_FIELD
GEO_NODE_CAPTURE_ATTRIBUTE
GEO_NODE_ATTRIBUTE_STATISTIC
GEO_NODE_BLUR_ATTRIBUTE
GEO_NODE_EVALUATE_AT_INDEX
GEO_NODE_EVALUATE_ON_DOMAIN
GEO_NODE_INPUT_NAMED_ATTRIBUTE
GEO_NODE_RAYCAST
GEO_NODE_SAMPLE_INDEX
GEO_NODE_SAMPLE_NEAREST_SURFACE
GEO_NODE_SAMPLE_UV_SURFACE
GEO_NODE_STORE_NAMED_ATTRIBUTE
GEO_NODE_VIEWER
Backward compatibility introduced by this commit.
See #113497 for forward compatibility.
Nice new feature: Changing the socket type does not break the link (for nodes that have changed in this pr).
@ -47,0 +32,4 @@
BaseSocketDeclarationBuilder *value_declaration = nullptr;
switch (data_type) {
case CD_PROP_FLOAT3:
value_declaration = &b.add_input<decl::Vector>("Value").default_value({1.0f, 1.0f, 1.0f});
missing
break
.WIP: Refactoring: Geometry Nodes: Dynamic declaration of node instead of update functionto WIP: Refactoring: Nodes: Dynamic declaration for dynamically-typed nodesWIP: Refactoring: Nodes: Dynamic declaration for dynamically-typed nodesto Refactoring: Nodes: Dynamic declaration for dynamically-typed nodesPlease remove the following nodes from this patch for now:
That is because those nodes are either also used by shader nodes or because they not only have the normal attribute sockets.
Also, various tests are failing currently. My guess is that this is caused by wrong versioning. An initial investigation also points at
version_geometry_nodes_extrude_smooth_propagation
.get_current_socket_identifier_for_future_socket
.@ -1796,6 +1841,23 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain)
}
}
if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 34)) {
This versioning code should be at the bottom of the file.
@ -1797,2 +1842,4 @@
}
if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 34)) {
LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) {
Don't check nodes in non-geometry-nodes trees.
Also better use a single loop over the nodes with a switch statement for the node type.
Just not sure if i want put there a long switch statement. This might be parallel though.
Using a switch statement is better. Switch statement are especially good when there are many cases.
@ -1966,0 +2013,4 @@
if (ntree->type != NTREE_GEOMETRY) {
continue;
}
versioning_node_dynamic_socket(*ntree, GEO_NODE_ACCUMULATE_FIELD, " ", " ", 1, 3);
/* This node requires the extra
totalparameter, because the
Group Indexidentifier also has a space in the name, that should not be treated as separator. */
@blender-bot build