Revision: 37066 http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37066 Author: moguri Date: 2011-06-01 06:43:10 +0000 (Wed, 01 Jun 2011) Log Message: ----------- BGE Animations: Removing guards that prevent the action actuator from being used on non-armatures. Object animation works through this actuator now too. :)
Modified Paths: -------------- branches/soc-2011-pepper/source/blender/editors/space_logic/logic_window.c branches/soc-2011-pepper/source/blender/makesrna/intern/rna_actuator.c branches/soc-2011-pepper/source/gameengine/Converter/KX_ConvertActuators.cpp Modified: branches/soc-2011-pepper/source/blender/editors/space_logic/logic_window.c =================================================================== --- branches/soc-2011-pepper/source/blender/editors/space_logic/logic_window.c 2011-06-01 06:26:54 UTC (rev 37065) +++ branches/soc-2011-pepper/source/blender/editors/space_logic/logic_window.c 2011-06-01 06:43:10 UTC (rev 37066) @@ -3679,10 +3679,6 @@ 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); Modified: branches/soc-2011-pepper/source/blender/makesrna/intern/rna_actuator.c =================================================================== --- branches/soc-2011-pepper/source/blender/makesrna/intern/rna_actuator.c 2011-06-01 06:26:54 UTC (rev 37065) +++ branches/soc-2011-pepper/source/blender/makesrna/intern/rna_actuator.c 2011-06-01 06:43:10 UTC (rev 37066) @@ -426,11 +426,11 @@ 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); Modified: branches/soc-2011-pepper/source/gameengine/Converter/KX_ConvertActuators.cpp =================================================================== --- branches/soc-2011-pepper/source/gameengine/Converter/KX_ConvertActuators.cpp 2011-06-01 06:26:54 UTC (rev 37065) +++ branches/soc-2011-pepper/source/gameengine/Converter/KX_ConvertActuators.cpp 2011-06-01 06:43:10 UTC (rev 37066) @@ -191,30 +191,26 @@ } 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: { _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs