Define name of built-in attributes #82693
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#82693
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?
Naming rule for attributes
In both cases abbreviations are to be avoided. If they eventually happen, should be lower case for the built-in attributes. For user defined attributes they can be decided on a per-case basis.
Reference
Written_Like_This
MaterialX: lowercase .e.g
materialassign, variantset
(example)Blender datablocks uses "Title Case" and PascalCase:
Built-in attributes:
density
position
radius
rotation
scale
temperature
Design presented on: https://wiki.blender.org/wiki/Source/Nodes/Modifier_Nodes#Attributes
Added subscriber: @dfelinto
Added subscriber: @pablovazquez
I think we should try to keep names shorter, since they will be used a lot in expressions.
Possibly supporting multiple names for built-in attributes. A longer, more descriptive name and a short-form version.
Proposal:
P
,position
, (alsolocation
for compatibility?)R
,rotation
(alsoorientation
,orient
for compatibility?)S
,scale
Other names we could have by default for points/particles:
age
density
temperature
N
,normal
V
,velocity
r
,radius
index
up
Added subscriber: @SteffenD
Added subscriber: @JacquesLucke
Can we get a set of rules for the names? Should the names be lower case always/usually. What about spaces? Should underscores be used instead? Do we want to enforce these rules (could be useful for expressions)?
What do we do if existing vertex groups do not follow these rules, are they just not accessible in geometry nodes?
I think giving attributes multiple names is calling for trouble. Having a single name will make things simpler. Maybe it makes sense to provide tooltips for some common attributes like P, but not sure if it is worth it.
Added subscriber: @brecht
Talked to Dalai and Bastien about this, summarizing some of the points I made:
P
,Pref
,Cd
) or a lowecase name (uv
,st
,width
,pscale
, ..)density
andtemperature
), because that is the OpenVDB convention.Personally my recommendation is not to use abbreviations at all, which makes it a choice between capitialization or all-lowercase. Either works for me, depends if we prefer to be consistent with other default Blender data names, or if we consider it harmful or helpful that geometry attributes have a distinct naming convention. If we do change it to lowercase, I'd recommend changing default uv map and vertex color names to lowercase as well.
Thanks for the feedback. I don't have a strong opinion on whether capitalization or all-lowercase should be the convention then.
Also should mention that vertex groups are capitalized and I imagine will be accessible as attributes in geometry nodes. And those names are matched with bone names for armature deform. Changing to lowercase may just be more trouble than it is worth.
The volume grids inconsistency is not great. We could also capitalize/lowercase on import/export there. For render engines that directly read OpenVDB or USD files any renaming on import/export is also a pain, but I guess they have to deal with that regardless of the convention we choose.
@pablovazquez and I came up with this proposal:
Reference
Written_Like_This
MaterialX: lowercase .e.g
materialassign, variantset
(example)Blender datablocks uses "Title Case" and PascalCase:
I'm fine with that proposal.
Added subscriber: @Sergey
Background: I was randomly pointed to this task.
Here are two easy steps to dramatically improve quality of the proposal.
Have up-to-date conclusion in the task description. Just similar to what we do for reports. Make it easy for everyone to see what's what.
Explicitly cover abbreviations. If they are unused at all, state so. If they are forbidden, state so. If there are any case when they might appear from (user attributes, for example) make explicit whether it is only first letter to be capital, or all of them (within the abbreviation).
Migrated the text to the wiki: https://wiki.blender.org/wiki/Source/Nodes/Modifier_Nodes#Attributes
@Sergey thanks for the feedback. I addressed your 1st point. For the second I feel it is a bit premature to set a rule to a case I can't even think already. So I phrased in a way that leaves some leeway for when it comes to that while covering it for built-in attributes.
Changed status from 'Needs Triage' to: 'Resolved'