Advertisement
Guest User

Patch for Blender bug #32987 "Origin to 3D Cursor" issue

a guest
Nov 3rd, 2012
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: source/blender/editors/object/object_transform.c
  2. ===================================================================
  3. --- source/blender/editors/object/object_transform.c    (revision 51814)
  4. +++ source/blender/editors/object/object_transform.c    (working copy)
  5. @@ -903,11 +903,16 @@
  6.             /* offset other selected objects */
  7.             if (do_inverse_offset && (centermode != GEOMETRY_TO_ORIGIN)) {
  8.                 CollectionPointerLink *ctx_link_other;
  9. +               float obmat[4][4];
  10.  
  11.                 /* was the object data modified
  12.                  * note: the functions above must set 'cent' */
  13. +
  14. +               /* convert the offset to parent space */
  15. +               BKE_object_to_mat4(ob, obmat);
  16.                 copy_v3_v3(centn, cent);
  17. -               mul_mat3_m4_v3(ob->obmat, centn); /* ommit translation part */
  18. +               mul_mat3_m4_v3(obmat, centn); /* omit translation part */
  19. +
  20.                 add_v3_v3(ob->loc, centn);
  21.  
  22.                 BKE_object_where_is_calc(scene, ob);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement