[Bf-blender-cvs] [24a97e07ee5] lanpr-under-gp: LineArt: default value assignments.

YimingWu noreply at git.blender.org
Wed Nov 4 10:57:29 CET 2020


Commit: 24a97e07ee582a40ab3e346c29b7bada32ec7b24
Author: YimingWu
Date:   Wed Nov 4 17:57:24 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB24a97e07ee582a40ab3e346c29b7bada32ec7b24

LineArt: default value assignments.

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

M	source/blender/blenloader/intern/versioning_290.c
M	source/blender/editors/lineart/lineart_cpu.c
M	source/blender/makesrna/intern/rna_object.c
M	source/blender/makesrna/intern/rna_scene.c

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

diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 3f1ea4131a2..92316e7ae7b 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -1141,7 +1141,7 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
 
     if (!DNA_struct_find(fd->filesdna, "SceneLineArt")) {
       LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
-        scene->lineart.crease_threshold = 140.0f;
+        scene->lineart.crease_threshold = DEG2RAD(140.0f);
         scene->lineart.line_types |= LRT_EDGE_FLAG_ALL_TYPE;
         scene->lineart.flags |= (LRT_ALLOW_DUPLI_OBJECTS | LRT_REMOVE_DOUBLES);
         scene->lineart.angle_splitting_threshold = DEG2RAD(60.0f);
diff --git a/source/blender/editors/lineart/lineart_cpu.c b/source/blender/editors/lineart/lineart_cpu.c
index ab7f70b076f..d0d99b62d97 100644
--- a/source/blender/editors/lineart/lineart_cpu.c
+++ b/source/blender/editors/lineart/lineart_cpu.c
@@ -1542,7 +1542,7 @@ static void lineart_geometry_object_load(Depsgraph *dg,
     reln->object_ref = orig_ob;
 
     if (ob->lineart.flags & OBJECT_LRT_OWN_CREASE) {
-      use_crease = cosf(DEG2RAD(180.0f - ob->lineart.crease_threshold));
+      use_crease = cosf(M_PI - ob->lineart.crease_threshold);
     }
     else {
       use_crease = rb->crease_threshold;
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 3bf91751ee8..72b3da179bc 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -2651,7 +2651,6 @@ static void rna_def_object_lineart(BlenderRNA *brna)
   RNA_def_property_update(prop, 0, "rna_object_lineart_update");
 
   prop = RNA_def_property(srna, "crease_threshold", PROP_FLOAT, PROP_ANGLE);
-  RNA_def_property_float_default(prop, DEG2RAD(140.0f));
   RNA_def_property_range(prop, 0, DEG2RAD(180.0f));
   RNA_def_property_ui_range(prop, 0.0f, DEG2RAD(180.0f), 0.01f, 1);
   RNA_def_property_ui_text(prop, "Own Crease", "Use own crease setting to overwrite scene global");
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 3c0441715b5..5d009cb52de 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -7434,7 +7434,6 @@ static void rna_def_scene_lineart(BlenderRNA *brna)
   RNA_def_property_update(prop, NC_SCENE, "rna_lineart_update");
 
   prop = RNA_def_property(srna, "crease_threshold", PROP_FLOAT, PROP_ANGLE);
-  RNA_def_property_float_default(prop, DEG2RAD(140.0f));
   RNA_def_property_range(prop, 0, DEG2RAD(180.0f));
   RNA_def_property_ui_range(prop, 0.0f, DEG2RAD(180.0f), 0.01f, 1);
   RNA_def_property_ui_text(



More information about the Bf-blender-cvs mailing list