Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-07-06 18:11:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-07-06 18:11:30 +0400
commit8a729824f454bfee6c66db1db0411ecc5fd4ad38 (patch)
tree380f40749764d28d64c1d55d86287408573cb707 /source/blender/src
parent1df2701fd78232b9f463531f1c707643d14de6cd (diff)
GameObject rayCast and rayCastTo were not setting exception strings (causes return without exception set error)
Also made game state buttons only have a dot in states that have controllers in them.
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/buttons_logic.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c
index cb09f947f3c..1a9e1030688 100644
--- a/source/blender/src/buttons_logic.c
+++ b/source/blender/src/buttons_logic.c
@@ -3126,6 +3126,8 @@ void logic_buts(void)
ob= OBACT;
for(a=0; a<count; a++) {
+ unsigned int controller_state_mask = 0; /* store a bitmask for states that are used */
+
ob= (Object *)idar[a];
uiClearButLock();
uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
@@ -3150,6 +3152,7 @@ void logic_buts(void)
act = cont->links[iact];
act->flag |= ACT_LINKED;
}
+ controller_state_mask |= cont->state_mask;
cont = cont->next;
}
@@ -3164,11 +3167,11 @@ void logic_buts(void)
for (offset=0; offset<15; offset+=5) {
uiBlockBeginAlign(block);
for (stbit=0; stbit<5; stbit++) {
- but = uiDefButBitI(block, BUT_TOGDUAL, 1<<(stbit+offset), stbit+offset, "", (short)(xco+35+12*stbit+13*offset), yco, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset)));
+ but = uiDefButBitI(block, controller_state_mask&(1<<(stbit+offset)) ? BUT_TOGDUAL:TOG, 1<<(stbit+offset), stbit+offset, "", (short)(xco+35+12*stbit+13*offset), yco, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset)));
uiButSetFunc(but, check_object_state, but, &(ob->state));
}
for (stbit=0; stbit<5; stbit++) {
- but = uiDefButBitI(block, BUT_TOGDUAL, 1<<(stbit+offset+15), stbit+offset+15, "", (short)(xco+35+12*stbit+13*offset), yco-12, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset+15)));
+ but = uiDefButBitI(block, controller_state_mask&(1<<(stbit+offset)) ? BUT_TOGDUAL:TOG, 1<<(stbit+offset+15), stbit+offset+15, "", (short)(xco+35+12*stbit+13*offset), yco-12, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset+15)));
uiButSetFunc(but, check_object_state, but, &(ob->state));
}
}