RNA assert: make object game state to comply with RNA_property_boolean_get_index...
authorDalai Felinto <dfelinto@gmail.com>
Mon, 13 Jul 2015 18:51:31 +0000 (15:51 -0300)
committerDalai Felinto <dfelinto@gmail.com>
Mon, 13 Jul 2015 18:52:05 +0000 (15:52 -0300)
source/blender/makesrna/intern/rna_object.c

index de39c7bc5548fe10db132ea838ead8622f123d08..67243d493a2ed9d0b477bf6df4f73f4a203a7643 100644 (file)
@@ -1134,7 +1134,7 @@ static void rna_GameObjectSettings_state_get(PointerRNA *ptr, int *values)
 
        memset(values, 0, sizeof(int) * OB_MAX_STATES);
        for (i = 0; i < OB_MAX_STATES; i++) {
-               values[i] = (ob->state & (1 << i)) | all_states;
+               values[i] = (ob->state & (1 << i)) ? 1 : 0 | all_states;
        }
 }