diff options
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/SConscript | 3 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 14 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_intern.h | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_ops.c | 4 |
6 files changed, 31 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/CMakeLists.txt b/source/blender/editors/mesh/CMakeLists.txt index c51d2cfb2e5..3180886b2b6 100644 --- a/source/blender/editors/mesh/CMakeLists.txt +++ b/source/blender/editors/mesh/CMakeLists.txt @@ -73,6 +73,10 @@ if(WITH_INTERNATIONAL) add_definitions(-DWITH_INTERNATIONAL) endif() +if(WITH_FREESTYLE) + add_definitions(-DWITH_FREESTYLE) +endif() + if(WITH_BULLET) add_definitions(-DWITH_BULLET) endif() diff --git a/source/blender/editors/mesh/SConscript b/source/blender/editors/mesh/SConscript index 11c90a4a922..55ad14a50fc 100644 --- a/source/blender/editors/mesh/SConscript +++ b/source/blender/editors/mesh/SConscript @@ -53,6 +53,9 @@ else: if env['WITH_BF_INTERNATIONAL']: defs.append('WITH_INTERNATIONAL') +if env['WITH_BF_FREESTYLE']: + defs.append('WITH_FREESTYLE') + if env['WITH_BF_BULLET']: defs.append('WITH_BULLET') diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 2538ddfc886..a46edb19662 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -683,7 +683,9 @@ static EnumPropertyItem prop_similar_types[] = { {SIMEDGE_BEVEL, "BEVEL", 0, "Bevel", ""}, {SIMEDGE_SEAM, "SEAM", 0, "Seam", ""}, {SIMEDGE_SHARP, "SHARP", 0, "Sharpness", ""}, +#ifdef WITH_FREESTYLE {SIMEDGE_FREESTYLE, "FREESTYLE_EDGE", 0, "Freestyle Edge Marks", ""}, +#endif {SIMFACE_MATERIAL, "MATERIAL", 0, "Material", ""}, {SIMFACE_IMAGE, "IMAGE", 0, "Image", ""}, @@ -692,7 +694,9 @@ static EnumPropertyItem prop_similar_types[] = { {SIMFACE_PERIMETER, "PERIMETER", 0, "Perimeter", ""}, {SIMFACE_NORMAL, "NORMAL", 0, "Normal", ""}, {SIMFACE_COPLANAR, "COPLANAR", 0, "Co-planar", ""}, +#ifdef WITH_FREESTYLE {SIMFACE_FREESTYLE, "FREESTYLE_FACE", 0, "Freestyle Face Marks", ""}, +#endif {0, NULL, 0, NULL, NULL} }; @@ -867,7 +871,11 @@ static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUS } } else if (em->selectmode & SCE_SELECT_FACE) { +#ifdef WITH_FREESTYLE for (a = SIMFACE_MATERIAL; a <= SIMFACE_FREESTYLE; a++) { +#else + for (a = SIMFACE_MATERIAL; a <= SIMFACE_COPLANAR; a++) { +#endif RNA_enum_items_add_value(&item, &totitem, prop_similar_types, a); } } @@ -1317,9 +1325,11 @@ static void edgetag_context_set(BMesh *bm, Scene *scene, BMEdge *e, int val) case EDGE_MODE_TAG_SHARP: BM_elem_flag_set(e, BM_ELEM_SMOOTH, !val); break; +#ifdef WITH_FREESTYLE case EDGE_MODE_TAG_FREESTYLE: BM_elem_flag_set(e, BM_ELEM_FREESTYLE, val); break; +#endif case EDGE_MODE_TAG_CREASE: BM_elem_float_data_set(&bm->edata, e, CD_CREASE, (val) ? 1.0f : 0.0f); break; @@ -1338,8 +1348,10 @@ static int edgetag_context_check(Scene *scene, BMesh *bm, BMEdge *e) return BM_elem_flag_test(e, BM_ELEM_SEAM); case EDGE_MODE_TAG_SHARP: return !BM_elem_flag_test(e, BM_ELEM_SMOOTH); +#ifdef WITH_FREESTYLE case EDGE_MODE_TAG_FREESTYLE: return !BM_elem_flag_test(e, BM_ELEM_FREESTYLE); +#endif case EDGE_MODE_TAG_CREASE: return BM_elem_float_data_get(&bm->edata, e, CD_CREASE) ? TRUE : FALSE; case EDGE_MODE_TAG_BEVEL: @@ -1494,9 +1506,11 @@ static int mouse_mesh_shortest_path_edge(ViewContext *vc) case EDGE_MODE_TAG_BEVEL: me->drawflag |= ME_DRAWBWEIGHTS; break; +#ifdef WITH_FREESTYLE case EDGE_MODE_TAG_FREESTYLE: me->drawflag |= ME_DRAW_FREESTYLE_EDGE; break; +#endif } EDBM_update_generic(em, FALSE, FALSE); diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index df2722f1fbc..c15c1d4a4de 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -5764,6 +5764,7 @@ void MESH_OT_symmetrize(struct wmOperatorType *ot) "Direction", "Which sides to copy from and to"); } +#ifdef WITH_FREESTYLE static int edbm_mark_freestyle_edge(bContext *C, wmOperator *op) { Object *obedit = CTX_data_edit_object(C); @@ -5867,3 +5868,4 @@ void MESH_OT_mark_freestyle_face(wmOperatorType *ot) RNA_def_boolean(ot->srna, "clear", 0, "Clear", ""); } +#endif
\ No newline at end of file diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h index 043679b9d8a..790a7eae487 100644 --- a/source/blender/editors/mesh/mesh_intern.h +++ b/source/blender/editors/mesh/mesh_intern.h @@ -131,7 +131,9 @@ void MESH_OT_select_random(struct wmOperatorType *ot); void MESH_OT_loop_multi_select(struct wmOperatorType *ot); void MESH_OT_mark_seam(struct wmOperatorType *ot); void MESH_OT_mark_sharp(struct wmOperatorType *ot); +#ifdef WITH_FREESTYLE void MESH_OT_mark_freestyle_edge(struct wmOperatorType *ot); +#endif void MESH_OT_vertices_smooth(struct wmOperatorType *ot); void MESH_OT_vertices_smooth_laplacian(struct wmOperatorType *ot); void MESH_OT_noise(struct wmOperatorType *ot); @@ -181,7 +183,9 @@ void MESH_OT_rip(struct wmOperatorType *ot); void MESH_OT_shape_propagate_to_all(struct wmOperatorType *ot); void MESH_OT_blend_from_shape(struct wmOperatorType *ot); void MESH_OT_sort_elements(struct wmOperatorType *ot); +#ifdef WITH_FREESTYLE void MESH_OT_mark_freestyle_face(struct wmOperatorType *ot); +#endif /* ******************* mesh_data.c */ diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index a2ac08268e0..12b68f0e419 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -118,7 +118,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); +#ifdef WITH_FREESTYLE WM_operatortype_append(MESH_OT_mark_freestyle_face); +#endif WM_operatortype_append(MESH_OT_delete); WM_operatortype_append(MESH_OT_edge_collapse); @@ -134,7 +136,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); +#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_noise); |