[Bf-blender-cvs] [4d382591ff1] lanpr-under-gp: LineArt: naming and description fixes.

YimingWu noreply at git.blender.org
Wed Nov 4 09:26:02 CET 2020


Commit: 4d382591ff1e417be3f574322f3a5d424ae8950e
Author: YimingWu
Date:   Wed Nov 4 16:07:23 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB4d382591ff1e417be3f574322f3a5d424ae8950e

LineArt: naming and description fixes.

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

M	source/blender/blenloader/intern/versioning_290.c
M	source/blender/editors/include/ED_lineart.h
M	source/blender/editors/lineart/lineart_cpu.c
M	source/blender/editors/lineart/lineart_ops.c
M	source/blender/editors/space_buttons/buttons_context.c
M	source/blender/editors/space_buttons/space_buttons.c
M	source/blender/editors/space_view3d/space_view3d.c
M	source/blender/makesdna/DNA_object_defaults.h
M	source/blender/makesdna/DNA_scene_defaults.h
M	source/blender/makesdna/DNA_scene_types.h
M	source/blender/makesrna/RNA_access.h
M	source/blender/makesrna/intern/rna_gpencil_modifier.c
M	source/blender/makesrna/intern/rna_object.c
M	source/blender/makesrna/intern/rna_scene.c
M	source/blender/makesrna/intern/rna_space.c

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

diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 992238ec49c..3f1ea4131a2 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -1139,7 +1139,7 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
    */
   {
 
-    if (!DNA_struct_find(fd->filesdna, "SceneLineart")) {
+    if (!DNA_struct_find(fd->filesdna, "SceneLineArt")) {
       LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
         scene->lineart.crease_threshold = 140.0f;
         scene->lineart.line_types |= LRT_EDGE_FLAG_ALL_TYPE;
diff --git a/source/blender/editors/include/ED_lineart.h b/source/blender/editors/include/ED_lineart.h
index 96120b74a96..2e33c38112a 100644
--- a/source/blender/editors/include/ED_lineart.h
+++ b/source/blender/editors/include/ED_lineart.h
@@ -580,7 +580,7 @@ BLI_INLINE int lineart_LineIntersectTest2d(
 int ED_lineart_point_inside_triangled(double v[2], double v0[2], double v1[2], double v2[2]);
 
 struct Depsgraph;
-struct SceneLineart;
+struct SceneLineArt;
 struct Scene;
 struct LineartRenderBuffer;
 
@@ -675,7 +675,7 @@ void ED_lineart_post_frame_update_external(struct bContext *C,
                                            struct Depsgraph *dg,
                                            bool from_modifier);
 
-struct SceneLineart;
+struct SceneLineArt;
 
 void ED_lineart_update_render_progress(int nr, const char *info);
 
diff --git a/source/blender/editors/lineart/lineart_cpu.c b/source/blender/editors/lineart/lineart_cpu.c
index fd5d7d08a74..ab7f70b076f 100644
--- a/source/blender/editors/lineart/lineart_cpu.c
+++ b/source/blender/editors/lineart/lineart_cpu.c
@@ -2603,7 +2603,7 @@ LineartRenderBuffer *ED_lineart_create_render_buffer(Scene *scene)
     rb->shift_y = (asp <= 1) ? c->shifty : c->shifty * asp;
   }
 
-  rb->crease_threshold = cos(DEG2RAD(180.0f - scene->lineart.crease_threshold));
+  rb->crease_threshold = cos(M_PI - scene->lineart.crease_threshold);
   rb->angle_splitting_threshold = scene->lineart.angle_splitting_threshold;
   rb->chaining_image_threshold = scene->lineart.chaining_image_threshold;
   rb->chaining_geometry_threshold = scene->lineart.chaining_geometry_threshold;
@@ -3711,7 +3711,7 @@ int ED_lineart_compute_feature_lines_internal(Depsgraph *depsgraph, const int sh
 {
   LineartRenderBuffer *rb;
   Scene *scene = DEG_get_evaluated_scene(depsgraph);
-  SceneLineart *lineart = &scene->lineart;
+  SceneLineArt *lineart = &scene->lineart;
   int intersections_only = 0; /* Not used right now, but preserve for future. */
 
   if ((lineart->flags & LRT_AUTO_UPDATE) == 0 || !scene->camera) {
diff --git a/source/blender/editors/lineart/lineart_ops.c b/source/blender/editors/lineart/lineart_ops.c
index b7312fbc459..080d42d1d8a 100644
--- a/source/blender/editors/lineart/lineart_ops.c
+++ b/source/blender/editors/lineart/lineart_ops.c
@@ -72,7 +72,7 @@ static int lineart_gpencil_bake_strokes_invoke(bContext *C,
                                                const wmEvent *UNUSED(event))
 {
   Scene *scene = CTX_data_scene(C);
-  SceneLineart *lineart = &scene->lineart;
+  SceneLineArt *lineart = &scene->lineart;
   Depsgraph *dg = CTX_data_depsgraph_pointer(C);
   int frame;
   int frame_begin = ((lineart->flags & LRT_BAKING_FINAL_RANGE) ? MAX2(scene->r.sfra, 1) :
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 7f20e34493a..148db0d6589 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -598,7 +598,7 @@ static bool buttons_context_path(
 #ifdef WITH_LINEART
       found = buttons_context_path_collection(path, window);
 #else
-      BLI_assert(!"'WITH_LINEART' is off. See buttons_context.c");
+      BLI_assert(!"'WITH_LINEART' is off.");
 #endif
       break;
     case BCONTEXT_TOOL:
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 4f61a09b3ef..7b7b6393e1e 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -279,7 +279,7 @@ static const char *buttons_main_region_context_string(const short mainb)
 #ifdef WITH_LINEART
       return "collection";
 #else
-      BLI_assert(!"'WITH_LINEART' is off. See buttons_context.c");
+      BLI_assert(!"'WITH_LINEART' is off.");
 #endif
     case BCONTEXT_OBJECT:
       return "object";
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 0d672798c1d..c427e307c84 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -1097,7 +1097,7 @@ static void view3d_main_region_message_subscribe(const struct bContext *C,
   WM_msg_subscribe_rna_anon_type(mbus, SceneEEVEE, &msg_sub_value_region_tag_redraw);
 
 #ifdef WITH_LINEART
-  WM_msg_subscribe_rna_anon_type(mbus, SceneLineart, &msg_sub_value_region_tag_redraw);
+  WM_msg_subscribe_rna_anon_type(mbus, SceneLineArt, &msg_sub_value_region_tag_redraw);
 #endif
 
   WM_msg_subscribe_rna_anon_type(mbus, SceneDisplay, &msg_sub_value_region_tag_redraw);
diff --git a/source/blender/makesdna/DNA_object_defaults.h b/source/blender/makesdna/DNA_object_defaults.h
index f3475c7c94a..d545b7912c0 100644
--- a/source/blender/makesdna/DNA_object_defaults.h
+++ b/source/blender/makesdna/DNA_object_defaults.h
@@ -66,7 +66,7 @@
     .preview = NULL, \
     .duplicator_visibility_flag = OB_DUPLI_FLAG_VIEWPORT | OB_DUPLI_FLAG_RENDER, \
     .pc_ids = {NULL, NULL}, \
-    .lineart = { .crease_threshold = 140.0f }, \
+    .lineart = { .crease_threshold = DEG2RAD(140.0f) }, \
   }
 
 /** \} */
diff --git a/source/blender/makesdna/DNA_scene_defaults.h b/source/blender/makesdna/DNA_scene_defaults.h
index ac902ffbf55..42921d29787 100644
--- a/source/blender/makesdna/DNA_scene_defaults.h
+++ b/source/blender/makesdna/DNA_scene_defaults.h
@@ -240,7 +240,7 @@
 
 #define _DNA_DEFAULT_SceneLineArt \
   { \
-    .crease_threshold = 140.0f,\
+    .crease_threshold = DEG2RAD(140.0f),\
     .angle_splitting_threshold = DEG2RAD(60.0f),\
     .chaining_geometry_threshold = 0.01f,\
     .chaining_image_threshold = 0.01f,\
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 984c5b7f580..0d0f63bb2df 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -1653,7 +1653,7 @@ typedef struct SceneEEVEE {
   float light_threshold;
 } SceneEEVEE;
 
-/* Line Art Global Config */
+/* Line Art Global Settings */
 
 typedef enum eLineartPostProcessingStatus {
   LRT_POST_PROCESSING_DISABLED = 0,
@@ -1681,7 +1681,7 @@ typedef enum eLineartMainFlags {
   LRT_REMOVE_DOUBLES = (1 << 14),
 } eLineartMainFlags;
 
-typedef struct SceneLineart {
+typedef struct SceneLineArt {
   int flags;
 
   /** line_types is used to select line types in global scope, especially when Fuzzy chaining is
@@ -1707,7 +1707,7 @@ typedef struct SceneLineart {
   int baking_preview_start;
   int baking_preview_end;
   int baking_skip; /* 0 for every frame, 1 for every other frame and so on. */
-} SceneLineart;
+} SceneLineArt;
 
 typedef struct SceneGpencil {
   float smaa_threshold;
@@ -1846,7 +1846,7 @@ typedef struct Scene {
   struct SceneDisplay display;
   struct SceneEEVEE eevee;
   struct SceneGpencil grease_pencil_settings;
-  struct SceneLineart lineart;
+  struct SceneLineArt lineart;
 } Scene;
 
 /* **************** RENDERDATA ********************* */
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 17feb957846..ac710b334de 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -506,7 +506,7 @@ extern StructRNA RNA_SPHFluidSettings;
 extern StructRNA RNA_Scene;
 extern StructRNA RNA_SceneDisplay;
 extern StructRNA RNA_SceneEEVEE;
-extern StructRNA RNA_SceneLineart;
+extern StructRNA RNA_SceneLineArt;
 extern StructRNA RNA_SceneObjects;
 extern StructRNA RNA_SceneRenderLayer;
 extern StructRNA RNA_SceneSequence;
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index 2a7d248c545..61c74a4da27 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -2335,7 +2335,7 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
   RNA_def_property_struct_type(prop, "Collection");
   RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
   RNA_def_property_ui_text(
-      prop, "Source Collection", "Source collection that this modifier grabs data from");
+      prop, "Source Collection", "Source collection that this modifier uses data from");
   RNA_def_property_update(prop, 0, "rna_GpencilModifier_dependency_update");
 
   /* types */
@@ -2373,13 +2373,15 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
 
   prop = RNA_def_property(srna, "level_start", PROP_INT, PROP_NONE);
   RNA_def_property_int_default(prop, 0);
-  RNA_def_property_ui_text(prop, "Level Start", "Occlusion level start");
+  RNA_def_property_ui_text(
+      prop, "Level Start", "Minimum level of occlusion level that gets selected");
   RNA_def_property_range(prop, 0, 128);
   RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
 
   prop = RNA_def_property(srna, "level_end", PROP_INT, PROP_NONE);
   RNA_def_property_int_default(prop, 0);
-  RNA_def_property_ui_text(prop, "Level End", "Occlusion level end");
+  RNA_def_property_ui_text(
+      prop, "Level End", "Maximum level of occlusion level that gets selected");
   RNA_def_property_range(prop, 0, 128);
   RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
 
@@ -2387,11 +2389,13 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
   RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
   RNA_def_property_struct_type(prop, "Material");
   RNA_def_property_override_flag(prop, PROPOVER

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list