[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14559] trunk/blender/source/blender/src/ editobject.c: Make apply size/rot take children into account ( apricot request)
Campbell Barton
ideasman42 at gmail.com
Sun Apr 27 16:29:49 CEST 2008
Revision: 14559
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14559
Author: campbellbarton
Date: 2008-04-27 16:29:49 +0200 (Sun, 27 Apr 2008)
Log Message:
-----------
Make apply size/rot take children into account (apricot request)
Modified Paths:
--------------
trunk/blender/source/blender/src/editobject.c
Modified: trunk/blender/source/blender/src/editobject.c
===================================================================
--- trunk/blender/source/blender/src/editobject.c 2008-04-27 11:37:57 UTC (rev 14558)
+++ trunk/blender/source/blender/src/editobject.c 2008-04-27 14:29:49 UTC (rev 14559)
@@ -3896,7 +3896,7 @@
void apply_objects_locrot( void )
{
Base *base, *basact;
- Object *ob;
+ Object *ob, *ob_child;
bArmature *arm;
Mesh *me;
Curve *cu;
@@ -3907,6 +3907,7 @@
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,7 +4041,18 @@
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);
+ }
+ }
}
}
if (change) {
More information about the Bf-blender-cvs
mailing list