Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_animation.c')
-rw-r--r--source/blender/makesrna/intern/rna_animation.c64
1 files changed, 33 insertions, 31 deletions
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index fedba105a69..42cd6fd5911 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -327,7 +327,7 @@ static PointerRNA rna_KeyingSet_typeinfo_get(PointerRNA *ptr)
static KS_Path *rna_KeyingSet_paths_add(KeyingSet *keyingset, ReportList *reports,
- ID *id, char rna_path[], int index, int grouping_method, char group_name[])
+ ID *id, char rna_path[], int index, int group_method, char group_name[])
{
KS_Path *ksp = NULL;
short flag = 0;
@@ -340,7 +340,7 @@ static KS_Path *rna_KeyingSet_paths_add(KeyingSet *keyingset, ReportList *report
/* 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, grouping_method);
+ ksp= BKE_keyingset_add_path(keyingset, id, group_name, rna_path, index, flag, group_method);
keyingset->active_path= BLI_countlist(&keyingset->paths);
}
else {
@@ -395,17 +395,17 @@ static void rna_def_common_keying_flags(StructRNA *srna, short reg)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "insertkey_needed", PROP_BOOLEAN, PROP_NONE);
+ 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, "insertkey_visual", PROP_BOOLEAN, PROP_NONE);
+ 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, "insertkey_xyz_to_rgb", PROP_BOOLEAN, PROP_NONE);
+ 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) and also Color is based on the transform axis");
if (reg) RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
@@ -489,7 +489,7 @@ static void rna_def_keyingset_path(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ID");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_editable_func(prop, "rna_ksPath_id_editable");
- RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_ksPath_id_typef");
+ RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_ksPath_id_typef", NULL);
RNA_def_property_ui_text(prop, "ID-Block", "ID-Block that keyframes for Keying Set should be added to (for Absolute Keying Sets only)");
prop= RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE);
@@ -504,7 +504,7 @@ static void rna_def_keyingset_path(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Group Name", "Name of Action Group to assign setting(s) for this path to");
/* Grouping */
- prop= RNA_def_property(srna, "grouping", PROP_ENUM, PROP_NONE);
+ 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, keyingset_path_grouping_items);
RNA_def_property_ui_text(prop, "Grouping Method", "Method used to define which Group-name to use");
@@ -519,7 +519,7 @@ static void rna_def_keyingset_path(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific setting if applicable");
/* Flags */
- prop= RNA_def_property(srna, "entire_array", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_entire_array", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KSP_FLAG_WHOLE_ARRAY);
RNA_def_property_ui_text(prop, "Entire Array", "When an 'array/vector' type is chosen (Location, Rotation, Color, etc.), entire array is to be used");
@@ -528,7 +528,6 @@ static void rna_def_keyingset_path(BlenderRNA *brna)
}
-
/* keyingset.paths */
static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop)
{
@@ -536,6 +535,8 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop)
FunctionRNA *func;
PropertyRNA *parm;
+
+ PropertyRNA *prop;
RNA_def_property_srna(cprop, "KeyingSetPaths");
srna= RNA_def_struct(brna, "KeyingSetPaths", NULL);
@@ -557,9 +558,9 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop)
parm= RNA_def_string(func, "data_path", "", 256, "Data-Path", "RNA-Path to destination property."); // xxx hopefully this is long enough
RNA_def_property_flag(parm, PROP_REQUIRED);
/* index (defaults to -1 for entire array) */
- parm=RNA_def_int(func, "index", -1, 0, INT_MAX, "Index", "The index of the destination property (i.e. axis of Location/Rotation/etc.), or -1 for the entire array.", 0, INT_MAX);
+ parm=RNA_def_int(func, "index", -1, -1, INT_MAX, "Index", "The index of the destination property (i.e. axis of Location/Rotation/etc.), or -1 for the entire array.", 0, INT_MAX);
/* grouping */
- parm=RNA_def_enum(func, "grouping_method", keyingset_path_grouping_items, KSP_GROUP_KSNAME, "Grouping Method", "Method used to define which Group-name to use.");
+ parm=RNA_def_enum(func, "group_method", keyingset_path_grouping_items, KSP_GROUP_KSNAME, "Grouping Method", "Method used to define which Group-name to use.");
parm=RNA_def_string(func, "group_name", "", 64, "Group Name", "Name of Action Group to assign destination to (only if grouping mode is to use this name).");
@@ -569,13 +570,25 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_flag(func, FUNC_USE_REPORTS);
/* path to remove */
parm= RNA_def_pointer(func, "path", "KeyingSetPath", "Path", "");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* Remove All Paths */
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);
+ RNA_def_property_editable_func(prop, "rna_KeyingSet_active_ksPath_editable");
+ RNA_def_property_pointer_funcs(prop, "rna_KeyingSet_active_ksPath_get", "rna_KeyingSet_active_ksPath_set", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes");
+
+ prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "active_path");
+ RNA_def_property_int_funcs(prop, "rna_KeyingSet_active_ksPath_index_get", "rna_KeyingSet_active_ksPath_index_set", "rna_KeyingSet_active_ksPath_index_range");
+ RNA_def_property_ui_text(prop, "Active Path Index", "Current Keying Set index");
}
static void rna_def_keyingset(BlenderRNA *brna)
@@ -595,8 +608,8 @@ static void rna_def_keyingset(BlenderRNA *brna)
/* 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);
- RNA_def_property_ui_text(prop, "Type Info", "Callback function defines for builtin Keying Sets");
+ 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);
@@ -604,21 +617,10 @@ static void rna_def_keyingset(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "KeyingSetPath");
RNA_def_property_ui_text(prop, "Paths", "Keying Set Paths to define settings that get keyframed together");
rna_def_keyingset_paths(brna, prop);
-
- prop= RNA_def_property(srna, "active_path", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "KeyingSetPath");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_editable_func(prop, "rna_KeyingSet_active_ksPath_editable");
- RNA_def_property_pointer_funcs(prop, "rna_KeyingSet_active_ksPath_get", "rna_KeyingSet_active_ksPath_set", NULL);
- RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes");
-
- prop= RNA_def_property(srna, "active_path_index", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "active_path");
- RNA_def_property_int_funcs(prop, "rna_KeyingSet_active_ksPath_index_get", "rna_KeyingSet_active_ksPath_index_set", "rna_KeyingSet_active_ksPath_index_range");
- RNA_def_property_ui_text(prop, "Active Path Index", "Current Keying Set index");
-
+
/* Flags */
- prop= RNA_def_property(srna, "absolute", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "is_path_absolute", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYINGSET_ABSOLUTE);
RNA_def_property_ui_text(prop, "Absolute", "Keying Set defines specific paths/settings to be keyframed (i.e. is not reliant on context info)");
@@ -658,7 +660,7 @@ void rna_def_animdata(BlenderRNA *brna)
/* Active Action */
prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_funcs(prop, NULL, "rna_AnimData_action_set", NULL);
+ RNA_def_property_pointer_funcs(prop, NULL, "rna_AnimData_action_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE); /* this flag as well as the dynamic test must be defined for this to be editable... */
RNA_def_property_editable_func(prop, "rna_AnimData_action_editable");
RNA_def_property_ui_text(prop, "Action", "Active Action for this datablock");
@@ -670,7 +672,7 @@ void rna_def_animdata(BlenderRNA *brna)
RNA_def_property_enum_items(prop, nla_mode_extend_items);
RNA_def_property_ui_text(prop, "Action Extrapolation", "Action to take for gaps past the Active Action's range (when evaluating with NLA)");
- prop= RNA_def_property(srna, "action_blending", PROP_ENUM, PROP_NONE);
+ 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, 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");
@@ -688,7 +690,7 @@ void rna_def_animdata(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Drivers", "The Drivers/Expressions for this datablock");
/* General Settings */
- prop= RNA_def_property(srna, "nla_enabled", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use_nla", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ADT_NLA_EVAL_OFF);
RNA_def_property_ui_text(prop, "NLA Evaluation Enabled", "NLA stack is evaluated when evaluating this block");
}