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:
authorSybren A. Stüvel <sybren@blender.org>2022-03-14 13:15:09 +0300
committerSybren A. Stüvel <sybren@blender.org>2022-03-14 13:17:45 +0300
commit7306417ae46a2cf2733849cd52e1bfb74af40f08 (patch)
tree0fb5e4289045b708b074a408c4fd7ca3c36e035e /source/blender/makesrna/intern/rna_animviz.c
parent4045b3d7b685aeeb6003d3f90b4a41f6337b6159 (diff)
Revert "Animation: Sensible frame range for motion paths"
This reverts commit 1558b270e9fcbc2e23fa248b0e7e770dddae155c. An earlier commit (rB101fadcf6b93c) introduced some new functionality, which was overlooked in reviewing this commit & got broken. Will re-commit after the issue has been fixed. Ref: D13687
Diffstat (limited to 'source/blender/makesrna/intern/rna_animviz.c')
-rw-r--r--source/blender/makesrna/intern/rna_animviz.c43
1 files changed, 15 insertions, 28 deletions
diff --git a/source/blender/makesrna/intern/rna_animviz.c b/source/blender/makesrna/intern/rna_animviz.c
index 0453b327b45..cb993931296 100644
--- a/source/blender/makesrna/intern/rna_animviz.c
+++ b/source/blender/makesrna/intern/rna_animviz.c
@@ -36,27 +36,6 @@ const EnumPropertyItem rna_enum_motionpath_bake_location_items[] = {
{0, NULL, 0, NULL, NULL},
};
-const EnumPropertyItem rna_enum_motionpath_display_type_items[] = {
- {MOTIONPATH_TYPE_ACFRA,
- "CURRENT_FRAME",
- 0,
- "Around Frame",
- "Display Paths of poses within a fixed number of frames around the current frame"},
- {MOTIONPATH_TYPE_RANGE,
- "RANGE",
- 0,
- "In Range",
- "Display Paths of poses within specified range"},
- {0, NULL, 0, NULL, NULL},
-};
-
-const EnumPropertyItem rna_enum_motionpath_range_items[] = {
- {MOTIONPATH_RANGE_KEYS_ALL, "KEYS_ALL", 0, "All keys range", ""},
- {MOTIONPATH_RANGE_KEYS_SELECTED, "KEYS_SELECTED", 0, "Selected keys range", ""},
- {MOTIONPATH_RANGE_SCENE, "SCENE", 0, "Scene frame range", ""},
- {0, NULL, 0, NULL, NULL},
-};
-
#ifdef RNA_RUNTIME
static PointerRNA rna_AnimViz_motion_paths_get(PointerRNA *ptr)
@@ -194,6 +173,20 @@ static void rna_def_animviz_paths(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ static const EnumPropertyItem prop_type_items[] = {
+ {MOTIONPATH_TYPE_ACFRA,
+ "CURRENT_FRAME",
+ 0,
+ "Around Frame",
+ "Display Paths of poses within a fixed number of frames around the current frame"},
+ {MOTIONPATH_TYPE_RANGE,
+ "RANGE",
+ 0,
+ "In Range",
+ "Display Paths of poses within specified range"},
+ {0, NULL, 0, NULL, NULL},
+ };
+
srna = RNA_def_struct(brna, "AnimVizMotionPaths", NULL);
RNA_def_struct_sdna(srna, "bAnimVizSettings");
RNA_def_struct_nested(brna, srna, "AnimViz");
@@ -205,16 +198,10 @@ static void rna_def_animviz_paths(BlenderRNA *brna)
/* Enums */
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "path_type");
- RNA_def_property_enum_items(prop, rna_enum_motionpath_display_type_items);
+ RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Paths Type", "Type of range to show for Motion Paths");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL);
- prop = RNA_def_property(srna, "range", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "path_range");
- RNA_def_property_enum_items(prop, rna_enum_motionpath_range_items);
- RNA_def_property_ui_text(prop, "Paths Range", "Type of range to calculate for Motion Paths");
- RNA_def_property_update(prop, NC_OBJECT | ND_DRAW_ANIMVIZ, NULL);
-
prop = RNA_def_property(srna, "bake_location", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "path_bakeflag");
RNA_def_property_enum_items(prop, rna_enum_motionpath_bake_location_items);