1

By using

bpy.data.objects['object1'].parent = bpy.data.objects['object2']

enter image description here to parent one object to another the parented object gets a weird offset. Why does this happen and how can i fix this?

Ray Mairlot
  • 29,192
  • 11
  • 103
  • 125
froggyman
  • 503
  • 5
  • 16
  • I asked a similar question before: http://blender.stackexchange.com/questions/62897/assigning-a-parent-to-mesh-causes-mesh-to-change-location The method you are using is equivalent to assigning the parent in the "Relations" section. This causes mesh to change location. The other way is using CTRL-P to do the parenting. It looks like the Python code might be: bpy.ops.object.parent_set(...) – TTTTTTa Nov 14 '16 at 19:35
  • It would be nice if they could eliminate the 5-minute rule for editing comments on this site. Not sure the reasoning behind this. Anyway, here is a link to another questions which looks like it has an explanation to the code: http://blender.stackexchange.com/questions/26108/how-do-i-parent-objects – TTTTTTa Nov 14 '16 at 19:44
  • 3
    Possible dupe of http://blender.stackexchange.com/a/29148/15543 – batFINGER Nov 15 '16 at 10:09

0 Answers0