diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-06-25 18:09:15 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-06-25 18:09:15 +0400 |
commit | c353af4d3a1ce51125b81f023c8725855906601e (patch) | |
tree | e963d26a92a22fca39f4cee7939d3312d8d76371 /source/blender | |
parent | 7ba2389932dd54468b0e8ded17bea9e272c92304 (diff) |
BGE patch 15044 approved: Edit Object Dynamics Actuator.
Add enable/disable dynamics actuator under the "Edit Object" category.
The Enable/disable rigid body option is also availale but not implemented.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesdna/DNA_actuator_types.h | 9 | ||||
-rw-r--r-- | source/blender/src/buttons_logic.c | 11 |
2 files changed, 14 insertions, 6 deletions
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 3f08ea05705..20316f26804 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -81,7 +81,7 @@ typedef struct bEditObjectActuator { char name[32]; float linVelocity[3]; /* initial lin. velocity on creation */ short localflag; /* flag for the lin. vel: apply locally */ - short pad; + short dyn_operation; } bEditObjectActuator; typedef struct bSceneActuator { @@ -360,10 +360,11 @@ typedef struct FreeCamera { /* editObjectActuator->type */ #define ACT_EDOB_ADD_OBJECT 0 #define ACT_EDOB_END_OBJECT 1 -#define ACT_EDOB_REPLACE_MESH 2 +#define ACT_EDOB_REPLACE_MESH 2 #define ACT_EDOB_TRACK_TO 3 -#define ACT_EDOB_MAKE_CHILD 4 -#define ACT_EDOB_END_CHILD 5 +#define ACT_EDOB_DYNAMICS 4 + + /* editObjectActuator->flag */ #define ACT_TRACK_3D 1 diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index ec85952a2f8..6cdc1d9b7c1 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -1940,8 +1940,15 @@ static short draw_actuatorbuttons(Object *ob, bActuator *act, uiBlock *block, sh uiDefButI(block, NUM, 0, "Time:", xco+10+(width-20)/2, yco-44, (width-20)/2-40, 19, &eoa->time, 0.0, 2000.0, 0, 0, "Duration the tracking takes"); uiDefButS(block, TOG, 0, "3D", xco+width-50, yco-44, 40, 19, &eoa->flag, 0.0, 0.0, 0, 0, "Enable 3D tracking"); } - - str= "Edit Object %t|Add Object %x0|End Object %x1|Replace Mesh %x2|Track to %x3"; + else if(eoa->type==ACT_EDOB_DYNAMICS) { + ysize= 48; + glRects(xco, yco-ysize, xco+width, yco); + uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1); + + str= "Dynamic Operation %t|Restore Dynamics %x0|Suspend Dynamics %x1|Enable Rigid Body %x2|Disable Rigid Body %x3"; + uiDefButS(block, MENU, B_REDR, str, xco+40, yco-44, (width-80), 19, &(eoa->dyn_operation), 0.0, 0.0, 0, 0, ""); + } + str= "Edit Object %t|Add Object %x0|End Object %x1|Replace Mesh %x2|Track to %x3|Dynamics %x4"; uiDefButS(block, MENU, B_REDR, str, xco+40, yco-24, (width-80), 19, &eoa->type, 0.0, 0.0, 0, 0, ""); yco-= ysize; |