Refactoring: Geometry Nodes: Enum items identifiers based on items names #117643
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#117643
Loading…
Reference in New Issue
No description provided.
Delete Branch "mod_moder/blender:refactoring_enum_item_identifiers"
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 change is to be able to merge different enumerations by selection overlapped items.
Names of items is the way to compare them. While runtime of evaluation, identifiers of items need
to be in the same space as names, so them need to be based on the names. Names is unique in one
enumeration declaration, so name-based identifiers is unique too.
For old files, versioning code is added.
I'm not sure i understand the intention here: There is a static name
VectorSet
and the item identifier is now the index in this set rather than a fixed int. Wouldn't this pick a new identifier every time the name is changed? How does this set get initialized when loading a blend file? Does the name set keep growing during the same Blender session (static variable)? Why is this needed in the first place?Correct, identifier will be updated each time when name is changed. As i see, identifier is used only in evaluation pipeline, so its update shouldn't change something.
I missed up that part, i'll have to add initialization part to blend-read function.
Correct, not sure if this is problem, identifiers need to be used only internally, so there is should not be any problem.
Lets say we add Menu inputs for domains of different nodes. If two
Evaluate on Domain
will be connected to one group input, group interface have to display menu which is result of merging both enums as new one.This might looking trivial, but if connected enums of different nodes (with different supported domains), result enums need to contains only shared items of source definitions.
So, for example:
Points, Edges, Faces, Curves
.Points, Edges, Faces
.Points, Edges, Faces
(Curves
was not added).To simplify evaluation part, int-representation of items need to be the same in any node (and if name is use as key to check overlapping), identifier need to be based on the name. So, previous examples now looks like:
2, 6, 1, 3
.2, 6, 1
.2, 6, 1
(3
was not added).Why does the group interface have to merge these enums? In the current design, connecting different enums results in a runtime error (red links). Only one type of menu connection is supported, changing this design is opening a big can of worms.
If i understand your motivation, you want to support built-in menus as well, with the complication that sometimes nodes use subsets of the overall enum. I don't have a good solution for that yet, but i don't think storing a static name list is going to work.
Checkout
From your project repository, check out a new branch and test the changes.