diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-09 15:40:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-09 15:40:09 +0300 |
commit | fb565ddb681f39cbe47e91d11e5b728bb4314a7b (patch) | |
tree | 93eba0946d0e65fd3cf16564cb41a0417bb3ba1e /source/blender/makesrna/intern/rna_animation.c | |
parent | 56a47e58f4de3f66c2fee827fb2a7883b4f493e9 (diff) |
Cleanup: trailing space in RNA
Diffstat (limited to 'source/blender/makesrna/intern/rna_animation.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_animation.c | 190 |
1 files changed, 95 insertions, 95 deletions
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 3f8a7bc96e8..23071288c0a 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -84,9 +84,9 @@ const EnumPropertyItem rna_enum_keying_flag_items[] = { static void rna_AnimData_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { ID *id = ptr->id.data; - - /* tag for refresh so that scheduled updates (e.g. action changed) will - * get computed and reflected in the scene [#34869] + + /* tag for refresh so that scheduled updates (e.g. action changed) will + * get computed and reflected in the scene [#34869] */ DAG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA); } @@ -94,7 +94,7 @@ static void rna_AnimData_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Point static int rna_AnimData_action_editable(PointerRNA *ptr, const char **UNUSED(r_info)) { AnimData *adt = (AnimData *)ptr->data; - + /* active action is only editable when it is not a tweaking strip */ if ((adt->flag & ADT_NLA_EDIT_ON) || (adt->actstrip) || (adt->tmpact)) return 0; @@ -106,10 +106,10 @@ static void rna_AnimData_action_set(PointerRNA *ptr, PointerRNA value) { ID *ownerId = (ID *)ptr->id.data; AnimData *adt; - + /* set action */ BKE_animdata_set_action(NULL, ownerId, value.data); - + /* force action to get evaluated [#34869] */ adt = BKE_animdata_from_id(ownerId); if (adt) { @@ -156,16 +156,16 @@ static int RKS_POLL_rna_internal(KeyingSetInfo *ksi, bContext *C) /* hook up arguments */ RNA_parameter_set_lookup(&list, "ksi", &ksi); RNA_parameter_set_lookup(&list, "context", &C); - + /* execute the function */ ksi->ext.call(C, &ptr, func, &list); - + /* read the result */ RNA_parameter_get_lookup(&list, "ok", &ret); ok = *(int *)ret; } RNA_parameter_list_free(&list); - + return ok; } @@ -187,7 +187,7 @@ static void RKS_ITER_rna_internal(KeyingSetInfo *ksi, bContext *C, KeyingSet *ks RNA_parameter_set_lookup(&list, "ksi", &ksi); RNA_parameter_set_lookup(&list, "context", &C); RNA_parameter_set_lookup(&list, "ks", &ks); - + /* execute the function */ ksi->ext.call(C, &ptr, func, &list); } @@ -213,7 +213,7 @@ static void RKS_GEN_rna_internal(KeyingSetInfo *ksi, bContext *C, KeyingSet *ks, RNA_parameter_set_lookup(&list, "context", &C); RNA_parameter_set_lookup(&list, "ks", &ks); RNA_parameter_set_lookup(&list, "data", data); - + /* execute the function */ ksi->ext.call(C, &ptr, func, &list); } @@ -235,11 +235,11 @@ static void rna_KeyingSetInfo_unregister(Main *bmain, StructRNA *type) if (ksi == NULL) return; - + /* free RNA data referencing this */ RNA_struct_free_extension(type, &ksi->ext); RNA_struct_free(&BLENDER_RNA, type); - + WM_main_add_notifier(NC_WINDOW, NULL); /* unlink Blender-side data */ @@ -258,17 +258,17 @@ static StructRNA *rna_KeyingSetInfo_register( /* setup dummy type info to store static properties in */ /* TODO: perhaps we want to get users to register as if they're using 'KeyingSet' directly instead? */ RNA_pointer_create(NULL, &RNA_KeyingSetInfo, &dummyksi, &dummyptr); - + /* validate the python class */ if (validate(&dummyptr, data, have_function) != 0) return NULL; - + if (strlen(identifier) >= sizeof(dummyksi.idname)) { BKE_reportf(reports, RPT_ERROR, "Registering keying set info class: '%s' is too long, maximum length is %d", identifier, (int)sizeof(dummyksi.idname)); return NULL; } - + /* check if we have registered this info before, and remove it */ ksi = ANIM_keyingset_info_find_name(dummyksi.idname); if (ksi && ksi->ext.srna) { @@ -278,23 +278,23 @@ static StructRNA *rna_KeyingSetInfo_register( /* create a new KeyingSetInfo type */ ksi = MEM_callocN(sizeof(KeyingSetInfo), "python keying set info"); memcpy(ksi, &dummyksi, sizeof(KeyingSetInfo)); - + /* set RNA-extensions info */ ksi->ext.srna = RNA_def_struct_ptr(&BLENDER_RNA, ksi->idname, &RNA_KeyingSetInfo); ksi->ext.data = data; ksi->ext.call = call; ksi->ext.free = free; RNA_struct_blender_type_set(ksi->ext.srna, ksi); - + /* set callbacks */ /* NOTE: we really should have all of these... */ ksi->poll = (have_function[0]) ? RKS_POLL_rna_internal : NULL; ksi->iter = (have_function[1]) ? RKS_ITER_rna_internal : NULL; ksi->generate = (have_function[2]) ? RKS_GEN_rna_internal : NULL; - + /* add and register with other info as needed */ ANIM_keyingset_info_register(ksi); - + WM_main_add_notifier(NC_WINDOW, NULL); /* return the struct-rna added */ @@ -318,7 +318,7 @@ static int rna_ksPath_id_editable(PointerRNA *ptr, const char **UNUSED(r_info)) static void rna_ksPath_id_type_set(PointerRNA *ptr, int value) { KS_Path *data = (KS_Path *)(ptr->data); - + /* set the driver type, then clear the id-block if the type is invalid */ data->idtype = value; if ((data->id) && (GS(data->id->name) != data->idtype)) @@ -338,7 +338,7 @@ static void rna_ksPath_RnaPath_get(PointerRNA *ptr, char *value) static int rna_ksPath_RnaPath_length(PointerRNA *ptr) { KS_Path *ksp = (KS_Path *)ptr->data; - + if (ksp->rna_path) return strlen(ksp->rna_path); else @@ -351,7 +351,7 @@ static void rna_ksPath_RnaPath_set(PointerRNA *ptr, const char *value) if (ksp->rna_path) MEM_freeN(ksp->rna_path); - + if (value[0]) ksp->rna_path = BLI_strdup(value); else @@ -363,20 +363,20 @@ static void rna_ksPath_RnaPath_set(PointerRNA *ptr, const char *value) static void rna_KeyingSet_name_set(PointerRNA *ptr, const char *value) { KeyingSet *ks = (KeyingSet *)ptr->data; - + /* update names of corresponding groups if name changes */ if (!STREQ(ks->name, value)) { KS_Path *ksp; - + for (ksp = ks->paths.first; ksp; ksp = ksp->next) { if ((ksp->groupmode == KSP_GROUP_KSNAME) && (ksp->id)) { AnimData *adt = BKE_animdata_from_id(ksp->id); - + /* TODO: NLA strips? */ if (adt && adt->action) { bActionGroup *agrp; - - /* lazy check - should really find the F-Curve for the affected path and check its group + + /* lazy check - should really find the F-Curve for the affected path and check its group * but this way should be faster and work well for most cases, as long as there are no * conflicts */ @@ -391,7 +391,7 @@ static void rna_KeyingSet_name_set(PointerRNA *ptr, const char *value) } } } - + /* finally, update name to new value */ BLI_strncpy(ks->name, value, sizeof(ks->name)); } @@ -400,7 +400,7 @@ static void rna_KeyingSet_name_set(PointerRNA *ptr, const char *value) static int rna_KeyingSet_active_ksPath_editable(PointerRNA *ptr, const char **UNUSED(r_info)) { KeyingSet *ks = (KeyingSet *)ptr->data; - + /* only editable if there are some paths to change to */ return (BLI_listbase_is_empty(&ks->paths) == false) ? PROP_EDITABLE : 0; } @@ -443,7 +443,7 @@ static PointerRNA rna_KeyingSet_typeinfo_get(PointerRNA *ptr) { KeyingSet *ks = (KeyingSet *)ptr->data; KeyingSetInfo *ksi = NULL; - + /* keying set info is only for builtin Keying Sets */ if ((ks->flag & KEYINGSET_ABSOLUTE) == 0) ksi = ANIM_keyingset_info_find_name(ks->typeinfo); @@ -457,13 +457,13 @@ static KS_Path *rna_KeyingSet_paths_add(KeyingSet *keyingset, ReportList *report { KS_Path *ksp = NULL; short flag = 0; - + /* special case when index = -1, we key the whole array (as with other places where index is used) */ if (index == -1) { flag |= KSP_FLAG_WHOLE_ARRAY; index = 0; } - + /* if data is valid, call the API function for this */ if (keyingset) { ksp = BKE_keyingset_add_path(keyingset, id, group_name, rna_path, index, flag, group_method); @@ -472,7 +472,7 @@ static KS_Path *rna_KeyingSet_paths_add(KeyingSet *keyingset, ReportList *report else { BKE_report(reports, RPT_ERROR, "Keying set path could not be added"); } - + /* return added path */ return ksp; } @@ -501,13 +501,13 @@ static void rna_KeyingSet_paths_clear(KeyingSet *keyingset, ReportList *reports) /* if data is valid, call the API function for this */ if (keyingset) { KS_Path *ksp, *kspn; - + /* free each path as we go to avoid looping twice */ for (ksp = keyingset->paths.first; ksp; ksp = kspn) { kspn = ksp->next; BKE_keyingset_free_path(keyingset, ksp); } - + /* reset the active path, since there aren't any left */ keyingset->active_path = 0; } @@ -566,7 +566,7 @@ static FCurve *rna_Driver_from_existing(AnimData *adt, bContext *C, FCurve *src_ else { /* just make a copy of the existing one and add to self */ FCurve *new_fcu = copy_fcurve(src_driver); - + /* XXX: if we impose any ordering on these someday, this will be problematic */ BLI_addtail(&adt->drivers, new_fcu); return new_fcu; @@ -590,39 +590,39 @@ static FCurve *rna_Driver_find(AnimData *adt, ReportList *reports, const char *d static void rna_def_common_keying_flags(StructRNA *srna, short reg) { PropertyRNA *prop; - + /* override scene/userpref defaults? */ prop = RNA_def_property(srna, "use_insertkey_override_needed", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "keyingoverride", INSERTKEY_NEEDED); - RNA_def_property_ui_text(prop, "Override Insert Keyframes Default- Only Needed", + RNA_def_property_ui_text(prop, "Override Insert Keyframes Default- Only Needed", "Override default setting to only insert keyframes where they're needed in the relevant F-Curves"); if (reg) RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); - + prop = RNA_def_property(srna, "use_insertkey_override_visual", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "keyingoverride", INSERTKEY_MATRIX); - RNA_def_property_ui_text(prop, "Override Insert Keyframes Default - Visual", + RNA_def_property_ui_text(prop, "Override Insert Keyframes Default - Visual", "Override default setting to insert keyframes based on 'visual transforms'"); if (reg) RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); - + prop = RNA_def_property(srna, "use_insertkey_override_xyz_to_rgb", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "keyingoverride", INSERTKEY_XYZ2RGB); RNA_def_property_ui_text(prop, "Override F-Curve Colors - XYZ to RGB", "Override default setting to set color for newly added transformation F-Curves " "(Location, Rotation, Scale) to be based on the transform axis"); if (reg) RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); - - + + /* value to override defaults with */ prop = RNA_def_property(srna, "use_insertkey_needed", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "keyingflag", INSERTKEY_NEEDED); RNA_def_property_ui_text(prop, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves"); if (reg) RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); - + prop = RNA_def_property(srna, "use_insertkey_visual", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "keyingflag", INSERTKEY_MATRIX); RNA_def_property_ui_text(prop, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'"); if (reg) RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); - + prop = RNA_def_property(srna, "use_insertkey_xyz_to_rgb", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "keyingflag", INSERTKEY_XYZ2RGB); RNA_def_property_ui_text(prop, "F-Curve Colors - XYZ to RGB", "Color for newly added transformation F-Curves (Location, Rotation, Scale) is based on the transform axis"); @@ -645,36 +645,36 @@ static void rna_def_keyingset_info(BlenderRNA *brna) PropertyRNA *prop; FunctionRNA *func; PropertyRNA *parm; - + srna = RNA_def_struct(brna, "KeyingSetInfo", NULL); RNA_def_struct_sdna(srna, "KeyingSetInfo"); RNA_def_struct_ui_text(srna, "Keying Set Info", "Callback function defines for builtin Keying Sets"); RNA_def_struct_refine_func(srna, "rna_KeyingSetInfo_refine"); RNA_def_struct_register_funcs(srna, "rna_KeyingSetInfo_register", "rna_KeyingSetInfo_unregister", NULL); - + /* Properties --------------------- */ - + RNA_define_verify_sdna(0); /* not in sdna */ - + prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "idname"); RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "ID Name", KEYINGSET_IDNAME_DOC); - + prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "name"); RNA_def_property_ui_text(prop, "UI Name", ""); RNA_def_struct_name_property(srna, prop); RNA_def_property_flag(prop, PROP_REGISTER); - + prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "description"); RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */ RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); RNA_def_property_ui_text(prop, "Description", "A short description of the keying set"); - + /* Regarding why we don't use rna_def_common_keying_flags() here: - * - Using it would keep this case in sync with the other places + * - Using it would keep this case in sync with the other places * where these options are exposed (which are optimized for being * used in the UI). * - Unlike all the other places, this case is used for defining @@ -687,9 +687,9 @@ static void rna_def_keyingset_info(BlenderRNA *brna) RNA_def_property_enum_items(prop, rna_enum_keying_flag_items); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL | PROP_ENUM_FLAG); RNA_def_property_ui_text(prop, "Options", "Keying Set options to use when inserting keyframes"); - + RNA_define_verify_sdna(1); - + /* Function Callbacks ------------- */ /* poll */ func = RNA_def_function(srna, "poll", NULL); @@ -698,7 +698,7 @@ static void rna_def_keyingset_info(BlenderRNA *brna) RNA_def_function_return(func, RNA_def_boolean(func, "ok", 1, "", "")); parm = RNA_def_pointer(func, "context", "Context", "", ""); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); - + /* iterator */ func = RNA_def_function(srna, "iterator", NULL); RNA_def_function_ui_description(func, "Call generate() on the structs which have properties to be keyframed"); @@ -707,7 +707,7 @@ static void rna_def_keyingset_info(BlenderRNA *brna) RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); parm = RNA_def_pointer(func, "ks", "KeyingSet", "", ""); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); - + /* generate */ func = RNA_def_function(srna, "generate", NULL); RNA_def_function_ui_description(func, "Add Paths to the Keying Set to keyframe the properties of the given data"); @@ -724,11 +724,11 @@ static void rna_def_keyingset_path(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - + srna = RNA_def_struct(brna, "KeyingSetPath", NULL); RNA_def_struct_sdna(srna, "KS_Path"); RNA_def_struct_ui_text(srna, "Keying Set Path", "Path to a setting for use in a Keying Set"); - + /* ID */ prop = RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "ID"); @@ -739,7 +739,7 @@ static void rna_def_keyingset_path(BlenderRNA *brna) "ID-Block that keyframes for Keying Set should be added to " "(for Absolute Keying Sets only)"); RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET | NA_EDITED, NULL); /* XXX: maybe a bit too noisy */ - + prop = RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "idtype"); RNA_def_property_enum_items(prop, rna_enum_id_type_items); @@ -748,19 +748,19 @@ static void rna_def_keyingset_path(BlenderRNA *brna) RNA_def_property_ui_text(prop, "ID Type", "Type of ID-block that can be used"); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_ID); RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET | NA_EDITED, NULL); /* XXX: maybe a bit too noisy */ - + /* Group */ prop = RNA_def_property(srna, "group", PROP_STRING, PROP_NONE); RNA_def_property_ui_text(prop, "Group Name", "Name of Action Group to assign setting(s) for this path to"); RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET | NA_EDITED, NULL); /* XXX: maybe a bit too noisy */ - + /* Grouping */ prop = RNA_def_property(srna, "group_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "groupmode"); RNA_def_property_enum_items(prop, rna_enum_keyingset_path_grouping_items); RNA_def_property_ui_text(prop, "Grouping Method", "Method used to define which Group-name to use"); RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET | NA_EDITED, NULL); /* XXX: maybe a bit too noisy */ - + /* Path + Array Index */ prop = RNA_def_property(srna, "data_path", PROP_STRING, PROP_NONE); RNA_def_property_string_funcs(prop, "rna_ksPath_RnaPath_get", "rna_ksPath_RnaPath_length", @@ -773,7 +773,7 @@ static void rna_def_keyingset_path(BlenderRNA *brna) prop = RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE); RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific setting if applicable"); RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET | NA_EDITED, NULL); /* XXX: maybe a bit too noisy */ - + /* Flags */ prop = RNA_def_property(srna, "use_entire_array", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", KSP_FLAG_WHOLE_ARRAY); @@ -781,7 +781,7 @@ static void rna_def_keyingset_path(BlenderRNA *brna) "When an 'array/vector' type is chosen (Location, Rotation, Color, etc.), " "entire array is to be used"); RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET | NA_EDITED, NULL); /* XXX: maybe a bit too noisy */ - + /* Keyframing Settings */ rna_def_common_keying_flags(srna, 0); } @@ -794,7 +794,7 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop) FunctionRNA *func; PropertyRNA *parm; - + PropertyRNA *prop; RNA_def_property_srna(cprop, "KeyingSetPaths"); @@ -802,7 +802,7 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_struct_sdna(srna, "KeyingSet"); RNA_def_struct_ui_text(srna, "Keying set paths", "Collection of keying set paths"); - + /* Add Path */ func = RNA_def_function(srna, "add", "rna_KeyingSet_paths_add"); RNA_def_function_ui_description(func, "Add a new path for the Keying Set"); @@ -842,7 +842,7 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "clear", "rna_KeyingSet_paths_clear"); RNA_def_function_ui_description(func, "Remove all the paths from the Keying Set"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - + prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "KeyingSetPath"); RNA_def_property_flag(prop, PROP_EDITABLE); @@ -862,17 +862,17 @@ static void rna_def_keyingset(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - + srna = RNA_def_struct(brna, "KeyingSet", NULL); RNA_def_struct_ui_text(srna, "Keying Set", "Settings that should be keyframed together"); - + /* Id/Label */ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "idname"); RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, "ID Name", KEYINGSET_IDNAME_DOC); /* RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET | NA_RENAME, NULL); */ /* NOTE: disabled, as ID name shouldn't be editable */ - + prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "name"); RNA_def_property_string_funcs(prop, NULL, NULL, "rna_KeyingSet_name_set"); @@ -880,19 +880,19 @@ static void rna_def_keyingset(BlenderRNA *brna) RNA_def_struct_ui_icon(srna, ICON_KEYINGSET); RNA_def_struct_name_property(srna, prop); RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET | NA_RENAME, NULL); - + prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "description"); RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */ RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); RNA_def_property_ui_text(prop, "Description", "A short description of the keying set"); - + /* KeyingSetInfo (Type Info) for Builtin Sets only */ prop = RNA_def_property(srna, "type_info", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "KeyingSetInfo"); RNA_def_property_pointer_funcs(prop, "rna_KeyingSet_typeinfo_get", NULL, NULL, NULL); RNA_def_property_ui_text(prop, "Type Info", "Callback function defines for built-in Keying Sets"); - + /* Paths */ prop = RNA_def_property(srna, "paths", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "paths", NULL); @@ -907,11 +907,11 @@ static void rna_def_keyingset(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Absolute", "Keying Set defines specific paths/settings to be keyframed " "(i.e. is not reliant on context info)"); - + /* Keyframing Flags */ rna_def_common_keying_flags(srna, 0); - - + + /* Keying Set API */ RNA_api_keyingset(srna); } @@ -926,12 +926,12 @@ static void rna_api_animdata_nla_tracks(BlenderRNA *brna, PropertyRNA *cprop) FunctionRNA *func; PropertyRNA *prop; - + RNA_def_property_srna(cprop, "NlaTracks"); srna = RNA_def_struct(brna, "NlaTracks", NULL); RNA_def_struct_sdna(srna, "AnimData"); RNA_def_struct_ui_text(srna, "NLA Tracks", "Collection of NLA Tracks"); - + func = RNA_def_function(srna, "new", "rna_NlaTrack_new"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); RNA_def_function_ui_description(func, "Add a new NLA Track"); @@ -939,7 +939,7 @@ static void rna_api_animdata_nla_tracks(BlenderRNA *brna, PropertyRNA *cprop) /* return type */ parm = RNA_def_pointer(func, "track", "NlaTrack", "", "New NLA Track"); RNA_def_function_return(func, parm); - + func = RNA_def_function(srna, "remove", "rna_NlaTrack_remove"); RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_CONTEXT); RNA_def_function_ui_description(func, "Remove a NLA Track"); @@ -963,12 +963,12 @@ static void rna_api_animdata_drivers(BlenderRNA *brna, PropertyRNA *cprop) FunctionRNA *func; /* PropertyRNA *prop; */ - + RNA_def_property_srna(cprop, "AnimDataDrivers"); srna = RNA_def_struct(brna, "AnimDataDrivers", NULL); RNA_def_struct_sdna(srna, "AnimData"); RNA_def_struct_ui_text(srna, "Drivers", "Collection of Driver F-Curves"); - + /* AnimData.drivers.from_existing(...) */ func = RNA_def_function(srna, "from_existing", "rna_Driver_from_existing"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); @@ -977,7 +977,7 @@ static void rna_api_animdata_drivers(BlenderRNA *brna, PropertyRNA *cprop) /* return type */ parm = RNA_def_pointer(func, "driver", "FCurve", "", "New Driver F-Curve"); RNA_def_function_return(func, parm); - + /* AnimData.drivers.find(...) */ func = RNA_def_function(srna, "find", "rna_Driver_find"); RNA_def_function_ui_description(func, "Find a driver F-Curve. Note that this function performs a linear scan " @@ -994,7 +994,7 @@ static void rna_api_animdata_drivers(BlenderRNA *brna, PropertyRNA *cprop) void rna_def_animdata_common(StructRNA *srna) { PropertyRNA *prop; - + prop = RNA_def_property(srna, "animation_data", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "adt"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); @@ -1005,11 +1005,11 @@ static void rna_def_animdata(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - + srna = RNA_def_struct(brna, "AnimData", NULL); RNA_def_struct_ui_text(srna, "Animation Data", "Animation data for data-block"); RNA_def_struct_ui_icon(srna, ICON_ANIM_DATA); - + /* NLA */ prop = RNA_def_property(srna, "nla_tracks", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "nla_tracks", NULL); @@ -1017,7 +1017,7 @@ static void rna_def_animdata(BlenderRNA *brna) RNA_def_property_ui_text(prop, "NLA Tracks", "NLA Tracks (i.e. Animation Layers)"); rna_api_animdata_nla_tracks(brna, prop); - + /* Active Action */ prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE); /* this flag as well as the dynamic test must be defined for this to be editable... */ @@ -1034,30 +1034,30 @@ static void rna_def_animdata(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Action Extrapolation", "Action to take for gaps past the Active Action's range (when evaluating with NLA)"); RNA_def_property_update(prop, NC_ANIMATION | ND_NLA, NULL); - + prop = RNA_def_property(srna, "action_blend_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "act_blendmode"); RNA_def_property_enum_items(prop, rna_enum_nla_mode_blend_items); RNA_def_property_ui_text(prop, "Action Blending", "Method used for combining Active Action's result with result of NLA stack"); RNA_def_property_update(prop, NC_ANIMATION | ND_NLA, NULL); /* this will do? */ - - prop = RNA_def_property(srna, "action_influence", PROP_FLOAT, PROP_FACTOR); + + prop = RNA_def_property(srna, "action_influence", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "act_influence"); RNA_def_property_float_default(prop, 1.0f); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Action Influence", "Amount the Active Action contributes to the result of the NLA stack"); RNA_def_property_update(prop, NC_ANIMATION | ND_NLA, NULL); /* this will do? */ - + /* Drivers */ prop = RNA_def_property(srna, "drivers", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "drivers", NULL); RNA_def_property_struct_type(prop, "FCurve"); RNA_def_property_ui_text(prop, "Drivers", "The Drivers/Expressions for this data-block"); - + rna_api_animdata_drivers(brna, prop); - + /* General Settings */ prop = RNA_def_property(srna, "use_nla", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ADT_NLA_EVAL_OFF); @@ -1076,7 +1076,7 @@ static void rna_def_animdata(BlenderRNA *brna) void RNA_def_animation(BlenderRNA *brna) { rna_def_animdata(brna); - + rna_def_keyingset(brna); rna_def_keyingset_path(brna); rna_def_keyingset_info(brna); |