svn merge -r 12937:13095 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender-staging.git] / source / blender / src / transform_conversions.c
index bc0377696e4b9762347b81d48bcb01f34cd78866..83bac0e257ccbfd33d83b2b517ddbb1db2f57fc0 100644 (file)
@@ -627,7 +627,7 @@ static void bone_children_clear_transflag(ListBase *lb)
        Bone *bone= lb->first;
        
        for(;bone;bone= bone->next) {
-               if(bone->flag & BONE_HINGE)
+               if((bone->flag & BONE_HINGE) && (bone->flag & BONE_CONNECTED))
                        bone->flag |= BONE_HINGE_CHILD_TRANSFORM;
                else
                        bone->flag &= ~BONE_TRANSFORM;
@@ -3373,19 +3373,21 @@ static void createTransObject(TransInfo *t)
 
        /* count */     
        for(base= FIRSTBASE; base; base= base->next) {
-               if TESTBASELIB(base) {
+               if TESTBASE(base) {
                        ob= base->object;
                        
                        /* store ipo keys? */
-                       if(ob->ipo && ob->ipo->showkey && (ob->ipoflag & OB_DRAWKEY)) {
+                       if (ob->id.lib == 0 && ob->ipo && ob->ipo->showkey && (ob->ipoflag & OB_DRAWKEY)) {
                                elems.first= elems.last= NULL;
                                make_ipokey_transform(ob, &elems, 1); /* '1' only selected keys */
                                
                                pushdata(&elems, sizeof(ListBase));
                                
-                               for(ik= elems.first; ik; ik= ik->next) t->total++;
+                               for(ik= elems.first; ik; ik= ik->next)
+                                       t->total++;
 
-                               if(elems.first==NULL) t->total++;
+                               if(elems.first==NULL)
+                                       t->total++;
                        }
                        else {
                                t->total++;
@@ -3403,15 +3405,20 @@ static void createTransObject(TransInfo *t)
        tx = t->ext = MEM_callocN(t->total*sizeof(TransDataExtension), "TransObExtension");
 
        for(base= FIRSTBASE; base; base= base->next) {
-               if TESTBASELIB(base) {
+               if TESTBASE(base) {
                        ob= base->object;
                        
-                       td->flag= TD_SELECTED;
+                       td->flag = TD_SELECTED;
                        td->protectflag= ob->protectflag;
                        td->ext = tx;
                        
+                       /* select linked objects, but skip them later */
+                       if (ob->id.lib != 0) {
+                               td->flag |= TD_SKIP;
+                       }
+
                        /* store ipo keys? */
-                       if(ob->ipo && ob->ipo->showkey && (ob->ipoflag & OB_DRAWKEY)) {
+                       if(ob->id.lib == 0 && ob->ipo && ob->ipo->showkey && (ob->ipoflag & OB_DRAWKEY)) {
                                
                                popfirst(&elems);       // bring back pushed listbase