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
path: root/source
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-12-08 09:32:30 +0300
committerJoshua Leung <aligorith@gmail.com>2009-12-08 09:32:30 +0300
commit53f94f92a1a84c44376722a4a642766f53b3ab24 (patch)
tree1f31f59ada13e4950261ec1e413b9d842490966d /source
parent4ea3e14ebf10b13f6dbd548dbb36784975aeb220 (diff)
Animation Editors: Fixes for RNA/Python Bastardisation
Still not happy about the tight/regular-spacing imposed by the layout engine automation, but will tweak later.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_action.c4
-rw-r--r--source/blender/makesrna/intern/rna_scene.c8
-rw-r--r--source/blender/makesrna/intern/rna_space.c23
3 files changed, 28 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 3708d810cca..0568652488d 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -144,13 +144,13 @@ static void rna_def_dopesheet(BlenderRNA *brna)
prop= RNA_def_property(srna, "include_missing_nla", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NLA_NOACT);
- RNA_def_property_ui_text(prop, "Include Missing NLA", "Include Animation Data blocks with no NLA Data.");
+ RNA_def_property_ui_text(prop, "Include Missing NLA", "Include Animation Data blocks with no NLA data. (NLA Editor only)");
RNA_def_property_ui_icon(prop, ICON_ACTION, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
prop= RNA_def_property(srna, "collapse_summary", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ADS_FLAG_SUMMARY_COLLAPSED);
- RNA_def_property_ui_text(prop, "Collapse Summary", "Collapse summary when shown, so all other channels get hidden.");
+ RNA_def_property_ui_text(prop, "Collapse Summary", "Collapse summary when shown, so all other channels get hidden. (DopeSheet Window Editors Only)");
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 458fdbf2ea9..5000dd90b1d 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -2453,6 +2453,14 @@ void RNA_def_scene(BlenderRNA *brna)
/* Animation Data (for Scene) */
rna_def_animdata_common(srna);
+ /* Readonly Properties */
+ prop= RNA_def_property(srna, "nla_tweakmode_on", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_NLA_EDIT_ON);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* DO NOT MAKE THIS EDITABLE, OR NLA EDITOR BREAKS */
+ RNA_def_property_ui_text(prop, "NLA TweakMode", "Indicates whether there is any action referenced by NLA being edited. Strictly read-only.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
+
+
/* Nodes (Compositing) */
prop= RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree.");
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 4a55d259be9..cc44a1b6c14 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -84,10 +84,10 @@ static EnumPropertyItem transform_orientation_items[] = {
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem autosnap_items[] = {
- {SACTSNAP_OFF, "NONE", 0, "None", ""},
- {SACTSNAP_STEP, "STEP", 0, "Step", "Snap to 1.0 frame/second intervals."},
- {SACTSNAP_FRAME, "FRAME", 0, "Frame", "Snap to actual frames/seconds (nla-action time)."},
- {SACTSNAP_MARKER, "MARKER", 0, "Marker", "Snap to nearest marker."},
+ {SACTSNAP_OFF, "NONE", 0, "No Auto-Snap", ""},
+ {SACTSNAP_STEP, "STEP", 0, "Time Step", "Snap to 1.0 frame/second intervals."},
+ {SACTSNAP_FRAME, "FRAME", 0, "Nearest Frame", "Snap to actual frames/seconds (nla-action time)."},
+ {SACTSNAP_MARKER, "MARKER", 0, "Nearest Marker", "Snap to nearest marker."},
{0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -464,6 +464,12 @@ static void rna_SpaceDopeSheetEditor_action_update(bContext *C, PointerRNA *ptr)
}
}
+static int rna_SpaceGraphEditor_has_ghost_curves_get(PointerRNA *ptr)
+{
+ SpaceIpo *sipo= (SpaceIpo*)(ptr->data);
+ return (sipo->ghostCurves.first != NULL);
+}
+
#else
static void rna_def_space(BlenderRNA *brna)
@@ -1290,7 +1296,7 @@ static void rna_def_space_graph(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem mode_items[] = {
- {SIPO_MODE_ANIMATION, "FCURVES", 0, "F-Curves", ""},
+ {SIPO_MODE_ANIMATION, "FCURVES", 0, "F-Curve Editor", ""},
{SIPO_MODE_DRIVERS, "DRIVERS", 0, "Drivers", ""},
{0, NULL, 0, NULL, NULL}};
@@ -1382,6 +1388,13 @@ static void rna_def_space_graph(BlenderRNA *brna)
RNA_def_property_enum_items(prop, autosnap_items);
RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping settings for transformations.");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
+
+ /* readonly state info */
+ prop= RNA_def_property(srna, "has_ghost_curves", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", 0); /* XXX: hack to make this compile, since this property doesn't actually exist*/
+ RNA_def_property_boolean_funcs(prop, "rna_SpaceGraphEditor_has_ghost_curves_get", NULL);
+ RNA_def_property_ui_text(prop, "Has Ghost Curves", "Graph Editor instance has some ghost curves stored.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
}
static void rna_def_space_nla(BlenderRNA *brna)