13
$\begingroup$

When I parent an object to another object with keep_transforms=True The object stays in place as expected, however I noticed that the location attribute of the child did not change.

If I zero out the location, my child object goes to the center of the world. I would expect that if I parent something with keep transforms, an inverse transform is applied to my location (location would not stay the same), I would also expect if I zero my child location attributes that the resulting position would be the same as the parents location.

There must be an extra transform offset kept somewhere which is trying to preserve the original location coordinates, basically storing the inverse that I feel should be applied to my child location as an offset attribute when I do the parenting. Where can I find info on this invisible attribute/offset?

This behavior is simply bizarre to me.

Steps to reproduce:

  1. In the default scene Add->Empty->Plain Axes
  2. set Empty location to (-2.0, 10.0, 2.0)
  3. Translate the default cube 5 in the X direction
  4. Select Cube then the Empty
  5. Object->Parent->Object->Keep Transforms
  6. Select Cube, notice Location X is still set to 5
  7. Zero out location of Cube, notice Cube goes to world center.
  8. Rotate or move Empty and the cube is no longer at the center, but has 0,0,0 for location.

Where is the extra transform stored and why is it stored at all?? If the parenting took place at world space 0,0,0 for both objects, it works as expected, but that is not convenient and seems ridiculous as a workaround.

Using Blender 2.68

$\endgroup$
10
$\begingroup$

The difference between the parent and child is stored on the child when the parent is set.

It's a matrix that can only be accessed through Python: bpy.types.Object.matrix_parent_inverse

$\endgroup$
  • $\begingroup$ Sure enough, setting the matrix to Identity it behaves as expected now. Thank you! $\endgroup$ – PolyMesh Nov 9 '13 at 1:11
  • $\begingroup$ Any idea why this is not visible in the UI? It's so hard to understand what's going on as a result of this. From a UI perspective, a completely identical pair of elements can behave differently. It's especially challenging because of the ambiguity in the "keep offset" (i.e. keeping the parent offset or the world offset). I'm having an especially difficult time positioning a newly created child on a linked element. I don't want to delete the entire parent structure just to duplicate it again, some children have positioning... ;( $\endgroup$ – shannon Dec 31 '14 at 2:50
  • $\begingroup$ What I mean, is, have you read or heard a reason why the Blender team hides this information? Otherwise, I will try to figure out how to add a feature request. $\endgroup$ – shannon Dec 31 '14 at 2:51
  • $\begingroup$ Interestingly, "Clear Parent Inverse" seemed to solve my problem in this case. I think, though, it wouldn't have if my child object hadn't been properly created at the origin, initially, due to more hidden information... $\endgroup$ – shannon Dec 31 '14 at 2:54
  • 2
    $\begingroup$ Should future searchers find this answer, there is an option to parent without inverse. By default, this operation is called "Make Parent without Inverse" and is searchable in the spacebar menu, with a default hotkey of CTRL-SHIFT-P. This sets the parent, then clears transforms on the child object, snapping it to the parent. $\endgroup$ – Italic_ Mar 3 '16 at 22:04
0
$\begingroup$

ok. i found this question when researching about an similar problem where an empty following a path (both are child of another obj) behaves unpredictable. what i found out is that you cant parent the empty just the path. thought that might help someone that has some problem like this.

-laurin

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.