Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-04-27 18:29:49 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-04-27 18:29:49 +0400
commit8207e6174f0be1c054f5da3e861a4ece2ed66f83 (patch)
treeb5782f7ac89363e1db1ebb67915eb6f7433d7dce /source/blender/src/editobject.c
parentdb18b47be53d997e95f7f0d3ba796c0b1b4133b5 (diff)
Make apply size/rot take children into account (apricot request)
Diffstat (limited to 'source/blender/src/editobject.c')
-rw-r--r--source/blender/src/editobject.c14
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);
+ }
}
}
}