diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-04-27 18:29:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-04-27 18:29:49 +0400 |
commit | 8207e6174f0be1c054f5da3e861a4ece2ed66f83 (patch) | |
tree | b5782f7ac89363e1db1ebb67915eb6f7433d7dce | |
parent | db18b47be53d997e95f7f0d3ba796c0b1b4133b5 (diff) |
Make apply size/rot take children into account (apricot request)
-rw-r--r-- | source/blender/src/editobject.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index cd8038e5c6e..00e709a4a54 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -3896,7 +3896,7 @@ void make_links(short event) void apply_objects_locrot( void ) { Base *base, *basact; - Object *ob; + Object *ob, *ob_child; bArmature *arm; Mesh *me; Curve *cu; @@ -3907,6 +3907,7 @@ void apply_objects_locrot( void ) float mat[3][3]; int a, change = 0; + /* first check if we can execute */ for (base= FIRSTBASE; base; base= base->next) { if TESTBASELIB(base) { @@ -4040,6 +4041,17 @@ void apply_objects_locrot( void ) BASACT= basact; change = 1; + } else { + continue; + } + + /* a change was made, adjust the children to compensate */ + for (ob_child=G.main->object.first; ob_child; ob_child=ob_child->id.next) { + if (ob_child->parent == ob) { + apply_obmat(ob_child); + what_does_parent(ob_child); + Mat4Invert(ob_child->parentinv, workob.obmat); + } } } } |