[Bf-blender-cvs] [b6cc0d0e1c8] soc-2019-npr: LANPR: Rename Freestyle face/edge mark structures into LANPR.
YimingWu
noreply at git.blender.org
Fri Aug 9 03:56:17 CEST 2019
Commit: b6cc0d0e1c88106147143f7e80c8fffb063c64c1
Author: YimingWu
Date: Fri Aug 9 09:56:08 2019 +0800
Branches: soc-2019-npr
https://developer.blender.org/rBb6cc0d0e1c88106147143f7e80c8fffb063c64c1
LANPR: Rename Freestyle face/edge mark structures into LANPR.
===================================================================
M release/scripts/startup/bl_operators/freestyle.py
M source/blender/blenkernel/intern/customdata.c
M source/blender/blenkernel/intern/data_transfer.c
M source/blender/draw/engines/lanpr/lanpr_dpix.c
M source/blender/draw/intern/draw_cache_impl_mesh.c
M source/blender/draw/intern/draw_common.c
M source/blender/editors/include/UI_resources.h
M source/blender/editors/interface/resources.c
M source/blender/editors/lanpr/lanpr_cpu.c
M source/blender/editors/mesh/editmesh_path.c
M source/blender/editors/mesh/editmesh_select_similar.c
M source/blender/editors/mesh/editmesh_tools.c
M source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
M source/blender/makesdna/DNA_meshdata_types.h
M source/blender/makesrna/intern/rna_mesh.c
===================================================================
diff --git a/release/scripts/startup/bl_operators/freestyle.py b/release/scripts/startup/bl_operators/freestyle.py
index 3d619f97e6e..14456941eb8 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="FreestyleEdgeMarkKeyingSet", name="Freestyle Edge Mark Keying Set")
+ ks = scene.keying_sets.new(idname="LanprEdgeMarkKeyingSet", 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="FreestyleFaceMarkKeyingSet", name="Freestyle Face Mark Keying Set")
+ ks = scene.keying_sets.new(idname="LanprFaceMarkKeyingSet", name="Freestyle Face Mark Keying Set")
ks.bl_description = ""
# add data paths to the keying set
ob = context.active_object
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 4851e883317..770d8662743 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -1612,9 +1612,9 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
NULL,
layerDefault_mvert_skin},
/* 37: CD_LANPR_EDGE */
- {sizeof(FreestyleEdge), "FreestyleEdge", 1, NULL, NULL, NULL, NULL, NULL, NULL},
+ {sizeof(LanprEdge), "LanprEdge", 1, NULL, NULL, NULL, NULL, NULL, NULL},
/* 38: CD_LANPR_FACE */
- {sizeof(FreestyleFace), "FreestyleFace", 1, NULL, NULL, NULL, NULL, NULL, NULL},
+ {sizeof(LanprFace), "LanprFace", 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 */ "CDFreestyleEdge",
- "CDFreestyleFace",
+ /* 37-38 */ "CDLanprEdge",
+ "CDLanprFace",
/* 39-41 */ "CDMLoopTangent",
"CDTessLoopNormal",
"CDCustomLoopNormal",
diff --git a/source/blender/blenkernel/intern/data_transfer.c b/source/blender/blenkernel/intern/data_transfer.c
index 4d5f78a17a9..3dc025bdcf2 100644
--- a/source/blender/blenkernel/intern/data_transfer.c
+++ b/source/blender/blenkernel/intern/data_transfer.c
@@ -520,10 +520,10 @@ static void data_transfer_layersmapping_add_item_cd(ListBase *r_map,
uint64_t data_flag = 0;
if (cddata_type == CD_LANPR_EDGE) {
- data_flag = FREESTYLE_EDGE_MARK;
+ data_flag = LANPR_EDGE_MARK;
}
else if (cddata_type == CD_LANPR_FACE) {
- data_flag = FREESTYLE_FACE_MARK;
+ data_flag = LANPR_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 7e394f370e0..69ac52fc1fb 100644
--- a/source/blender/draw/engines/lanpr/lanpr_dpix.c
+++ b/source/blender/draw/engines/lanpr/lanpr_dpix.c
@@ -159,7 +159,7 @@ int lanpr_feed_atlas_data_obj(void *UNUSED(vedata),
struct BMVert *v1, *v2;
struct BMEdge *e;
struct BMLoop *l1, *l2;
- FreestyleEdge *fe;
+ LanprEdge *fe;
int CanFindFreestyle = 0;
int edge_count = me->totedge;
int i, idx;
@@ -216,7 +216,7 @@ int lanpr_feed_atlas_data_obj(void *UNUSED(vedata),
if (CanFindFreestyle) {
fe = CustomData_bmesh_get(&bm->edata, e->head.data, CD_LANPR_EDGE);
- if (fe->flag & FREESTYLE_EDGE_MARK) {
+ if (fe->flag & LANPR_EDGE_MARK) {
AtlasEdgeMask[idx + 1] = 1; /* channel G */
}
}
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index a017133185f..cbfaf76969b 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -1653,8 +1653,8 @@ static uchar mesh_render_data_face_flag(MeshRenderData *rdata, const BMFace *efa
#ifdef WITH_FREESTYLE
if (rdata->cd.offset.freestyle_face != -1) {
- const FreestyleFace *ffa = BM_ELEM_CD_GET_VOID_P(efa, rdata->cd.offset.freestyle_face);
- if (ffa->flag & FREESTYLE_FACE_MARK) {
+ const LanprFace *ffa = BM_ELEM_CD_GET_VOID_P(efa, rdata->cd.offset.freestyle_face);
+ if (ffa->flag & LANPR_FACE_MARK) {
fflag |= VFLAG_FACE_FREESTYLE;
}
}
@@ -1718,8 +1718,8 @@ static void mesh_render_data_edge_flag(const MeshRenderData *rdata,
}
#ifdef WITH_FREESTYLE
if (rdata->cd.offset.freestyle_edge != -1) {
- const FreestyleEdge *fed = BM_ELEM_CD_GET_VOID_P(eed, rdata->cd.offset.freestyle_edge);
- if (fed->flag & FREESTYLE_EDGE_MARK) {
+ const LanprEdge *fed = BM_ELEM_CD_GET_VOID_P(eed, rdata->cd.offset.freestyle_edge);
+ if (fed->flag & LANPR_EDGE_MARK) {
eattr->e_flag |= VFLAG_EDGE_FREESTYLE;
}
}
diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c
index ac3e7e4ce67..e3867eef8d8 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_FREESTYLE_EDGE_MARK, gb->colorEdgeFreestyle);
- UI_GetThemeColor4fv(TH_FREESTYLE_FACE_MARK, gb->colorFaceFreestyle);
+ UI_GetThemeColor4fv(TH_LANPR_EDGE_MARK, gb->colorEdgeFreestyle);
+ UI_GetThemeColor4fv(TH_LANPR_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 3b080b6df95..1db584f0f59 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_FREESTYLE_EDGE_MARK,
- TH_FREESTYLE_FACE_MARK,
+ TH_LANPR_EDGE_MARK,
+ TH_LANPR_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 c31de60c7ed..1e74ee50dab 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_FREESTYLE_EDGE_MARK:
+ case TH_LANPR_EDGE_MARK:
cp = ts->freestyle_edge_mark;
break;
- case TH_FREESTYLE_FACE_MARK:
+ case TH_LANPR_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 f2cc0be616e..419781f17e4 100644
--- a/source/blender/editors/lanpr/lanpr_cpu.c
+++ b/source/blender/editors/lanpr/lanpr_cpu.c
@@ -1584,7 +1584,7 @@ static void lanpr_make_render_geometry_buffers_object(
LANPR_RenderVert *orv;
LANPR_RenderLine *orl;
LANPR_RenderTriangle *ort;
- FreestyleEdge *fe;
+ LanprEdge *fe;
int CanFindFreestyle = 0;
int i;
@@ -1661,7 +1661,7 @@ static void lanpr_make_render_geometry_buffers_object(
e = BM_edge_at_index(bm, i);
if (CanFindFreestyle) {
fe = CustomData_bmesh_get(&bm->edata, e->head.data, CD_LANPR_EDGE);
- if (fe->flag & FREESTYLE_EDGE_MARK) {
+ if (fe->flag & LANPR_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 478fbec8ea6..3040ea44890 100644
--- a/source/blender/editors/mesh/editmesh_path.c
+++ b/source/blender/editors/mesh/editmesh_path.c
@@ -302,8 +302,8 @@ static bool edgetag_test_cb(BMEdge *e, void *user_data_v)
case EDGE_MODE_TAG_BEVEL:
return BM_elem_float_data_get(&bm->edata, e, CD_BWEIGHT) ? true : false;
case EDGE_MODE_TAG_FREESTYLE: {
- FreestyleEdge *fed = CustomData_bmesh_get(&bm->edata, e->head.data, CD_LANPR_EDGE);
- return (!fed) ? false : (fed->flag & FREESTYLE_EDGE_MARK) ? true : false;
+ LanprEdge *fed = CustomData_bmesh_get(&bm->edata, e->head.data, CD_LANPR_EDGE);
+ return (!fed) ? false : (fed->flag & LANPR_EDGE_MARK) ? true : false;
}
}
return 0;
@@ -331,13 +331,13 @@ static void edgetag_set_cb(BMEdge *e, bool val, void *user_data_v)
BM_elem_float_data_set(&bm->edata, e, CD_BWEIGHT, (val) ? 1.0f : 0.0f);
break;
case EDGE_MODE_TAG_FREESTYLE: {
- FreestyleEdge *fed;
+ LanprEdge *fed;
fed = CustomData_bmesh_get(&bm->edata, e->head.data, CD_LANPR_EDGE);
if (!val) {
- fed->flag &= ~FREESTYLE_EDGE_MARK;
+ fed->flag &= ~LANPR_EDGE_MARK;
}
else {
- fed->flag |= FREESTYLE_EDGE_MARK;
+ fed->flag |= LANPR_EDGE_MARK;
}
break;
}
diff --git a/source/blender/editors/mesh/editmesh_select_similar.c b/source/blender/editors/mesh/editmesh_select_similar.c
index 94b2981ff62..02ec903dcdf 100644
--- a/source/blender/editors/mesh/editmesh_select_similar.c
+++ b/source/blender/editors/mesh/editmesh_select_similar.c
@@ -297,9 +297,9 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
break;
}
case SIMFACE_FREESTYLE: {
- FreestyleFace *fface;
+ LanprFace *fface;
fface = CustomData_bmesh_get(&bm->pdata, face->head.data, CD_LANPR_FACE);
- if ((fface == NULL) || ((fface-
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list