Blender  V2.59
rna_actuator.c
Go to the documentation of this file.
00001 /*
00002  * $Id: rna_actuator.c 37455 2011-06-13 17:08:33Z dfelinto $
00003  *
00004  * ***** BEGIN GPL LICENSE BLOCK *****
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  *
00020  * Contributor(s): Blender Foundation (2008).
00021  *
00022  * ***** END GPL LICENSE BLOCK *****
00023  */
00024 
00030 #include <stdlib.h>
00031 
00032 #include "RNA_define.h"
00033 #include "RNA_access.h"
00034 
00035 #include "rna_internal.h"
00036 #include "DNA_constraint_types.h"
00037 #include "DNA_object_types.h"
00038 #include "DNA_actuator_types.h"
00039 #include "DNA_scene_types.h" // for MAXFRAME
00040 
00041 #include "WM_types.h"
00042 
00043 #include "BLI_utildefines.h"
00044 
00045 /* Always keep in alphabetical order */
00046 EnumPropertyItem actuator_type_items[] ={
00047         {ACT_ACTION, "ACTION", 0, "Action", ""},
00048         {ACT_ARMATURE, "ARMATURE", 0, "Armature", ""},
00049         {ACT_CAMERA, "CAMERA", 0, "Camera", ""},
00050         {ACT_CONSTRAINT, "CONSTRAINT", 0, "Constraint", ""},
00051         {ACT_EDIT_OBJECT, "EDIT_OBJECT", 0, "Edit Object", ""},
00052         {ACT_IPO, "FCURVE", 0, "F-Curve", ""},
00053         {ACT_2DFILTER, "FILTER_2D", 0, "Filter 2D", ""},
00054         {ACT_GAME, "GAME", 0, "Game", ""},
00055         {ACT_MESSAGE, "MESSAGE", 0, "Message", ""},
00056         {ACT_OBJECT, "MOTION", 0, "Motion", ""},
00057         {ACT_PARENT, "PARENT", 0, "Parent", ""},
00058         {ACT_PROPERTY, "PROPERTY", 0, "Property", ""},
00059         {ACT_RANDOM, "RANDOM", 0, "Random", ""},
00060         {ACT_SCENE, "SCENE", 0, "Scene", ""},
00061         {ACT_SHAPEACTION, "SHAPE_ACTION", 0, "Shape Action", ""},
00062         {ACT_SOUND, "SOUND", 0, "Sound", ""},
00063         {ACT_STATE, "STATE", 0, "State", ""},
00064         {ACT_VISIBILITY, "VISIBILITY", 0, "Visibility", ""},
00065         {0, NULL, 0, NULL, NULL}};
00066 
00067 #ifdef RNA_RUNTIME
00068 
00069 #include "BKE_sca.h"
00070 
00071 static StructRNA* rna_Actuator_refine(struct PointerRNA *ptr)
00072 {
00073         bActuator *actuator= (bActuator*)ptr->data;
00074 
00075         switch(actuator->type) {
00076                 case ACT_ACTION:
00077                         return &RNA_ActionActuator;
00078                 case ACT_OBJECT:
00079                         return &RNA_ObjectActuator;
00080                 case ACT_IPO:
00081                         return &RNA_FCurveActuator;
00082                 case ACT_CAMERA:
00083                         return &RNA_CameraActuator;
00084                 case ACT_SOUND:
00085                         return &RNA_SoundActuator;
00086                 case ACT_PROPERTY:
00087                         return &RNA_PropertyActuator;
00088                 case ACT_CONSTRAINT:
00089                         return &RNA_ConstraintActuator;
00090                 case ACT_EDIT_OBJECT:
00091                         return &RNA_EditObjectActuator;
00092                 case ACT_SCENE:
00093                         return &RNA_SceneActuator;
00094                 case ACT_RANDOM:
00095                         return &RNA_RandomActuator;
00096                 case ACT_MESSAGE:
00097                         return &RNA_MessageActuator;
00098                 case ACT_GAME:
00099                         return &RNA_GameActuator;
00100                 case ACT_VISIBILITY:
00101                         return &RNA_VisibilityActuator;
00102                 case ACT_2DFILTER:
00103                         return &RNA_Filter2DActuator;
00104                 case ACT_PARENT:
00105                         return &RNA_ParentActuator;
00106                 case ACT_SHAPEACTION:
00107                         return &RNA_ShapeActionActuator;
00108                 case ACT_STATE:
00109                         return &RNA_StateActuator;
00110                 case ACT_ARMATURE:
00111                         return &RNA_ArmatureActuator;
00112                 default:
00113                         return &RNA_Actuator;
00114         }
00115 }
00116 
00117 static void rna_Actuator_type_set(struct PointerRNA *ptr, int value)
00118 {
00119         bActuator *act= (bActuator *)ptr->data;
00120         if (value != act->type)
00121         {
00122                 act->type = value;
00123                 init_actuator(act);
00124         }
00125 }
00126 
00127 static void rna_ConstraintActuator_type_set(struct PointerRNA *ptr, int value)
00128 {
00129         bActuator *act= (bActuator *)ptr->data;
00130         bConstraintActuator *ca= act->data;
00131         if (value != ca->type)
00132         {
00133                 ca->type = value;
00134                 switch (ca->type) {
00135                 case ACT_CONST_TYPE_ORI:
00136                         /* negative axis not supported in the orientation mode */
00137                         if (ELEM3(ca->mode, ACT_CONST_DIRNX,ACT_CONST_DIRNY, ACT_CONST_DIRNZ))
00138                                 ca->mode = ACT_CONST_NONE;
00139                         break;
00140 
00141                 case ACT_CONST_TYPE_LOC:
00142                 case ACT_CONST_TYPE_DIST:
00143                 case ACT_CONST_TYPE_FH:
00144                 default:
00145                         break;
00146                 }
00147         }
00148 }
00149 
00150 static float rna_ConstraintActuator_limitmin_get(struct PointerRNA *ptr)
00151 {
00152         bActuator *act = (bActuator*)ptr->data;
00153         bConstraintActuator *ca = act->data;
00154         float *fp;
00155 
00156         if(ca->flag & ACT_CONST_LOCX) fp= ca->minloc;
00157         else if(ca->flag & ACT_CONST_LOCY) fp= ca->minloc+1;
00158         else if(ca->flag & ACT_CONST_LOCZ) fp= ca->minloc+2;
00159         else if(ca->flag & ACT_CONST_ROTX) fp= ca->minrot;
00160         else if(ca->flag & ACT_CONST_ROTY) fp= ca->minrot+1;
00161         else fp= ca->minrot+2;
00162 
00163         return *fp;
00164 }
00165 
00166 static void rna_ConstraintActuator_limitmin_set(struct PointerRNA *ptr, float value)
00167 {
00168         bActuator *act = (bActuator*)ptr->data;
00169         bConstraintActuator *ca = act->data;
00170         float *fp;
00171 
00172         if(ca->flag & ACT_CONST_LOCX) fp= ca->minloc;
00173         else if(ca->flag & ACT_CONST_LOCY) fp= ca->minloc+1;
00174         else if(ca->flag & ACT_CONST_LOCZ) fp= ca->minloc+2;
00175         else if(ca->flag & ACT_CONST_ROTX) fp= ca->minrot;
00176         else if(ca->flag & ACT_CONST_ROTY) fp= ca->minrot+1;
00177         else fp= ca->minrot+2;
00178 
00179         *fp = value;
00180 }
00181 
00182 static float rna_ConstraintActuator_limitmax_get(struct PointerRNA *ptr)
00183 {
00184         bActuator *act = (bActuator*)ptr->data;
00185         bConstraintActuator *ca = act->data;
00186         float *fp;
00187 
00188         if(ca->flag & ACT_CONST_LOCX) fp= ca->maxloc;
00189         else if(ca->flag & ACT_CONST_LOCY) fp= ca->maxloc+1;
00190         else if(ca->flag & ACT_CONST_LOCZ) fp= ca->maxloc+2;
00191         else if(ca->flag & ACT_CONST_ROTX) fp= ca->maxrot;
00192         else if(ca->flag & ACT_CONST_ROTY) fp= ca->maxrot+1;
00193         else fp= ca->maxrot+2;
00194 
00195         return *fp;
00196 }
00197 
00198 static void rna_ConstraintActuator_limitmax_set(struct PointerRNA *ptr, float value)
00199 {
00200         bActuator *act = (bActuator*)ptr->data;
00201         bConstraintActuator *ca = act->data;
00202         float *fp;
00203 
00204         if(ca->flag & ACT_CONST_LOCX) fp= ca->maxloc;
00205         else if(ca->flag & ACT_CONST_LOCY) fp= ca->maxloc+1;
00206         else if(ca->flag & ACT_CONST_LOCZ) fp= ca->maxloc+2;
00207         else if(ca->flag & ACT_CONST_ROTX) fp= ca->maxrot;
00208         else if(ca->flag & ACT_CONST_ROTY) fp= ca->maxrot+1;
00209         else fp= ca->maxrot+2;
00210 
00211         *fp = value;
00212 }
00213 
00214 static float rna_ConstraintActuator_distance_get(struct PointerRNA *ptr)
00215 {
00216         bActuator *act = (bActuator*)ptr->data;
00217         bConstraintActuator *ca = act->data;
00218         float *fp;
00219 
00220         if(ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= ca->minloc;
00221         else if(ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= ca->minloc+1;
00222         else fp= ca->minloc+2;
00223 
00224         return *fp;
00225 }
00226 
00227 static void rna_ConstraintActuator_distance_set(struct PointerRNA *ptr, float value)
00228 {
00229         bActuator *act = (bActuator*)ptr->data;
00230         bConstraintActuator *ca = act->data;
00231         float *fp;
00232 
00233         if(ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= ca->minloc;
00234         else if(ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= ca->minloc+1;
00235         else fp= ca->minloc+2;
00236 
00237         *fp = value;
00238 }
00239 
00240 static float rna_ConstraintActuator_range_get(struct PointerRNA *ptr)
00241 {
00242         bActuator *act = (bActuator*)ptr->data;
00243         bConstraintActuator *ca = act->data;
00244         float *fp;
00245 
00246         if(ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= ca->maxloc;
00247         else if(ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= ca->maxloc+1;
00248         else fp= ca->maxloc+2;
00249 
00250         return *fp;
00251 }
00252 
00253 static void rna_ConstraintActuator_range_set(struct PointerRNA *ptr, float value)
00254 {
00255         bActuator *act = (bActuator*)ptr->data;
00256         bConstraintActuator *ca = act->data;
00257         float *fp;
00258 
00259         if(ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= ca->maxloc;
00260         else if(ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= ca->maxloc+1;
00261         else fp= ca->maxloc+2;
00262 
00263         *fp = value;
00264 }
00265 
00266 static float rna_ConstraintActuator_fhheight_get(struct PointerRNA *ptr)
00267 {
00268         bActuator *act = (bActuator*)ptr->data;
00269         bConstraintActuator *ca = act->data;
00270         float *fp;
00271 
00272         if(ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= ca->minloc;
00273         else if(ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= ca->minloc+1;
00274         else fp= ca->minloc+2;
00275 
00276         return *fp;
00277 }
00278 
00279 static void rna_ConstraintActuator_fhheight_set(struct PointerRNA *ptr, float value)
00280 {
00281         bActuator *act = (bActuator*)ptr->data;
00282         bConstraintActuator *ca = act->data;
00283         float *fp;
00284 
00285         if(ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= ca->minloc;
00286         else if(ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= ca->minloc+1;
00287         else fp= ca->minloc+2;
00288 
00289         *fp = value;
00290 }
00291 
00292 static float rna_ConstraintActuator_spring_get(struct PointerRNA *ptr)
00293 {
00294         bActuator *act = (bActuator*)ptr->data;
00295         bConstraintActuator *ca = act->data;
00296         float *fp;
00297 
00298         if(ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= ca->maxloc;
00299         else if(ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= ca->maxloc+1;
00300         else fp= ca->maxloc+2;
00301 
00302         return *fp;
00303 }
00304 
00305 static void rna_ConstraintActuator_spring_set(struct PointerRNA *ptr, float value)
00306 {
00307         bActuator *act = (bActuator*)ptr->data;
00308         bConstraintActuator *ca = act->data;
00309         float *fp;
00310 
00311         if(ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= ca->maxloc;
00312         else if(ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= ca->maxloc+1;
00313         else fp= ca->maxloc+2;
00314 
00315         *fp = value;
00316 }
00317 /* ConstraintActuator uses the same property for Material and Property.
00318    Therefore we need to clear the property when "use_material_detect" mode changes */
00319 static void rna_Actuator_constraint_detect_material_set(struct PointerRNA *ptr, int value)
00320 {
00321         bActuator *act = (bActuator*)ptr->data;
00322         bConstraintActuator *ca = act->data;
00323 
00324         short old_value = (ca->flag & ACT_CONST_MATERIAL? 1:0);
00325 
00326         if (old_value != value) {
00327                 ca->flag ^= ACT_CONST_MATERIAL;
00328                 ca->matprop[0] = '\0';
00329         }
00330 }
00331 
00332 static void rna_FcurveActuator_add_set(struct PointerRNA *ptr, int value)
00333 {
00334         bActuator *act = (bActuator *)ptr->data;
00335         bIpoActuator *ia = act->data;
00336 
00337         if(value == 1){
00338                 ia->flag &= ~ACT_IPOFORCE;
00339                 ia->flag |= ACT_IPOADD;
00340         }else
00341                 ia->flag &= ~ACT_IPOADD;
00342 }
00343 
00344 static void rna_FcurveActuator_force_set(struct PointerRNA *ptr, int value)
00345 {
00346         bActuator *act = (bActuator *)ptr->data;
00347         bIpoActuator *ia = act->data;
00348 
00349         if(value == 1){
00350                 ia->flag &= ~ACT_IPOADD;
00351                 ia->flag |= ACT_IPOFORCE;
00352         }else
00353                 ia->flag &= ~ACT_IPOFORCE;
00354 }
00355 
00356 
00357 static void rna_ObjectActuator_type_set(struct PointerRNA *ptr, int value)
00358 {
00359         bActuator *act= (bActuator *)ptr->data;
00360         bObjectActuator *oa = act->data;
00361         if (value != oa->type)
00362         {
00363                 oa->type = value;
00364                 switch (oa->type) {
00365                 case ACT_OBJECT_NORMAL:
00366                         memset(oa, 0, sizeof(bObjectActuator));
00367                         oa->flag = ACT_FORCE_LOCAL|ACT_TORQUE_LOCAL|ACT_DLOC_LOCAL|ACT_DROT_LOCAL;
00368                         oa->type = ACT_OBJECT_NORMAL;
00369                         break;
00370 
00371                 case ACT_OBJECT_SERVO:
00372                         memset(oa, 0, sizeof(bObjectActuator));
00373                         oa->flag = ACT_LIN_VEL_LOCAL;
00374                         oa->type = ACT_OBJECT_SERVO;
00375                         oa->forcerot[0] = 30.0f;
00376                         oa->forcerot[1] = 0.5f;
00377                         oa->forcerot[2] = 0.0f;
00378                         break;
00379                 }
00380         }
00381 }
00382 
00383 static void rna_ObjectActuator_integralcoefficient_set(struct PointerRNA *ptr, float value)
00384 {
00385         bActuator *act = (bActuator*)ptr->data;
00386         bObjectActuator *oa = act->data;
00387         
00388         oa->forcerot[1] = value;
00389         oa->forcerot[0] = 60.0f*oa->forcerot[1];
00390 }
00391 
00392 static void rna_StateActuator_state_set(PointerRNA *ptr, const int *values)
00393 {
00394         bActuator *act = (bActuator*)ptr->data;
00395         bStateActuator *sa = act->data;
00396 
00397         int i, tot= 0;
00398 
00399         /* ensure we always have some state selected */
00400         for(i=0; i<OB_MAX_STATES; i++)
00401                 if(values[i])
00402                         tot++;
00403         
00404         if(tot==0)
00405                 return;
00406 
00407         for(i=0; i<OB_MAX_STATES; i++) {
00408                 if(values[i]) sa->mask |= (1<<i);
00409                 else sa->mask &= ~(1<<i);
00410         }
00411 }
00412 
00413 /* Always keep in alphabetical order */
00414 EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
00415 {
00416         EnumPropertyItem *item= NULL;
00417         Object *ob= NULL;
00418         int totitem= 0;
00419         
00420         if (ptr->type==&RNA_Actuator || RNA_struct_is_a(ptr->type, &RNA_Actuator)){
00421                 ob = (Object *)ptr->id.data;
00422         } else {
00423                 /* can't use ob from ptr->id.data because that enum is also used by operators */
00424                 ob = CTX_data_active_object(C);
00425         }
00426         
00427         if (ob != NULL) {
00428                 if (ob->type==OB_ARMATURE) {
00429                         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_ACTION);
00430                         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_ARMATURE);
00431                 }
00432         }
00433 
00434         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_CAMERA);
00435         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_CONSTRAINT);
00436         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_EDIT_OBJECT);
00437         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_IPO);
00438         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_2DFILTER);
00439         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_GAME);
00440         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_MESSAGE);
00441         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_OBJECT);
00442         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_PARENT);
00443         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_PROPERTY);
00444         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_RANDOM);
00445         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_SCENE);
00446 
00447         if (ob != NULL) {
00448                 if (ob->type==OB_MESH){
00449                         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_SHAPEACTION);
00450                 }
00451         }
00452 
00453         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_SOUND);
00454         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_STATE);
00455         RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_VISIBILITY);
00456         
00457         RNA_enum_item_end(&item, &totitem);
00458         *free= 1;
00459         
00460         return item;
00461 }
00462 
00463 static void rna_Actuator_Armature_update(Main *bmain, Scene *scene, PointerRNA *ptr)
00464 {
00465         bActuator *act= (bActuator *)ptr->data;
00466         bArmatureActuator *aa = act->data;
00467         Object *ob = (Object *)ptr->id.data;
00468 
00469         char *posechannel= aa->posechannel;
00470         char *constraint= aa->constraint;
00471 
00472         /* check that bone exist in the active object */
00473         if (ob->type == OB_ARMATURE && ob->pose) {
00474                 bPoseChannel *pchan;
00475                 bPose *pose = ob->pose;
00476                 for (pchan=pose->chanbase.first; pchan; pchan=pchan->next) {
00477                         if (!strcmp(pchan->name, posechannel)) {
00478                                 /* found it, now look for constraint channel */
00479                                 bConstraint *con;
00480                                 for (con=pchan->constraints.first; con; con=con->next) {
00481                                         if (!strcmp(con->name, constraint)) {
00482                                                 /* found it, all ok */
00483                                                 return;                                         
00484                                         }
00485                                 }
00486                                 /* didn't find constraint, make empty */
00487                                 constraint[0] = 0;
00488                                 return;
00489                         }
00490                 }
00491         }
00492         /* didn't find any */
00493         posechannel[0] = 0;
00494         constraint[0] = 0;
00495 }
00496 
00497 /* note: the following set functions exists only to avoid id refcounting */
00498 static void rna_Actuator_editobject_mesh_set(PointerRNA *ptr, PointerRNA value)
00499 {
00500         bActuator *act = (bActuator *)ptr->data;
00501         bEditObjectActuator *eoa = (bEditObjectActuator *) act->data;
00502 
00503         eoa->me = value.data;
00504 }
00505 
00506 static void rna_Actuator_action_action_set(PointerRNA *ptr, PointerRNA value)
00507 {
00508         bActuator *act = (bActuator *)ptr->data;
00509         bActionActuator *aa = (bActionActuator *) act->data;
00510 
00511         aa->act = value.data;
00512 }
00513 
00514 #else
00515 
00516 void rna_def_actuator(BlenderRNA *brna)
00517 {
00518         StructRNA *srna;
00519         PropertyRNA *prop;
00520 
00521         srna= RNA_def_struct(brna, "Actuator", NULL);
00522         RNA_def_struct_ui_text(srna, "Actuator", "Actuator to apply actions in the game engine");
00523         RNA_def_struct_sdna(srna, "bActuator");
00524         RNA_def_struct_refine_func(srna, "rna_Actuator_refine");
00525 
00526         prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
00527         RNA_def_property_ui_text(prop, "Name", "");
00528         RNA_def_struct_name_property(srna, prop);
00529 
00530         prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
00531         RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
00532         RNA_def_property_enum_items(prop, actuator_type_items);
00533         RNA_def_property_enum_funcs(prop, NULL, "rna_Actuator_type_set", "rna_Actuator_type_itemf");
00534         RNA_def_property_ui_text(prop, "Type", "");
00535 
00536         prop= RNA_def_property(srna, "pin", PROP_BOOLEAN, PROP_NONE);
00537         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_PIN);
00538         RNA_def_property_ui_text(prop, "Pinned", "Display when not linked to a visible states controller");
00539         RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
00540         RNA_def_property_update(prop, NC_LOGIC, NULL);
00541 
00542         prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
00543         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SHOW);
00544         RNA_def_property_ui_text(prop, "Expanded", "Set actuator expanded in the user interface");
00545         RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
00546 
00547         RNA_api_actuator(srna);
00548 }
00549 
00550 static void rna_def_action_actuator(BlenderRNA *brna)
00551 {
00552         StructRNA *srna;
00553         PropertyRNA *prop;
00554 
00555         static EnumPropertyItem prop_type_items[] ={
00556                 {ACT_ACTION_PLAY, "PLAY", 0, "Play", ""},
00557                 {ACT_ACTION_PINGPONG, "PINGPONG", 0, "Ping Pong", ""},
00558                 {ACT_ACTION_FLIPPER, "FLIPPER", 0, "Flipper", ""},
00559                 {ACT_ACTION_LOOP_STOP, "LOOPSTOP", 0, "Loop Stop", ""},
00560                 {ACT_ACTION_LOOP_END, "LOOPEND", 0, "Loop End", ""},
00561                 {ACT_ACTION_FROM_PROP, "PROPERTY", 0, "Property", ""},
00562 #ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
00563                 {ACT_ACTION_MOTION, "MOTION", 0, "Displacement", ""},
00564 #endif
00565                 {0, NULL, 0, NULL, NULL}};
00566 
00567         srna= RNA_def_struct(brna, "ActionActuator", "Actuator");
00568         RNA_def_struct_ui_text(srna, "Action Actuator", "Actuator to control the object movement");
00569         RNA_def_struct_sdna_from(srna, "bActionActuator", "data");
00570 
00571         prop= RNA_def_property(srna, "play_mode", PROP_ENUM, PROP_NONE);
00572         RNA_def_property_enum_sdna(prop, NULL, "type");
00573         RNA_def_property_enum_items(prop, prop_type_items);
00574         RNA_def_property_ui_text(prop, "Action Type", "Action playback type");
00575         RNA_def_property_update(prop, NC_LOGIC, NULL);
00576 
00577         prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
00578         RNA_def_property_pointer_sdna(prop, NULL, "act");
00579         RNA_def_property_struct_type(prop, "Action");
00580         RNA_def_property_flag(prop, PROP_EDITABLE);
00581         RNA_def_property_ui_text(prop, "Action", "");
00582         /* note: custom set function is ONLY to avoid rna setting a user for this. */
00583         RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_action_action_set", NULL, NULL);
00584         RNA_def_property_update(prop, NC_LOGIC, NULL);
00585 
00586         prop= RNA_def_property(srna, "use_continue_last_frame", PROP_BOOLEAN, PROP_NONE);
00587         RNA_def_property_boolean_negative_sdna(prop, NULL, "end_reset", 1);
00588         RNA_def_property_ui_text(prop, "Continue", "Restore last frame when switching on/off, otherwise play from the start each time");
00589         RNA_def_property_update(prop, NC_LOGIC, NULL);
00590         
00591         prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
00592         RNA_def_property_string_sdna(prop, NULL, "name");
00593         RNA_def_property_ui_text(prop, "Property", "Use this property to define the Action position");
00594         RNA_def_property_update(prop, NC_LOGIC, NULL);
00595 
00596         prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
00597         RNA_def_property_float_sdna(prop, NULL, "sta");
00598         RNA_def_property_ui_range(prop, 0.0, MAXFRAME, 100, 2);
00599         RNA_def_property_ui_text(prop, "Start Frame", "");
00600         RNA_def_property_update(prop, NC_LOGIC, NULL);
00601 
00602         prop= RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE);
00603         RNA_def_property_float_sdna(prop, NULL, "end");
00604         RNA_def_property_ui_range(prop, 0.0, MAXFRAME, 100, 2);
00605         RNA_def_property_ui_text(prop, "End Frame", "");
00606         RNA_def_property_update(prop, NC_LOGIC, NULL);
00607 
00608         prop= RNA_def_property(srna, "frame_blend_in", PROP_INT, PROP_NONE);
00609         RNA_def_property_int_sdna(prop, NULL, "blendin");
00610         RNA_def_property_range(prop, 0, 32767);
00611         RNA_def_property_ui_text(prop, "Blendin", "Number of frames of motion blending");
00612         RNA_def_property_update(prop, NC_LOGIC, NULL);
00613 
00614         prop= RNA_def_property(srna, "priority", PROP_INT, PROP_NONE);
00615         RNA_def_property_range(prop, 0, 100);
00616         RNA_def_property_ui_text(prop, "Priority", "Execution priority - lower numbers will override actions with higher numbers. With 2 or more actions at once, the overriding channels must be lower in the stack");
00617         RNA_def_property_update(prop, NC_LOGIC, NULL);
00618 
00619         prop= RNA_def_property(srna, "frame_property", PROP_STRING, PROP_NONE);
00620         RNA_def_property_string_sdna(prop, NULL, "frameProp");
00621         RNA_def_property_ui_text(prop, "Frame Property", "Assign the action's current frame number to this property");
00622         RNA_def_property_update(prop, NC_LOGIC, NULL);
00623 
00624 #ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
00625         prop= RNA_def_property(srna, "stride_length", PROP_FLOAT, PROP_NONE);
00626         RNA_def_property_float_sdna(prop, NULL, "stridelength");
00627         RNA_def_property_range(prop, 0.0, 2500.0);
00628         RNA_def_property_ui_text(prop, "Cycle", "Distance covered by a single cycle of the action");
00629         RNA_def_property_update(prop, NC_LOGIC, NULL);
00630 #endif
00631 }
00632 
00633 static void rna_def_object_actuator(BlenderRNA *brna)
00634 {
00635         StructRNA *srna;
00636         PropertyRNA* prop;
00637 
00638         static EnumPropertyItem prop_type_items[] ={
00639                 {ACT_OBJECT_NORMAL, "OBJECT_NORMAL", 0, "Simple Motion", ""},
00640                 {ACT_OBJECT_SERVO, "OBJECT_SERVO", 0, "Servo Control", ""},
00641                 {0, NULL, 0, NULL, NULL}};
00642 
00643         srna= RNA_def_struct(brna, "ObjectActuator", "Actuator");
00644         RNA_def_struct_ui_text(srna, "Motion Actuator", "Actuator to control the object movement");
00645         RNA_def_struct_sdna_from(srna, "bObjectActuator", "data");
00646 
00647 
00648         prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
00649         RNA_def_property_enum_sdna(prop, NULL, "type");
00650         RNA_def_property_enum_items(prop, prop_type_items);
00651         RNA_def_property_enum_funcs(prop, NULL, "rna_ObjectActuator_type_set", NULL);
00652         RNA_def_property_ui_text(prop, "Motion Type", "Specify the motion system");
00653         RNA_def_property_update(prop, NC_LOGIC, NULL);
00654         
00655         prop= RNA_def_property(srna, "reference_object", PROP_POINTER, PROP_NONE);
00656         RNA_def_property_struct_type(prop, "Object");
00657         RNA_def_property_pointer_sdna(prop, NULL, "reference");
00658         RNA_def_property_flag(prop, PROP_EDITABLE);
00659         RNA_def_property_ui_text(prop, "Reference Object", "Reference object for velocity calculation, leave empty for world reference");
00660         RNA_def_property_update(prop, NC_LOGIC, NULL);
00661         
00662         prop= RNA_def_property(srna, "damping", PROP_INT, PROP_NONE);
00663         RNA_def_property_ui_range(prop, 0, 1000, 1, 1);
00664         RNA_def_property_ui_text(prop, "Damping Frames", "Number of frames to reach the target velocity");
00665         RNA_def_property_update(prop, NC_LOGIC, NULL);
00666 
00667         prop= RNA_def_property(srna, "proportional_coefficient", PROP_FLOAT, PROP_NONE);
00668         RNA_def_property_float_sdna(prop, NULL, "forcerot[0]");
00669         RNA_def_property_ui_range(prop, 0.0, 200.0, 10, 2);
00670         RNA_def_property_ui_text(prop, "Proportional Coefficient", "Typical value is 60x integral coefficient");
00671         RNA_def_property_update(prop, NC_LOGIC, NULL);
00672 
00673         prop= RNA_def_property(srna, "integral_coefficient", PROP_FLOAT, PROP_NONE);
00674         RNA_def_property_float_sdna(prop, NULL, "forcerot[1]");
00675         RNA_def_property_ui_range(prop, 0.0, 3.0, 10, 2);
00676         RNA_def_property_float_funcs(prop, NULL, "rna_ObjectActuator_integralcoefficient_set", NULL);
00677         RNA_def_property_ui_text(prop, "Integral Coefficient", "Low value (0.01) for slow response, high value (0.5) for fast response");
00678         RNA_def_property_update(prop, NC_LOGIC, NULL);
00679 
00680         prop= RNA_def_property(srna, "derivate_coefficient", PROP_FLOAT, PROP_NONE);
00681         RNA_def_property_float_sdna(prop, NULL, "forcerot[2]");
00682         RNA_def_property_ui_range(prop, -100.0, 100.0, 10, 2);
00683         RNA_def_property_ui_text(prop, "Derivate Coefficient", "Not required, high values can cause instability");
00684         RNA_def_property_update(prop, NC_LOGIC, NULL);
00685 
00686         /* Servo Limit */
00687         prop= RNA_def_property(srna, "force_max_x", PROP_FLOAT, PROP_NONE);
00688         RNA_def_property_float_sdna(prop, NULL, "dloc[0]");
00689         RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
00690         RNA_def_property_ui_text(prop, "Max", "Set the upper limit for force");
00691         RNA_def_property_update(prop, NC_LOGIC, NULL);
00692 
00693         prop= RNA_def_property(srna, "force_min_x", PROP_FLOAT, PROP_NONE);
00694         RNA_def_property_float_sdna(prop, NULL, "drot[0]");
00695         RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
00696         RNA_def_property_ui_text(prop, "Min", "Set the lower limit for force");
00697         RNA_def_property_update(prop, NC_LOGIC, NULL);
00698 
00699         prop= RNA_def_property(srna, "force_max_y", PROP_FLOAT, PROP_NONE);
00700         RNA_def_property_float_sdna(prop, NULL, "dloc[1]");
00701         RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
00702         RNA_def_property_ui_text(prop, "Max", "Set the upper limit for force");
00703         RNA_def_property_update(prop, NC_LOGIC, NULL);
00704 
00705         prop= RNA_def_property(srna, "force_min_y", PROP_FLOAT, PROP_NONE);
00706         RNA_def_property_float_sdna(prop, NULL, "drot[1]");
00707         RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
00708         RNA_def_property_ui_text(prop, "Min", "Set the lower limit for force");
00709         RNA_def_property_update(prop, NC_LOGIC, NULL);
00710 
00711         prop= RNA_def_property(srna, "force_max_z", PROP_FLOAT, PROP_NONE);
00712         RNA_def_property_float_sdna(prop, NULL, "dloc[2]");
00713         RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
00714         RNA_def_property_ui_text(prop, "Max", "Set the upper limit for force");
00715         RNA_def_property_update(prop, NC_LOGIC, NULL);
00716 
00717         prop= RNA_def_property(srna, "force_min_z", PROP_FLOAT, PROP_NONE);
00718         RNA_def_property_float_sdna(prop, NULL, "drot[2]");
00719         RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
00720         RNA_def_property_ui_text(prop, "Min", "Set the lower limit for force");
00721         RNA_def_property_update(prop, NC_LOGIC, NULL);
00722 
00723         /* floats 3 Arrays*/
00724         prop= RNA_def_property(srna, "offset_location", PROP_FLOAT, PROP_XYZ);
00725         RNA_def_property_float_sdna(prop, NULL, "dloc");
00726         RNA_def_property_array(prop, 3);
00727         RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
00728         RNA_def_property_ui_text(prop, "Loc", "Sets the location");
00729         RNA_def_property_update(prop, NC_LOGIC, NULL);
00730 
00731         prop= RNA_def_property(srna, "offset_rotation", PROP_FLOAT, PROP_EULER);
00732         RNA_def_property_float_sdna(prop, NULL, "drot");
00733         RNA_def_property_array(prop, 3);
00734         RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
00735         RNA_def_property_ui_text(prop, "Rot", "Sets the rotation");
00736         RNA_def_property_update(prop, NC_LOGIC, NULL);
00737 
00738         prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_XYZ);
00739         RNA_def_property_float_sdna(prop, NULL, "forceloc");
00740         RNA_def_property_array(prop, 3);
00741         RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
00742         RNA_def_property_ui_text(prop, "Force", "Sets the force");
00743         RNA_def_property_update(prop, NC_LOGIC, NULL);
00744 
00745         prop= RNA_def_property(srna, "torque", PROP_FLOAT, PROP_XYZ);
00746         RNA_def_property_float_sdna(prop, NULL, "forcerot");
00747         RNA_def_property_array(prop, 3);
00748         RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
00749         RNA_def_property_ui_text(prop, "Torque", "Sets the torque");
00750         RNA_def_property_update(prop, NC_LOGIC, NULL);
00751 
00752         prop= RNA_def_property(srna, "linear_velocity", PROP_FLOAT, PROP_XYZ);
00753         RNA_def_property_float_sdna(prop, NULL, "linearvelocity");
00754         RNA_def_property_array(prop, 3);
00755         RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
00756         RNA_def_property_ui_text(prop, "Linear Velocity", "Sets the linear velocity (in Servo mode it sets the target relative linear velocity, it will be achieved by automatic application of force. Null velocity is a valid target)");
00757         RNA_def_property_update(prop, NC_LOGIC, NULL);
00758 
00759         prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_XYZ);
00760         RNA_def_property_float_sdna(prop, NULL, "angularvelocity");
00761         RNA_def_property_array(prop, 3);
00762         RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
00763         RNA_def_property_ui_text(prop, "Angular Velocity", "Sets the angular velocity");
00764         RNA_def_property_update(prop, NC_LOGIC, NULL);
00765         
00766         /* booleans */
00767         prop= RNA_def_property(srna, "use_local_location", PROP_BOOLEAN, PROP_NONE);
00768         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_DLOC_LOCAL);
00769         RNA_def_property_ui_text(prop, "L", "Location is defined in local coordinates");
00770         RNA_def_property_update(prop, NC_LOGIC, NULL);
00771 
00772         prop= RNA_def_property(srna, "use_local_rotation", PROP_BOOLEAN, PROP_NONE);
00773         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_DROT_LOCAL);
00774         RNA_def_property_ui_text(prop, "L", "Rotation is defined in local coordinates");
00775         RNA_def_property_update(prop, NC_LOGIC, NULL);
00776 
00777         prop= RNA_def_property(srna, "use_local_force", PROP_BOOLEAN, PROP_NONE);
00778         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_FORCE_LOCAL);
00779         RNA_def_property_ui_text(prop, "L", "Force is defined in local coordinates");
00780         RNA_def_property_update(prop, NC_LOGIC, NULL);
00781 
00782         prop= RNA_def_property(srna, "use_local_torque", PROP_BOOLEAN, PROP_NONE);
00783         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_TORQUE_LOCAL);
00784         RNA_def_property_ui_text(prop, "L", "Torque is defined in local coordinates");
00785         RNA_def_property_update(prop, NC_LOGIC, NULL);
00786 
00787         prop= RNA_def_property(srna, "use_local_linear_velocity", PROP_BOOLEAN, PROP_NONE);
00788         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_LIN_VEL_LOCAL);
00789         RNA_def_property_ui_text(prop, "L", "Velocity is defined in local coordinates");
00790         RNA_def_property_update(prop, NC_LOGIC, NULL);
00791 
00792         prop= RNA_def_property(srna, "use_local_angular_velocity", PROP_BOOLEAN, PROP_NONE);
00793         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_ANG_VEL_LOCAL);
00794         RNA_def_property_ui_text(prop, "L", "Angular velocity is defined in local coordinates");
00795         RNA_def_property_update(prop, NC_LOGIC, NULL);
00796 
00797         prop= RNA_def_property(srna, "use_add_linear_velocity", PROP_BOOLEAN, PROP_NONE);
00798         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_ADD_LIN_VEL);
00799         RNA_def_property_ui_text(prop, "Add", "Toggles between ADD and SET linV");
00800         RNA_def_property_update(prop, NC_LOGIC, NULL);
00801 
00802         prop= RNA_def_property(srna, "use_servo_limit_x", PROP_BOOLEAN, PROP_NONE);
00803         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SERVO_LIMIT_X);
00804         RNA_def_property_ui_text(prop, "X", "Set limit to force along the X axis");
00805         RNA_def_property_update(prop, NC_LOGIC, NULL);
00806 
00807         prop= RNA_def_property(srna, "use_servo_limit_y", PROP_BOOLEAN, PROP_NONE);
00808         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SERVO_LIMIT_Y);
00809         RNA_def_property_ui_text(prop, "Y", "Set limit to force along the Y axis");
00810         RNA_def_property_update(prop, NC_LOGIC, NULL);
00811 
00812         prop= RNA_def_property(srna, "use_servo_limit_z", PROP_BOOLEAN, PROP_NONE);
00813         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SERVO_LIMIT_Z);
00814         RNA_def_property_ui_text(prop, "Z", "Set limit to force along the Z axis");
00815         RNA_def_property_update(prop, NC_LOGIC, NULL);
00816 }
00817 
00818 static void rna_def_fcurve_actuator(BlenderRNA *brna)
00819 {
00820         StructRNA *srna;
00821         PropertyRNA *prop;
00822 
00823         static EnumPropertyItem prop_type_items[] ={
00824                 {ACT_IPO_PLAY, "PLAY", 0, "Play", ""},
00825                 {ACT_IPO_PINGPONG, "PINGPONG", 0, "Ping Pong", ""},
00826                 {ACT_IPO_FLIPPER, "FLIPPER", 0, "Flipper", ""},
00827                 {ACT_IPO_LOOP_STOP, "STOP", 0, "Loop Stop", ""},
00828                 {ACT_IPO_LOOP_END, "END", 0, "Loop End", ""},
00829 //              {ACT_IPO_KEY2KEY, "IPOCHILD", 0, "Key to Key", ""},
00830                 {ACT_IPO_FROM_PROP, "PROP", 0, "Property", ""},
00831                 {0, NULL, 0, NULL, NULL}};
00832         
00833         srna= RNA_def_struct(brna, "FCurveActuator", "Actuator");
00834         RNA_def_struct_ui_text(srna, "F-Curve Actuator", "Actuator to animate the object");
00835         RNA_def_struct_sdna_from(srna, "bIpoActuator", "data");
00836 
00837         prop= RNA_def_property(srna, "play_type", PROP_ENUM, PROP_NONE);
00838         RNA_def_property_enum_sdna(prop, NULL, "type");
00839         RNA_def_property_enum_items(prop, prop_type_items);
00840         RNA_def_property_ui_text(prop, "F-Curve Type", "Specify the way you want to play the animation");
00841         RNA_def_property_update(prop, NC_LOGIC, NULL);
00842         
00843         prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
00844         RNA_def_property_float_sdna(prop, NULL, "sta");
00845         RNA_def_property_ui_range(prop, 1.0, MAXFRAME, 100, 2);
00846         RNA_def_property_ui_text(prop, "Start Frame", "");
00847         RNA_def_property_update(prop, NC_SCENE, NULL);
00848 
00849         prop= RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE);
00850         RNA_def_property_float_sdna(prop, NULL, "end");
00851         RNA_def_property_ui_range(prop, 1.0, MAXFRAME, 100, 2);
00852         RNA_def_property_ui_text(prop, "End Frame", "");
00853         RNA_def_property_update(prop, NC_LOGIC, NULL);
00854         
00855         prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
00856         RNA_def_property_string_sdna(prop, NULL, "name");
00857         RNA_def_property_ui_text(prop, "Property", "Use this property to define the F-Curve position");
00858         RNA_def_property_update(prop, NC_LOGIC, NULL);
00859 
00860         prop= RNA_def_property(srna, "frame_property", PROP_STRING, PROP_NONE);
00861         RNA_def_property_string_sdna(prop, NULL, "frameProp");
00862         RNA_def_property_ui_text(prop, "Frame Property", "Assign the action's current frame number to this property");
00863 
00864         /* booleans */
00865         prop= RNA_def_property(srna, "use_additive", PROP_BOOLEAN, PROP_NONE);
00866         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOADD);
00867         RNA_def_property_boolean_funcs(prop, NULL, "rna_FcurveActuator_add_set");
00868         RNA_def_property_ui_text(prop, "Add", "F-Curve is added to the current loc/rot/scale in global or local coordinate according to Local flag");
00869         RNA_def_property_update(prop, NC_LOGIC, NULL);
00870 
00871         prop= RNA_def_property(srna, "use_force", PROP_BOOLEAN, PROP_NONE);
00872         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOFORCE);
00873         RNA_def_property_boolean_funcs(prop, NULL, "rna_FcurveActuator_force_set");
00874         RNA_def_property_ui_text(prop, "Force", "Apply F-Curve as a global or local force depending on the local option (dynamic objects only)");
00875         RNA_def_property_update(prop, NC_LOGIC, NULL);
00876         
00877         prop= RNA_def_property(srna, "use_local", PROP_BOOLEAN, PROP_NONE);
00878         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOLOCAL);
00879         RNA_def_property_ui_text(prop, "L", "Let the F-Curve act in local coordinates, used in Force and Add mode");
00880         RNA_def_property_update(prop, NC_LOGIC, NULL);
00881 
00882         prop= RNA_def_property(srna, "apply_to_children", PROP_BOOLEAN, PROP_NONE);
00883         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOCHILD);
00884         RNA_def_property_ui_text(prop, "Child", "Update F-Curve on all children Objects as well");
00885         RNA_def_property_update(prop, NC_LOGIC, NULL);
00886 }
00887 
00888 static void rna_def_camera_actuator(BlenderRNA *brna)
00889 {
00890         StructRNA *srna;
00891         PropertyRNA *prop;
00892 
00893         static EnumPropertyItem prop_axis_items[] ={
00894                 {ACT_CAMERA_X, "X", 0, "X", "Camera tries to get behind the X axis"},
00895                 {ACT_CAMERA_Y, "Y", 0, "Y", "Camera tries to get behind the Y axis"},
00896                 {0, NULL, 0, NULL, NULL}};
00897         
00898         srna= RNA_def_struct(brna, "CameraActuator", "Actuator");
00899         RNA_def_struct_ui_text(srna, "Camera Actuator", "Actuator to ..");
00900         RNA_def_struct_sdna_from(srna, "bCameraActuator", "data");
00901 
00902         prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
00903         RNA_def_property_struct_type(prop, "Object");
00904         RNA_def_property_pointer_sdna(prop, NULL, "ob");
00905         RNA_def_property_flag(prop, PROP_EDITABLE);
00906         RNA_def_property_ui_text(prop, "Camera Object", "Look at this Object");
00907         RNA_def_property_update(prop, NC_LOGIC, NULL);
00908 
00909         /* floats */
00910         prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
00911         RNA_def_property_ui_range(prop, 0.0, 20.0, 1, 2);
00912         RNA_def_property_ui_text(prop, "Height", "");
00913         RNA_def_property_update(prop, NC_LOGIC, NULL);
00914 
00915         prop= RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE);
00916         RNA_def_property_ui_range(prop, 0.0, 20.0, 1, 2);
00917         RNA_def_property_ui_text(prop, "Min", "");
00918         RNA_def_property_update(prop, NC_LOGIC, NULL);
00919 
00920         prop= RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE);
00921         RNA_def_property_ui_range(prop, 0.0, 20.0, 1, 2);
00922         RNA_def_property_ui_text(prop, "Max", "");
00923         RNA_def_property_update(prop, NC_LOGIC, NULL);
00924 
00925         prop= RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
00926         RNA_def_property_float_sdna(prop, NULL, "damping");
00927         RNA_def_property_range(prop, 0, 10.0);
00928         RNA_def_property_ui_range(prop, 0, 5.0, 1, 2);
00929         RNA_def_property_ui_text(prop, "Damping", "Specify the strength of the constraint that drive the camera behind the target");
00930         RNA_def_property_update(prop, NC_LOGIC, NULL);
00931 
00932         /* x/y */
00933         prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
00934         RNA_def_property_enum_sdna(prop, NULL, "axis");
00935         RNA_def_property_enum_items(prop, prop_axis_items);
00936         RNA_def_property_ui_text(prop, "Axis", "Specify the axis the Camera will try to get behind");
00937         RNA_def_property_update(prop, NC_LOGIC, NULL);
00938 }
00939 
00940 static void rna_def_sound_actuator(BlenderRNA *brna)
00941 {
00942         StructRNA *srna;
00943         PropertyRNA *prop;
00944 
00945         static EnumPropertyItem prop_type_items[] ={
00946                 {ACT_SND_PLAY_STOP_SOUND, "PLAYSTOP", 0, "Play Stop", ""},
00947                 {ACT_SND_PLAY_END_SOUND, "PLAYEND", 0, "Play End", ""},
00948                 {ACT_SND_LOOP_STOP_SOUND, "LOOPSTOP", 0, "Loop Stop", ""},
00949                 {ACT_SND_LOOP_END_SOUND, "LOOPEND", 0, "Loop End", ""},
00950                 {ACT_SND_LOOP_BIDIRECTIONAL_SOUND, "LOOPBIDIRECTIONAL", 0, "Loop Bidirectional", ""},
00951                 {ACT_SND_LOOP_BIDIRECTIONAL_STOP_SOUND, "LOOPBIDIRECTIONALSTOP", 0, "Loop Bidirectional Stop", ""},
00952                 {0, NULL, 0, NULL, NULL}
00953         };
00954         
00955         srna= RNA_def_struct(brna, "SoundActuator", "Actuator");
00956         RNA_def_struct_ui_text(srna, "Sound Actuator", "Actuator to handle sound");
00957         RNA_def_struct_sdna_from(srna, "bSoundActuator", "data");
00958 
00959         prop= RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
00960         RNA_def_property_struct_type(prop, "Sound");
00961         RNA_def_property_flag(prop, PROP_EDITABLE);
00962         RNA_def_struct_ui_text(srna, "Sound", "Sound file");
00963         RNA_def_property_update(prop, NC_LOGIC, NULL);
00964 
00965         prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
00966         RNA_def_property_enum_sdna(prop, NULL, "type");
00967         RNA_def_property_enum_items(prop, prop_type_items);
00968         RNA_def_property_ui_text(prop, "Play Mode", "");
00969         RNA_def_property_update(prop, NC_LOGIC, NULL);
00970 
00971         prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
00972         RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
00973         RNA_def_property_range(prop, 0.0, 2.0);
00974         RNA_def_property_ui_text(prop, "Volume", "Sets the initial volume of the sound");
00975         RNA_def_property_update(prop, NC_LOGIC, NULL);
00976 
00977         prop= RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
00978         RNA_def_property_ui_range(prop, -12.0, 12.0, 1, 2);
00979         RNA_def_property_ui_text(prop, "Pitch", "Sets the pitch of the sound");
00980         RNA_def_property_update(prop, NC_LOGIC, NULL);
00981         
00982         /* floats - 3D Parameters */
00983         prop= RNA_def_property(srna, "gain_3d_min", PROP_FLOAT, PROP_NONE);
00984         RNA_def_property_float_sdna(prop, NULL, "sound3D.min_gain");
00985         RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
00986         RNA_def_property_ui_text(prop, "Minimum Gain", "The minimum gain of the sound, no matter how far it is away");
00987         RNA_def_property_update(prop, NC_LOGIC, NULL);
00988 
00989         prop= RNA_def_property(srna, "gain_3d_max", PROP_FLOAT, PROP_NONE);
00990         RNA_def_property_float_sdna(prop, NULL, "sound3D.max_gain");
00991         RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
00992         RNA_def_property_ui_text(prop, "Maximum Gain", "The maximum gain of the sound, no matter how near it is");
00993         RNA_def_property_update(prop, NC_LOGIC, NULL);
00994 
00995         prop= RNA_def_property(srna, "distance_3d_reference", PROP_FLOAT, PROP_NONE);
00996         RNA_def_property_float_sdna(prop, NULL, "sound3D.reference_distance");
00997         RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 1, 2);
00998         RNA_def_property_ui_text(prop, "Reference Distance", "The distance where the sound has a gain of 1.0");
00999         RNA_def_property_update(prop, NC_LOGIC, NULL);
01000         
01001         prop= RNA_def_property(srna, "distance_3d_max", PROP_FLOAT, PROP_NONE);
01002         RNA_def_property_float_sdna(prop, NULL, "sound3D.max_distance");
01003         RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 1, 2);
01004         RNA_def_property_ui_text(prop, "Maximum Distance", "The maximum distance at which you can hear the sound");
01005         RNA_def_property_update(prop, NC_LOGIC, NULL);
01006 
01007         prop= RNA_def_property(srna, "rolloff_factor_3d", PROP_FLOAT, PROP_NONE);
01008         RNA_def_property_float_sdna(prop, NULL, "sound3D.rolloff_factor");
01009         RNA_def_property_ui_range(prop, 0.0, 5.0, 1, 2);
01010         RNA_def_property_ui_text(prop, "Rolloff", "The influence factor on volume depending on distance");
01011         RNA_def_property_update(prop, NC_LOGIC, NULL);
01012 
01013         prop= RNA_def_property(srna, "cone_outer_gain_3d", PROP_FLOAT, PROP_NONE);
01014         RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_outer_gain");
01015         RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
01016         RNA_def_property_ui_text(prop, "Cone Outer Gain", "The gain outside the outer cone. The gain in the outer cone will be interpolated between this value and the normal gain in the inner cone");
01017         RNA_def_property_update(prop, NC_LOGIC, NULL);
01018 
01019         prop= RNA_def_property(srna, "cone_outer_angle_3d", PROP_FLOAT, PROP_NONE);
01020         RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_outer_angle");
01021         RNA_def_property_ui_range(prop, 0.0, 360.0, 1, 2);
01022         RNA_def_property_ui_text(prop, "Cone Outer Angle", "The angle of the outer cone");
01023         RNA_def_property_update(prop, NC_LOGIC, NULL);
01024 
01025         prop= RNA_def_property(srna, "cone_inner_angle_3d", PROP_FLOAT, PROP_NONE);
01026         RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_inner_angle");
01027         RNA_def_property_ui_range(prop, 0.0, 360.0, 1, 2);
01028         RNA_def_property_ui_text(prop, "Cone Inner Angle", "The angle of the inner cone");
01029         RNA_def_property_update(prop, NC_LOGIC, NULL);
01030         
01031         /* booleans */
01032         prop= RNA_def_property(srna, "use_sound_3d", PROP_BOOLEAN, PROP_NONE);
01033         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SND_3D_SOUND);
01034         RNA_def_property_ui_text(prop, "3D Sound", "Enable/Disable 3D Sound");
01035         RNA_def_property_update(prop, NC_LOGIC, NULL);
01036 }
01037 
01038 static void rna_def_property_actuator(BlenderRNA *brna)
01039 {
01040         StructRNA *srna;
01041         PropertyRNA *prop;
01042 
01043         static EnumPropertyItem prop_type_items[] ={
01044                 {ACT_PROP_ASSIGN, "ASSIGN", 0, "Assign", ""},
01045                 {ACT_PROP_ADD, "ADD", 0, "Add", ""},
01046                 {ACT_PROP_COPY, "COPY", 0, "Copy", ""},
01047                 {ACT_PROP_TOGGLE, "TOGGLE", 0, "Toggle", "For bool/int/float/timer properties only"},
01048                 {0, NULL, 0, NULL, NULL}
01049         };
01050 
01051         srna= RNA_def_struct(brna, "PropertyActuator", "Actuator");
01052         RNA_def_struct_ui_text(srna, "Property Actuator", "Actuator to handle properties");
01053         RNA_def_struct_sdna_from(srna, "bPropertyActuator", "data");
01054 
01055         prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
01056         RNA_def_property_enum_sdna(prop, NULL, "type");
01057         RNA_def_property_enum_items(prop, prop_type_items);
01058         RNA_def_property_ui_text(prop, "Mode", "");
01059         RNA_def_property_update(prop, NC_LOGIC, NULL);
01060 
01061         prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
01062         RNA_def_property_string_sdna(prop, NULL, "name");
01063         RNA_def_property_ui_text(prop, "Property", "The name of the property");
01064         RNA_def_property_update(prop, NC_LOGIC, NULL);
01065 
01066         prop= RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
01067         RNA_def_property_ui_text(prop, "Value", "The name of the property or the value to use (use \"\" around strings)");
01068         RNA_def_property_update(prop, NC_LOGIC, NULL);
01069 
01070         /* Copy Mode */
01071         prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
01072         RNA_def_property_struct_type(prop, "Object");
01073         RNA_def_property_pointer_sdna(prop, NULL, "ob");
01074         RNA_def_property_flag(prop, PROP_EDITABLE);
01075         RNA_def_property_ui_text(prop, "Object", "Copy from this Object");
01076         RNA_def_property_update(prop, NC_LOGIC, NULL);
01077 
01078         //XXX add even magic'er property lookup (need to look for the property list of the target object)
01079         prop= RNA_def_property(srna, "object_property", PROP_STRING, PROP_NONE);
01080         RNA_def_property_string_sdna(prop, NULL, "value");
01081         RNA_def_property_ui_text(prop, "Property Name", "Copy this property");
01082         RNA_def_property_update(prop, NC_LOGIC, NULL);
01083 }
01084 
01085 static void rna_def_constraint_actuator(BlenderRNA *brna)
01086 {
01087         StructRNA *srna;
01088         PropertyRNA *prop;
01089 
01090         static EnumPropertyItem prop_type_items[] ={
01091                 {ACT_CONST_TYPE_LOC, "LOC", 0, "Location Constraint", ""},
01092                 {ACT_CONST_TYPE_DIST, "DIST", 0, "Distance Constraint", ""},
01093                 {ACT_CONST_TYPE_ORI, "ORI", 0, "Orientation Constraint", ""},
01094                 {ACT_CONST_TYPE_FH, "FH", 0, "Force Field Constraint", ""},
01095                 {0, NULL, 0, NULL, NULL}
01096         };
01097 
01098         static EnumPropertyItem prop_limit_items[] ={
01099                 {ACT_CONST_NONE, "NONE", 0, "None", ""},
01100                 {ACT_CONST_LOCX, "LOCX", 0, "Loc X", ""},
01101                 {ACT_CONST_LOCY, "LOCY", 0, "Loc Y", ""},
01102                 {ACT_CONST_LOCZ, "LOCZ", 0, "Loc Z", ""},
01103                 {0, NULL, 0, NULL, NULL}
01104         };
01105 
01106         static EnumPropertyItem prop_direction_items[] ={
01107                 {ACT_CONST_NONE, "NONE", 0, "None", ""},
01108                 {ACT_CONST_DIRPX, "DIRPX", 0, "X axis", ""},
01109                 {ACT_CONST_DIRPY, "DIRPY", 0, "Y axis", ""},
01110                 {ACT_CONST_DIRPZ, "DIRPZ", 0, "Z axis", ""},
01111                 {ACT_CONST_DIRNX, "DIRNX", 0, "-X axis", ""},
01112                 {ACT_CONST_DIRNY, "DIRNY", 0, "-Y axis", ""},
01113                 {ACT_CONST_DIRNZ, "DIRNZ", 0, "-Z axis", ""},
01114                 {0, NULL, 0, NULL, NULL}
01115         };
01116 
01117         static EnumPropertyItem prop_direction_pos_items[] ={
01118                 {ACT_CONST_NONE, "NONE", 0, "None", ""},
01119                 {ACT_CONST_DIRPX, "DIRPX", 0, "X axis", ""},
01120                 {ACT_CONST_DIRPY, "DIRPY", 0, "Y axis", ""},
01121                 {ACT_CONST_DIRPZ, "DIRPZ", 0, "Z axis", ""},
01122                 {0, NULL, 0, NULL, NULL}
01123         };
01124 
01125         srna= RNA_def_struct(brna, "ConstraintActuator", "Actuator");
01126         RNA_def_struct_ui_text(srna, "Constraint Actuator", "Actuator to handle Constraints");
01127         RNA_def_struct_sdna_from(srna, "bConstraintActuator", "data");
01128 
01129         prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
01130         RNA_def_property_enum_sdna(prop, NULL, "type");
01131         RNA_def_property_enum_items(prop, prop_type_items);
01132         RNA_def_property_enum_funcs(prop, NULL, "rna_ConstraintActuator_type_set", NULL);
01133         RNA_def_property_ui_text(prop, "Constraints Mode", "The type of the constraint");
01134         RNA_def_property_update(prop, NC_LOGIC, NULL);
01135 
01136         prop= RNA_def_property(srna, "limit", PROP_ENUM, PROP_NONE);
01137         RNA_def_property_enum_sdna(prop, NULL, "flag");
01138         RNA_def_property_enum_items(prop, prop_limit_items);
01139         RNA_def_property_ui_text(prop, "Limit", "");
01140         RNA_def_property_update(prop, NC_LOGIC, NULL);
01141 
01142         prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
01143         RNA_def_property_enum_sdna(prop, NULL, "mode");
01144         RNA_def_property_enum_items(prop, prop_direction_items);
01145         RNA_def_property_ui_text(prop, "Direction", "Set the direction of the ray");
01146         RNA_def_property_update(prop, NC_LOGIC, NULL);
01147 
01148         prop= RNA_def_property(srna, "direction_axis", PROP_ENUM, PROP_NONE);
01149         RNA_def_property_enum_sdna(prop, NULL, "mode");
01150         RNA_def_property_enum_items(prop, prop_direction_items);
01151         RNA_def_property_ui_text(prop, "Direction", "Select the axis to be aligned along the reference direction");
01152         RNA_def_property_update(prop, NC_LOGIC, NULL);
01153 
01154         /* ACT_CONST_TYPE_LOC */
01155         prop= RNA_def_property(srna, "limit_min", PROP_FLOAT, PROP_NONE);
01156         RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_limitmin_get", "rna_ConstraintActuator_limitmin_set", NULL);
01157         RNA_def_property_ui_range(prop, -2000.f, 2000.f, 1, 2);
01158         RNA_def_property_ui_text(prop, "Min", "");
01159         RNA_def_property_update(prop, NC_LOGIC, NULL);
01160 
01161         prop= RNA_def_property(srna, "limit_max", PROP_FLOAT, PROP_NONE);
01162         RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_limitmax_get", "rna_ConstraintActuator_limitmax_set", NULL);
01163         RNA_def_property_ui_range(prop, -2000.f, 2000.f, 1, 2);
01164         RNA_def_property_ui_text(prop, "Max", "");
01165         RNA_def_property_update(prop, NC_LOGIC, NULL);
01166 
01167         prop= RNA_def_property(srna, "damping", PROP_INT, PROP_NONE);
01168         RNA_def_property_int_sdna(prop, NULL, "damp");
01169         RNA_def_property_ui_range(prop, 0, 100, 1, 1);
01170         RNA_def_property_ui_text(prop, "Damping", "Damping factor: time constant (in frame) of low pass filter");
01171         RNA_def_property_update(prop, NC_LOGIC, NULL);
01172 
01173         /* ACT_CONST_TYPE_DIST */
01174         prop= RNA_def_property(srna, "range", PROP_FLOAT, PROP_NONE);
01175         RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_range_get", "rna_ConstraintActuator_range_set", NULL);
01176         RNA_def_property_ui_range(prop, 0.f, 2000.f, 1, 2);
01177         RNA_def_property_ui_text(prop, "Range", "Set the maximum length of ray");
01178         RNA_def_property_update(prop, NC_LOGIC, NULL);
01179 
01180         prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
01181         RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_distance_get", "rna_ConstraintActuator_distance_set", NULL);
01182         RNA_def_property_ui_range(prop, -2000.f, 2000.f, 1, 2);
01183         RNA_def_property_ui_text(prop, "Distance", "Keep this distance to target");
01184         RNA_def_property_update(prop, NC_LOGIC, NULL);
01185 
01186         //XXX to use a pointer or add a material lookup
01187         prop= RNA_def_property(srna, "material", PROP_STRING, PROP_NONE);
01188         RNA_def_property_string_sdna(prop, NULL, "matprop");
01189         RNA_def_property_flag(prop, PROP_EDITABLE);
01190         RNA_def_property_ui_text(prop, "Material", "Ray detects only Objects with this material");
01191         RNA_def_property_update(prop, NC_LOGIC, NULL);
01192 
01193         //XXX add magic property lookup
01194         prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
01195         RNA_def_property_string_sdna(prop, NULL, "matprop");
01196         RNA_def_property_ui_text(prop, "Property", "Ray detect only Objects with this property");
01197         RNA_def_property_update(prop, NC_LOGIC, NULL);
01198 
01199         prop= RNA_def_property(srna, "time", PROP_INT, PROP_NONE);
01200         RNA_def_property_ui_range(prop, 0, 1000, 1, 2);
01201         RNA_def_property_ui_text(prop, "Time", "Maximum activation time in frame, 0 for unlimited");
01202         RNA_def_property_update(prop, NC_LOGIC, NULL);
01203 
01204         prop= RNA_def_property(srna, "damping_rotation", PROP_INT, PROP_NONE);
01205         RNA_def_property_int_sdna(prop, NULL, "rotdamp");
01206         RNA_def_property_ui_range(prop, 0, 100, 1, 1);
01207         RNA_def_property_ui_text(prop, "RotDamp", "Use a different damping for orientation");
01208         RNA_def_property_update(prop, NC_LOGIC, NULL);
01209 
01210         /* ACT_CONST_TYPE_ORI */
01211         prop= RNA_def_property(srna, "direction_axis_pos", PROP_ENUM, PROP_NONE);
01212         RNA_def_property_enum_sdna(prop, NULL, "mode");
01213         RNA_def_property_enum_items(prop, prop_direction_pos_items);
01214         RNA_def_property_ui_text(prop, "Direction", "Select the axis to be aligned along the reference direction");
01215         RNA_def_property_update(prop, NC_LOGIC, NULL);
01216 
01217         prop= RNA_def_property(srna, "rotation_max", PROP_FLOAT, PROP_XYZ);
01218         RNA_def_property_float_sdna(prop, NULL, "maxrot");
01219         RNA_def_property_array(prop, 3);
01220         RNA_def_property_ui_range(prop, -2000.0, 2000.0, 10, 2);
01221         RNA_def_property_ui_text(prop, "Reference Direction", "Reference Direction");
01222         RNA_def_property_update(prop, NC_LOGIC, NULL);
01223 
01224         //XXX TODO - use radians internally then change to PROP_ANGLE
01225         prop= RNA_def_property(srna, "angle_min", PROP_FLOAT, PROP_NONE);
01226         RNA_def_property_float_sdna(prop, NULL, "minloc[0]");
01227         RNA_def_property_range(prop, 0.0, 180.0);
01228         RNA_def_property_ui_text(prop, "Min Angle", "Minimum angle (in degree) to maintain with target direction. No correction is done if angle with target direction is between min and max");
01229         RNA_def_property_update(prop, NC_LOGIC, NULL);
01230 
01231         //XXX TODO - use radians internally then change to PROP_ANGLE
01232         prop= RNA_def_property(srna, "angle_max", PROP_FLOAT, PROP_NONE);
01233         RNA_def_property_float_sdna(prop, NULL, "maxloc[0]");
01234         RNA_def_property_range(prop, 0.0, 180.0);
01235         RNA_def_property_ui_text(prop, "Max Angle", "Maximum angle (in degree) allowed with target direction. No correction is done if angle with target direction is between min and max");
01236         RNA_def_property_update(prop, NC_LOGIC, NULL);
01237 
01238         /* ACT_CONST_TYPE_FH */
01239         prop= RNA_def_property(srna, "fh_height", PROP_FLOAT, PROP_NONE);
01240         RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_fhheight_get", "rna_ConstraintActuator_fhheight_set", NULL);
01241         RNA_def_property_ui_range(prop, 0.01, 2000.0, 10, 2);
01242         RNA_def_property_ui_text(prop, "Distance", "Height of the force field area");
01243         RNA_def_property_update(prop, NC_LOGIC, NULL);
01244 
01245         prop= RNA_def_property(srna, "fh_force", PROP_FLOAT, PROP_NONE);
01246         RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_spring_get", "rna_ConstraintActuator_spring_set", NULL);
01247         RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 2);
01248         RNA_def_property_ui_text(prop, "Force", "Spring force within the force field area");
01249         RNA_def_property_update(prop, NC_LOGIC, NULL);
01250 
01251         prop= RNA_def_property(srna, "fh_damping", PROP_FLOAT, PROP_NONE);
01252         RNA_def_property_float_sdna(prop, NULL, "maxrot[0]");
01253         RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 2);
01254         RNA_def_property_ui_text(prop, "Damping", "Damping factor of the force field spring");
01255         RNA_def_property_update(prop, NC_LOGIC, NULL);
01256 
01257         /* booleans */
01258         prop= RNA_def_property(srna, "use_force_distance", PROP_BOOLEAN, PROP_NONE);
01259         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_DISTANCE);
01260         RNA_def_property_ui_text(prop, "Force Distance", "Force distance of object to point of impact of ray");
01261         RNA_def_property_update(prop, NC_LOGIC, NULL);
01262 
01263         prop= RNA_def_property(srna, "use_local", PROP_BOOLEAN, PROP_NONE);
01264         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_LOCAL);
01265         RNA_def_property_ui_text(prop, "L", "Set ray along object's axis or global axis");
01266         RNA_def_property_update(prop, NC_LOGIC, NULL);
01267 
01268         prop= RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
01269         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_NORMAL);
01270         RNA_def_property_ui_text(prop, "N", "Set object axis along (local axis) or parallel (global axis) to the normal at hit position");
01271         RNA_def_property_update(prop, NC_LOGIC, NULL);
01272 
01273         prop= RNA_def_property(srna, "use_persistent", PROP_BOOLEAN, PROP_NONE);
01274         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_PERMANENT);
01275         RNA_def_property_ui_text(prop, "PER", "Persistent actuator: stays active even if ray does not reach target");
01276         RNA_def_property_update(prop, NC_LOGIC, NULL);
01277 
01278         //XXX to use an enum instead of a flag if possible
01279         prop= RNA_def_property(srna, "use_material_detect", PROP_BOOLEAN, PROP_NONE);
01280         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_MATERIAL);
01281         RNA_def_property_ui_text(prop, "M/P", "Detect material instead of property");
01282         RNA_def_property_boolean_funcs(prop, NULL, "rna_Actuator_constraint_detect_material_set");
01283         RNA_def_property_update(prop, NC_LOGIC, NULL);
01284 
01285         prop= RNA_def_property(srna, "use_fh_paralel_axis", PROP_BOOLEAN, PROP_NONE);
01286         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_DOROTFH);
01287         RNA_def_property_ui_text(prop, "Rot Fh", "Keep object axis parallel to normal");
01288         RNA_def_property_update(prop, NC_LOGIC, NULL);
01289 
01290         prop= RNA_def_property(srna, "use_fh_normal", PROP_BOOLEAN, PROP_NONE);
01291         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_NORMAL);
01292         RNA_def_property_ui_text(prop, "N", "Add a horizontal spring force on slopes");
01293         RNA_def_property_update(prop, NC_LOGIC, NULL);
01294 }
01295 
01296 static void rna_def_edit_object_actuator(BlenderRNA *brna)
01297 {
01298         StructRNA *srna;
01299         PropertyRNA *prop;
01300 
01301         static EnumPropertyItem prop_dyn_items[] ={
01302                 {ACT_EDOB_RESTORE_DYN, "RESTOREDYN", 0, "Restore Dynamics", ""},
01303                 {ACT_EDOB_SUSPEND_DYN, "SUSPENDDYN", 0, "Suspend Dynamics", ""},
01304                 {ACT_EDOB_ENABLE_RB, "ENABLERIGIDBODY", 0, "Enable Rigid Body", ""},
01305                 {ACT_EDOB_DISABLE_RB, "DISABLERIGIDBODY", 0, "Disable Rigid Body", ""},
01306                 {ACT_EDOB_SET_MASS, "SETMASS", 0, "Set Mass", ""},
01307                 {0, NULL, 0, NULL, NULL} };
01308 
01309         static EnumPropertyItem prop_type_items[] ={
01310         {ACT_EDOB_ADD_OBJECT, "ADDOBJECT", 0, "Add Object", ""},
01311         {ACT_EDOB_END_OBJECT, "ENDOBJECT", 0, "End Object", ""},
01312         {ACT_EDOB_REPLACE_MESH, "REPLACEMESH", 0, "Replace Mesh", ""},
01313         {ACT_EDOB_TRACK_TO, "TRACKTO", 0, "Track to", ""},
01314         {ACT_EDOB_DYNAMICS, "DYNAMICS", 0, "Dynamics", ""},
01315         {0, NULL, 0, NULL, NULL} };
01316 
01317         srna= RNA_def_struct(brna, "EditObjectActuator", "Actuator");
01318         RNA_def_struct_ui_text(srna, "Edit Object Actuator", "Actuator used to edit objects");
01319         RNA_def_struct_sdna_from(srna, "bEditObjectActuator", "data");
01320 
01321         prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
01322         RNA_def_property_enum_sdna(prop, NULL, "type");
01323         RNA_def_property_enum_items(prop, prop_type_items);
01324         RNA_def_property_ui_text(prop, "Edit Object", "The mode of the actuator");
01325         RNA_def_property_update(prop, NC_LOGIC, NULL);
01326 
01327         prop= RNA_def_property(srna, "dynamic_operation", PROP_ENUM, PROP_NONE);
01328         RNA_def_property_enum_sdna(prop, NULL, "dyn_operation");
01329         RNA_def_property_enum_items(prop, prop_dyn_items);
01330         RNA_def_property_ui_text(prop, "Dynamic Operation", "");
01331         RNA_def_property_update(prop, NC_LOGIC, NULL);
01332 
01333         prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
01334         RNA_def_property_struct_type(prop, "Object");
01335         RNA_def_property_pointer_sdna(prop, NULL, "ob");
01336         RNA_def_property_flag(prop, PROP_EDITABLE);
01337         RNA_def_property_ui_text(prop, "Object", "Add this Object and all its children (cant be on an visible layer)");
01338         RNA_def_property_update(prop, NC_LOGIC, NULL);
01339 
01340         prop= RNA_def_property(srna, "track_object", PROP_POINTER, PROP_NONE);
01341         RNA_def_property_struct_type(prop, "Object");
01342         RNA_def_property_pointer_sdna(prop, NULL, "ob");
01343         RNA_def_property_flag(prop, PROP_EDITABLE);
01344         RNA_def_property_ui_text(prop, "Object", "Track to this Object");
01345         RNA_def_property_update(prop, NC_LOGIC, NULL);
01346         
01347         prop= RNA_def_property(srna, "mesh", PROP_POINTER, PROP_NONE);
01348         RNA_def_property_struct_type(prop, "Mesh");
01349         RNA_def_property_pointer_sdna(prop, NULL, "me");
01350         RNA_def_property_flag(prop, PROP_EDITABLE);
01351         RNA_def_property_ui_text(prop, "Mesh", "Replace the existing, when left blank 'Phys' will remake the existing physics mesh");
01352         /* note: custom set function is ONLY to avoid rna setting a user for this. */
01353         RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_editobject_mesh_set", NULL, NULL);
01354         RNA_def_property_update(prop, NC_LOGIC, NULL);
01355 
01356         prop= RNA_def_property(srna, "time", PROP_INT, PROP_NONE);
01357         RNA_def_property_ui_range(prop, 0, 2000, 1, 1);
01358         RNA_def_property_ui_text(prop, "Time", "Duration the new Object lives or the track takes");
01359         RNA_def_property_update(prop, NC_LOGIC, NULL);
01360 
01361         prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
01362         RNA_def_property_ui_range(prop, 0, 10000, 1, 2);
01363         RNA_def_property_ui_text(prop, "Mass", "The mass of the object");
01364         RNA_def_property_update(prop, NC_LOGIC, NULL);
01365 
01366         /* floats 3 Arrays*/
01367         prop= RNA_def_property(srna, "linear_velocity", PROP_FLOAT, PROP_XYZ);
01368         RNA_def_property_float_sdna(prop, NULL, "linVelocity");
01369         RNA_def_property_array(prop, 3);
01370         RNA_def_property_ui_range(prop, -100.0, 100.0, 10, 2);
01371         RNA_def_property_ui_text(prop, "Linear Velocity", "Velocity upon creation");
01372         RNA_def_property_update(prop, NC_LOGIC, NULL);
01373 
01374         prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_XYZ);
01375         RNA_def_property_float_sdna(prop, NULL, "angVelocity");
01376         RNA_def_property_array(prop, 3);
01377         RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
01378         RNA_def_property_ui_text(prop, "Angular Velocity", "Angular velocity upon creation");
01379         RNA_def_property_update(prop, NC_LOGIC, NULL);
01380 
01381         /* booleans */
01382         prop= RNA_def_property(srna, "use_local_linear_velocity", PROP_BOOLEAN, PROP_NONE);
01383         RNA_def_property_boolean_sdna(prop, NULL, "localflag", ACT_EDOB_LOCAL_LINV);
01384         RNA_def_property_ui_text(prop, "L", "Apply the transformation locally");
01385         RNA_def_property_update(prop, NC_LOGIC, NULL);
01386 
01387         prop= RNA_def_property(srna, "use_local_angular_velocity", PROP_BOOLEAN, PROP_NONE);
01388         RNA_def_property_boolean_sdna(prop, NULL, "localflag", ACT_EDOB_LOCAL_ANGV);
01389         RNA_def_property_ui_text(prop, "L", "Apply the rotation locally");
01390         RNA_def_property_update(prop, NC_LOGIC, NULL);
01391 
01392         prop= RNA_def_property(srna, "use_replace_display_mesh", PROP_BOOLEAN, PROP_NONE);
01393         RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ACT_EDOB_REPLACE_MESH_NOGFX);
01394         RNA_def_property_ui_text(prop, "Gfx", "Replace the display mesh");
01395         RNA_def_property_update(prop, NC_LOGIC, NULL);
01396 
01397         prop= RNA_def_property(srna, "use_replace_physics_mesh", PROP_BOOLEAN, PROP_NONE);
01398         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_EDOB_REPLACE_MESH_PHYS);
01399         RNA_def_property_ui_text(prop, "Phys", "Replace the physics mesh (triangle bounds only - compound shapes not supported)");
01400         RNA_def_property_update(prop, NC_LOGIC, NULL);
01401 
01402         prop= RNA_def_property(srna, "use_3d_tracking", PROP_BOOLEAN, PROP_NONE);
01403         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_TRACK_3D);
01404         RNA_def_property_ui_text(prop, "3D", "Enable 3D tracking");
01405         RNA_def_property_update(prop, NC_LOGIC, NULL);
01406 }
01407 
01408 static void rna_def_scene_actuator(BlenderRNA *brna)
01409 {
01410         StructRNA *srna;
01411         PropertyRNA *prop;
01412 
01413         static EnumPropertyItem prop_type_items[] ={
01414                 {ACT_SCENE_RESTART, "RESTART", 0, "Restart", ""},
01415                 {ACT_SCENE_SET, "SET", 0, "Set Scene", ""},
01416                 {ACT_SCENE_CAMERA, "CAMERA", 0, "Set Camera", ""},
01417                 {ACT_SCENE_ADD_FRONT, "ADDFRONT", 0, "Add Overlay Scene", ""},
01418                 {ACT_SCENE_ADD_BACK, "ADDBACK", 0, "Add Background Scene", ""},
01419                 {ACT_SCENE_REMOVE, "REMOVE", 0, "Remove Scene", ""},
01420                 {ACT_SCENE_SUSPEND, "SUSPEND", 0, "Suspend Scene", ""},
01421                 {ACT_SCENE_RESUME, "RESUME", 0, "Resume Scene", ""},
01422                 {0, NULL, 0, NULL, NULL}};      
01423                 
01424         srna= RNA_def_struct(brna, "SceneActuator", "Actuator");
01425         RNA_def_struct_ui_text(srna, "Scene Actuator", "Actuator to ..");
01426         RNA_def_struct_sdna_from(srna, "bSceneActuator", "data");
01427 
01428         prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
01429         RNA_def_property_enum_sdna(prop, NULL, "type");
01430         RNA_def_property_enum_items(prop, prop_type_items);
01431         RNA_def_property_ui_text(prop, "Scene", "");
01432         RNA_def_property_update(prop, NC_LOGIC, NULL);
01433         
01434         //XXX filter only camera objects
01435         prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
01436         RNA_def_property_struct_type(prop, "Object");
01437         RNA_def_property_flag(prop, PROP_EDITABLE);
01438         RNA_def_property_ui_text(prop, "Camera Object", "Set this Camera. Leave empty to refer to self object");
01439         RNA_def_property_update(prop, NC_LOGIC, NULL);
01440 
01441         prop= RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
01442         RNA_def_property_struct_type(prop, "Scene");
01443         RNA_def_property_flag(prop, PROP_EDITABLE);
01444         RNA_def_property_ui_text(prop, "Scene", "Set the Scene to be added/removed/paused/resumed");
01445         RNA_def_property_update(prop, NC_LOGIC, NULL);
01446 
01447         /* XXX no need for those tooltips. to remove soon
01448         Originally we had different 'scene' tooltips for different values of 'type'.
01449         They were:
01450         ACT_SCENE_RESTART       ""
01451         ACT_SCENE_CAMERA        ""
01452         ACT_SCENE_SET           "Set this Scene"
01453         ACT_SCENE_ADD_FRONT     "Add an Overlay Scene"
01454         ACT_SCENE_ADD_BACK      "Add a Background Scene"
01455         ACT_SCENE_REMOVE        "Remove a Scene"
01456         ACT_SCENE_SUSPEND       "Pause a Scene"
01457         ACT_SCENE_RESUME        "Unpause a Scene"
01458 
01459         It can be done in the ui script if still needed.
01460         */
01461         
01462 }
01463 
01464 static void rna_def_random_actuator(BlenderRNA *brna)
01465 {
01466         StructRNA *srna;
01467         PropertyRNA *prop;
01468 
01469         static EnumPropertyItem prop_distribution_items[] ={
01470                 {ACT_RANDOM_BOOL_CONST, "BOOL_CONSTANT", 0, "Bool Constant", ""},
01471                 {ACT_RANDOM_BOOL_UNIFORM, "BOOL_UNIFORM", 0, "Bool Uniform", ""},
01472                 {ACT_RANDOM_BOOL_BERNOUILLI, "BOOL_BERNOUILLI", 0, "Bool Bernoulli", ""},
01473                 {ACT_RANDOM_INT_CONST, "INT_CONSTANT", 0, "Int Constant", ""},
01474                 {ACT_RANDOM_INT_UNIFORM, "INT_UNIFORM", 0, "Int Uniform", ""},
01475                 {ACT_RANDOM_INT_POISSON, "INT_POISSON", 0, "Int Poisson", ""},
01476                 {ACT_RANDOM_FLOAT_CONST, "FLOAT_CONSTANT", 0, "Float Constant", ""},
01477                 {ACT_RANDOM_FLOAT_UNIFORM, "FLOAT_UNIFORM", 0, "Float Uniform", ""},
01478                 {ACT_RANDOM_FLOAT_NORMAL, "FLOAT_NORMAL", 0, "Float Normal", ""},
01479                 {ACT_RANDOM_FLOAT_NEGATIVE_EXPONENTIAL, "FLOAT_NEGATIVE_EXPONENTIAL", 0, "Float Neg. Exp.", ""},
01480                 {0, NULL, 0, NULL, NULL}};      
01481 
01482         srna= RNA_def_struct(brna, "RandomActuator", "Actuator");
01483         RNA_def_struct_ui_text(srna, "Random Actuator", "Actuator to ..");
01484         RNA_def_struct_sdna_from(srna, "bRandomActuator", "data");
01485 
01486         prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
01487         RNA_def_property_ui_range(prop, 0, 1000, 1, 1);
01488         RNA_def_property_range(prop, 0, MAXFRAME);
01489         RNA_def_property_ui_text(prop, "Seed", "Initial seed of the random generator. Use Python for more freedom (choose 0 for not random)");
01490         RNA_def_property_update(prop, NC_LOGIC, NULL);
01491 
01492         prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
01493         RNA_def_property_string_sdna(prop, NULL, "propname");
01494         RNA_def_property_ui_text(prop, "Property", "Assign the random value to this property");
01495         RNA_def_property_update(prop, NC_LOGIC, NULL);
01496 
01497         prop= RNA_def_property(srna, "distribution", PROP_ENUM, PROP_NONE);
01498         RNA_def_property_enum_items(prop, prop_distribution_items);
01499         RNA_def_property_ui_text(prop, "Distribution", "Choose the type of distribution");
01500         RNA_def_property_update(prop, NC_LOGIC, NULL);
01501         
01502         /* arguments for the distribution */
01503         /* int_arg_1, int_arg_2, float_arg_1, float_arg_2 */
01504 
01505         /* ACT_RANDOM_BOOL_CONST */
01506         prop= RNA_def_property(srna, "use_always_true", PROP_BOOLEAN, PROP_NONE);
01507         RNA_def_property_boolean_sdna(prop, NULL, "int_arg_1", 1);
01508         RNA_def_property_ui_text(prop, "Always True", "Always false or always true");
01509         RNA_def_property_update(prop, NC_LOGIC, NULL);
01510 
01511         /* ACT_RANDOM_BOOL_UNIFORM */
01512         // label => "Choose between true and false, 50% chance each"
01513 
01514         /* ACT_RANDOM_BOOL_BERNOUILLI */
01515         prop= RNA_def_property(srna, "chance", PROP_FLOAT, PROP_PERCENTAGE);
01516         RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
01517         RNA_def_property_range(prop, 0.0, 1.0);
01518         RNA_def_property_ui_text(prop, "Chance", "Pick a number between 0 and 1. Success if you stay below this value");
01519         RNA_def_property_update(prop, NC_LOGIC, NULL);
01520 
01521         /* ACT_RANDOM_INT_CONST */
01522         prop= RNA_def_property(srna, "int_value", PROP_INT, PROP_NONE);
01523         RNA_def_property_int_sdna(prop, NULL, "int_arg_1");
01524         RNA_def_property_ui_range(prop, -1000, 1000, 1, 1);
01525         RNA_def_property_ui_text(prop, "Value", "Always return this number");
01526         RNA_def_property_update(prop, NC_LOGIC, NULL);
01527 
01528         /* ACT_RANDOM_INT_UNIFORM */
01529         prop= RNA_def_property(srna, "int_min", PROP_INT, PROP_NONE);
01530         RNA_def_property_int_sdna(prop, NULL, "int_arg_1");
01531         RNA_def_property_range(prop, -1000, 1000);
01532         RNA_def_property_ui_text(prop, "Min", "Choose a number from a range. Lower boundary of the range");
01533         RNA_def_property_update(prop, NC_LOGIC, NULL);
01534 
01535         prop= RNA_def_property(srna, "int_max", PROP_INT, PROP_NONE);
01536         RNA_def_property_int_sdna(prop, NULL, "int_arg_2");
01537         RNA_def_property_range(prop, -1000, 1000);
01538         RNA_def_property_ui_text(prop, "Max", "Choose a number from a range. Upper boundary of the range");
01539         RNA_def_property_update(prop, NC_LOGIC, NULL);
01540 
01541         /* ACT_RANDOM_INT_POISSON */
01542         prop= RNA_def_property(srna, "int_mean", PROP_FLOAT, PROP_NONE);
01543         RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
01544         RNA_def_property_range(prop, 0.01, 100.0);
01545         RNA_def_property_ui_text(prop, "Mean", "Expected mean value of the distribution");
01546         RNA_def_property_update(prop, NC_LOGIC, NULL);
01547 
01548         /* ACT_RANDOM_FLOAT_CONST */
01549         prop= RNA_def_property(srna, "float_value", PROP_FLOAT, PROP_NONE);
01550         RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
01551         RNA_def_property_range(prop, 0.0, 1.0);
01552         RNA_def_property_ui_text(prop, "Value", "Always return this number");
01553         RNA_def_property_update(prop, NC_LOGIC, NULL);
01554 
01555         /* ACT_RANDOM_FLOAT_UNIFORM */
01556         prop= RNA_def_property(srna, "float_min", PROP_FLOAT, PROP_NONE);
01557         RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
01558         RNA_def_property_range(prop, -1000.0, 1000.0);
01559         RNA_def_property_ui_text(prop, "Min", "Choose a number from a range. Lower boundary of the range");
01560         RNA_def_property_update(prop, NC_LOGIC, NULL);
01561 
01562         prop= RNA_def_property(srna, "float_max", PROP_FLOAT, PROP_NONE);
01563         RNA_def_property_float_sdna(prop, NULL, "float_arg_2");
01564         RNA_def_property_range(prop, -1000.0, 1000.0);
01565         RNA_def_property_ui_text(prop, "Max", "Choose a number from a range. Upper boundary of the range");
01566         RNA_def_property_update(prop, NC_LOGIC, NULL);
01567 
01568         /* ACT_RANDOM_FLOAT_NORMAL */
01569         prop= RNA_def_property(srna, "float_mean", PROP_FLOAT, PROP_NONE);
01570         RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
01571         RNA_def_property_range(prop, -1000.0, 1000.0);
01572         RNA_def_property_ui_text(prop, "Mean", "A normal distribution. Mean of the distribution");
01573         RNA_def_property_update(prop, NC_LOGIC, NULL);
01574 
01575         prop= RNA_def_property(srna, "standard_derivation", PROP_FLOAT, PROP_NONE);
01576         RNA_def_property_float_sdna(prop, NULL, "float_arg_2");
01577         RNA_def_property_range(prop, -1000.0, 1000.0);
01578         RNA_def_property_ui_text(prop, "SD", "A normal distribution. Standard deviation of the distribution");
01579         RNA_def_property_update(prop, NC_LOGIC, NULL);
01580 
01581         /* ACT_RANDOM_FLOAT_NEGATIVE_EXPONENTIAL */
01582         prop= RNA_def_property(srna, "half_life_time", PROP_FLOAT, PROP_NONE);
01583         RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
01584         RNA_def_property_range(prop, -1000.0, 1000.0);
01585         RNA_def_property_ui_text(prop, "Half-Life Time", "Negative exponential dropoff");
01586         RNA_def_property_update(prop, NC_LOGIC, NULL);
01587 }
01588 
01589 static void rna_def_message_actuator(BlenderRNA *brna)
01590 {
01591         StructRNA *srna;
01592         PropertyRNA *prop;
01593 
01594         static EnumPropertyItem prop_body_type_items[] ={
01595                 {ACT_MESG_MESG, "TEXT", 0, "Text", ""},
01596                 {ACT_MESG_PROP, "PROPERTY", 0, "Property", ""},
01597                 {0, NULL, 0, NULL, NULL}};
01598 
01599         srna= RNA_def_struct(brna, "MessageActuator", "Actuator");
01600         RNA_def_struct_ui_text(srna, "Message Actuator", "Actuator to ..");
01601         RNA_def_struct_sdna_from(srna, "bMessageActuator", "data");
01602 
01603         prop= RNA_def_property(srna, "to_property", PROP_STRING, PROP_NONE);
01604         RNA_def_property_string_sdna(prop, NULL, "toPropName");
01605         RNA_def_property_ui_text(prop, "To", "Optional send message to objects with this name only, or empty to broadcast");
01606         RNA_def_property_update(prop, NC_LOGIC, NULL);
01607 
01608         prop= RNA_def_property(srna, "subject", PROP_STRING, PROP_NONE);
01609         RNA_def_property_ui_text(prop, "Subject", "Optional message subject. This is what can be filtered on");
01610         RNA_def_property_update(prop, NC_LOGIC, NULL);
01611 
01612         prop= RNA_def_property(srna, "body_type", PROP_ENUM, PROP_NONE);
01613         RNA_def_property_enum_sdna(prop, NULL, "bodyType");
01614         RNA_def_property_enum_items(prop, prop_body_type_items);
01615         RNA_def_property_ui_text(prop, "Body", "Toggle message type: either Text or a PropertyName");
01616 
01617         /* ACT_MESG_MESG */
01618         prop= RNA_def_property(srna, "body_message", PROP_STRING, PROP_NONE);
01619         RNA_def_property_string_sdna(prop, NULL, "body");
01620         RNA_def_property_ui_text(prop, "Body", "Optional message body Text");
01621         RNA_def_property_update(prop, NC_LOGIC, NULL);
01622         
01623         /* ACT_MESG_PROP */
01624         prop= RNA_def_property(srna, "body_property", PROP_STRING, PROP_NONE);
01625         RNA_def_property_string_sdna(prop, NULL, "body");
01626         RNA_def_property_ui_text(prop, "Prop Name", "The message body will be set by the Property Value");
01627         RNA_def_property_update(prop, NC_LOGIC, NULL);
01628 }
01629 
01630 static void rna_def_game_actuator(BlenderRNA *brna)
01631 {
01632         StructRNA *srna;
01633         PropertyRNA *prop;
01634 
01635         static EnumPropertyItem prop_type_items[] ={
01636 //              {ACT_GAME_LOAD, "LOAD", 0, "Load Game", ""},
01637 //              {ACT_GAME_START, "START", 0, "Start Loaded Game", ""},  
01638 //              keeping the load/start hacky for compatibility with 2.49
01639 //              ideally we could use ACT_GAME_START again and do a do_version()
01640 
01641                 {ACT_GAME_LOAD, "START", 0, "Start Game From File", ""},
01642                 {ACT_GAME_RESTART, "RESTART", 0, "Restart Game", ""},
01643                 {ACT_GAME_QUIT, "QUIT", 0, "Quit Game", ""},
01644                 {ACT_GAME_SAVECFG, "SAVECFG", 0, "Save bge.logic.globalDict", ""},
01645                 {ACT_GAME_LOADCFG, "LOADCFG", 0, "Load bge.logic.globalDict", ""},
01646                 {0, NULL, 0, NULL, NULL}};
01647         
01648         srna= RNA_def_struct(brna, "GameActuator", "Actuator");
01649         RNA_def_struct_ui_text(srna, "Game Actuator", "");
01650         RNA_def_struct_sdna_from(srna, "bGameActuator", "data");
01651 
01652         prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
01653         RNA_def_property_enum_sdna(prop, NULL, "type");
01654         RNA_def_property_enum_items(prop, prop_type_items);
01655         RNA_def_property_ui_text(prop, "Game", "");
01656         RNA_def_property_update(prop, NC_LOGIC, NULL);
01657 
01658         /* ACT_GAME_LOAD */
01659         prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
01660         RNA_def_property_ui_text(prop, "File", "Load this blend file, use the \"//\" prefix for a path relative to the current blend file");
01661         RNA_def_property_update(prop, NC_LOGIC, NULL);
01662         //XXX to do: an operator that calls file_browse with relative_path on and blender filtering active
01663 }
01664 
01665 static void rna_def_visibility_actuator(BlenderRNA *brna)
01666 {
01667         StructRNA *srna;
01668         PropertyRNA *prop;
01669         
01670         srna= RNA_def_struct(brna, "VisibilityActuator", "Actuator");
01671         RNA_def_struct_ui_text(srna, "Visibility Actuator", "Actuator to set visibility and occlusion of the object");
01672         RNA_def_struct_sdna_from(srna, "bVisibilityActuator", "data");
01673 
01674         prop= RNA_def_property(srna, "use_visible", PROP_BOOLEAN, PROP_NONE);
01675         RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ACT_VISIBILITY_INVISIBLE);
01676         RNA_def_property_ui_text(prop, "Visible", "Set the objects visible. Initialized from the object render restriction toggle in physics button");
01677         RNA_def_property_update(prop, NC_LOGIC, NULL);
01678 
01679         prop= RNA_def_property(srna, "use_occlusion", PROP_BOOLEAN, PROP_NONE);
01680         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_VISIBILITY_OCCLUSION);
01681         RNA_def_property_ui_text(prop, "Occlusion", "Set the object to occlude objects behind it. Initialized from the object type in physics button");
01682         RNA_def_property_update(prop, NC_LOGIC, NULL);
01683 
01684         prop= RNA_def_property(srna, "apply_to_children", PROP_BOOLEAN, PROP_NONE);
01685         RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_VISIBILITY_RECURSIVE);
01686         RNA_def_property_ui_text(prop, "Children", "Set all the children of this object to the same visibility/occlusion recursively");
01687         RNA_def_property_update(prop, NC_LOGIC, NULL);
01688 }
01689 
01690 static void rna_def_twodfilter_actuator(BlenderRNA *brna)
01691 {
01692         StructRNA *srna;
01693         PropertyRNA *prop;
01694 
01695         static EnumPropertyItem prop_type_items[] ={
01696                 {ACT_2DFILTER_ENABLED, "ENABLE", 0, "Enable Filter", ""},
01697                 {ACT_2DFILTER_DISABLED, "DISABLE", 0, "Disable Filter", ""},
01698                 {ACT_2DFILTER_NOFILTER, "REMOVE", 0, "Remove Filter", ""},
01699                 {ACT_2DFILTER_MOTIONBLUR, "MOTIONBLUR", 0, "Motion Blur", ""},
01700                 {ACT_2DFILTER_BLUR, "BLUR", 0, "Blur", ""},
01701                 {ACT_2DFILTER_SHARPEN, "SHARPEN", 0, "Sharpen", ""},
01702                 {ACT_2DFILTER_DILATION, "DILATION", 0, "Dilation", ""},
01703                 {ACT_2DFILTER_EROSION, "EROSION", 0, "Erosion", ""},
01704                 {ACT_2DFILTER_LAPLACIAN, "LAPLACIAN", 0, "Laplacian", ""},
01705                 {ACT_2DFILTER_SOBEL, "SOBEL", 0, "Sobel", ""},
01706                 {ACT_2DFILTER_PREWITT, "PREWITT", 0, "Prewitt", ""},
01707                 {ACT_2DFILTER_GRAYSCALE, "GRAYSCALE", 0, "Gray Scale", ""},
01708                 {ACT_2DFILTER_SEPIA, "SEPIA", 0, "Sepia", ""},
01709                 {ACT_2DFILTER_INVERT, "INVERT", 0, "Invert", ""},
01710                 {ACT_2DFILTER_CUSTOMFILTER, "CUSTOMFILTER", 0, "Custom Filter", ""},
01711 //              {ACT_2DFILTER_NUMBER_OF_FILTERS, "", 0, "Do not use it. Sentinel", ""},
01712                 {0, NULL, 0, NULL, NULL}};
01713 
01714         srna= RNA_def_struct(brna, "Filter2DActuator", "Actuator");
01715         RNA_def_struct_ui_text(srna, "Filter 2D Actuator", "Actuator to apply screen graphic effects");
01716         RNA_def_struct_sdna_from(srna, "bTwoDFilterActuator", "data");
01717 
01718         prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
01719         RNA_def_property_enum_sdna(prop, NULL, "type");
01720         RNA_def_property_enum_items(prop, prop_type_items);
01721         RNA_def_property_ui_text(prop, "Filter 2D Type", "");
01722         RNA_def_property_update(prop, NC_LOGIC, NULL);
01723 
01724         prop= RNA_def_property(srna, "glsl_shader", PROP_POINTER, PROP_NONE);
01725         RNA_def_property_pointer_sdna(prop, NULL, "text");
01726         RNA_def_property_struct_type(prop, "Text");
01727         RNA_def_property_flag(prop, PROP_EDITABLE);
01728         RNA_def_property_ui_text(prop, "Script", "");
01729         RNA_def_property_update(prop, NC_LOGIC, NULL);
01730 
01731         prop= RNA_def_property(srna, "filter_pass", PROP_INT, PROP_NONE);
01732         RNA_def_property_int_sdna(prop, NULL, "int_arg");
01733         RNA_def_property_ui_text(prop, "Pass Number", "Set filter order");
01734         RNA_def_property_range(prop, 0, 99); //MAX_RENDER_PASS-1
01735         RNA_def_property_update(prop, NC_LOGIC, NULL);
01736 
01737         prop= RNA_def_property(srna, "motion_blur_factor", PROP_FLOAT, PROP_NONE);
01738         RNA_def_property_float_sdna(prop, NULL, "float_arg");
01739         RNA_def_property_ui_text(prop, "Value", "Set motion blur factor");
01740         RNA_def_property_range(prop, 0.0, 1.0);
01741         RNA_def_property_update(prop, NC_LOGIC, NULL);
01742         
01743         /* booleans */
01744         prop= RNA_def_property(srna, "use_motion_blur", PROP_BOOLEAN, PROP_NONE);
01745         RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", 1);
01746         RNA_def_property_ui_text(prop, "Enable", "Enable/Disable Motion Blur");
01747         RNA_def_property_update(prop, NC_LOGIC, NULL);
01748 }
01749 
01750 static void rna_def_parent_actuator(BlenderRNA *brna)
01751 {
01752         StructRNA *srna;
01753         PropertyRNA *prop;
01754         
01755         static EnumPropertyItem prop_type_items[] ={
01756                 {ACT_PARENT_SET, "SETPARENT", 0, "Set Parent", ""},
01757                 {ACT_PARENT_REMOVE, "REMOVEPARENT", 0, "Remove Parent", ""},
01758                 {0, NULL, 0, NULL, NULL}};
01759 
01760         srna= RNA_def_struct(brna, "ParentActuator", "Actuator");
01761         RNA_def_struct_ui_text(srna, "Parent Actuator", "");
01762         RNA_def_struct_sdna_from(srna, "bParentActuator", "data");
01763 
01764         prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
01765         RNA_def_property_enum_sdna(prop, NULL, "type");
01766         RNA_def_property_enum_items(prop, prop_type_items);
01767         RNA_def_property_ui_text(prop, "Scene", "");
01768         RNA_def_property_update(prop, NC_LOGIC, NULL);
01769         
01770         prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
01771         RNA_def_property_struct_type(prop, "Object");
01772         RNA_def_property_pointer_sdna(prop, NULL, "ob");
01773         RNA_def_property_flag(prop, PROP_EDITABLE);
01774         RNA_def_property_ui_text(prop, "Parent Object", "Set this object as parent");
01775         RNA_def_property_update(prop, NC_LOGIC, NULL);
01776 
01777         /* booleans */
01778         prop= RNA_def_property(srna, "use_compound", PROP_BOOLEAN, PROP_NONE);
01779         RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ACT_PARENT_COMPOUND);
01780         RNA_def_property_ui_text(prop, "Compound", "Add this object shape to the parent shape (only if the parent shape is already compound)");
01781         RNA_def_property_update(prop, NC_LOGIC, NULL);
01782 
01783         prop= RNA_def_property(srna, "use_ghost", PROP_BOOLEAN, PROP_NONE);
01784         RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ACT_PARENT_GHOST);
01785         RNA_def_property_ui_text(prop, "Ghost", "Make this object ghost while parented");
01786         RNA_def_property_update(prop, NC_LOGIC, NULL);
01787 }
01788 
01789 static void rna_def_shape_action_actuator(BlenderRNA *brna)
01790 {
01791         StructRNA *srna;
01792         PropertyRNA *prop;
01793 
01794         static EnumPropertyItem prop_type_items[] ={
01795                 {ACT_ACTION_PLAY, "PLAY", 0, "Play", ""},
01796                 {ACT_ACTION_PINGPONG, "PINGPONG", 0, "Ping Pong", ""},
01797                 {ACT_ACTION_FLIPPER, "FLIPPER", 0, "Flipper", ""},
01798                 {ACT_ACTION_LOOP_STOP, "LOOPSTOP", 0, "Loop Stop", ""},
01799                 {ACT_ACTION_LOOP_END, "LOOPEND", 0, "Loop End", ""},
01800                 {ACT_ACTION_FROM_PROP, "PROPERTY", 0, "Property", ""},
01801 #ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
01802                 {ACT_ACTION_MOTION, "MOTION", 0, "Displacement", ""},
01803 #endif
01804                 {0, NULL, 0, NULL, NULL}};
01805 
01806         srna= RNA_def_struct(brna, "ShapeActionActuator", "Actuator");
01807         RNA_def_struct_ui_text(srna, "Shape Action Actuator", "Actuator to control shape key animations");
01808         RNA_def_struct_sdna_from(srna, "bActionActuator", "data");
01809 
01810         prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
01811         RNA_def_property_enum_sdna(prop, NULL, "type");
01812         RNA_def_property_enum_items(prop, prop_type_items);
01813         RNA_def_property_ui_text(prop, "Action Type", "Action playback type");
01814         RNA_def_property_update(prop, NC_LOGIC, NULL);
01815 
01816         prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
01817         RNA_def_property_pointer_sdna(prop, NULL, "act");
01818         RNA_def_property_struct_type(prop, "Action");
01819         RNA_def_property_flag(prop, PROP_EDITABLE);
01820         RNA_def_property_ui_text(prop, "Action", "");
01821         /* note: custom set function is ONLY to avoid rna setting a user for this. */
01822         RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_action_action_set", NULL, NULL);
01823         RNA_def_property_update(prop, NC_LOGIC, NULL);
01824 
01825         prop= RNA_def_property(srna, "use_continue_last_frame", PROP_BOOLEAN, PROP_NONE);
01826         RNA_def_property_boolean_negative_sdna(prop, NULL, "end_reset", 1);
01827         RNA_def_property_ui_text(prop, "Continue", "Restore last frame when switching on/off, otherwise play from the start each time");
01828         RNA_def_property_update(prop, NC_LOGIC, NULL);
01829         
01830         prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
01831         RNA_def_property_string_sdna(prop, NULL, "name");
01832         RNA_def_property_ui_text(prop, "Property", "Use this property to define the Action position");
01833         RNA_def_property_update(prop, NC_LOGIC, NULL);
01834 
01835         prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
01836         RNA_def_property_float_sdna(prop, NULL, "sta");
01837         RNA_def_property_ui_range(prop, 0.0, MAXFRAME, 100, 2);
01838         RNA_def_property_ui_text(prop, "Start Frame", "");
01839         RNA_def_property_update(prop, NC_LOGIC, NULL);
01840 
01841         prop= RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE);
01842         RNA_def_property_float_sdna(prop, NULL, "end");
01843         RNA_def_property_ui_range(prop, 0.0, MAXFRAME, 100, 2);
01844         RNA_def_property_ui_text(prop, "End Frame", "");
01845         RNA_def_property_update(prop, NC_LOGIC, NULL);
01846 
01847         prop= RNA_def_property(srna, "frame_blend_in", PROP_INT, PROP_NONE);
01848         RNA_def_property_int_sdna(prop, NULL, "blendin");
01849         RNA_def_property_range(prop, 0, 32767);
01850         RNA_def_property_ui_text(prop, "Blendin", "Number of frames of motion blending");
01851         RNA_def_property_update(prop, NC_LOGIC, NULL);
01852 
01853         prop= RNA_def_property(srna, "priority", PROP_INT, PROP_NONE);
01854         RNA_def_property_range(prop, 0, 100);
01855         RNA_def_property_ui_text(prop, "Priority", "Execution priority - lower numbers will override actions with higher numbers. With 2 or more actions at once, the overriding channels must be lower in the stack");
01856         RNA_def_property_update(prop, NC_LOGIC, NULL);
01857 
01858         prop= RNA_def_property(srna, "frame_property", PROP_STRING, PROP_NONE);
01859         RNA_def_property_string_sdna(prop, NULL, "frameProp");
01860         RNA_def_property_ui_text(prop, "Frame Property", "Assign the action's current frame number to this property");
01861         RNA_def_property_update(prop, NC_LOGIC, NULL);
01862 
01863 #ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
01864         prop= RNA_def_property(srna, "stride_length", PROP_FLOAT, PROP_NONE);
01865         RNA_def_property_float_sdna(prop, NULL, "stridelength");
01866         RNA_def_property_range(prop, 0.0, 2500.0);
01867         RNA_def_property_ui_text(prop, "Cycle", "Distance covered by a single cycle of the action");
01868         RNA_def_property_update(prop, NC_LOGIC, NULL);
01869 #endif
01870 }
01871 
01872 static void rna_def_state_actuator(BlenderRNA *brna)
01873 {
01874         StructRNA *srna;
01875         PropertyRNA *prop;
01876 
01877         static EnumPropertyItem prop_type_items[] ={
01878                 {ACT_STATE_SET, "SET", 0, "Set State", ""},
01879                 {ACT_STATE_ADD, "ADD", 0, "Add State", ""},
01880                 {ACT_STATE_REMOVE, "REMOVE", 0, "Remove State", ""},
01881                 {ACT_STATE_CHANGE, "CHANGE", 0, "Change State", ""},
01882                 {0, NULL, 0, NULL, NULL}};
01883         
01884         srna= RNA_def_struct(brna, "StateActuator", "Actuator");
01885         RNA_def_struct_ui_text(srna, "State Actuator", "Actuator to handle states");
01886         RNA_def_struct_sdna_from(srna, "bStateActuator", "data");
01887 
01888         prop= RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
01889         RNA_def_property_enum_sdna(prop, NULL, "type");
01890         RNA_def_property_enum_items(prop, prop_type_items);
01891         RNA_def_property_ui_text(prop, "Operation", "Select the bit operation on object state mask");
01892         RNA_def_property_update(prop, NC_LOGIC, NULL);
01893 
01894         prop= RNA_def_property(srna, "states", PROP_BOOLEAN, PROP_LAYER_MEMBER);
01895         RNA_def_property_boolean_sdna(prop, NULL, "mask", 1);
01896         RNA_def_property_array(prop, OB_MAX_STATES);
01897         RNA_def_property_ui_text(prop, "State", "");
01898         RNA_def_property_boolean_funcs(prop, NULL, "rna_StateActuator_state_set");
01899 }
01900 
01901 static void rna_def_armature_actuator(BlenderRNA *brna)
01902 {
01903         StructRNA *srna;
01904         PropertyRNA* prop;
01905 
01906         static EnumPropertyItem prop_type_items[] ={
01907                 {ACT_ARM_RUN, "RUN", 0, "Run Armature", ""},
01908                 {ACT_ARM_ENABLE, "ENABLE", 0, "Enable", ""},
01909                 {ACT_ARM_DISABLE, "DISABLE", 0, "Disable", ""},
01910                 {ACT_ARM_SETTARGET, "SETTARGET", 0, "Set Target", ""},
01911                 {ACT_ARM_SETWEIGHT, "SETWEIGHT", 0, "Set Weight", ""},
01912                 {0, NULL, 0, NULL, NULL}};
01913 
01914         srna= RNA_def_struct(brna, "ArmatureActuator", "Actuator");
01915         RNA_def_struct_ui_text(srna, "Armature Actuator", "Actuator to ..");
01916         RNA_def_struct_sdna_from(srna, "bArmatureActuator", "data");
01917 
01918         prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
01919         RNA_def_property_enum_sdna(prop, NULL, "type");
01920         RNA_def_property_enum_items(prop, prop_type_items);
01921         RNA_def_property_ui_text(prop, "Constraint Type", "");
01922         RNA_def_property_update(prop, NC_LOGIC, NULL);
01923 
01924         prop= RNA_def_property(srna, "bone", PROP_STRING, PROP_NONE);
01925         RNA_def_property_string_sdna(prop, NULL, "posechannel");
01926         RNA_def_property_ui_text(prop, "Bone", "Bone on which the constraint is defined");
01927         RNA_def_property_update(prop, NC_LOGIC, "rna_Actuator_Armature_update");
01928 
01929         prop= RNA_def_property(srna, "constraint", PROP_STRING, PROP_NONE);
01930         RNA_def_property_string_sdna(prop, NULL, "constraint");
01931         RNA_def_property_ui_text(prop, "Constraint", "Name of the constraint you want to control");
01932         RNA_def_property_update(prop, NC_LOGIC, "rna_Actuator_Armature_update");
01933 
01934         prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
01935         RNA_def_property_struct_type(prop, "Object");
01936         RNA_def_property_flag(prop, PROP_EDITABLE);
01937         RNA_def_property_ui_text(prop, "Target", "Set this object as the target of the constraint");
01938         RNA_def_property_update(prop, NC_LOGIC, NULL);
01939 
01940         prop= RNA_def_property(srna, "secondary_target", PROP_POINTER, PROP_NONE);
01941         RNA_def_property_pointer_sdna(prop, NULL, "subtarget");
01942         RNA_def_property_struct_type(prop, "Object");
01943         RNA_def_property_flag(prop, PROP_EDITABLE);
01944         RNA_def_property_ui_text(prop, "Secondary Target", "Set this object as the secondary target of the constraint (only IK polar target at the moment)");
01945         RNA_def_property_update(prop, NC_LOGIC, NULL);
01946 
01947         prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
01948         RNA_def_property_float_sdna(prop, NULL, "weight");
01949         RNA_def_property_range(prop, 0.0, 1.0);
01950         RNA_def_property_ui_text(prop, "Weight", "Set weight of this constraint");
01951         RNA_def_property_update(prop, NC_LOGIC, NULL);
01952 }
01953 
01954 void RNA_def_actuator(BlenderRNA *brna)
01955 {
01956         rna_def_actuator(brna);
01957 
01958         rna_def_action_actuator(brna);
01959         rna_def_object_actuator(brna);
01960         rna_def_fcurve_actuator(brna);
01961         rna_def_camera_actuator(brna);
01962         rna_def_sound_actuator(brna);
01963         rna_def_property_actuator(brna);
01964         rna_def_constraint_actuator(brna);
01965         rna_def_edit_object_actuator(brna);
01966         rna_def_scene_actuator(brna);
01967         rna_def_random_actuator(brna);
01968         rna_def_message_actuator(brna);
01969         rna_def_game_actuator(brna);
01970         rna_def_visibility_actuator(brna);
01971         rna_def_twodfilter_actuator(brna);
01972         rna_def_parent_actuator(brna);
01973         rna_def_shape_action_actuator(brna);
01974         rna_def_state_actuator(brna);
01975         rna_def_armature_actuator(brna);
01976 }
01977 
01978 #endif
01979