[Bf-blender-cvs] [87ca0afe810] greasepencil-object: GP: Initialize intersection threshold

Antonioya noreply at git.blender.org
Fri Jan 4 20:18:21 CET 2019


Commit: 87ca0afe810f6d95bb0c20c8c9d9d437b4c32a37
Author: Antonioya
Date:   Fri Jan 4 20:18:13 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB87ca0afe810f6d95bb0c20c8c9d9d437b4c32a37

GP: Initialize intersection threshold

===================================================================

M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/makesrna/intern/rna_sculpt_paint.c

===================================================================

diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 3b2950891f7..c25b29b36aa 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -2742,6 +2742,16 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
 			}
 		}
 
+		/* Grease pencil cutter/select segment intersection threshold  */
+		if (!DNA_struct_elem_find(fd->filesdna, "GP_Sculpt_Settings", "float", "isect_threshold")) {
+			for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
+				GP_Sculpt_Settings *gset = &scene->toolsettings->gp_sculpt;
+				if (gset) {
+					gset->isect_threshold = 0.1f;
+				}
+			}
+		}
+
 		/* Fix anamorphic bokeh eevee rna limits.*/
 		for (Camera *ca = bmain->camera.first; ca; ca = ca->id.next) {
 			if (ca->gpu_dof.ratio < 0.01f) {
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index d52ab41aa02..3e2491df278 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -1288,7 +1288,7 @@ static void rna_def_gpencil_sculpt(BlenderRNA *brna)
 	prop = RNA_def_property(srna, "isect_threshold", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "isect_threshold");
 	RNA_def_property_range(prop, 0.0f, 10.0f);
-	RNA_def_property_float_default(prop, 0.0f);
+	RNA_def_property_float_default(prop, 0.1f);
 	RNA_def_property_ui_text(prop, "Threshold", "Threshold for stroke intersections");
 	RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0);



More information about the Bf-blender-cvs mailing list