Only search projects.blender.org
Log In
New Account
Home
My Page
Projects
Blender 2.x BF release
Summary
Activity
Tracker
SCM
Files
Blender 2.6 Bug Tracker: Browse
[#24574] setting location gained from a matrix_world.copy().translation_part() (visual loc) after constraints causes NAN in object location after python script ends
Date:
2010-11-06 22:55
Priority:
3
State:
Closed
Submitted by:
Josh Wedlake (
joshwedlake
)
Assigned to:
Campbell Barton (campbellbarton)
Category:
Python
Status:
Fixed / Closed
Relates to:
Duplicates:
Patches:
Summary:
setting location gained from a matrix_world.copy().translation_part() (visual loc) after constraints causes NAN in object location after python script ends
Detailed description
Initially thought this was a bug in my script, but I've managed to reconstruct the problem in a simple blend file and am pretty sure this is a python/mathutils/matrix bug. 2.55 beta windows 32 from blender.org.
Open the blend, select the empty, click run script until the empty disappears (some times it only takes on press of run script, sometimes its 10 or 20 before it goes).
The empty is shrinkwrap constrained to the plane with a shrinkwrap. The very short python code in the top window displays the location and the translation part of the world matrix of the active object (the empty). It copies the translation part across to the location (effectively applying the SR without deleting the modifier). The code then prints the location and the translation part of the matrix. NOTE they are now the same in the terminal and are both real numbers. Look in the 3D view and the empty has disappeared and its location in the transform panel displays (0,0,0). g-key grab the empty and note the location transform fields turn to '-1.#IO'.
Its the same effect as if I was to set the location with a vector full of 'NaN's but python has explicitly told me in the terminal that my matrix does not have 'NaN's in it and that immediately after setting the location, its value is correct, not zero and not a NaN.
If you run the script several times the print-outs in the terminal will eventually change to NaNs.
Many Thanks,
Josh
Followup
Message
Date
: 2010-11-06 23:04
Sender
:
Josh Wedlake
forget it being a python specific bug, just hit apply visual transform from the spacebar menu and the empty will disappear!
On a separate note the + and - options are missing in the UI for project mode in the shrinkwrap options.
The terminal is also chucking out the following:
uiItemPointerR: property not found: ShrinkwrapConstraint.subtarget
thanks again!
Date
: 2010-11-07 07:00
Sender
:
Campbell Barton
fixed r32908.
This bug was caused by shrinkwrap constraint dividing by zero.
Attached Files:
Name
Date
Download
bugtest.blend
2010-11-06 22:55
Download
Changes:
Field
Old Value
Date
By
Resolution
New
2010-11-07 07:00
campbellbarton
close_date
2010-11-07 07:00
2010-11-07 07:00
campbellbarton
assigned_to
none
2010-11-07 07:00
campbellbarton
status_id
Open
2010-11-07 07:00
campbellbarton
File Added
13418: bugtest.blend
2010-11-06 22:55
joshwedlake