[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25156] trunk/blender/source/blender/ makesrna/intern: Finished wrapping SpaceGraph in RNA and also wrapped bDopeSheet in the process .

Elia Sarti vekoon at gmail.com
Sun Dec 6 23:29:00 CET 2009


Revision: 25156
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25156
Author:   vekoon
Date:     2009-12-06 23:28:59 +0100 (Sun, 06 Dec 2009)

Log Message:
-----------
Finished wrapping SpaceGraph in RNA and also wrapped bDopeSheet in the process. Some descriptions might be slightly off, feel free to check.

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_action.c
    trunk/blender/source/blender/makesrna/intern/rna_space.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_action.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_action.c	2009-12-06 22:01:04 UTC (rev 25155)
+++ trunk/blender/source/blender/makesrna/intern/rna_action.c	2009-12-06 22:28:59 UTC (rev 25156)
@@ -34,10 +34,117 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "WM_types.h"
+
+
 #ifdef RNA_RUNTIME
 
 #else
 
+static void rna_def_dopesheet(BlenderRNA *brna)
+{
+	StructRNA *srna;
+	PropertyRNA *prop;
+
+	srna= RNA_def_struct(brna, "DopeSheet", NULL);
+	RNA_def_struct_sdna(srna, "bDopeSheet");
+	RNA_def_struct_ui_text(srna, "DopeSheet", "Storage for Dopesheet/Grease-Pencil Editor data.");
+
+	prop= RNA_def_property(srna, "source", PROP_POINTER, PROP_NONE);
+	RNA_def_property_struct_type(prop, "ID");
+	RNA_def_property_ui_text(prop, "Source", "ID-Block representing source data, currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil).");
+
+	prop= RNA_def_property(srna, "only_selected", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_ONLYSEL);
+	RNA_def_property_ui_text(prop, "Only Selected", "Only include channels relating to selected Objects.");
+	RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	prop= RNA_def_property(srna, "only_drivers", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_ONLYDRIVERS);
+	RNA_def_property_ui_text(prop, "Only Drivers", "Only include Driver data from Animation data.");
+	RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	prop= RNA_def_property(srna, "only_nla", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_ONLYNLA);
+	RNA_def_property_ui_text(prop, "Only NLA", "Only include NLA data from Animation data.");
+	RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	prop= RNA_def_property(srna, "use_filter", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_SELEDIT);
+	RNA_def_property_ui_text(prop, "Use Filter", "Indicates if filtering options must be taken into account.");
+	RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	prop= RNA_def_property(srna, "display_summary", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_SUMMARY);
+	RNA_def_property_ui_text(prop, "Display Summary", "Display an additional 'summary' line.");
+	RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	prop= RNA_def_property(srna, "display_shapekeys", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOSHAPEKEYS);
+	RNA_def_property_ui_text(prop, "Display Shapekeys", "Include visualization of Shapekey related Animation data.");
+	RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	prop= RNA_def_property(srna, "display_camera", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOCAM);
+	RNA_def_property_ui_text(prop, "Display Camera", "Include visualization of Camera related Animation data.");
+	RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	prop= RNA_def_property(srna, "display_material", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOMAT);
+	RNA_def_property_ui_text(prop, "Display Material", "Include visualization of Material related Animation data.");
+	RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	prop= RNA_def_property(srna, "display_lamp", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOLAM);
+	RNA_def_property_ui_text(prop, "Display Lamp", "Include visualization of Lamp related Animation data.");
+	RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	prop= RNA_def_property(srna, "display_curve", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOCUR);
+	RNA_def_property_ui_text(prop, "Display Curve", "Include visualization of Curve related Animation data.");
+	RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	prop= RNA_def_property(srna, "display_world", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOWOR);
+	RNA_def_property_ui_text(prop, "Display World", "Include visualization of World related Animation data.");
+	RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	prop= RNA_def_property(srna, "display_scene", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOSCE);
+	RNA_def_property_ui_text(prop, "Display Scene", "Include visualization of Scene related Animation data.");
+	RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	prop= RNA_def_property(srna, "display_particle", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOPART);
+	RNA_def_property_ui_text(prop, "Display Particle", "Include visualization of Particle related Animation data.");
+	RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	prop= RNA_def_property(srna, "display_metaball", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOMBA);
+	RNA_def_property_ui_text(prop, "Display Metaball", "Include visualization of Metaball related Animation data.");
+	RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	prop= RNA_def_property(srna, "display_armature", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOARM);
+	RNA_def_property_ui_text(prop, "Display Armature", "Include visualization of Armature related Animation data.");
+	RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	prop= RNA_def_property(srna, "display_node", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NONTREE);
+	RNA_def_property_ui_text(prop, "Display Node", "Include visualization of Node related Animation data.");
+	RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	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_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+
+	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_update(prop, NC_ANIMATION, NULL); /* XXX fix notifier */
+}
+
 static void rna_def_action_group(BlenderRNA *brna)
 {
 	StructRNA *srna;
@@ -80,22 +187,22 @@
 {
 	StructRNA *srna;
 	PropertyRNA *prop;
-	
+
 	srna= RNA_def_struct(brna, "Action", "ID");
 	RNA_def_struct_sdna(srna, "bAction");
 	RNA_def_struct_ui_text(srna, "Action", "A collection of F-Curves for animation.");
 	RNA_def_struct_ui_icon(srna, ICON_ACTION);
-	
+
 	prop= RNA_def_property(srna, "fcurves", PROP_COLLECTION, PROP_NONE);
 	RNA_def_property_collection_sdna(prop, NULL, "curves", NULL);
 	RNA_def_property_struct_type(prop, "FCurve");
 	RNA_def_property_ui_text(prop, "F-Curves", "The individual F-Curves that make up the Action.");
-	
+
 	prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
 	RNA_def_property_collection_sdna(prop, NULL, "groups", NULL);
 	RNA_def_property_struct_type(prop, "ActionGroup");
 	RNA_def_property_ui_text(prop, "Groups", "Convenient groupings of F-Curves.");
-	
+
 	prop= RNA_def_property(srna, "pose_markers", PROP_COLLECTION, PROP_NONE);
 	RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
 	RNA_def_property_struct_type(prop, "TimelineMarker");
@@ -110,6 +217,7 @@
 {
 	rna_def_action(brna);
 	rna_def_action_group(brna);
+	rna_def_dopesheet(brna);
 }
 
 

Modified: trunk/blender/source/blender/makesrna/intern/rna_space.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_space.c	2009-12-06 22:01:04 UTC (rev 25155)
+++ trunk/blender/source/blender/makesrna/intern/rna_space.c	2009-12-06 22:28:59 UTC (rev 25156)
@@ -1284,8 +1284,15 @@
 		//{V3D_CENTROID, "MEDIAN_POINT", 0, "Median Point", ""},
 		//{V3D_ACTIVE, "ACTIVE_ELEMENT", 0, "Active Element", ""},
 		{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."},
+		{0, NULL, 0, NULL, NULL}};
+
 	
-	
 	srna= RNA_def_struct(brna, "SpaceGraphEditor", "Space");
 	RNA_def_struct_sdna(srna, "SpaceIpo");
 	RNA_def_struct_ui_text(srna, "Space Graph Editor", "Graph Editor space data.");
@@ -1351,8 +1358,19 @@
 	RNA_def_property_enum_items(prop, gpivot_items);
 	RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling.");
 	RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
-	
-	// TODO... autosnap, dopesheet?
+
+	/* dopesheet */
+	prop= RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
+	RNA_def_property_struct_type(prop, "DopeSheet");
+	RNA_def_property_pointer_sdna(prop, NULL, "ads");
+	RNA_def_property_ui_text(prop, "DopeSheet", "Settings for filtering animation data.");
+
+	/* autosnap */
+	prop= RNA_def_property(srna, "autosnap", PROP_ENUM, PROP_NONE);
+	RNA_def_property_enum_sdna(prop, NULL, "autosnap");
+	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);
 }
 

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list