Page MenuHome

'matrix_world.translation' setter is broken when parented to Curve
Open, Needs Triage by DeveloperPublic


System Information
Operating system: Mac OS
Graphics card: <irrelevant>

Blender Version
Broken: 2.80

Short description of error
Setting the translation of an object via the Python API, when parented to a curve, does not behave as expected. See the attached screenshot below:

Instead of setting the translation as expected, it seems that the translation setter is adding to the value. I believe this behavior is caused by the setter reading the curve's origin, assuming that this drives the child's location, while the child's location is actually being driven by some point along the curve.

Exact steps for others to reproduce the error

  • Open default scene
  • Add a 'Bezier Curve' object
  • Parent the default cube to the Curve, without inverse (i.e. 'Set Parent to Object (Without Inverse)')
    • the cube should have moved slightly so that it is on the end of the curve
  • Select the default cube so that it is the active object
  • In the scripting editor, type the following commands in succession:

C.object.matrix_world.translation.x = -1