[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22949] branches/blender2.5/blender: 2. 5 - UI Bugfixes

Joshua Leung aligorith at gmail.com
Wed Sep 2 14:16:01 CEST 2009


Revision: 22949
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22949
Author:   aligorith
Date:     2009-09-02 14:16:00 +0200 (Wed, 02 Sep 2009)

Log Message:
-----------
2.5 - UI Bugfixes

* Modifiers for Lattices now get shown again
* Auto IK and X-Axis Mirror options are now visible again in Armatures UI. Their placement isn't ideal yet, and they also need some proper poll-based visibility adjustments
* F-Modifiers now correctly update the keyframes view after their settings are modified

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/buttons_data_armature.py
    branches/blender2.5/blender/source/blender/editors/space_buttons/buttons_context.c
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_fcurve.c
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_nla.c

Modified: branches/blender2.5/blender/release/ui/buttons_data_armature.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_armature.py	2009-09-02 10:45:11 UTC (rev 22948)
+++ branches/blender2.5/blender/release/ui/buttons_data_armature.py	2009-09-02 12:16:00 UTC (rev 22949)
@@ -45,6 +45,9 @@
 		col.template_layers(arm, "layer")
 		col.itemL(text="Protected Layers:")
 		col.template_layers(arm, "layer_protection")
+		col.itemL(text="Edit Options:")
+		col.itemR(arm, "x_axis_mirror")
+		col.itemR(arm, "auto_ik")
 		
 		col = split.column()
 		col.itemR(arm, "rest_position")
@@ -53,8 +56,6 @@
 		col.itemR(arm, "deform_envelope", text="Envelopes")
 		col.itemR(arm, "deform_quaternion", text="Quaternion")
 		col.itemR(arm, "deform_bbone_rest", text="B-Bones Rest")
-		#col.itemR(arm, "x_axis_mirror")
-		#col.itemR(arm, "auto_ik")
 		
 class DATA_PT_display(DataButtonsPanel):
 	__label__ = "Display"

