[Bf-blender-cvs] [4fffd9273fc] temp_lineart_contained: LineArt: Remove SceneLineArt.
YimingWu
noreply at git.blender.org
Thu Nov 12 05:35:43 CET 2020
Commit: 4fffd9273fcebeab2a8139666e3baa4bea4b4158
Author: YimingWu
Date: Thu Nov 12 10:58:22 2020 +0800
Branches: temp_lineart_contained
https://developer.blender.org/rB4fffd9273fcebeab2a8139666e3baa4bea4b4158
LineArt: Remove SceneLineArt.
===================================================================
M release/scripts/startup/bl_ui/properties_render.py
M source/blender/blenloader/intern/versioning_290.c
M source/blender/editors/include/ED_lineart.h
M source/blender/editors/space_view3d/space_view3d.c
M source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
M source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
M source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
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_scene.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index dc017f4ebb1..ae2a7a8ccb9 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -691,158 +691,6 @@ class RENDER_PT_simplify_greasepencil(RenderButtonsPanel, Panel, GreasePencilSim
bl_options = {'DEFAULT_CLOSED'}
-class RENDER_PT_lineart(RenderButtonsPanel, Panel):
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
- bl_label = "Line Art"
- bl_options = {'DEFAULT_CLOSED'}
-
- def draw_header(self, context):
- self.layout.prop(context.scene.lineart, "auto_update", text="")
-
- def draw(self, context):
- scene = context.scene
- lineart = scene.lineart
-
- layout = self.layout
- layout.active = lineart.auto_update
- layout.use_property_split = True
-
- if not scene.camera:
- layout.label(text="No active camera.")
-
- else:
- layout.prop(lineart, "use_contour", text='Contour')
- layout.prop(lineart, "use_material", text='Material Separation')
- layout.prop(lineart, "use_edge_mark", text='Edge Marks')
-
-
-class RENDER_PT_lineart_crease(RenderButtonsPanel, Panel):
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
- bl_label = "Crease Lines"
- bl_parent_id = "RENDER_PT_lineart"
- bl_options = {'DEFAULT_CLOSED'}
-
- @classmethod
- def poll(cls, context):
- scene = context.scene
- return (scene.camera is not None)
-
- def draw_header(self, context):
- scene = context.scene
- lineart = scene.lineart
-
- self.layout.prop(lineart, "use_crease", text='')
-
- def draw(self, context):
- scene = context.scene
- lineart = scene.lineart
-
- layout = self.layout
- layout.active = lineart.auto_update
- layout.use_property_split = True
-
- layout.prop(lineart, "crease_threshold", slider=True)
-
-
-class RENDER_PT_lineart_intersection(RenderButtonsPanel, Panel):
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
- bl_label = "Intersection Lines"
- bl_parent_id = "RENDER_PT_lineart"
- bl_options = {'DEFAULT_CLOSED'}
-
- @classmethod
- def poll(cls, context):
- scene = context.scene
- return (scene.camera is not None)
-
-
- def draw_header(self, context):
- scene = context.scene
- lineart = scene.lineart
- self.layout.prop(lineart, "use_intersections", text='')
-
- def draw(self, context):
- scene = context.scene
- lineart = scene.lineart
-
- layout = self.layout
- layout.active = lineart.auto_update
- layout.use_property_split = True
-
- row = layout.row(align=False)
- row.active = not lineart.fuzzy_everything
- row.prop(lineart, "fuzzy_intersections")
-
-
-class RENDER_PT_lineart_extras(RenderButtonsPanel, Panel):
- bl_label = "Extras"
- bl_parent_id = "RENDER_PT_lineart"
- bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
-
- @classmethod
- def poll(cls, context):
- scene = context.scene
- return (scene.camera is not None)
-
- def draw(self, context):
- scene = context.scene
- lineart = scene.lineart
-
- layout = self.layout
- layout.use_property_split = True
- layout.use_property_decorate = False
-
- layout.prop(lineart, "angle_splitting_threshold", slider=True)
-
- layout.prop(lineart, "chaining_image_threshold")
- layout.prop(lineart, "chaining_geometry_threshold")
-
- layout.label(text="Advanced Options:")
- layout.prop(lineart, "fuzzy_everything")
- layout.prop(lineart, "allow_duplication", text="Instancing")
- layout.prop(lineart, "allow_overlapping_edges")
- layout.prop(lineart, "allow_clipping_boundaries",
- text="Show Clipping Boundaries")
- layout.prop(lineart, "remove_doubles")
-
-
-class RENDER_PT_lineart_baking(RenderButtonsPanel, Panel):
- bl_label = "Baking"
- bl_parent_id = "RENDER_PT_lineart"
- bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
-
- @classmethod
- def poll(cls, context):
- scene = context.scene
- return (scene.camera is not None)
-
- def draw(self, context):
- scene = context.scene
- lineart = scene.lineart
-
- layout = self.layout
- layout.use_property_split = True
- layout.use_property_decorate = False
-
- layout.prop(lineart, "gpencil_overwrite", text='Overwrite')
-
- layout.prop(lineart, "baking_final_range")
-
- if not lineart.baking_final_range:
- col = layout.column(align=True)
- col.prop(lineart, "baking_preview_start", text='Start')
- col.prop(lineart, "baking_preview_end", text='End')
-
- layout.prop(lineart, "baking_keyframes_only")
-
- if not lineart.baking_keyframes_only:
- layout.prop(lineart, "baking_skip")
-
- layout.operator('scene.lineart_bake_strokes')
-
-
classes = (
RENDER_PT_context,
RENDER_PT_eevee_sampling,
@@ -874,12 +722,6 @@ classes = (
RENDER_PT_simplify_viewport,
RENDER_PT_simplify_render,
RENDER_PT_simplify_greasepencil,
-
- RENDER_PT_lineart,
- RENDER_PT_lineart_crease,
- RENDER_PT_lineart_intersection,
- RENDER_PT_lineart_extras,
- RENDER_PT_lineart_baking,
)
if __name__ == "__main__": # only for live edit.
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 1d0a0e67e25..471cecce7a3 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -1138,16 +1138,5 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
* \note Keep this message at the bottom of the function.
*/
{
-
- if (!DNA_struct_find(fd->filesdna, "SceneLineArt")) {
- LISTBASE_FOREACH (Scene *, sc, &bmain->scenes) {
- sc->lineart.crease_threshold = DEG2RAD(140.0f);
- sc->lineart.line_types |= LRT_EDGE_FLAG_ALL_TYPE;
- sc->lineart.flags |= (LRT_ALLOW_DUPLI_OBJECTS | LRT_REMOVE_DOUBLES);
- sc->lineart.angle_splitting_threshold = DEG2RAD(60.0f);
- sc->lineart.chaining_geometry_threshold = 0.001f;
- sc->lineart.chaining_image_threshold = 0.001f;
- }
- }
}
}
diff --git a/source/blender/editors/include/ED_lineart.h b/source/blender/editors/include/ED_lineart.h
index 41f3badb236..ced597ffe0c 100644
--- a/source/blender/editors/include/ED_lineart.h
+++ b/source/blender/editors/include/ED_lineart.h
@@ -583,7 +583,6 @@ 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 Scene;
struct LineartRenderBuffer;
@@ -678,8 +677,6 @@ void ED_lineart_post_frame_update_external(struct bContext *C,
struct Depsgraph *dg,
bool from_modifier);
-struct SceneLineArt;
-
void ED_lineart_update_render_progress(int nr, const char *info);
float ED_lineart_chain_compute_length(LineartRenderLineChain *rlc);
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 231915c28ea..5ae012ce5dd 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -1095,11 +1095,6 @@ 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);
-#endif
-
WM_msg_subscribe_rna_anon_type(mbus, SceneDisplay, &msg_sub_value_region_tag_redraw);
WM_msg_subscribe_rna_anon_type(mbus, ObjectDisplay, &msg_sub_value_region_tag_redraw);
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index 487802e4a80..ad1c8268d36 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -76,6 +76,11 @@ static void initData(GpencilModifierData *md)
lmd->thickness = 25;
lmd->opacity = 1.0f;
lmd->flags |= LRT_GPENCIL_MATCH_OUTPUT_VGROUP;
+ lmd->crease_threshold = DEG2RAD(140.0f);
+ lmd->calculation_flags |= (LRT_ALLOW_DUPLI_OBJECTS | LRT_REMOVE_DOUBLES);
+ lmd->angle_splitting_threshold = DEG2RAD(60.0f);
+ lmd->chaining_geometry_threshold = 0.001f;
+ lmd->chaining_image_threshold = 0.001f;
}
static void copyData(const GpencilModifierData *md, GpencilModifierData *target)
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 8debc1cc32d..8e942ef0f93 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -3718,7 +3718,6 @@ 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;
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/gpencil_modifiers/intern/lineart/lineart_ops.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
index 043c4b0d9fa..0946ae3885c 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
@@ -70,7 +70,6 @@ static int lineart_gpencil_bake_strokes_invoke(bContext *C,
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list