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:
authorJoshua Leung <aligorith@gmail.com>2009-08-17 14:39:03 +0400
committerJoshua Leung <aligorith@gmail.com>2009-08-17 14:39:03 +0400
commit7798ed75d425978539b6fdad2837964c301a9f20 (patch)
tree4db5e8fbd63c50d75a22c4406a4af25cd6872444 /source/blender/makesrna
parentddd7bfc91bb7acb65d17be26be5e1e018acdea7c (diff)
2.5 - Bugfixes:
* Reverse playback works again. Flag was getting overriden before it had a chance to do anything * Active KeyingSet field in TimeLine header should now only be marked as editable when there are some Keying Sets. However, there still seems to be a bug when trying to change this... TODO (Brecht?): it would be nice to be able to specify a list/collection of data for pointer-buttons that aren't ID's.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index f5b4a508894..440f12be2ce 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -176,6 +176,14 @@ static void rna_Scene_frame_update(bContext *C, PointerRNA *ptr)
//ED_update_for_newframe(C);
}
+static int rna_Scene_active_keying_set_editable(PointerRNA *ptr)
+{
+ Scene *scene= (Scene *)ptr->data;
+
+ /* only editable if there are some Keying Sets to change to */
+ return (scene->keyingsets.first != NULL);
+}
+
static PointerRNA rna_Scene_active_keying_set_get(PointerRNA *ptr)
{
Scene *scene= (Scene *)ptr->data;
@@ -1837,7 +1845,7 @@ void RNA_def_scene(BlenderRNA *brna)
prop= RNA_def_property(srna, "active_keying_set", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "KeyingSet");
- RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_editable_func(prop, "rna_Scene_active_keying_set_editable");
RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL);
RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes.");
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
@@ -1845,7 +1853,7 @@ void RNA_def_scene(BlenderRNA *brna)
prop= RNA_def_property(srna, "active_keying_set_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get", "rna_Scene_active_keying_set_index_set", "rna_Scene_active_keying_set_index_range");
- RNA_def_property_ui_text(prop, "Active Keying Set", "Current Keying Set index.");
+ RNA_def_property_ui_text(prop, "Active Keying Set Index", "Current Keying Set index.");
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
/* Tool Settings */