Modified: branches/blender2.5/blender/source/blender/editors/space_buttons/buttons_context.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_buttons/buttons_context.c	2009-09-02 10:45:11 UTC (rev 22948)
+++ branches/blender2.5/blender/source/blender/editors/space_buttons/buttons_context.c	2009-09-02 12:16:00 UTC (rev 22949)
@@ -200,7 +200,7 @@
 	if(buttons_context_path_object(path)) {
 		ob= path->ptr[path->len-1].data;
 
-		if(ob && ELEM4(ob->type, OB_MESH, OB_CURVE, OB_FONT, OB_SURF))
+		if(ob && ELEM5(ob->type, OB_MESH, OB_CURVE, OB_FONT, OB_SURF, OB_LATTICE))
 			return 1;
 	}
 

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_fcurve.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_fcurve.c	2009-09-02 10:45:11 UTC (rev 22948)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_fcurve.c	2009-09-02 12:16:00 UTC (rev 22949)
@@ -34,6 +34,8 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "WM_types.h"
+
 EnumPropertyItem fmodifier_type_items[] = {
 	{FMODIFIER_TYPE_NULL, "NULL", 0, "Invalid", ""},
 	{FMODIFIER_TYPE_GENERATOR, "GENERATOR", 0, "Generator", ""},
@@ -168,17 +170,20 @@
 	prop= RNA_def_property(srna, "additive", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_GENERATOR_ADDITIVE);
 	RNA_def_property_ui_text(prop, "Additive", "Values generated by this modifier are applied on top of the existing values instead of overwriting them.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 		// XXX this has a special validation func
 	prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
 	RNA_def_property_enum_items(prop, prop_mode_items);
 	RNA_def_property_ui_text(prop, "Mode", "Type of generator to use.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	
 	/* order of the polynomial */
 		// XXX this has a special validation func
 	prop= RNA_def_property(srna, "poly_order", PROP_INT, PROP_NONE);
 	RNA_def_property_ui_text(prop, "Polynomial Order", "The highest power of 'x' for this polynomial. (number of coefficients - 1)");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	/* coefficients array */
 		// FIXME: this is quite difficult to try to wrap
@@ -210,25 +215,31 @@
 	/* coefficients */
 	prop= RNA_def_property(srna, "amplitude", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_ui_text(prop, "Amplitude", "Scale factor determining the maximum/minimum values.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	prop= RNA_def_property(srna, "phase_multiplier", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_ui_text(prop, "Phase Multiplier", "Scale factor determining the 'speed' of the function.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	prop= RNA_def_property(srna, "phase_offset", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_ui_text(prop, "Phase Offset", "Constant factor to offset time by for function.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	prop= RNA_def_property(srna, "value_offset", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_ui_text(prop, "Value Offset", "Constant factor to offset values by.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	/* flags */
 	prop= RNA_def_property(srna, "additive", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_GENERATOR_ADDITIVE);
 	RNA_def_property_ui_text(prop, "Additive", "Values generated by this modifier are applied on top of the existing values instead of overwriting them.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	prop= RNA_def_property(srna, "function_type", PROP_ENUM, PROP_NONE);
 	RNA_def_property_enum_sdna(prop, NULL, "type");
 	RNA_def_property_enum_items(prop, prop_type_items);
 	RNA_def_property_ui_text(prop, "Type", "Type of built-in function to use.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 }
 
 /* --------- */
@@ -249,15 +260,18 @@
 	prop= RNA_def_property(srna, "minimum", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "min");
 	RNA_def_property_ui_text(prop, "Minimum Value", "Lower bound of envelope at this control-point.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	prop= RNA_def_property(srna, "maximum", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "max");
 	RNA_def_property_ui_text(prop, "Maximum Value", "Upper bound of envelope at this control-point.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	/* Frame */
 	prop= RNA_def_property(srna, "frame", PROP_FLOAT, PROP_TIME);
 	RNA_def_property_float_sdna(prop, NULL, "time");
 	RNA_def_property_ui_text(prop, "Frame", "Frame this control-point occurs on.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	// TODO:
 	//	- selection flags (not implemented in UI yet though)
@@ -282,14 +296,17 @@
 	prop= RNA_def_property(srna, "reference_value", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "midval");
 	RNA_def_property_ui_text(prop, "Reference Value", "Value that envelope's influence is centered around / based on.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	prop= RNA_def_property(srna, "default_minimum", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "min");
 	RNA_def_property_ui_text(prop, "Default Minimum", "Lower distance from Reference Value for 1:1 default influence.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	prop= RNA_def_property(srna, "default_maximum", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "max");
 	RNA_def_property_ui_text(prop, "Default Maximum", "Upper distance from Reference Value for 1:1 default influence.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 }
 
 /* --------- */
@@ -314,18 +331,21 @@
 	prop= RNA_def_property(srna, "before_mode", PROP_ENUM, PROP_NONE);
 	RNA_def_property_enum_items(prop, prop_type_items);
 	RNA_def_property_ui_text(prop, "Before Mode", "Cycling mode to use before first keyframe.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	prop= RNA_def_property(srna, "before_cycles", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_ui_text(prop, "Before Cycles", "Maximum number of cycles to allow before first keyframe. (0 = infinite)");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
-	
 	/* after */
 	prop= RNA_def_property(srna, "after_mode", PROP_ENUM, PROP_NONE);
 	RNA_def_property_enum_items(prop, prop_type_items);
 	RNA_def_property_ui_text(prop, "After Mode", "Cycling mode to use after last keyframe.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	prop= RNA_def_property(srna, "after_cycles", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_ui_text(prop, "After Cycles", "Maximum number of cycles to allow after last keyframe. (0 = infinite)");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 }
 
 /* --------- */
@@ -354,34 +374,42 @@
 	prop= RNA_def_property(srna, "use_minimum_x", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_LIMIT_XMIN);
 	RNA_def_property_ui_text(prop, "Minimum X", "Use the minimum X value.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	prop= RNA_def_property(srna, "use_minimum_y", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_LIMIT_YMIN);
 	RNA_def_property_ui_text(prop, "Minimum Y", "Use the minimum Y value.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	prop= RNA_def_property(srna, "use_maximum_x", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_LIMIT_XMAX);
 	RNA_def_property_ui_text(prop, "Maximum X", "Use the maximum X value.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	prop= RNA_def_property(srna, "use_maximum_y", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_LIMIT_YMAX);
 	RNA_def_property_ui_text(prop, "Maximum Y", "Use the maximum Y value.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	prop= RNA_def_property(srna, "minimum_x", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "rect.xmin");
 	RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	prop= RNA_def_property(srna, "minimum_y", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "rect.ymin");
 	RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	prop= RNA_def_property(srna, "maximum_x", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "rect.xmax");
 	RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow.");
+	RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
 	
 	prop= RNA_def_property(srna, "maximum_y", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "rect.ymax");

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list