Attribute Names for Multiple Domains #86206
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#86206
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
Many planned attributes can exist on multiple domains:
While the attribute system could try to automatically choose which domain based on a single name (i.e. we have multiple attributes with the same name), it's very nice to know explicitly which domain the data comes from, and many things become simpler to the user and the code when we don't try to handle the case of multiple attributes with the same name.
So we discussed using a different name for each domain. Here is one initial proposal:
normal
face_normal
corner_normal
point_index
edge_index
face_index
corner_index
It was suggested to put the domain name after the attribute name like
normal_corner
, however, the resulting combinations sound quite unnatural, and even a bit incorrect (i.e.index_edge
), so I would actually prefer not to do that.The idea with
normal
was that vertex normals are the most common, so we don't need to repeat "vertex" at the beginning of the name, just for brevity. However, I'm beginning to question that too, since vertex normals are read-only, it seems strange to emphasize them with a special name.With all that said, here is my proposal for a naming pattern for multi-domain attributes:
vertex_normal
Use the full name here, it's long but it's clearface_normal
corner_normal
point_index
Use the name of the domain, because point clouds would have "point_index" tooedge_index
face_index
corner_index
We have talked about this a few times, but I wanted to clarify the ideas and push a little bit more, because this is an important decision, attribute names are not easy to change later with versioning, and also my opinions have changed slightly.
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscribers: @HooglyBoogly, @JacquesLucke, @SimonThommes, @pablovazquez, @dfelinto
We talked about this earlier today. The team doesn't seem to have very strong opinions about the attribute names e.g. "normal" vs. "vertex_normal". But the consensus was that "vertex_normal" is okay.
Another piece of feedback is that index should not be handled as an attribute, but rather an expression. For example, if the attribute isn't displayed by the spreadsheet and it isn't stored as an attribute on the geometry data, is it really an attribute?
On the other hand, the difference is not that apparent on the user level anyway, and attribute system would be a nice shortcut to expose indices. This needs a bit more thinking though.
Added subscriber: @CharlieJolly
From a user perspective I'd like to use indices as though they were a read-only attribute but perhaps cleaner to have an Index to Attribute node? 🤔
This issue was referenced by
f117ea2624
Changed status from 'Confirmed' to: 'Resolved'