[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25114] trunk/blender/source/blender/ makesrna/intern/rna_curve.c: Fix for [#19884] Curve resolution slider not affecting anything
Matt Ebb
matt at mke3.net
Fri Dec 4 02:38:46 CET 2009
Revision: 25114
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25114
Author: broken
Date: 2009-12-04 02:38:36 +0100 (Fri, 04 Dec 2009)
Log Message:
-----------
Fix for [#19884] Curve resolution slider not affecting anything
Modified Paths:
--------------
trunk/blender/source/blender/makesrna/intern/rna_curve.c
Modified: trunk/blender/source/blender/makesrna/intern/rna_curve.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_curve.c 2009-12-04 01:28:00 UTC (rev 25113)
+++ trunk/blender/source/blender/makesrna/intern/rna_curve.c 2009-12-04 01:38:36 UTC (rev 25114)
@@ -229,6 +229,38 @@
rna_Curve_update_data(C, ptr);
}
+static void rna_Curve_resolution_u_update_data(bContext *C, PointerRNA *ptr)
+{
+ Curve *cu= (Curve*)ptr->id.data;
+ Nurb *nu=NULL;
+
+ if (cu->editnurb) nu= cu->editnurb->first;
+ else nu=cu->nurb.first;
+
+ while(nu) {
+ nu->resolu= cu->resolu;
+ nu= nu->next;
+ }
+
+ rna_Curve_update_data(C, ptr);
+}
+
+static void rna_Curve_resolution_v_update_data(bContext *C, PointerRNA *ptr)
+{
+ Curve *cu= (Curve*)ptr->id.data;
+ Nurb *nu=NULL;
+
+ if (cu->editnurb) nu= cu->editnurb->first;
+ else nu=cu->nurb.first;
+
+ while(nu) {
+ nu->resolv= cu->resolv;
+ nu= nu->next;
+ }
+
+ rna_Curve_update_data(C, ptr);
+}
+
/* name functions that ignore the first two ID characters */
void rna_Curve_body_get(PointerRNA *ptr, char *value)
{
@@ -792,13 +824,13 @@
RNA_def_property_int_sdna(prop, NULL, "resolu");
RNA_def_property_ui_range(prop, 1, 1024, 1, 0);
RNA_def_property_ui_text(prop, "Resolution U", "Surface resolution in U direction.");
- RNA_def_property_update(prop, 0, "rna_Curve_update_data");
+ RNA_def_property_update(prop, 0, "rna_Curve_resolution_u_update_data");
prop= RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolv");
RNA_def_property_ui_range(prop, 1, 1024, 1, 0);
RNA_def_property_ui_text(prop, "Resolution V", "Surface resolution in V direction.");
- RNA_def_property_update(prop, 0, "rna_Curve_update_data");
+ RNA_def_property_update(prop, 0, "rna_Curve_resolution_v_update_data");
prop= RNA_def_property(srna, "render_resolution_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolu_ren");
More information about the Bf-blender-cvs
mailing list