From a2cb7ffa66691f4a210ab9f19ea22c2b614f2e7a Mon Sep 17 00:00:00 2001 From: YimingWu Date: Thu, 12 Sep 2019 17:09:50 +0800 Subject: LANPR: Apply cleanup branch result. --- intern/cycles/render/film.h | 2 +- intern/ghost/intern/GHOST_ContextCGL.mm | 9 +- intern/ghost/intern/GHOST_SystemCocoa.mm | 3 +- release/scripts/startup/bl_operators/freestyle.py | 4 +- .../startup/bl_ui/properties_data_modifier.py | 6 - release/scripts/startup/bl_ui/space_view3d.py | 6 +- source/blender/blenkernel/intern/customdata.c | 12 +- source/blender/blenkernel/intern/data_transfer.c | 12 +- source/blender/draw/engines/lanpr/lanpr_dpix.c | 8 +- source/blender/draw/intern/draw_common.c | 4 +- source/blender/editors/include/UI_resources.h | 4 +- source/blender/editors/interface/resources.c | 4 +- source/blender/editors/lanpr/lanpr_cpu.c | 8 +- source/blender/editors/mesh/editmesh_path.c | 27 +++-- .../blender/editors/mesh/editmesh_select_similar.c | 32 +++--- source/blender/editors/mesh/editmesh_tools.c | 57 +++++----- source/blender/editors/mesh/mesh_intern.h | 6 +- source/blender/editors/mesh/mesh_ops.c | 9 +- source/blender/editors/sculpt_paint/sculpt.c | 3 - .../intern/blender_interface/BlenderFileLoader.cpp | 10 +- source/blender/makesdna/DNA_customdata_types.h | 8 +- source/blender/makesdna/DNA_material_types.h | 1 - source/blender/makesdna/DNA_meshdata_types.h | 16 +-- source/blender/makesrna/intern/rna_mesh.c | 24 ++-- source/blender/modifiers/CMakeLists.txt | 2 +- source/blender/modifiers/intern/MOD_featureline.c | 124 --------------------- .../python/bmesh/bmesh_py_types_customdata.c | 4 +- 27 files changed, 139 insertions(+), 266 deletions(-) delete mode 100644 source/blender/modifiers/intern/MOD_featureline.c diff --git a/intern/cycles/render/film.h b/intern/cycles/render/film.h index 2c4e07d60ae..20f6261a871 100644 --- a/intern/cycles/render/film.h +++ b/intern/cycles/render/film.h @@ -91,7 +91,7 @@ class Film : public Node { void device_free(Device *device, DeviceScene *dscene, Scene *scene); bool modified(const Film &film); - void tag_passes_update(Scene *scene, const vector &passes_, bool update_passes = true); + void tag_passes_update(Scene *scene, const vector &passes_, bool update_passes=true); void tag_update(Scene *scene); }; diff --git a/intern/ghost/intern/GHOST_ContextCGL.mm b/intern/ghost/intern/GHOST_ContextCGL.mm index 0fca41306a6..12c340ffe97 100644 --- a/intern/ghost/intern/GHOST_ContextCGL.mm +++ b/intern/ghost/intern/GHOST_ContextCGL.mm @@ -34,8 +34,7 @@ static void ghost_fatal_error_dialog(const char *msg) { - @autoreleasepool - { + @autoreleasepool { NSString *message = [NSString stringWithFormat:@"Error opening window:\n%s", msg]; NSAlert *alert = [[NSAlert alloc] init]; @@ -338,8 +337,7 @@ static const OSType METAL_CORE_VIDEO_PIXEL_FORMAT = kCVPixelFormatType_32BGRA; void GHOST_ContextCGL::metalInit() { - @autoreleasepool - { + @autoreleasepool { id device = m_metalLayer.device; // Create a command queue for blit/present operation @@ -534,8 +532,7 @@ void GHOST_ContextCGL::metalUpdateFramebuffer() void GHOST_ContextCGL::metalSwapBuffers() { - @autoreleasepool - { + @autoreleasepool { updateDrawingContext(); glFlush(); diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 80a521a7ca5..376ebfa2a21 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -1358,8 +1358,7 @@ bool GHOST_SystemCocoa::handleOpenDocumentRequest(void *filepathStr) // Check open windows if some changes are not saved if (m_windowManager->getAnyModifiedState()) { - @autoreleasepool - { + @autoreleasepool { NSAlert *alert = [[NSAlert alloc] init]; NSString *title = [NSString stringWithFormat:@"Opening %@", [filepath lastPathComponent]]; NSString *text = @"Current document has not been saved.\nDo you really want to proceed?"; diff --git a/release/scripts/startup/bl_operators/freestyle.py b/release/scripts/startup/bl_operators/freestyle.py index b86c6eba5a9..baac3556fb2 100644 --- a/release/scripts/startup/bl_operators/freestyle.py +++ b/release/scripts/startup/bl_operators/freestyle.py @@ -148,7 +148,7 @@ class SCENE_OT_freestyle_add_edge_marks_to_keying_set(bpy.types.Operator): scene = context.scene ks = scene.keying_sets.active if ks is None: - ks = scene.keying_sets.new(idname="LanprEdgeMarkKeyingSet", name="Freestyle Edge Mark Keying Set") + ks = scene.keying_sets.new(idname="FreestyleEdgeMarkKeyingSet", name="Freestyle Edge Mark Keying Set") ks.bl_description = "" # add data paths to the keying set ob = context.active_object @@ -179,7 +179,7 @@ class SCENE_OT_freestyle_add_face_marks_to_keying_set(bpy.types.Operator): scene = context.scene ks = scene.keying_sets.active if ks is None: - ks = scene.keying_sets.new(idname="LanprFaceMarkKeyingSet", name="Freestyle Face Mark Keying Set") + ks = scene.keying_sets.new(idname="FreestyleFaceMarkKeyingSet", name="Freestyle Face Mark Keying Set") ks.bl_description = "" # add data paths to the keying set ob = context.active_object diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 2b7e9e785a7..124fe77cb52 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -1641,12 +1641,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "thresh", text="Threshold") col.prop(md, "face_influence") - def FEATURE_LINE(self, layout, _ob, _md): - if not (bpy.context.scene.render.engine == "BLENDER_LANPR" or bpy.context.scene.lanpr.enabled): - layout.label(text="LANPR is disabled.") - else: - layout.label(text="Settings are inside the LANPR tab.") - class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel): bl_label = "Modifiers" diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 2c34c8cbafe..6732f8fcc68 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3462,11 +3462,11 @@ class VIEW3D_MT_edit_mesh_context_menu(Menu): col.operator("mesh.mark_sharp") col.operator("mesh.mark_sharp", text="Clear Sharp").clear = True - if scene.lanpr.enabled or render.engine=="BLENDER_LANPR": + if render.use_freestyle or scene.lanpr.enabled or render.engine=="BLENDER_LANPR": col.separator() - col.operator("mesh.mark_lanpr_edge").clear = False - col.operator("mesh.mark_lanpr_edge", text="Clear Freestyle Edge").clear = True + col.operator("mesh.mark_freestyle_edge").clear = False + col.operator("mesh.mark_freestyle_edge", text="Clear Freestyle Edge").clear = True col.separator() diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index e9ecde19574..8ac0f71cd7e 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -1611,10 +1611,10 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = { layerInterp_mvert_skin, NULL, layerDefault_mvert_skin}, - /* 37: CD_LANPR_EDGE */ - {sizeof(LanprEdge), "LanprEdge", 1, NULL, NULL, NULL, NULL, NULL, NULL}, - /* 38: CD_LANPR_FACE */ - {sizeof(LanprFace), "LanprFace", 1, NULL, NULL, NULL, NULL, NULL, NULL}, + /* 37: CD_FREESTYLE_EDGE */ + {sizeof(FreestyleEdge), "FreestyleEdge", 1, NULL, NULL, NULL, NULL, NULL, NULL}, + /* 38: CD_FREESTYLE_FACE */ + {sizeof(FreestyleFace), "FreestyleFace", 1, NULL, NULL, NULL, NULL, NULL, NULL}, /* 39: CD_MLOOPTANGENT */ {sizeof(float[4]), "", 0, NULL, NULL, NULL, NULL, NULL, NULL}, /* 40: CD_TESSLOOPNORMAL */ @@ -1663,8 +1663,8 @@ static const char *LAYERTYPENAMES[CD_NUMTYPES] = { "CDPaintMask", /* 35-36 */ "CDGridPaintMask", "CDMVertSkin", - /* 37-38 */ "CDLanprEdge", - "CDLanprFace", + /* 37-38 */ "CDFreestyleEdge", + "CDFreestyleFace", /* 39-41 */ "CDMLoopTangent", "CDTessLoopNormal", "CDCustomLoopNormal", diff --git a/source/blender/blenkernel/intern/data_transfer.c b/source/blender/blenkernel/intern/data_transfer.c index 3dc025bdcf2..0414c6d0a02 100644 --- a/source/blender/blenkernel/intern/data_transfer.c +++ b/source/blender/blenkernel/intern/data_transfer.c @@ -222,14 +222,14 @@ int BKE_object_data_transfer_dttype_to_cdtype(const int dtdata_type) case DT_TYPE_BWEIGHT_EDGE: return CD_FAKE_BWEIGHT; case DT_TYPE_FREESTYLE_EDGE: - return CD_LANPR_EDGE; + return CD_FREESTYLE_EDGE; case DT_TYPE_UV: return CD_FAKE_UV; case DT_TYPE_SHARP_FACE: return CD_FAKE_SHARP; case DT_TYPE_FREESTYLE_FACE: - return CD_LANPR_FACE; + return CD_FREESTYLE_FACE; case DT_TYPE_VCOL: return CD_MLOOPCOL; @@ -519,11 +519,11 @@ static void data_transfer_layersmapping_add_item_cd(ListBase *r_map, { uint64_t data_flag = 0; - if (cddata_type == CD_LANPR_EDGE) { - data_flag = LANPR_EDGE_MARK; + if (cddata_type == CD_FREESTYLE_EDGE) { + data_flag = FREESTYLE_EDGE_MARK; } - else if (cddata_type == CD_LANPR_FACE) { - data_flag = LANPR_FACE_MARK; + else if (cddata_type == CD_FREESTYLE_FACE) { + data_flag = FREESTYLE_FACE_MARK; } data_transfer_layersmapping_add_item(r_map, diff --git a/source/blender/draw/engines/lanpr/lanpr_dpix.c b/source/blender/draw/engines/lanpr/lanpr_dpix.c index 7ebb28d2b2e..dd136b5f378 100644 --- a/source/blender/draw/engines/lanpr/lanpr_dpix.c +++ b/source/blender/draw/engines/lanpr/lanpr_dpix.c @@ -186,7 +186,7 @@ int lanpr_feed_atlas_data_obj(void *UNUSED(vedata), struct BMVert *v1, *v2; struct BMEdge *e; struct BMLoop *l1, *l2; - LanprEdge *fe; + FreestyleEdge *fe; int CanFindFreestyle = 0; int edge_count = me->totedge; int i, idx; @@ -210,7 +210,7 @@ int lanpr_feed_atlas_data_obj(void *UNUSED(vedata), })); BM_mesh_elem_table_ensure(bm, BM_VERT | BM_EDGE | BM_FACE); - if (CustomData_has_layer(&bm->edata, CD_LANPR_EDGE)) { + if (CustomData_has_layer(&bm->edata, CD_FREESTYLE_EDGE)) { CanFindFreestyle = 1; } @@ -242,8 +242,8 @@ int lanpr_feed_atlas_data_obj(void *UNUSED(vedata), AtlasPointsR[idx + 3] = 1; if (CanFindFreestyle) { - fe = CustomData_bmesh_get(&bm->edata, e->head.data, CD_LANPR_EDGE); - if (fe->flag & LANPR_EDGE_MARK) { + fe = CustomData_bmesh_get(&bm->edata, e->head.data, FREESTYLE_EDGE_MARK); + if (fe->flag & FREESTYLE_EDGE_MARK) { AtlasEdgeMask[idx + 1] = 1; /* channel G */ } } diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c index d6e5da9307e..8e0f713add6 100644 --- a/source/blender/draw/intern/draw_common.c +++ b/source/blender/draw/intern/draw_common.c @@ -97,8 +97,8 @@ void DRW_globals_update(void) interp_v4_v4v4(gb->colorDupli, gb->colorBackground, gb->colorWire, 0.3f); #ifdef WITH_FREESTYLE - UI_GetThemeColor4fv(TH_LANPR_EDGE_MARK, gb->colorEdgeFreestyle); - UI_GetThemeColor4fv(TH_LANPR_FACE_MARK, gb->colorFaceFreestyle); + UI_GetThemeColor4fv(TH_FREESTYLE_EDGE_MARK, gb->colorEdgeFreestyle); + UI_GetThemeColor4fv(TH_FREESTYLE_FACE_MARK, gb->colorFaceFreestyle); #else zero_v4(gb->colorEdgeFreestyle); zero_v4(gb->colorFaceFreestyle); diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index efa35c84b9e..1c317ac458b 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -250,8 +250,8 @@ typedef enum ThemeColorID { TH_UV_SHADOW, TH_UV_OTHERS, - TH_LANPR_EDGE_MARK, - TH_LANPR_FACE_MARK, + TH_FREESTYLE_EDGE_MARK, + TH_FREESTYLE_FACE_MARK, TH_MATCH, /* highlight color for search matches */ TH_SELECT_HIGHLIGHT, /* highlight color for selected outliner item */ diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index bea9af99c2e..ae161f1017c 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -537,10 +537,10 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) case TH_HANDLE_SEL_ALIGN: cp = ts->handle_sel_align; break; - case TH_LANPR_EDGE_MARK: + case TH_FREESTYLE_EDGE_MARK: cp = ts->freestyle_edge_mark; break; - case TH_LANPR_FACE_MARK: + case TH_FREESTYLE_FACE_MARK: cp = ts->freestyle_face_mark; break; diff --git a/source/blender/editors/lanpr/lanpr_cpu.c b/source/blender/editors/lanpr/lanpr_cpu.c index 2caadc66f49..48b051e8806 100644 --- a/source/blender/editors/lanpr/lanpr_cpu.c +++ b/source/blender/editors/lanpr/lanpr_cpu.c @@ -1599,7 +1599,7 @@ static void lanpr_make_render_geometry_buffers_object( LANPR_RenderVert *orv; LANPR_RenderLine *orl; LANPR_RenderTriangle *ort; - LanprEdge *fe; + FreestyleEdge *fe; int CanFindFreestyle = 0; int i; @@ -1635,7 +1635,7 @@ static void lanpr_make_render_geometry_buffers_object( BM_mesh_elem_table_ensure(bm, BM_VERT | BM_EDGE | BM_FACE); BM_mesh_elem_index_ensure(bm, BM_VERT | BM_EDGE | BM_FACE); - if (CustomData_has_layer(&bm->edata, CD_LANPR_EDGE)) { + if (CustomData_has_layer(&bm->edata, CD_FREESTYLE_EDGE)) { CanFindFreestyle = 1; } @@ -1673,8 +1673,8 @@ static void lanpr_make_render_geometry_buffers_object( for (i = 0; i < bm->totedge; i++) { e = BM_edge_at_index(bm, i); if (CanFindFreestyle) { - fe = CustomData_bmesh_get(&bm->edata, e->head.data, CD_LANPR_EDGE); - if (fe->flag & LANPR_EDGE_MARK) { + fe = CustomData_bmesh_get(&bm->edata, e->head.data, CD_FREESTYLE_EDGE); + if (fe->flag & FREESTYLE_EDGE_MARK) { rl->flags |= LANPR_EDGE_FLAG_EDGE_MARK; } } diff --git a/source/blender/editors/mesh/editmesh_path.c b/source/blender/editors/mesh/editmesh_path.c index 42f722dcdaa..06c41b78c37 100644 --- a/source/blender/editors/mesh/editmesh_path.c +++ b/source/blender/editors/mesh/editmesh_path.c @@ -28,8 +28,9 @@ #include "DNA_mesh_types.h" #include "DNA_windowmanager_types.h" -// for freestyle edge mark. -#include "DNA_meshdata_types.h" +#ifdef WITH_FREESTYLE +# include "DNA_meshdata_types.h" +#endif #include "BLI_math.h" #include "BLI_linklist.h" @@ -300,10 +301,12 @@ static bool edgetag_test_cb(BMEdge *e, void *user_data_v) return BM_elem_float_data_get(&bm->edata, e, CD_CREASE) ? true : false; case EDGE_MODE_TAG_BEVEL: return BM_elem_float_data_get(&bm->edata, e, CD_BWEIGHT) ? true : false; +#ifdef WITH_FREESTYLE case EDGE_MODE_TAG_FREESTYLE: { - LanprEdge *fed = CustomData_bmesh_get(&bm->edata, e->head.data, CD_LANPR_EDGE); - return (!fed) ? false : (fed->flag & LANPR_EDGE_MARK) ? true : false; + FreestyleEdge *fed = CustomData_bmesh_get(&bm->edata, e->head.data, CD_FREESTYLE_EDGE); + return (!fed) ? false : (fed->flag & FREESTYLE_EDGE_MARK) ? true : false; } +#endif } return 0; } @@ -329,17 +332,19 @@ static void edgetag_set_cb(BMEdge *e, bool val, void *user_data_v) case EDGE_MODE_TAG_BEVEL: BM_elem_float_data_set(&bm->edata, e, CD_BWEIGHT, (val) ? 1.0f : 0.0f); break; +#ifdef WITH_FREESTYLE case EDGE_MODE_TAG_FREESTYLE: { - LanprEdge *fed; - fed = CustomData_bmesh_get(&bm->edata, e->head.data, CD_LANPR_EDGE); + FreestyleEdge *fed; + fed = CustomData_bmesh_get(&bm->edata, e->head.data, CD_FREESTYLE_EDGE); if (!val) { - fed->flag &= ~LANPR_EDGE_MARK; + fed->flag &= ~FREESTYLE_EDGE_MARK; } else { - fed->flag |= LANPR_EDGE_MARK; + fed->flag |= FREESTYLE_EDGE_MARK; } break; } +#endif } } @@ -354,11 +359,13 @@ static void edgetag_ensure_cd_flag(Mesh *me, const char edge_mode) case EDGE_MODE_TAG_BEVEL: BM_mesh_cd_flag_ensure(bm, me, ME_CDFLAG_EDGE_BWEIGHT); break; +#ifdef WITH_FREESTYLE case EDGE_MODE_TAG_FREESTYLE: - if (!CustomData_has_layer(&bm->edata, CD_LANPR_EDGE)) { - BM_data_layer_add(bm, &bm->edata, CD_LANPR_EDGE); + if (!CustomData_has_layer(&bm->edata, CD_FREESTYLE_EDGE)) { + BM_data_layer_add(bm, &bm->edata, CD_FREESTYLE_EDGE); } break; +#endif default: break; } diff --git a/source/blender/editors/mesh/editmesh_select_similar.c b/source/blender/editors/mesh/editmesh_select_similar.c index 02ec903dcdf..2782cc92aca 100644 --- a/source/blender/editors/mesh/editmesh_select_similar.c +++ b/source/blender/editors/mesh/editmesh_select_similar.c @@ -233,7 +233,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) break; } case SIMFACE_FREESTYLE: { - if (!CustomData_has_layer(&bm->pdata, CD_LANPR_FACE)) { + if (!CustomData_has_layer(&bm->pdata, CD_FREESTYLE_FACE)) { face_data_value |= SIMFACE_DATA_FALSE; continue; } @@ -297,9 +297,9 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) break; } case SIMFACE_FREESTYLE: { - LanprFace *fface; - fface = CustomData_bmesh_get(&bm->pdata, face->head.data, CD_LANPR_FACE); - if ((fface == NULL) || ((fface->flag & LANPR_FACE_MARK) == 0)) { + FreestyleFace *fface; + fface = CustomData_bmesh_get(&bm->pdata, face->head.data, CD_FREESTYLE_FACE); + if ((fface == NULL) || ((fface->flag & FREESTYLE_FACE_MARK) == 0)) { face_data_value |= SIMFACE_DATA_FALSE; } else { @@ -357,7 +357,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) break; } case SIMFACE_FREESTYLE: { - has_custom_data_layer = CustomData_has_layer(&bm->pdata, CD_LANPR_FACE); + has_custom_data_layer = CustomData_has_layer(&bm->pdata, CD_FREESTYLE_FACE); if ((face_data_value == SIMFACE_DATA_TRUE) && !has_custom_data_layer) { continue; } @@ -459,7 +459,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) } break; case SIMFACE_FREESTYLE: { - LanprFace *fface; + FreestyleFace *fface; if (!has_custom_data_layer) { BLI_assert(face_data_value == SIMFACE_DATA_FALSE); @@ -467,8 +467,8 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) break; } - fface = CustomData_bmesh_get(&bm->pdata, face->head.data, CD_LANPR_FACE); - if (((fface != NULL) && (fface->flag & LANPR_FACE_MARK)) == + fface = CustomData_bmesh_get(&bm->pdata, face->head.data, CD_FREESTYLE_FACE); + if (((fface != NULL) && (fface->flag & FREESTYLE_FACE_MARK)) == ((face_data_value & SIMFACE_DATA_TRUE) != 0)) { select = true; } @@ -687,7 +687,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) switch (type) { case SIMEDGE_FREESTYLE: { - if (!CustomData_has_layer(&bm->edata, CD_LANPR_EDGE)) { + if (!CustomData_has_layer(&bm->edata, CD_FREESTYLE_EDGE)) { edge_data_value |= SIMEDGE_DATA_FALSE; continue; } @@ -745,9 +745,9 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) } break; case SIMEDGE_FREESTYLE: { - LanprEdge *fedge; - fedge = CustomData_bmesh_get(&bm->edata, edge->head.data, CD_LANPR_EDGE); - if ((fedge == NULL) || ((fedge->flag & LANPR_EDGE_MARK) == 0)) { + FreestyleEdge *fedge; + fedge = CustomData_bmesh_get(&bm->edata, edge->head.data, CD_FREESTYLE_EDGE); + if ((fedge == NULL) || ((fedge->flag & FREESTYLE_EDGE_MARK) == 0)) { edge_data_value |= SIMEDGE_DATA_FALSE; } else { @@ -790,7 +790,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) bool has_custom_data_layer = false; switch (type) { case SIMEDGE_FREESTYLE: { - has_custom_data_layer = CustomData_has_layer(&bm->edata, CD_LANPR_EDGE); + has_custom_data_layer = CustomData_has_layer(&bm->edata, CD_FREESTYLE_EDGE); if ((edge_data_value == SIMEDGE_DATA_TRUE) && !has_custom_data_layer) { continue; } @@ -877,7 +877,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) } break; case SIMEDGE_FREESTYLE: { - LanprEdge *fedge; + FreestyleEdge *fedge; if (!has_custom_data_layer) { BLI_assert(edge_data_value == SIMEDGE_DATA_FALSE); @@ -885,8 +885,8 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) break; } - fedge = CustomData_bmesh_get(&bm->edata, edge->head.data, CD_LANPR_EDGE); - if (((fedge != NULL) && (fedge->flag & LANPR_EDGE_MARK)) == + fedge = CustomData_bmesh_get(&bm->edata, edge->head.data, CD_FREESTYLE_EDGE); + if (((fedge != NULL) && (fedge->flag & FREESTYLE_EDGE_MARK)) == ((edge_data_value & SIMEDGE_DATA_TRUE) != 0)) { select = true; } diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 0c4db012786..e5023068100 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -7413,18 +7413,17 @@ void MESH_OT_symmetry_snap(struct wmOperatorType *ot) /** \} */ -/* preserve the edge marking capability */ -//#ifdef WITH_FREESTYLE +#ifdef WITH_FREESTYLE /* -------------------------------------------------------------------- */ /** \name Mark Edge (Freestyle) Operator * \{ */ -static int edbm_mark_lanpr_edge_exec(bContext *C, wmOperator *op) +static int edbm_mark_freestyle_edge_exec(bContext *C, wmOperator *op) { BMEdge *eed; BMIter iter; - LanprEdge *fed; + FreestyleEdge *fed; const bool clear = RNA_boolean_get(op->ptr, "clear"); ViewLayer *view_layer = CTX_data_view_layer(C); @@ -7445,23 +7444,23 @@ static int edbm_mark_lanpr_edge_exec(bContext *C, wmOperator *op) continue; } - if (!CustomData_has_layer(&em->bm->edata, CD_LANPR_EDGE)) { - BM_data_layer_add(em->bm, &em->bm->edata, CD_LANPR_EDGE); + if (!CustomData_has_layer(&em->bm->edata, CD_FREESTYLE_EDGE)) { + BM_data_layer_add(em->bm, &em->bm->edata, CD_FREESTYLE_EDGE); } if (clear) { BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) { if (BM_elem_flag_test(eed, BM_ELEM_SELECT) && !BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) { - fed = CustomData_bmesh_get(&em->bm->edata, eed->head.data, CD_LANPR_EDGE); - fed->flag &= ~LANPR_EDGE_MARK; + fed = CustomData_bmesh_get(&em->bm->edata, eed->head.data, CD_FREESTYLE_EDGE); + fed->flag &= ~FREESTYLE_EDGE_MARK; } } } else { BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) { if (BM_elem_flag_test(eed, BM_ELEM_SELECT) && !BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) { - fed = CustomData_bmesh_get(&em->bm->edata, eed->head.data, CD_LANPR_EDGE); - fed->flag |= LANPR_EDGE_MARK; + fed = CustomData_bmesh_get(&em->bm->edata, eed->head.data, CD_FREESTYLE_EDGE); + fed->flag |= FREESTYLE_EDGE_MARK; } } } @@ -7474,17 +7473,17 @@ static int edbm_mark_lanpr_edge_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void MESH_OT_mark_lanpr_edge(wmOperatorType *ot) +void MESH_OT_mark_freestyle_edge(wmOperatorType *ot) { PropertyRNA *prop; /* identifiers */ - ot->name = "Mark LANPR Edge"; - ot->description = "(Un)mark selected edges as LANPR feature edges"; - ot->idname = "MESH_OT_mark_lanpr_edge"; + ot->name = "Mark Freestyle Edge"; + ot->description = "(Un)mark selected edges as Freestyle feature edges"; + ot->idname = "MESH_OT_mark_freestyle_edge"; /* api callbacks */ - ot->exec = edbm_mark_lanpr_edge_exec; + ot->exec = edbm_mark_freestyle_edge_exec; ot->poll = ED_operator_editmesh; /* flags */ @@ -7500,11 +7499,11 @@ void MESH_OT_mark_lanpr_edge(wmOperatorType *ot) /** \name Mark Face (Freestyle) Operator * \{ */ -static int edbm_mark_lanpr_face_exec(bContext *C, wmOperator *op) +static int edbm_mark_freestyle_face_exec(bContext *C, wmOperator *op) { BMFace *efa; BMIter iter; - LanprFace *ffa; + FreestyleFace *ffa; const bool clear = RNA_boolean_get(op->ptr, "clear"); ViewLayer *view_layer = CTX_data_view_layer(C); @@ -7523,23 +7522,23 @@ static int edbm_mark_lanpr_face_exec(bContext *C, wmOperator *op) continue; } - if (!CustomData_has_layer(&em->bm->pdata, CD_LANPR_FACE)) { - BM_data_layer_add(em->bm, &em->bm->pdata, CD_LANPR_FACE); + if (!CustomData_has_layer(&em->bm->pdata, CD_FREESTYLE_FACE)) { + BM_data_layer_add(em->bm, &em->bm->pdata, CD_FREESTYLE_FACE); } if (clear) { BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { if (BM_elem_flag_test(efa, BM_ELEM_SELECT) && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { - ffa = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_LANPR_FACE); - ffa->flag &= ~LANPR_FACE_MARK; + ffa = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_FREESTYLE_FACE); + ffa->flag &= ~FREESTYLE_FACE_MARK; } } } else { BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { if (BM_elem_flag_test(efa, BM_ELEM_SELECT) && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { - ffa = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_LANPR_FACE); - ffa->flag |= LANPR_FACE_MARK; + ffa = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_FREESTYLE_FACE); + ffa->flag |= FREESTYLE_FACE_MARK; } } } @@ -7552,17 +7551,17 @@ static int edbm_mark_lanpr_face_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void MESH_OT_mark_lanpr_face(wmOperatorType *ot) +void MESH_OT_mark_freestyle_face(wmOperatorType *ot) { PropertyRNA *prop; /* identifiers */ - ot->name = "Mark LANPR Face"; - ot->description = "(Un)mark selected faces for exclusion from LANPR feature edge detection"; - ot->idname = "MESH_OT_mark_lanpr_face"; + ot->name = "Mark Freestyle Face"; + ot->description = "(Un)mark selected faces for exclusion from Freestyle feature edge detection"; + ot->idname = "MESH_OT_mark_freestyle_face"; /* api callbacks */ - ot->exec = edbm_mark_lanpr_face_exec; + ot->exec = edbm_mark_freestyle_face_exec; ot->poll = ED_operator_editmesh; /* flags */ @@ -7574,7 +7573,7 @@ void MESH_OT_mark_lanpr_face(wmOperatorType *ot) /** \} */ -//#endif /* WITH_FREESTYLE */ +#endif /* WITH_FREESTYLE */ /* -------------------------------------------------------------------- */ /** \name Loop Normals Editing Tools Modal Map diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h index bab5e35df53..8d340d93c0a 100644 --- a/source/blender/editors/mesh/mesh_intern.h +++ b/source/blender/editors/mesh/mesh_intern.h @@ -256,8 +256,10 @@ void MESH_OT_paint_mask_extract(struct wmOperatorType *ot); struct wmKeyMap *point_normals_modal_keymap(wmKeyConfig *keyconf); -void MESH_OT_mark_lanpr_edge(struct wmOperatorType *ot); -void MESH_OT_mark_lanpr_face(struct wmOperatorType *ot); +#ifdef WITH_FREESTYLE +void MESH_OT_mark_freestyle_edge(struct wmOperatorType *ot); +void MESH_OT_mark_freestyle_face(struct wmOperatorType *ot); +#endif /* *** mesh_data.c *** */ void MESH_OT_uv_texture_add(struct wmOperatorType *ot); diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index fc1c91dbeef..4105f853868 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -114,7 +114,9 @@ void ED_operatortypes_mesh(void) WM_operatortype_append(MESH_OT_faces_shade_smooth); WM_operatortype_append(MESH_OT_faces_shade_flat); WM_operatortype_append(MESH_OT_sort_elements); - WM_operatortype_append(MESH_OT_mark_lanpr_face); +#ifdef WITH_FREESTYLE + WM_operatortype_append(MESH_OT_mark_freestyle_face); +#endif WM_operatortype_append(MESH_OT_delete); WM_operatortype_append(MESH_OT_delete_loose); @@ -131,8 +133,9 @@ void ED_operatortypes_mesh(void) WM_operatortype_append(MESH_OT_loop_multi_select); WM_operatortype_append(MESH_OT_mark_seam); WM_operatortype_append(MESH_OT_mark_sharp); - WM_operatortype_append(MESH_OT_mark_lanpr_edge); - +#ifdef WITH_FREESTYLE + WM_operatortype_append(MESH_OT_mark_freestyle_edge); +#endif WM_operatortype_append(MESH_OT_vertices_smooth); WM_operatortype_append(MESH_OT_vertices_smooth_laplacian); WM_operatortype_append(MESH_OT_flip_normals); diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index ab557dc59b5..afbe7e14794 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -5978,9 +5978,6 @@ static void sculpt_update_brush_delta(UnifiedPaintSettings *ups, Object *ob, Bru else if (tool == SCULPT_TOOL_ELASTIC_DEFORM) { copy_v3_v3(cache->anchored_location, cache->true_location); } - else if (tool == SCULPT_TOOL_ELASTIC_DEFORM) { - copy_v3_v3(cache->anchored_location, cache->true_location); - } else if (tool == SCULPT_TOOL_THUMB) { copy_v3_v3(cache->anchored_location, cache->orig_grab_location); } diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp index d20da1ca377..8bd4fda8e23 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp @@ -392,7 +392,7 @@ int BlenderFileLoader::testDegenerateTriangle(float v1[3], float v2[3], float v3 return 0; } -static bool testEdgeMark(Mesh *me, LanprEdge *fed, const MLoopTri *lt, int i) +static bool testEdgeMark(Mesh *me, FreestyleEdge *fed, const MLoopTri *lt, int i) { MLoop *mloop = &me->mloop[lt->tri[i]]; MLoop *mloop_next = &me->mloop[lt->tri[(i + 1) % 3]]; @@ -403,7 +403,7 @@ static bool testEdgeMark(Mesh *me, LanprEdge *fed, const MLoopTri *lt, int i) return false; } - return (fed[mloop->e].flag & LANPR_EDGE_MARK) != 0; + return (fed[mloop->e].flag & FREESTYLE_EDGE_MARK) != 0; } void BlenderFileLoader::insertShapeNode(Object *ob, Mesh *me, int id) @@ -427,8 +427,8 @@ void BlenderFileLoader::insertShapeNode(Object *ob, Mesh *me, int id) MVert *mvert = me->mvert; MLoop *mloop = me->mloop; MPoly *mpoly = me->mpoly; - LanprEdge *fed = (LanprEdge *)CustomData_get_layer(&me->edata, CD_LANPR_EDGE); - LanprFace *ffa = (LanprFace *)CustomData_get_layer(&me->pdata, CD_LANPR_FACE); + FreestyleEdge *fed = (FreestyleEdge *)CustomData_get_layer(&me->edata, CD_FREESTYLE_EDGE); + FreestyleFace *ffa = (FreestyleFace *)CustomData_get_layer(&me->pdata, CD_FREESTYLE_FACE); // Compute view matrix Object *ob_camera_eval = DEG_get_evaluated_object(_depsgraph, RE_GetCamera(_re)); @@ -559,7 +559,7 @@ void BlenderFileLoader::insertShapeNode(Object *ob, Mesh *me, int id) continue; } - bool fm = (ffa) ? (ffa[lt->poly].flag & LANPR_FACE_MARK) != 0 : false; + bool fm = (ffa) ? (ffa[lt->poly].flag & FREESTYLE_FACE_MARK) != 0 : false; bool em1 = false, em2 = false, em3 = false; if (fed) { diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index 415eb03e26d..9799489982d 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -139,8 +139,8 @@ typedef enum CustomDataType { CD_PAINT_MASK = 34, CD_GRID_PAINT_MASK = 35, CD_MVERT_SKIN = 36, - CD_LANPR_EDGE = 37, - CD_LANPR_FACE = 38, + CD_FREESTYLE_EDGE = 37, + CD_FREESTYLE_FACE = 38, CD_MLOOPTANGENT = 39, CD_TESSLOOPNORMAL = 40, CD_CUSTOMLOOPNORMAL = 41, @@ -188,8 +188,8 @@ typedef enum CustomDataType { #define CD_MASK_PAINT_MASK (1LL << CD_PAINT_MASK) #define CD_MASK_GRID_PAINT_MASK (1LL << CD_GRID_PAINT_MASK) #define CD_MASK_MVERT_SKIN (1LL << CD_MVERT_SKIN) -#define CD_MASK_FREESTYLE_EDGE (1LL << CD_LANPR_EDGE) -#define CD_MASK_FREESTYLE_FACE (1LL << CD_LANPR_FACE) +#define CD_MASK_FREESTYLE_EDGE (1LL << CD_FREESTYLE_EDGE) +#define CD_MASK_FREESTYLE_FACE (1LL << CD_FREESTYLE_FACE) #define CD_MASK_MLOOPTANGENT (1LL << CD_MLOOPTANGENT) #define CD_MASK_TESSLOOPNORMAL (1LL << CD_TESSLOOPNORMAL) #define CD_MASK_CUSTOMLOOPNORMAL (1LL << CD_CUSTOMLOOPNORMAL) diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 3d309f3c22f..1d1ccef8846 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -27,7 +27,6 @@ #include "DNA_defs.h" #include "DNA_ID.h" #include "DNA_listBase.h" -#include "DNA_lanpr_types.h" #ifndef MAX_MTEX # define MAX_MTEX 18 diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index 50402bbdc87..f6a7a8a5f5b 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -363,24 +363,24 @@ typedef struct MVertSkin { int flag; } MVertSkin; -typedef struct LanprEdge { +typedef struct FreestyleEdge { char flag; char _pad[3]; -} LanprEdge; +} FreestyleEdge; -/* LanprEdge->flag */ +/* FreestyleEdge->flag */ enum { - LANPR_EDGE_MARK = 1, + FREESTYLE_EDGE_MARK = 1, }; -typedef struct LanprFace { +typedef struct FreestyleFace { char flag; char _pad[3]; -} LanprFace; +} FreestyleFace; -/* LanprFace->flag */ +/* FreestyleFace->flag */ enum { - LANPR_FACE_MARK = 1, + FREESTYLE_FACE_MARK = 1, }; /* mvert->flag */ diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 3b01c2a944b..8887ccbc936 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -603,25 +603,25 @@ static bool rna_MEdge_freestyle_edge_mark_get(PointerRNA *ptr) { Mesh *me = rna_mesh(ptr); MEdge *medge = (MEdge *)ptr->data; - LanprEdge *fed = CustomData_get(&me->edata, (int)(medge - me->medge), CD_LANPR_EDGE); + FreestyleEdge *fed = CustomData_get(&me->edata, (int)(medge - me->medge), CD_FREESTYLE_EDGE); - return fed && (fed->flag & LANPR_EDGE_MARK) != 0; + return fed && (fed->flag & FREESTYLE_EDGE_MARK) != 0; } static void rna_MEdge_freestyle_edge_mark_set(PointerRNA *ptr, bool value) { Mesh *me = rna_mesh(ptr); MEdge *medge = (MEdge *)ptr->data; - LanprEdge *fed = CustomData_get(&me->edata, (int)(medge - me->medge), CD_LANPR_EDGE); + FreestyleEdge *fed = CustomData_get(&me->edata, (int)(medge - me->medge), CD_FREESTYLE_EDGE); if (!fed) { - fed = CustomData_add_layer(&me->edata, CD_LANPR_EDGE, CD_CALLOC, NULL, me->totedge); + fed = CustomData_add_layer(&me->edata, CD_FREESTYLE_EDGE, CD_CALLOC, NULL, me->totedge); } if (value) { - fed->flag |= LANPR_EDGE_MARK; + fed->flag |= FREESTYLE_EDGE_MARK; } else { - fed->flag &= ~LANPR_EDGE_MARK; + fed->flag &= ~FREESTYLE_EDGE_MARK; } } @@ -629,25 +629,25 @@ static bool rna_MPoly_freestyle_face_mark_get(PointerRNA *ptr) { Mesh *me = rna_mesh(ptr); MPoly *mpoly = (MPoly *)ptr->data; - LanprFace *ffa = CustomData_get(&me->pdata, (int)(mpoly - me->mpoly), CD_LANPR_FACE); + FreestyleFace *ffa = CustomData_get(&me->pdata, (int)(mpoly - me->mpoly), CD_FREESTYLE_FACE); - return ffa && (ffa->flag & LANPR_FACE_MARK) != 0; + return ffa && (ffa->flag & FREESTYLE_FACE_MARK) != 0; } static void rna_MPoly_freestyle_face_mark_set(PointerRNA *ptr, int value) { Mesh *me = rna_mesh(ptr); MPoly *mpoly = (MPoly *)ptr->data; - LanprFace *ffa = CustomData_get(&me->pdata, (int)(mpoly - me->mpoly), CD_LANPR_FACE); + FreestyleFace *ffa = CustomData_get(&me->pdata, (int)(mpoly - me->mpoly), CD_FREESTYLE_FACE); if (!ffa) { - ffa = CustomData_add_layer(&me->pdata, CD_LANPR_FACE, CD_CALLOC, NULL, me->totpoly); + ffa = CustomData_add_layer(&me->pdata, CD_FREESTYLE_FACE, CD_CALLOC, NULL, me->totpoly); } if (value) { - ffa->flag |= LANPR_FACE_MARK; + ffa->flag |= FREESTYLE_FACE_MARK; } else { - ffa->flag &= ~LANPR_FACE_MARK; + ffa->flag &= ~FREESTYLE_FACE_MARK; } } diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt index b631050d4e3..1ae1f891e6f 100644 --- a/source/blender/modifiers/CMakeLists.txt +++ b/source/blender/modifiers/CMakeLists.txt @@ -100,7 +100,7 @@ set(SRC intern/MOD_weightvgmix.c intern/MOD_weightvgproximity.c intern/MOD_wireframe.c - + MOD_modifiertypes.h intern/MOD_fluidsim_util.h intern/MOD_meshcache_util.h diff --git a/source/blender/modifiers/intern/MOD_featureline.c b/source/blender/modifiers/intern/MOD_featureline.c deleted file mode 100644 index 0d2e3c7ae6b..00000000000 --- a/source/blender/modifiers/intern/MOD_featureline.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2005 by the Blender Foundation. - * All rights reserved. - */ - -/** \file - * \ingroup modifiers - */ - -#include "BLI_utildefines.h" - -#include "BLI_edgehash.h" -#include "BLI_kdtree.h" -#include "BLI_math.h" -#include "BLI_rand.h" - -#include "DNA_meshdata_types.h" -#include "DNA_scene_types.h" -#include "DNA_object_types.h" -#include "DNA_mesh_types.h" - -#include "BKE_deform.h" -#include "BKE_lattice.h" -#include "BKE_library.h" -#include "BKE_mesh.h" -#include "BKE_modifier.h" -#include "BKE_particle.h" -#include "BKE_scene.h" -#include "BKE_library_query.h" - -#include "DEG_depsgraph_query.h" - -#include "MEM_guardedalloc.h" - -#include "MOD_modifiertypes.h" - -#include "bmesh.h" -#include "bmesh_tools.h" - -#include "DEG_depsgraph.h" -#include "DEG_depsgraph_build.h" -#include "DEG_depsgraph_query.h" - -static void initData(ModifierData *md) -{ - FeatureLineModifierData *flmd = (FeatureLineModifierData *)md; - flmd->types = MOD_FEATURE_LINE_ALL; -} -static void freeData(ModifierData *md) -{ - FeatureLineModifierData *flmd = (FeatureLineModifierData *)md; -} -static void copyData(const ModifierData *md, ModifierData *target, const int flag) -{ - FeatureLineModifierData *tflmd = (FeatureLineModifierData *)target; - - modifier_copyData_generic(md, target, flag); -} -static bool dependsOnTime(ModifierData *UNUSED(md)) -{ - return true; /* ?? */ -} -static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh) -{ - FeatureLineModifierData *flmd = (FeatureLineModifierData *)md; - return mesh; -} - -static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, void *userData) -{ - FeatureLineModifierData *flmd = (FeatureLineModifierData *)md; - - walk(userData, ob, &flmd->target, IDWALK_NOP); -} - -static bool isDisabled(const struct Scene *scene, struct ModifierData *md, bool userRenderParams) -{ - FeatureLineModifierData *flmd = (FeatureLineModifierData *)md; - if (!flmd->target) { - return true; - } - return false; -} - -ModifierTypeInfo modifierType_FeatureLine = { - /* name */ "Feature Line", - /* structName */ "FeatureLineModifierData", - /* structSize */ sizeof(FeatureLineModifierData), - /* type */ eModifierTypeType_Constructive, - /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_Single, - /* copyData */ copyData, - - /* deformVerts */ NULL, - /* deformMatrices */ NULL, - /* deformVertsEM */ NULL, - /* deformMatricesEM */ NULL, - /* applyModifier */ applyModifier, - - /* initData */ initData, - /* requiredDataMask */ NULL, - /* freeData */ freeData, - /* isDisabled */ isDisabled, - /* updateDepsgraph */ NULL, - /* dependsOnTime */ dependsOnTime, - /* dependsOnNormals */ NULL, - /* foreachObjectLink */ foreachObjectLink, - /* foreachIDLink */ NULL, - /* foreachTexLink */ NULL, - /* freeRuntimeData */ NULL, -}; diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c index c97fa246df3..a7f4e30b494 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c @@ -252,7 +252,7 @@ static PyGetSetDef bpy_bmlayeraccess_edge_getseters[] = { (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__freestyle_edge_doc, - (void *)CD_LANPR_EDGE}, + (void *)CD_FREESTYLE_EDGE}, #endif {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ @@ -285,7 +285,7 @@ static PyGetSetDef bpy_bmlayeraccess_face_getseters[] = { (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__freestyle_face_doc, - (void *)CD_LANPR_FACE}, + (void *)CD_FREESTYLE_FACE}, #endif {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ -- cgit v1.2.3