[Bf-committers] OOPS Parenting & Patch
Campbell Barton
bf-committers@blender.org
Fri, 04 Jun 2004 23:36:46 +1000
This is a multi-part message in MIME format.
--------------050809000706090901020204
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Selecting an object from OOPS didnt always make it active.
Heres a patch to make it work as it should.
--------------050809000706090901020204
Content-Type: text/plain;
name="parent_oops.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="parent_oops.txt"
Index: source/blender/src/editoops.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/editoops.c,v
retrieving revision 1.10
diff -u -r1.10 editoops.c
--- source/blender/src/editoops.c 3 Jun 2004 14:26:43 -0000 1.10
+++ source/blender/src/editoops.c 4 Jun 2004 13:16:02 -0000
@@ -111,7 +111,6 @@
while(base) {
if(base->flag != base->object->flag) {
base->flag= base->object->flag;
- set_active_base(base);
}
base= base->next;
}
@@ -430,6 +429,8 @@
void mouse_select_oops(void)
{
Oops *oops;
+ Object *ob;
+ Base *base;
extern float oopslastx, oopslasty; /* oops.c */
if(G.soops==0) return;
@@ -456,7 +457,17 @@
oops->flag |= SELECT;
}
}
-
+
+ /* Set the object active */
+ base= FIRSTBASE;
+ ob= (Object *)oops->id;
+ while(base) {
+ if(base->object == ob) {
+ set_active_base(base);
+ }
+ base= base->next;
+ }
+
oopslastx= oops->x;
oopslasty= oops->y;
--------------050809000706090901020204--