Custom Properties: Add extra subtypes for float array #112583

Merged
Hans Goudey merged 2 commits from bonj/blender:extra-custom-property-subtypes into main 2023-10-05 09:43:42 +02:00
Contributor

I think these are the most useful ones that are missing.
I left out matrix because it doesn't play nice with UI, so I figure nobody making custom properties would need it.
I also left out coordinates because as far as I can tell it's the same thing as XYZ; please correct me if I'm wrong.

I think these are the most useful ones that are missing. I left out matrix because it doesn't play nice with UI, so I figure nobody making custom properties would need it. I also left out coordinates because as far as I can tell it's the same thing as XYZ; please correct me if I'm wrong.
Jorijn de Graaf added 1 commit 2023-09-19 16:05:15 +02:00
37f0e44a6d Add extra subtypes for float array
I think these are the most useful ones that are missing.
I left out matrix because it doesn't play nice with UI so I figure nobody making custom properties would need it.
I also left out coordinates because as far as I can tell it's the same thing as XYZ.
Jorijn de Graaf requested review from Campbell Barton 2023-09-19 16:07:35 +02:00
Jorijn de Graaf requested review from Hans Goudey 2023-09-19 16:07:36 +02:00

LGTM, but to help with decision making, I think it would be useful to explain in the description why these types in arrays would be useful.
It might also be useful to show in a screenshot why matrix "doesn't play nice with UI".
I also didn't understand why the fact that "coordinates" is the same as XYZ prevents this from being supported as well.

However, just adding types seems to be OK. (I don't know why we can't just support everything at once).

LGTM, but to help with decision making, I think it would be useful to explain in the description why these types in arrays would be useful. It might also be useful to show in a screenshot why matrix "doesn't play nice with UI". I also didn't understand why the fact that "coordinates" is the same as XYZ prevents this from being supported as well. However, just adding types seems to be OK. (I don't know why we can't just support everything at once).
Author
Contributor

These subtypes are used all over Blender, and are useful for custom properties for the same reason they're useful anywhere else.
Matrix looks like this in the UI: image, which isn't very useful.
Currently the list is limited to "Most useful entries of rna_enum_property_subtype_items", I suppose to avoid overwhelming the user with options.
I'd be fine with adding Coordinates and more; I only kept the list limited to stick with the current design.

These subtypes are used all over Blender, and are useful for custom properties for the same reason they're useful anywhere else. Matrix looks like this in the UI: ![image](/attachments/5bd3045f-23ef-4326-be02-6d993d74bb3f), which isn't very useful. Currently the list is limited to "Most useful entries of rna_enum_property_subtype_items", I suppose to avoid overwhelming the user with options. I'd be fine with adding Coordinates and more; I only kept the list limited to stick with the current design.
2.2 KiB
Member

Looks good. How is XYZ_LENGTH different from TRANSLATION though?

Looks good. How is `XYZ_LENGTH` different from `TRANSLATION` though?
Hans Goudey changed title from Add extra subtypes for float array to Custom Properties: Add extra subtypes for float array 2023-10-02 23:41:26 +02:00
Author
Contributor

Looks good. How is XYZ_LENGTH different from TRANSLATION though?

They're the same, but XYZ_LENGTH is used for dimensions while TRANSLATION is used for offset.
I suppose you could get rid of either, though I'm not sure which I'd choose.

> Looks good. How is `XYZ_LENGTH` different from `TRANSLATION` though? They're the same, but `XYZ_LENGTH` is used for dimensions while `TRANSLATION` is used for offset. I suppose you could get rid of either, though I'm not sure which I'd choose.
Member

Since "TRANSLATION" is exposed in the node editor, I'd prefer to use that here over "XYZ_LENGTH".

Since "TRANSLATION" is exposed in the node editor, I'd prefer to use that here over "XYZ_LENGTH".
Author
Contributor

That makes sense, I'll remove XYZ_LENGTH then.
Tomorrow because I've already shut off for the night.

That makes sense, I'll remove `XYZ_LENGTH` then. Tomorrow because I've already shut off for the night.
Jorijn de Graaf added 1 commit 2023-10-03 16:48:15 +02:00
b436d6350c Remove XYZ_LENGTH from the list
It behaves the same as TRANSLATION, and we're choosing to keep that one because geometry nodes uses it too.
Author
Contributor

@HooglyBoogly Alright done, XYZ_LENGTH is no more.

@HooglyBoogly Alright done, `XYZ_LENGTH` is no more.
Hans Goudey approved these changes 2023-10-05 09:42:37 +02:00
Hans Goudey merged commit 355a30c106 into main 2023-10-05 09:43:42 +02:00
Sign in to join this conversation.
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
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#112583
No description provided.