BGE Animations: Removing guards that prevent the action actuator from being used...
authorMitchell Stokes <mogurijin@gmail.com>
Wed, 1 Jun 2011 06:43:10 +0000 (06:43 +0000)
committerMitchell Stokes <mogurijin@gmail.com>
Wed, 1 Jun 2011 06:43:10 +0000 (06:43 +0000)
source/blender/editors/space_logic/logic_window.c
source/blender/makesrna/intern/rna_actuator.c
source/gameengine/Converter/KX_ConvertActuators.cpp

index bce492f5a040ae4e1ade57cc7330407599d40960..0a9a91a53afb86448b7d6404b135ec8e960867e8 100644 (file)
@@ -3679,10 +3679,6 @@ static void draw_actuator_action(uiLayout *layout, PointerRNA *ptr)
        PointerRNA settings_ptr;
        uiLayout *row;
 
-       if(ob->type != OB_ARMATURE){
-               uiItemL(layout, "Actuator only available for armatures", ICON_NONE);
-               return;
-       }
        RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr);
 
        row= uiLayoutRow(layout, 0);
index 116f5185980f613d13098d4c5b425bcb74e1345b..410822cecf89b2ab13843e58d59aac27b73952d2 100644 (file)
@@ -426,11 +426,11 @@ EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, Property
        
        if (ob != NULL) {
                if (ob->type==OB_ARMATURE) {
-                       RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_ACTION);
                        RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_ARMATURE);
                }
        }
-
+       
+       RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_ACTION);
        RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_CAMERA);
        RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_CONSTRAINT);
        RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_EDIT_OBJECT);
index 01516a24182003570860d8c16777c4068c4666cc..b8e19c9187adfb64d7a14c46249d249a74761aa6 100644 (file)
@@ -191,30 +191,26 @@ void BL_ConvertActuators(char* maggiename,
                        }
                case ACT_ACTION:
                        {
-                               if (blenderobject->type==OB_ARMATURE){
-                                       bActionActuator* actact = (bActionActuator*) bact->data;
-                                       STR_String propname = (actact->name ? actact->name : "");
-                                       STR_String propframe = (actact->frameProp ? actact->frameProp : "");
+                               bActionActuator* actact = (bActionActuator*) bact->data;
+                               STR_String propname = (actact->name ? actact->name : "");
+                               STR_String propframe = (actact->frameProp ? actact->frameProp : "");
                                        
-                                       BL_ActionActuator* tmpbaseact = new BL_ActionActuator(
-                                               gameobj,
-                                               propname,
-                                               propframe,
-                                               actact->sta,
-                                               actact->end,
-                                               actact->act,
-                                               actact->type, // + 1, because Blender starts to count at zero,
-                                               actact->blendin,
-                                               actact->priority,
-                                               actact->end_reset,
-                                               actact->stridelength
-                                               // Ketsji at 1, because zero is reserved for "NoDef"
-                                               );
-                                       baseact= tmpbaseact;
-                                       break;
-                               }
-                               else
-                                       printf ("Discarded action actuator from non-armature object [%s]\n", blenderobject->id.name+2);
+                               BL_ActionActuator* tmpbaseact = new BL_ActionActuator(
+                                       gameobj,
+                                       propname,
+                                       propframe,
+                                       actact->sta,
+                                       actact->end,
+                                       actact->act,
+                                       actact->type, // + 1, because Blender starts to count at zero,
+                                       actact->blendin,
+                                       actact->priority,
+                                       actact->end_reset,
+                                       actact->stridelength
+                                       // Ketsji at 1, because zero is reserved for "NoDef"
+                                       );
+                               baseact= tmpbaseact;
+                               break;
                        }
                case ACT_SHAPEACTION:
                        {