[#22831] transform problem with hidden parent object
authorMartin Poirier <theeth@yahoo.com>
Sat, 14 Aug 2010 17:11:10 +0000 (17:11 +0000)
committerMartin Poirier <theeth@yahoo.com>
Sat, 14 Aug 2010 17:11:10 +0000 (17:11 +0000)
Partial fix. It now checks if selected parents are modifiable (due to the look up for base, this could get slow, but no other good way to do it).

source/blender/editors/transform/transform_conversions.c

index a82037ead114f19b1079c41edee0aafa97485199..fa0a9f7f832232f67056397cc4b9965cd0a55c01 100644 (file)
@@ -4371,7 +4371,11 @@ static void set_trans_object_base_flags(bContext *C, TransInfo *t)
 
                        /* if parent selected, deselect */
                        while(parsel) {
-                               if(parsel->flag & SELECT) break;
+                               if(parsel->flag & SELECT) {
+                                       Base *parbase = object_in_scene(parsel, scene);
+                                       if TESTBASELIB_BGMODE(v3d, scene, parbase)
+                                                       break;
+                               }
                                parsel= parsel->parent;
                        }