[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16665] trunk/blender/source/blender: copy object properties was crashing because of my recent changes.
Campbell Barton
ideasman42 at gmail.com
Mon Sep 22 09:17:41 CEST 2008
Revision: 16665
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16665
Author: campbellbarton
Date: 2008-09-22 09:17:39 +0200 (Mon, 22 Sep 2008)
Log Message:
-----------
copy object properties was crashing because of my recent changes. need to NULL listbase first.
changed visibility actuator menu to 3 toggle buttons and added tooltip note about outliner render restriction being used for visibility.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/object.c
trunk/blender/source/blender/src/buttons_logic.c
Modified: trunk/blender/source/blender/blenkernel/intern/object.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/object.c 2008-09-22 04:30:21 UTC (rev 16664)
+++ trunk/blender/source/blender/blenkernel/intern/object.c 2008-09-22 07:17:39 UTC (rev 16665)
@@ -1182,7 +1182,9 @@
BPY_copy_scriptlink(&ob->scriptlink);
+ obn->prop.first = obn->prop.last = NULL;
copy_properties(&obn->prop, &ob->prop);
+
copy_sensors(&obn->sensors, &ob->sensors);
copy_controllers(&obn->controllers, &ob->controllers);
copy_actuators(&obn->actuators, &ob->actuators);
Modified: trunk/blender/source/blender/src/buttons_logic.c
===================================================================
--- trunk/blender/source/blender/src/buttons_logic.c 2008-09-22 04:30:21 UTC (rev 16664)
+++ trunk/blender/source/blender/src/buttons_logic.c 2008-09-22 07:17:39 UTC (rev 16665)
@@ -1036,26 +1036,26 @@
{
/* Pulsing and frequency */
uiDefIconButBitS(block, TOG, SENS_PULSE_REPEAT, 1, ICON_DOTSUP,
- (short)(x + 10 + 0. * (w-20)), (short)(y - 19), (short)(0.15 * (w-20)), 19,
+ (short)(x + 10 + 0. * (w-20)), (short)(y - 21), (short)(0.15 * (w-20)), 19,
&sens->pulse, 0.0, 0.0, 0, 0,
"Activate TRUE level triggering (pulse mode)");
uiDefIconButBitS(block, TOG, SENS_NEG_PULSE_MODE, 1, ICON_DOTSDOWN,
- (short)(x + 10 + 0.15 * (w-20)), (short)(y - 19), (short)(0.15 * (w-20)), 19,
+ (short)(x + 10 + 0.15 * (w-20)), (short)(y - 21), (short)(0.15 * (w-20)), 19,
&sens->pulse, 0.0, 0.0, 0, 0,
"Activate FALSE level triggering (pulse mode)");
uiDefButS(block, NUM, 1, "f:",
- (short)(x + 10 + 0.3 * (w-20)), (short)(y - 19), (short)(0.275 * (w-20)), 19,
+ (short)(x + 10 + 0.3 * (w-20)), (short)(y - 21), (short)(0.275 * (w-20)), 19,
&sens->freq, 0.0, 10000.0, 0, 0,
"Delay between repeated pulses (in logic tics, 0 = no delay)");
/* value or shift? */
uiDefButS(block, TOG, 1, "Inv",
- (short)(x + 10 + 0.85 * (w-20)), (short)(y - 19), (short)(0.15 * (w-20)), 19,
+ (short)(x + 10 + 0.85 * (w-20)), (short)(y - 21), (short)(0.15 * (w-20)), 19,
&sens->invert, 0.0, 0.0, 0, 0,
"Invert the level (output) of this sensor");
uiDefButS(block, TOG, 1, "Level",
- (short)(x + 10 + 0.65 * (w-20)), (short)(y - 19), (short)(0.20 * (w-20)), 19,
+ (short)(x + 10 + 0.65 * (w-20)), (short)(y - 21), (short)(0.20 * (w-20)), 19,
&sens->level, 0.0, 0.0, 0, 0,
"Level detector, trigger controllers of new states (only applicable upon logic state transition)");
}
@@ -2355,19 +2355,25 @@
visAct = act->data;
- str= "Visibility %t|Visible %x0|Invisible %x1|Visible Recursive %x2|Invisible Recursive %x3";
-
- uiDefButI(block, MENU, B_REDR, str,
- xco + 10, yco - 24, width - 20, 19, &visAct->flag,
+ uiBlockBeginAlign(block);
+ uiDefButBitI(block, TOGN, ACT_VISIBILITY_INVISIBLE, B_REDR,
+ "Visible",
+ xco + 10, yco - 20, (width - 20)/3, 19, &visAct->flag,
0.0, 0.0, 0, 0,
- "Make the object invisible or visible.");
-/*
- uiDefButBitI(block, TOG, ACT_VISIBILITY_INVISIBLE, 0,
+ "Set the objects visible. Initialized from the objects render restriction toggle (access in the outliner)");
+ uiDefButBitI(block, TOG, ACT_VISIBILITY_INVISIBLE, B_REDR,
"Invisible",
- xco + 10, yco - 24, width - 20, 19, &visAct->flag,
+ xco + 10 + ((width - 20)/3), yco - 20, (width - 20)/3, 19, &visAct->flag,
0.0, 0.0, 0, 0,
- "Make the object invisible or visible.");
-*/
+ "Set the object invisible. Initialized from the objects render restriction toggle (access in the outliner)");
+ uiBlockEndAlign(block);
+
+ uiDefButBitI(block, TOG, ACT_VISIBILITY_RECURSIVE, B_NOP,
+ "Children",
+ xco + 10 + (((width - 20)/3)*2)+10, yco - 20, ((width - 20)/3)-10, 19, &visAct->flag,
+ 0.0, 0.0, 0, 0,
+ "Sets all the children of this object to the same visibility recursively");
+
yco-= ysize;
break;
More information about the Bf-blender-cvs
mailing list