Object.dimensions doesn't support shortshands (e.g. *=) #36958
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#36958
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?
%%%--- Blender version with error, and version that worked ---
r60402
bpy.context.object.dimensions = bpy.context.object.dimensions * 3 # works
bpy.context.object.dimensions *= 3 # does nothing%%%
Changed status to: 'Open'
%%%Guess that one is for Campbell too… ;)%%%
%%%Whats happening is 'dimensions' works in quite a strange way.
Dimensions reads from the object matrix, but sets the object scale.
So writing if the vector is set, then immediately read, the read value will remain unchanged.
This causes a problem for in-place multiplication since the vector is written to once for the in place multiplication, but read again for the attribute assignment.
Attached a workaround when skips the assignment if an RNA variable is assigned to its self, however I don't think its acceptable.
IMHO dimensions shouldn't even be an RNA attribute, it was only added for the interface and has problems with the order values are set in too - perhaps this could be redone in C and the rna attribute removed.%%%
Changed status from 'Open' to: 'Archived'
This is weak design on blenders part, but not going to change, I would say fix is to remove
dimensions
but probably this would annoy script authors too.closing (wontfix)