[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22883] branches/blender2.5/blender/source /blender: Grease Pencil: Bugfix (Dots) + RNA Wrapping
Joshua Leung
aligorith at gmail.com
Sun Aug 30 07:54:27 CEST 2009
Revision: 22883
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22883
Author: aligorith
Date: 2009-08-30 07:54:27 +0200 (Sun, 30 Aug 2009)
Log Message:
-----------
Grease Pencil: Bugfix (Dots) + RNA Wrapping
* Making single dots should be possible again.
* Wrapped the debug option, 'Show Points', for layers, which makes all the points on the layer get drawn with dots indicating positions of stroke points.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/editors/gpencil/gpencil_buttons.c
branches/blender2.5/blender/source/blender/editors/gpencil/gpencil_paint.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_gpencil.c
Modified: branches/blender2.5/blender/source/blender/editors/gpencil/gpencil_buttons.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/gpencil/gpencil_buttons.c 2009-08-30 04:48:34 UTC (rev 22882)
+++ branches/blender2.5/blender/source/blender/editors/gpencil/gpencil_buttons.c 2009-08-30 05:54:27 UTC (rev 22883)
@@ -203,13 +203,6 @@
subcol= uiLayoutColumn(col, 1);
uiItemR(subcol, NULL, 0, &ptr, "line_thickness", UI_ITEM_R_SLIDER);
- /* debugging options */
- if (G.f & G_DEBUG) {
- // XXX this option hasn't been wrapped yet... since it's just debug
- //subcol= uiLayoutColumn(col, 1);
- // uiItemR(subrow, NULL, 0, &ptr, "show_points", 0);
- }
-
/* right column ................... */
col= uiLayoutColumn(split, 0);
@@ -218,6 +211,13 @@
uiItemR(subcol, "Onion Skinning", 0, &ptr, "use_onion_skinning", 0);
uiItemR(subcol, "GStep", 0, &ptr, "max_ghost_range", 0); // XXX shorter name here? (i.e. GStep)
+ /* debugging options */
+ // XXX re-enable the debug-only checks later
+ //if (G.f & G_DEBUG) {
+ subcol= uiLayoutColumn(col, 1);
+ uiItemR(subcol, NULL, 0, &ptr, "show_points", 0);
+ //}
+
/* additional options... */
// None at the moment...
}
Modified: branches/blender2.5/blender/source/blender/editors/gpencil/gpencil_paint.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/gpencil/gpencil_paint.c 2009-08-30 04:48:34 UTC (rev 22882)
+++ branches/blender2.5/blender/source/blender/editors/gpencil/gpencil_paint.c 2009-08-30 05:54:27 UTC (rev 22883)
@@ -161,8 +161,12 @@
int dx= abs(mval[0] - pmval[0]);
int dy= abs(mval[1] - pmval[1]);
+ /* if buffer is empty, just let this go through (i.e. so that dots will work) */
+ if (p->gpd->sbuffer_size == 0)
+ return 1;
+
/* check if mouse moved at least certain distance on both axes (best case) */
- if ((dx > MIN_MANHATTEN_PX) && (dy > MIN_MANHATTEN_PX))
+ else if ((dx > MIN_MANHATTEN_PX) && (dy > MIN_MANHATTEN_PX))
return 1;
/* check if the distance since the last point is significant enough */
Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_gpencil.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_gpencil.c 2009-08-30 04:48:34 UTC (rev 22882)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_gpencil.c 2009-08-30 05:54:27 UTC (rev 22883)
@@ -208,6 +208,10 @@
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_SELECT);
RNA_def_property_ui_text(prop, "Selected", "Layer is selected for editing in the DopeSheet.");
+ prop= RNA_def_property(srna, "show_points", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_DRAWDEBUG);
+ RNA_def_property_ui_text(prop, "Show Points", "Draw the points which make up the strokes (for debugging purposes).");
+
}
void rna_def_gpencil_data(BlenderRNA *brna)
More information about the Bf-blender-cvs
mailing list