Revision: 23911
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23911
Author:   eman
Date:     2009-10-18 02:16:34 +0200 (Sun, 18 Oct 2009)

Log Message:
-----------
* Updated Isolines
 - Had previously been modifying rna_curve_gen.c, which I now know stands for 
'generated' (thanks Genscher)
 - New RNA/Python UI stuff is very nice. Beats the pants off UIButDef()!
 - Added options for Isoline Resolution and Density, currently swapped, think 
that's a code problem

Modified Paths:
--------------
    branches/nurbs25/release/scripts/ui/buttons_data_curve.py
    branches/nurbs25/source/blender/makesrna/intern/rna_curve.c

Modified: branches/nurbs25/release/scripts/ui/buttons_data_curve.py
===================================================================
--- branches/nurbs25/release/scripts/ui/buttons_data_curve.py   2009-10-17 
22:34:40 UTC (rev 23910)
+++ branches/nurbs25/release/scripts/ui/buttons_data_curve.py   2009-10-18 
00:16:34 UTC (rev 23911)
@@ -215,14 +215,20 @@
                                col.itemR(act_spline, "tilt_interpolation", 
text="Tilt")
                                col.itemR(act_spline, "radius_interpolation", 
text="Radius")
                        
+                       # Isolines
+                       if is_surf:
+                               row= layout.row()
+                               row.itemR(act_spline, "isolines")
+                               row.itemR(act_spline, "isoline_resolution") 
+                               row.itemR(act_spline, "isoline_density")
+
                        split = layout.split()
                        col = split.column()
                        col.itemR(act_spline, "smooth")
+                       
 
-                       col.itemR(act_spline, "isovis")
-
 bpy.types.register(DATA_PT_context_curve)
 bpy.types.register(DATA_PT_shape_curve)
 bpy.types.register(DATA_PT_geometry_curve)
 bpy.types.register(DATA_PT_pathanim)
-bpy.types.register(DATA_PT_active_spline)
\ No newline at end of file
+bpy.types.register(DATA_PT_active_spline)

Modified: branches/nurbs25/source/blender/makesrna/intern/rna_curve.c
===================================================================
--- branches/nurbs25/source/blender/makesrna/intern/rna_curve.c 2009-10-17 
22:34:40 UTC (rev 23910)
+++ branches/nurbs25/source/blender/makesrna/intern/rna_curve.c 2009-10-18 
00:16:34 UTC (rev 23911)
@@ -223,6 +223,14 @@
        WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
 }
 
+static void rna_Curve_update_isolines(bContext *C, PointerRNA *ptr)
+{
+       ID *id= ptr->id.data;
+       Nurb *nu= (Nurb*)ptr->data;
+       nurbanaResetIsoLines(nu);
+       DAG_id_flush_update(id, OB_RECALC_DATA);
+       WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
+}
 
 static void rna_Nurb_update_handle_data(bContext *C, PointerRNA *ptr)
 {
@@ -952,6 +960,23 @@
        RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_v");
 
 
+       prop= RNA_def_property(srna, "isolines", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "isovis", 0);
+       RNA_def_property_ui_text(prop, "Isolines", "Turn on isolines which 
define the surface in U and V."); //FIXME eman better description?
+       RNA_def_property_update(prop, 0, "rna_Curve_update_isolines");
+
+       prop= RNA_def_property(srna, "isoline_resolution", PROP_INT, PROP_NONE);
+       RNA_def_property_int_sdna(prop, NULL, "isores");
+       RNA_def_property_range(prop, 1, 1024);
+       RNA_def_property_ui_text(prop, "Isoline Resolution", "Isoline 
subdivisions per line");
+       RNA_def_property_update(prop, 0, "rna_Curve_update_isolines");
+
+       prop= RNA_def_property(srna, "isoline_density", PROP_INT, PROP_NONE);
+       RNA_def_property_int_sdna(prop, NULL, "isoden");
+       RNA_def_property_range(prop, 1, 1024);
+       RNA_def_property_ui_text(prop, "Isoline Density", "Number of isolines 
per surface.");
+       RNA_def_property_update(prop, 0, "rna_Curve_update_isolines");
+
        prop= RNA_def_property(srna, "smooth", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_SMOOTH);
        RNA_def_property_ui_text(prop, "Smooth", "Smooth the normals of the 
surface or beveled curve.");


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to