Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-25 14:03:56 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-25 14:04:24 +0300
commit5b3ff9f7d890554ae87e63095f24ac6d31a36d3c (patch)
tree34ce6928414d5902be3692aafdf3f436187f16d5 /source/blender/blenkernel/intern/DerivedMesh.c
parente10eb5bcb8c08bb451492c42d18de7359bc026df (diff)
Cleanup: Move colorband handling from DM to mesh_runtime universe.
Diffstat (limited to 'source/blender/blenkernel/intern/DerivedMesh.c')
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 19886738b00..a77e6ec12c7 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -1438,10 +1438,10 @@ enum {
CALC_WP_MIRROR_X = (1 << 5),
};
-typedef struct DMWeightColorInfo {
+typedef struct MERuntimeWeightColorInfo {
const ColorBand *coba;
const char *alert_color;
-} DMWeightColorInfo;
+} MERuntimeWeightColorInfo;
static int dm_drawflag_calc(const ToolSettings *ts, const Mesh *me)
@@ -1453,7 +1453,7 @@ static int dm_drawflag_calc(const ToolSettings *ts, const Mesh *me)
((me->editflag & ME_EDIT_MIRROR_X) ? CALC_WP_MIRROR_X : 0));
}
-static void weightpaint_color(unsigned char r_col[4], DMWeightColorInfo *dm_wcinfo, const float input)
+static void weightpaint_color(unsigned char r_col[4], MERuntimeWeightColorInfo *dm_wcinfo, const float input)
{
float colf[4];
@@ -1476,7 +1476,7 @@ static void weightpaint_color(unsigned char r_col[4], DMWeightColorInfo *dm_wcin
static void calc_weightpaint_vert_color(
unsigned char r_col[4],
const MDeformVert *dv,
- DMWeightColorInfo *dm_wcinfo,
+ MERuntimeWeightColorInfo *dm_wcinfo,
const int defbase_tot, const int defbase_act,
const bool *defbase_sel, const int defbase_sel_tot,
const int draw_flag)
@@ -1521,12 +1521,12 @@ static void calc_weightpaint_vert_color(
}
}
-static DMWeightColorInfo G_dm_wcinfo;
+static MERuntimeWeightColorInfo G_me_runtime_wcinfo;
-void vDM_ColorBand_store(const ColorBand *coba, const char alert_color[4])
+void BKE_mesh_runtime_color_band_store(const ColorBand *coba, const char alert_color[4])
{
- G_dm_wcinfo.coba = coba;
- G_dm_wcinfo.alert_color = alert_color;
+ G_me_runtime_wcinfo.coba = coba;
+ G_me_runtime_wcinfo.alert_color = alert_color;
}
/**
@@ -1537,7 +1537,7 @@ void vDM_ColorBand_store(const ColorBand *coba, const char alert_color[4])
* so leave this as is - campbell
*/
static void calc_weightpaint_vert_array(
- Object *ob, DerivedMesh *dm, int const draw_flag, DMWeightColorInfo *dm_wcinfo,
+ Object *ob, DerivedMesh *dm, int const draw_flag, MERuntimeWeightColorInfo *dm_wcinfo,
unsigned char (*r_wtcol_v)[4])
{
BMEditMesh *em = (dm->type == DM_TYPE_EDITBMESH) ? BKE_editmesh_from_object(ob) : NULL;
@@ -1612,7 +1612,7 @@ static void calc_weightpaint_vert_array(
}
static void calc_weightpaint_vert_array_mesh(
- Object *ob, Mesh *mesh, int const draw_flag, DMWeightColorInfo *dm_wcinfo,
+ Object *ob, Mesh *mesh, int const draw_flag, MERuntimeWeightColorInfo *dm_wcinfo,
unsigned char (*r_wtcol_v)[4])
{
BMEditMesh *em = BKE_editmesh_from_object(ob);
@@ -1741,7 +1741,7 @@ void DM_update_weight_mcol(
}
else {
/* No weights given, take them from active vgroup(s). */
- calc_weightpaint_vert_array(ob, dm, draw_flag, &G_dm_wcinfo, wtcol_v);
+ calc_weightpaint_vert_array(ob, dm, draw_flag, &G_me_runtime_wcinfo, wtcol_v);
}
if (dm->type == DM_TYPE_EDITBMESH) {
@@ -1815,7 +1815,7 @@ static void mesh_update_weight_mcol(
}
else {
/* No weights given, take them from active vgroup(s). */
- calc_weightpaint_vert_array_mesh(ob, mesh, draw_flag, &G_dm_wcinfo, wtcol_v);
+ calc_weightpaint_vert_array_mesh(ob, mesh, draw_flag, &G_me_runtime_wcinfo, wtcol_v);
}
if (em) {