From 7206254d920b6949cdb2c1c4a4f1c152f1472777 Mon Sep 17 00:00:00 2001 From: YimingWu Date: Wed, 4 Sep 2019 14:26:00 +0800 Subject: LANPR: Remove "ignore_lanpr" in edge split modifier. --- .../startup/bl_ui/properties_data_modifier.py | 4 --- release/scripts/startup/bl_ui/properties_render.py | 1 - source/blender/blenloader/intern/versioning_280.c | 2 -- source/blender/draw/CMakeLists.txt | 1 - source/blender/editors/include/ED_lanpr.h | 1 - source/blender/editors/lanpr/lanpr_cpu.c | 4 --- source/blender/makesdna/DNA_modifier_types.h | 2 -- source/blender/makesdna/DNA_scene_types.h | 3 +- source/blender/makesrna/intern/rna_modifier.c | 4 --- source/blender/makesrna/intern/rna_scene.c | 5 --- source/blender/modifiers/intern/MOD_edgesplit.c | 40 +--------------------- 11 files changed, 2 insertions(+), 65 deletions(-) diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index bc81dde3b22..35e5ad721f0 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -400,10 +400,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): split.prop(md, "use_edge_sharp", text="Sharp Edges") - layout.prop(md, "ignore_lanpr") - if md.ignore_lanpr: - layout.label(text="Enabeling edge split may cause problems in LANPR.") - def EXPLODE(self, layout, ob, md): split = layout.split() diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 75e2ab888bb..531c6825a25 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -1117,7 +1117,6 @@ class RENDER_PT_lanpr_options(RenderButtonsPanel, Panel): layout.prop(lanpr,"gpu_cache_size") layout.prop(lanpr,"enable_intersections") - layout.prop(lanpr, "disable_edge_splits") if scene.render.engine=='BLENDER_LANPR' and lanpr.master_mode=='SOFTWARE': layout.prop(lanpr,"enable_chaining", text = "Chained Lines") diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index f01ce71b513..12ce551791f 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -3628,8 +3628,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) sce->lanpr.flags |= (LANPR_USE_CHAINING | LANPR_USE_INTERSECTIONS); sce->lanpr.chaining_image_threshold = 0.01f; sce->lanpr.chaining_geometry_threshold = 0.0f; - - sce->lanpr.disable_edge_splits = 1; } for (Collection *co = bmain->collections.first; co; co = co->id.next) { co->lanpr.types = COLLECTION_FEATURE_LINE_ALL; diff --git a/source/blender/draw/CMakeLists.txt b/source/blender/draw/CMakeLists.txt index 9b0f5f743f6..3b808fabacb 100644 --- a/source/blender/draw/CMakeLists.txt +++ b/source/blender/draw/CMakeLists.txt @@ -131,7 +131,6 @@ set(SRC engines/gpencil/gpencil_shader_fx.c engines/lanpr/lanpr_dpix.c engines/lanpr/lanpr_engine.c - # engines/lanpr/lanpr_snake.c deprecated for now. engines/lanpr/lanpr_cpu.c engines/lanpr/lanpr_chain_draw.c engines/select/select_draw_utils.c diff --git a/source/blender/editors/include/ED_lanpr.h b/source/blender/editors/include/ED_lanpr.h index b5130c90aa5..25182b726f5 100644 --- a/source/blender/editors/include/ED_lanpr.h +++ b/source/blender/editors/include/ED_lanpr.h @@ -604,7 +604,6 @@ void ED_lanpr_calculation_set_flag(LANPR_RenderStatus flag); bool ED_lanpr_calculation_flag_check(LANPR_RenderStatus flag); bool ED_lanpr_dpix_shader_error(void); -bool ED_lanpr_disable_edge_splits(struct Scene *s); int ED_lanpr_max_occlusion_in_line_layers(struct SceneLANPR *lanpr); LANPR_LineLayer *ED_lanpr_new_line_layer(struct SceneLANPR *lanpr); diff --git a/source/blender/editors/lanpr/lanpr_cpu.c b/source/blender/editors/lanpr/lanpr_cpu.c index fcc5cbb010f..df60d395a81 100644 --- a/source/blender/editors/lanpr/lanpr_cpu.c +++ b/source/blender/editors/lanpr/lanpr_cpu.c @@ -3950,10 +3950,6 @@ bool ED_lanpr_dpix_shader_error() { return lanpr_share.dpix_shader_error; } -bool ED_lanpr_disable_edge_splits(Scene *s) -{ - return ((s->lanpr.flags & LANPR_ENABLED) && s->lanpr.disable_edge_splits); -} /* GPencil bindings */ diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 13b0d3b35e9..86d01fd7f54 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -351,8 +351,6 @@ typedef struct EdgeSplitModifierData { /** Angle above which edges should be split. */ float split_angle; int flags; - int ignore_lanpr; - char _pad[4]; } EdgeSplitModifierData; /* EdgeSplitModifierData->flags */ diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 1a13d7e150f..89555458f8f 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1701,9 +1701,8 @@ typedef struct SceneLANPR { float depth_alpha_influence; float depth_alpha_curve; - int disable_edge_splits; - int gpu_cache_size; /* enum! */ + int _pad; int enable_chain_connection; diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 568113a61a1..3739535bd3d 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2652,10 +2652,6 @@ static void rna_def_modifier_edgesplit(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_EDGESPLIT_FROMFLAG); RNA_def_property_ui_text(prop, "Use Sharp Edges", "Split edges that are marked as sharp"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - - prop = RNA_def_property(srna, "ignore_lanpr", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_ui_text(prop, "Ignore LANPR", "Ignore the presense of LANPR modifier."); - RNA_def_property_update(prop, 0, "rna_Modifier_update"); } static void rna_def_modifier_displace(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index d0c2b530e8c..bb7e1d1d47c 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -7454,11 +7454,6 @@ static void rna_def_scene_lanpr(BlenderRNA *brna) RNA_def_property_ui_text( prop, "DPIX Shader Error", "Can't compile DPIX transform shader on your GPU."); - prop = RNA_def_property(srna, "disable_edge_splits", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_default(prop, 0); - RNA_def_property_ui_text( - prop, "Disable Edge Splits", "Disable edge split modifiers to prevent errors in LANPR."); - prop = RNA_def_property(srna, "chaining_geometry_threshold", PROP_FLOAT, PROP_NONE); RNA_def_property_float_default(prop, 0.1f); RNA_def_property_ui_text(prop, diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c index 904d600164a..59d560b9a4a 100644 --- a/source/blender/modifiers/intern/MOD_edgesplit.c +++ b/source/blender/modifiers/intern/MOD_edgesplit.c @@ -127,44 +127,6 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *UNUSED(c return result; } -bool ED_lanpr_disable_edge_splits(struct Scene *s); - -static bool isDisabled(const struct Scene *scene, struct ModifierData *md, bool userRenderParams) -{ - int lanpr_found = 0; - ModifierData *imd; - EdgeSplitModifierData *emd = (EdgeSplitModifierData *)md; - - if (ED_lanpr_disable_edge_splits(scene)) { - lanpr_found = 1; - } - if (!lanpr_found) { - for (imd = md->prev; imd; imd = imd->prev) { - if (imd->type == eModifierType_FeatureLine) { - lanpr_found = 1; - break; - } - } - } - if (!lanpr_found) { - for (imd = md->next; imd; imd = imd->next) { - if (imd->type == eModifierType_FeatureLine) { - lanpr_found = 1; - break; - } - } - } - if (!lanpr_found) { - return false; - } - else { - if (emd->ignore_lanpr) { - return false; - } - return true; - } -} - ModifierTypeInfo modifierType_EdgeSplit = { /* name */ "EdgeSplit", /* structName */ "EdgeSplitModifierData", @@ -185,7 +147,7 @@ ModifierTypeInfo modifierType_EdgeSplit = { /* initData */ initData, /* requiredDataMask */ NULL, /* freeData */ NULL, - /* isDisabled */ isDisabled, + /* isDisabled */ NULL, /* updateDepsgraph */ NULL, /* dependsOnTime */ NULL, /* dependsOnNormals */ NULL, -- cgit v1.2.3