Cleanup: naming in MOD_utils.
This commit is contained in:
@@ -119,7 +119,7 @@ static void deformVerts(
|
|||||||
{
|
{
|
||||||
ArmatureModifierData *amd = (ArmatureModifierData *) md;
|
ArmatureModifierData *amd = (ArmatureModifierData *) md;
|
||||||
|
|
||||||
modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
|
MOD_previous_vcos_store(md, vertexCos); /* if next modifier needs original vertices */
|
||||||
|
|
||||||
armature_deform_verts(amd->object, ctx->object, mesh, vertexCos, NULL,
|
armature_deform_verts(amd->object, ctx->object, mesh, vertexCos, NULL,
|
||||||
numVerts, amd->deformflag, (float(*)[3])amd->prevCos, amd->defgrp_name);
|
numVerts, amd->deformflag, (float(*)[3])amd->prevCos, amd->defgrp_name);
|
||||||
@@ -136,9 +136,9 @@ static void deformVertsEM(
|
|||||||
Mesh *mesh, float (*vertexCos)[3], int numVerts)
|
Mesh *mesh, float (*vertexCos)[3], int numVerts)
|
||||||
{
|
{
|
||||||
ArmatureModifierData *amd = (ArmatureModifierData *) md;
|
ArmatureModifierData *amd = (ArmatureModifierData *) md;
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, em, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, em, mesh, NULL, false, false);
|
||||||
|
|
||||||
modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
|
MOD_previous_vcos_store(md, vertexCos); /* if next modifier needs original vertices */
|
||||||
|
|
||||||
armature_deform_verts(amd->object, ctx->object, mesh_src, vertexCos, NULL,
|
armature_deform_verts(amd->object, ctx->object, mesh_src, vertexCos, NULL,
|
||||||
numVerts, amd->deformflag, (float(*)[3])amd->prevCos, amd->defgrp_name);
|
numVerts, amd->deformflag, (float(*)[3])amd->prevCos, amd->defgrp_name);
|
||||||
@@ -160,7 +160,7 @@ static void deformMatricesEM(
|
|||||||
float (*defMats)[3][3], int numVerts)
|
float (*defMats)[3][3], int numVerts)
|
||||||
{
|
{
|
||||||
ArmatureModifierData *amd = (ArmatureModifierData *) md;
|
ArmatureModifierData *amd = (ArmatureModifierData *) md;
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, em, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, em, mesh, NULL, false, false);
|
||||||
|
|
||||||
armature_deform_verts(amd->object, ctx->object, mesh_src, vertexCos, defMats, numVerts,
|
armature_deform_verts(amd->object, ctx->object, mesh_src, vertexCos, defMats, numVerts,
|
||||||
amd->deformflag, NULL, amd->defgrp_name);
|
amd->deformflag, NULL, amd->defgrp_name);
|
||||||
@@ -175,7 +175,7 @@ static void deformMatrices(
|
|||||||
float (*vertexCos)[3], float (*defMats)[3][3], int numVerts)
|
float (*vertexCos)[3], float (*defMats)[3][3], int numVerts)
|
||||||
{
|
{
|
||||||
ArmatureModifierData *amd = (ArmatureModifierData *) md;
|
ArmatureModifierData *amd = (ArmatureModifierData *) md;
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, NULL, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, NULL, mesh, NULL, false, false);
|
||||||
|
|
||||||
armature_deform_verts(amd->object, ctx->object, mesh_src, vertexCos, defMats, numVerts,
|
armature_deform_verts(amd->object, ctx->object, mesh_src, vertexCos, defMats, numVerts,
|
||||||
amd->deformflag, NULL, amd->defgrp_name);
|
amd->deformflag, NULL, amd->defgrp_name);
|
||||||
|
@@ -108,7 +108,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
|
|||||||
});
|
});
|
||||||
|
|
||||||
if ((bmd->lim_flags & MOD_BEVEL_VGROUP) && bmd->defgrp_name[0])
|
if ((bmd->lim_flags & MOD_BEVEL_VGROUP) && bmd->defgrp_name[0])
|
||||||
modifier_get_vgroup_mesh(ctx->object, mesh, bmd->defgrp_name, &dvert, &vgroup);
|
MOD_get_vgroup(ctx->object, mesh, bmd->defgrp_name, &dvert, &vgroup);
|
||||||
|
|
||||||
if (vertex_only) {
|
if (vertex_only) {
|
||||||
BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
|
BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
|
||||||
|
@@ -153,7 +153,7 @@ static void sphere_do(
|
|||||||
|
|
||||||
/* 3) if we were given a vertex group name,
|
/* 3) if we were given a vertex group name,
|
||||||
* only those vertices should be affected */
|
* only those vertices should be affected */
|
||||||
modifier_get_vgroup_mesh(ob, mesh, cmd->defgrp_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ob, mesh, cmd->defgrp_name, &dvert, &defgrp_index);
|
||||||
|
|
||||||
if (flag & MOD_CAST_SIZE_FROM_RADIUS) {
|
if (flag & MOD_CAST_SIZE_FROM_RADIUS) {
|
||||||
len = cmd->radius;
|
len = cmd->radius;
|
||||||
@@ -255,7 +255,7 @@ static void cuboid_do(
|
|||||||
|
|
||||||
/* 3) if we were given a vertex group name,
|
/* 3) if we were given a vertex group name,
|
||||||
* only those vertices should be affected */
|
* only those vertices should be affected */
|
||||||
modifier_get_vgroup_mesh(ob, mesh, cmd->defgrp_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ob, mesh, cmd->defgrp_name, &dvert, &defgrp_index);
|
||||||
|
|
||||||
if (ctrl_ob) {
|
if (ctrl_ob) {
|
||||||
if (flag & MOD_CAST_USE_OB_TRANSFORM) {
|
if (flag & MOD_CAST_USE_OB_TRANSFORM) {
|
||||||
@@ -429,7 +429,7 @@ static void deformVerts(
|
|||||||
int numVerts)
|
int numVerts)
|
||||||
{
|
{
|
||||||
CastModifierData *cmd = (CastModifierData *)md;
|
CastModifierData *cmd = (CastModifierData *)md;
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, NULL, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, NULL, mesh, NULL, false, false);
|
||||||
|
|
||||||
BLI_assert(mesh_src->totvert == numVerts);
|
BLI_assert(mesh_src->totvert == numVerts);
|
||||||
|
|
||||||
@@ -451,7 +451,7 @@ static void deformVertsEM(
|
|||||||
Mesh *mesh, float (*vertexCos)[3], int numVerts)
|
Mesh *mesh, float (*vertexCos)[3], int numVerts)
|
||||||
{
|
{
|
||||||
CastModifierData *cmd = (CastModifierData *)md;
|
CastModifierData *cmd = (CastModifierData *)md;
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, editData, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, editData, mesh, NULL, false, false);
|
||||||
|
|
||||||
BLI_assert(mesh_src->totvert == numVerts);
|
BLI_assert(mesh_src->totvert == numVerts);
|
||||||
|
|
||||||
|
@@ -92,7 +92,7 @@ static void deformVerts(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mesh == NULL) {
|
if (mesh == NULL) {
|
||||||
mesh_src = get_mesh(ctx->object, NULL, NULL, NULL, false, false);
|
mesh_src = MOD_get_mesh_eval(ctx->object, NULL, NULL, NULL, false, false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Not possible to use get_mesh() in this case as we'll modify its vertices
|
/* Not possible to use get_mesh() in this case as we'll modify its vertices
|
||||||
|
@@ -113,7 +113,7 @@ static void deformVerts(
|
|||||||
Object *ob = ctx->object;
|
Object *ob = ctx->object;
|
||||||
|
|
||||||
if (mesh == NULL) {
|
if (mesh == NULL) {
|
||||||
mesh_src = get_mesh(ob, NULL, NULL, NULL, false, false);
|
mesh_src = MOD_get_mesh_eval(ob, NULL, NULL, NULL, false, false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Not possible to use get_mesh() in this case as we'll modify its vertices
|
/* Not possible to use get_mesh() in this case as we'll modify its vertices
|
||||||
|
@@ -581,7 +581,7 @@ static void correctivesmooth_modifier_do(
|
|||||||
MDeformVert *dvert = NULL;
|
MDeformVert *dvert = NULL;
|
||||||
int defgrp_index;
|
int defgrp_index;
|
||||||
|
|
||||||
modifier_get_vgroup_mesh(ob, mesh, csmd->defgrp_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ob, mesh, csmd->defgrp_name, &dvert, &defgrp_index);
|
||||||
|
|
||||||
/* if rest bind_coords not are defined, set them (only run during bind) */
|
/* if rest bind_coords not are defined, set them (only run during bind) */
|
||||||
if ((csmd->rest_source == MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND) &&
|
if ((csmd->rest_source == MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND) &&
|
||||||
@@ -717,7 +717,7 @@ static void deformVerts(
|
|||||||
ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh,
|
ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh,
|
||||||
float (*vertexCos)[3], int numVerts)
|
float (*vertexCos)[3], int numVerts)
|
||||||
{
|
{
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, NULL, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, NULL, mesh, NULL, false, false);
|
||||||
|
|
||||||
correctivesmooth_modifier_do(md, ctx->object, mesh_src, vertexCos, (unsigned int)numVerts, NULL);
|
correctivesmooth_modifier_do(md, ctx->object, mesh_src, vertexCos, (unsigned int)numVerts, NULL);
|
||||||
|
|
||||||
@@ -731,7 +731,7 @@ static void deformVertsEM(
|
|||||||
ModifierData *md, const ModifierEvalContext *ctx, struct BMEditMesh *editData,
|
ModifierData *md, const ModifierEvalContext *ctx, struct BMEditMesh *editData,
|
||||||
Mesh *mesh, float (*vertexCos)[3], int numVerts)
|
Mesh *mesh, float (*vertexCos)[3], int numVerts)
|
||||||
{
|
{
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, editData, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, editData, mesh, NULL, false, false);
|
||||||
|
|
||||||
correctivesmooth_modifier_do(md, ctx->object, mesh_src, vertexCos, (unsigned int)numVerts, editData);
|
correctivesmooth_modifier_do(md, ctx->object, mesh_src, vertexCos, (unsigned int)numVerts, editData);
|
||||||
|
|
||||||
|
@@ -113,7 +113,7 @@ static void deformVerts(
|
|||||||
int numVerts)
|
int numVerts)
|
||||||
{
|
{
|
||||||
CurveModifierData *cmd = (CurveModifierData *) md;
|
CurveModifierData *cmd = (CurveModifierData *) md;
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, NULL, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, NULL, mesh, NULL, false, false);
|
||||||
|
|
||||||
BLI_assert(mesh_src->totvert == numVerts);
|
BLI_assert(mesh_src->totvert == numVerts);
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ static void deformVertsEM(
|
|||||||
float (*vertexCos)[3],
|
float (*vertexCos)[3],
|
||||||
int numVerts)
|
int numVerts)
|
||||||
{
|
{
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, em, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, em, mesh, NULL, false, false);
|
||||||
|
|
||||||
BLI_assert(mesh_src->totvert == numVerts);
|
BLI_assert(mesh_src->totvert == numVerts);
|
||||||
|
|
||||||
|
@@ -129,7 +129,7 @@ static Mesh *applyModifier(
|
|||||||
MDeformVert *dvert;
|
MDeformVert *dvert;
|
||||||
int defgrp_index;
|
int defgrp_index;
|
||||||
|
|
||||||
modifier_get_vgroup_mesh(ctx->object, mesh, dmd->defgrp_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ctx->object, mesh, dmd->defgrp_name, &dvert, &defgrp_index);
|
||||||
|
|
||||||
if (dvert) {
|
if (dvert) {
|
||||||
const unsigned int vert_tot = mesh->totvert;
|
const unsigned int vert_tot = mesh->totvert;
|
||||||
|
@@ -293,14 +293,14 @@ static void displaceModifier_do(
|
|||||||
if (dmd->strength == 0.0f) return;
|
if (dmd->strength == 0.0f) return;
|
||||||
|
|
||||||
mvert = mesh->mvert;
|
mvert = mesh->mvert;
|
||||||
modifier_get_vgroup_mesh(ob, mesh, dmd->defgrp_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ob, mesh, dmd->defgrp_name, &dvert, &defgrp_index);
|
||||||
|
|
||||||
if (dmd->texture) {
|
if (dmd->texture) {
|
||||||
tex_co = MEM_calloc_arrayN((size_t)numVerts, sizeof(*tex_co),
|
tex_co = MEM_calloc_arrayN((size_t)numVerts, sizeof(*tex_co),
|
||||||
"displaceModifier_do tex_co");
|
"displaceModifier_do tex_co");
|
||||||
get_texture_coords_mesh((MappingInfoModifierData *)dmd, ob, mesh, vertexCos, tex_co);
|
MOD_get_texture_coords((MappingInfoModifierData *)dmd, ob, mesh, vertexCos, tex_co);
|
||||||
|
|
||||||
modifier_init_texture(depsgraph, dmd->texture);
|
MOD_init_texture(depsgraph, dmd->texture);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tex_co = NULL;
|
tex_co = NULL;
|
||||||
@@ -376,7 +376,7 @@ static void deformVerts(
|
|||||||
float (*vertexCos)[3],
|
float (*vertexCos)[3],
|
||||||
int numVerts)
|
int numVerts)
|
||||||
{
|
{
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, NULL, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, NULL, mesh, NULL, false, false);
|
||||||
|
|
||||||
BLI_assert(mesh_src->totvert == numVerts);
|
BLI_assert(mesh_src->totvert == numVerts);
|
||||||
|
|
||||||
@@ -391,7 +391,7 @@ static void deformVertsEM(
|
|||||||
ModifierData *md, const ModifierEvalContext *ctx, struct BMEditMesh *editData,
|
ModifierData *md, const ModifierEvalContext *ctx, struct BMEditMesh *editData,
|
||||||
Mesh *mesh, float (*vertexCos)[3], int numVerts)
|
Mesh *mesh, float (*vertexCos)[3], int numVerts)
|
||||||
{
|
{
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, editData, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, editData, mesh, NULL, false, false);
|
||||||
|
|
||||||
BLI_assert(mesh_src->totvert == numVerts);
|
BLI_assert(mesh_src->totvert == numVerts);
|
||||||
|
|
||||||
|
@@ -271,7 +271,7 @@ static void deformVerts_do(
|
|||||||
|
|
||||||
/* Generic data needed for applying per-vertex calculations (initialize all members) */
|
/* Generic data needed for applying per-vertex calculations (initialize all members) */
|
||||||
hd.vertexCos = vertexCos;
|
hd.vertexCos = vertexCos;
|
||||||
modifier_get_vgroup_mesh(ob, mesh, hmd->name, &hd.dvert, &hd.defgrp_index);
|
MOD_get_vgroup(ob, mesh, hmd->name, &hd.dvert, &hd.defgrp_index);
|
||||||
|
|
||||||
hd.curfalloff = hmd->curfalloff;
|
hd.curfalloff = hmd->curfalloff;
|
||||||
|
|
||||||
@@ -354,7 +354,7 @@ static void deformVerts(
|
|||||||
float (*vertexCos)[3], int numVerts)
|
float (*vertexCos)[3], int numVerts)
|
||||||
{
|
{
|
||||||
HookModifierData *hmd = (HookModifierData *)md;
|
HookModifierData *hmd = (HookModifierData *)md;
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, NULL, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, NULL, mesh, NULL, false, false);
|
||||||
|
|
||||||
deformVerts_do(hmd, ctx->object, mesh_src, vertexCos, numVerts);
|
deformVerts_do(hmd, ctx->object, mesh_src, vertexCos, numVerts);
|
||||||
|
|
||||||
@@ -369,7 +369,7 @@ static void deformVertsEM(
|
|||||||
struct Mesh *mesh, float (*vertexCos)[3], int numVerts)
|
struct Mesh *mesh, float (*vertexCos)[3], int numVerts)
|
||||||
{
|
{
|
||||||
HookModifierData *hmd = (HookModifierData *)md;
|
HookModifierData *hmd = (HookModifierData *)md;
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, editData, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, editData, mesh, NULL, false, false);
|
||||||
|
|
||||||
deformVerts_do(hmd, ctx->object, mesh_src, vertexCos, numVerts);
|
deformVerts_do(hmd, ctx->object, mesh_src, vertexCos, numVerts);
|
||||||
|
|
||||||
|
@@ -509,7 +509,7 @@ static bool isValidVertexGroup(LaplacianDeformModifierData *lmd, Object *ob, Mes
|
|||||||
int defgrp_index;
|
int defgrp_index;
|
||||||
MDeformVert *dvert = NULL;
|
MDeformVert *dvert = NULL;
|
||||||
|
|
||||||
modifier_get_vgroup_mesh(ob, mesh, lmd->anchor_grp_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ob, mesh, lmd->anchor_grp_name, &dvert, &defgrp_index);
|
||||||
|
|
||||||
return (dvert != NULL);
|
return (dvert != NULL);
|
||||||
}
|
}
|
||||||
@@ -535,7 +535,7 @@ static void initSystem(
|
|||||||
|
|
||||||
STACK_INIT(index_anchors, numVerts);
|
STACK_INIT(index_anchors, numVerts);
|
||||||
|
|
||||||
modifier_get_vgroup_mesh(ob, mesh, lmd->anchor_grp_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ob, mesh, lmd->anchor_grp_name, &dvert, &defgrp_index);
|
||||||
BLI_assert(dvert != NULL);
|
BLI_assert(dvert != NULL);
|
||||||
dv = dvert;
|
dv = dvert;
|
||||||
for (i = 0; i < numVerts; i++) {
|
for (i = 0; i < numVerts; i++) {
|
||||||
@@ -595,7 +595,7 @@ static int isSystemDifferent(LaplacianDeformModifierData *lmd, Object *ob, Mesh
|
|||||||
if (!STREQ(lmd->anchor_grp_name, sys->anchor_grp_name)) {
|
if (!STREQ(lmd->anchor_grp_name, sys->anchor_grp_name)) {
|
||||||
return LAPDEFORM_SYSTEM_ONLY_CHANGE_GROUP;
|
return LAPDEFORM_SYSTEM_ONLY_CHANGE_GROUP;
|
||||||
}
|
}
|
||||||
modifier_get_vgroup_mesh(ob, mesh, lmd->anchor_grp_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ob, mesh, lmd->anchor_grp_name, &dvert, &defgrp_index);
|
||||||
if (!dvert) {
|
if (!dvert) {
|
||||||
return LAPDEFORM_SYSTEM_CHANGE_NOT_VALID_GROUP;
|
return LAPDEFORM_SYSTEM_CHANGE_NOT_VALID_GROUP;
|
||||||
}
|
}
|
||||||
@@ -734,7 +734,7 @@ static void deformVerts(
|
|||||||
ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh,
|
ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh,
|
||||||
float (*vertexCos)[3], int numVerts)
|
float (*vertexCos)[3], int numVerts)
|
||||||
{
|
{
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, NULL, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, NULL, mesh, NULL, false, false);
|
||||||
|
|
||||||
LaplacianDeformModifier_do((LaplacianDeformModifierData *)md, ctx->object, mesh_src, vertexCos, numVerts);
|
LaplacianDeformModifier_do((LaplacianDeformModifierData *)md, ctx->object, mesh_src, vertexCos, numVerts);
|
||||||
if (mesh_src != mesh) {
|
if (mesh_src != mesh) {
|
||||||
@@ -746,7 +746,7 @@ static void deformVertsEM(
|
|||||||
ModifierData *md, const ModifierEvalContext *ctx, struct BMEditMesh *editData,
|
ModifierData *md, const ModifierEvalContext *ctx, struct BMEditMesh *editData,
|
||||||
Mesh *mesh, float (*vertexCos)[3], int numVerts)
|
Mesh *mesh, float (*vertexCos)[3], int numVerts)
|
||||||
{
|
{
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, editData, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, editData, mesh, NULL, false, false);
|
||||||
LaplacianDeformModifier_do((LaplacianDeformModifierData *)md, ctx->object, mesh_src,
|
LaplacianDeformModifier_do((LaplacianDeformModifierData *)md, ctx->object, mesh_src,
|
||||||
vertexCos, numVerts);
|
vertexCos, numVerts);
|
||||||
if (mesh_src != mesh) {
|
if (mesh_src != mesh) {
|
||||||
|
@@ -379,7 +379,7 @@ static void laplaciansmoothModifier_do(
|
|||||||
sys->medges = mesh->medge;
|
sys->medges = mesh->medge;
|
||||||
sys->vertexCos = vertexCos;
|
sys->vertexCos = vertexCos;
|
||||||
sys->min_area = 0.00001f;
|
sys->min_area = 0.00001f;
|
||||||
modifier_get_vgroup_mesh(ob, mesh, smd->defgrp_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ob, mesh, smd->defgrp_name, &dvert, &defgrp_index);
|
||||||
|
|
||||||
sys->vert_centroid[0] = 0.0f;
|
sys->vert_centroid[0] = 0.0f;
|
||||||
sys->vert_centroid[1] = 0.0f;
|
sys->vert_centroid[1] = 0.0f;
|
||||||
@@ -507,7 +507,7 @@ static void deformVerts(
|
|||||||
if (numVerts == 0)
|
if (numVerts == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mesh_src = get_mesh(ctx->object, NULL, mesh, NULL, false, false);
|
mesh_src = MOD_get_mesh_eval(ctx->object, NULL, mesh, NULL, false, false);
|
||||||
|
|
||||||
laplaciansmoothModifier_do((LaplacianSmoothModifierData *)md, ctx->object, mesh_src,
|
laplaciansmoothModifier_do((LaplacianSmoothModifierData *)md, ctx->object, mesh_src,
|
||||||
vertexCos, numVerts);
|
vertexCos, numVerts);
|
||||||
@@ -525,7 +525,7 @@ static void deformVertsEM(
|
|||||||
if (numVerts == 0)
|
if (numVerts == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mesh_src = get_mesh(ctx->object, editData, mesh, NULL, false, false);
|
mesh_src = MOD_get_mesh_eval(ctx->object, editData, mesh, NULL, false, false);
|
||||||
|
|
||||||
laplaciansmoothModifier_do((LaplacianSmoothModifierData *)md, ctx->object, mesh_src,
|
laplaciansmoothModifier_do((LaplacianSmoothModifierData *)md, ctx->object, mesh_src,
|
||||||
vertexCos, numVerts);
|
vertexCos, numVerts);
|
||||||
|
@@ -100,9 +100,9 @@ static void deformVerts(
|
|||||||
int numVerts)
|
int numVerts)
|
||||||
{
|
{
|
||||||
LatticeModifierData *lmd = (LatticeModifierData *) md;
|
LatticeModifierData *lmd = (LatticeModifierData *) md;
|
||||||
struct Mesh *mesh_src = get_mesh(ctx->object, NULL, mesh, NULL, false, false);
|
struct Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, NULL, mesh, NULL, false, false);
|
||||||
|
|
||||||
modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
|
MOD_previous_vcos_store(md, vertexCos); /* if next modifier needs original vertices */
|
||||||
|
|
||||||
lattice_deform_verts(lmd->object, ctx->object, mesh_src,
|
lattice_deform_verts(lmd->object, ctx->object, mesh_src,
|
||||||
vertexCos, numVerts, lmd->name, lmd->strength);
|
vertexCos, numVerts, lmd->name, lmd->strength);
|
||||||
@@ -115,7 +115,7 @@ static void deformVertsEM(
|
|||||||
ModifierData *md, const ModifierEvalContext *ctx, struct BMEditMesh *em,
|
ModifierData *md, const ModifierEvalContext *ctx, struct BMEditMesh *em,
|
||||||
struct Mesh *mesh, float (*vertexCos)[3], int numVerts)
|
struct Mesh *mesh, float (*vertexCos)[3], int numVerts)
|
||||||
{
|
{
|
||||||
struct Mesh *mesh_src = get_mesh(ctx->object, em, mesh, NULL, false, false);
|
struct Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, em, mesh, NULL, false, false);
|
||||||
|
|
||||||
deformVerts(md, ctx, mesh_src, vertexCos, numVerts);
|
deformVerts(md, ctx, mesh_src, vertexCos, numVerts);
|
||||||
|
|
||||||
|
@@ -374,7 +374,7 @@ static void meshdeformModifier_do(
|
|||||||
copy_v3_v3(dco[a], co);
|
copy_v3_v3(dco[a], co);
|
||||||
}
|
}
|
||||||
|
|
||||||
modifier_get_vgroup_mesh(ob, mesh, mmd->defgrp_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ob, mesh, mmd->defgrp_name, &dvert, &defgrp_index);
|
||||||
|
|
||||||
/* Initialize data to be pass to the for body function. */
|
/* Initialize data to be pass to the for body function. */
|
||||||
data.mmd = mmd;
|
data.mmd = mmd;
|
||||||
@@ -408,9 +408,9 @@ static void deformVerts(
|
|||||||
float (*vertexCos)[3],
|
float (*vertexCos)[3],
|
||||||
int numVerts)
|
int numVerts)
|
||||||
{
|
{
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, NULL, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, NULL, mesh, NULL, false, false);
|
||||||
|
|
||||||
modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
|
MOD_previous_vcos_store(md, vertexCos); /* if next modifier needs original vertices */
|
||||||
|
|
||||||
meshdeformModifier_do(md, ctx, mesh_src, vertexCos, numVerts);
|
meshdeformModifier_do(md, ctx, mesh_src, vertexCos, numVerts);
|
||||||
|
|
||||||
@@ -426,7 +426,7 @@ static void deformVertsEM(
|
|||||||
float (*vertexCos)[3],
|
float (*vertexCos)[3],
|
||||||
int numVerts)
|
int numVerts)
|
||||||
{
|
{
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, NULL, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, NULL, mesh, NULL, false, false);
|
||||||
|
|
||||||
meshdeformModifier_do(md, ctx, mesh_src, vertexCos, numVerts);
|
meshdeformModifier_do(md, ctx, mesh_src, vertexCos, numVerts);
|
||||||
|
|
||||||
|
@@ -470,7 +470,7 @@ static Mesh *normalEditModifier_do(NormalEditModifierData *enmd, Object *ob, Mes
|
|||||||
clnors = CustomData_add_layer(ldata, CD_CUSTOMLOOPNORMAL, CD_CALLOC, NULL, num_loops);
|
clnors = CustomData_add_layer(ldata, CD_CUSTOMLOOPNORMAL, CD_CALLOC, NULL, num_loops);
|
||||||
}
|
}
|
||||||
|
|
||||||
modifier_get_vgroup_mesh(ob, result, enmd->defgrp_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ob, result, enmd->defgrp_name, &dvert, &defgrp_index);
|
||||||
|
|
||||||
if (enmd->mode == MOD_NORMALEDIT_MODE_RADIAL) {
|
if (enmd->mode == MOD_NORMALEDIT_MODE_RADIAL) {
|
||||||
normalEditModifier_do_radial(
|
normalEditModifier_do_radial(
|
||||||
|
@@ -120,7 +120,7 @@ static void deformVerts(
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (mesh_src == NULL) {
|
if (mesh_src == NULL) {
|
||||||
mesh_src = get_mesh(ctx->object, NULL, NULL, vertexCos, false, true);
|
mesh_src = MOD_get_mesh_eval(ctx->object, NULL, NULL, vertexCos, false, true);
|
||||||
if (mesh_src == NULL) {
|
if (mesh_src == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -286,7 +286,7 @@ static void SimpleDeformModifier_do(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
modifier_get_vgroup_mesh(ob, mesh, smd->vgroup_name, &dvert, &vgroup);
|
MOD_get_vgroup(ob, mesh, smd->vgroup_name, &dvert, &vgroup);
|
||||||
const bool invert_vgroup = (smd->flag & MOD_SIMPLEDEFORM_FLAG_INVERT_VGROUP) != 0;
|
const bool invert_vgroup = (smd->flag & MOD_SIMPLEDEFORM_FLAG_INVERT_VGROUP) != 0;
|
||||||
const uint *axis_map = axis_map_table[(smd->mode != MOD_SIMPLEDEFORM_MODE_BEND) ? deform_axis : 2];
|
const uint *axis_map = axis_map_table[(smd->mode != MOD_SIMPLEDEFORM_MODE_BEND) ? deform_axis : 2];
|
||||||
|
|
||||||
@@ -385,7 +385,7 @@ static void deformVerts(
|
|||||||
float (*vertexCos)[3],
|
float (*vertexCos)[3],
|
||||||
int numVerts)
|
int numVerts)
|
||||||
{
|
{
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, NULL, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, NULL, mesh, NULL, false, false);
|
||||||
|
|
||||||
SimpleDeformModifier_do((SimpleDeformModifierData *)md, ctx->object, mesh_src, vertexCos, numVerts);
|
SimpleDeformModifier_do((SimpleDeformModifierData *)md, ctx->object, mesh_src, vertexCos, numVerts);
|
||||||
|
|
||||||
@@ -401,7 +401,7 @@ static void deformVertsEM(
|
|||||||
float (*vertexCos)[3],
|
float (*vertexCos)[3],
|
||||||
int numVerts)
|
int numVerts)
|
||||||
{
|
{
|
||||||
Mesh *mesh_src = get_mesh(ctx->object, editData, mesh, NULL, false, false);
|
Mesh *mesh_src = MOD_get_mesh_eval(ctx->object, editData, mesh, NULL, false, false);
|
||||||
|
|
||||||
SimpleDeformModifier_do((SimpleDeformModifierData *)md, ctx->object, mesh_src, vertexCos, numVerts);
|
SimpleDeformModifier_do((SimpleDeformModifierData *)md, ctx->object, mesh_src, vertexCos, numVerts);
|
||||||
|
|
||||||
|
@@ -118,7 +118,7 @@ static void smoothModifier_do(
|
|||||||
numDMEdges = 0;
|
numDMEdges = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
modifier_get_vgroup_mesh(ob, mesh, smd->defgrp_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ob, mesh, smd->defgrp_name, &dvert, &defgrp_index);
|
||||||
|
|
||||||
/* NOTICE: this can be optimized a little bit by moving the
|
/* NOTICE: this can be optimized a little bit by moving the
|
||||||
* if (dvert) out of the loop, if needed */
|
* if (dvert) out of the loop, if needed */
|
||||||
|
@@ -250,7 +250,7 @@ static Mesh *applyModifier(
|
|||||||
/* array size is doubled in case of using a shell */
|
/* array size is doubled in case of using a shell */
|
||||||
const unsigned int stride = do_shell ? 2 : 1;
|
const unsigned int stride = do_shell ? 2 : 1;
|
||||||
|
|
||||||
modifier_get_vgroup_mesh(ctx->object, mesh, smd->defgrp_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ctx->object, mesh, smd->defgrp_name, &dvert, &defgrp_index);
|
||||||
|
|
||||||
orig_mvert = mesh->mvert;
|
orig_mvert = mesh->mvert;
|
||||||
orig_medge = mesh->medge;
|
orig_medge = mesh->medge;
|
||||||
|
@@ -111,7 +111,7 @@ static void deformVerts(
|
|||||||
LIB_ID_COPY_NO_PREVIEW,
|
LIB_ID_COPY_NO_PREVIEW,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
else surmd->mesh = get_mesh(ctx->object, NULL, NULL, NULL, false, false);
|
else surmd->mesh = MOD_get_mesh_eval(ctx->object, NULL, NULL, NULL, false, false);
|
||||||
|
|
||||||
if (!ctx->object->pd) {
|
if (!ctx->object->pd) {
|
||||||
printf("SurfaceModifier deformVerts: Should not happen!\n");
|
printf("SurfaceModifier deformVerts: Should not happen!\n");
|
||||||
|
@@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
#include "bmesh.h"
|
#include "bmesh.h"
|
||||||
|
|
||||||
void modifier_init_texture(const Depsgraph *depsgraph, Tex *tex)
|
void MOD_init_texture(const Depsgraph *depsgraph, Tex *tex)
|
||||||
{
|
{
|
||||||
if (!tex)
|
if (!tex)
|
||||||
return;
|
return;
|
||||||
@@ -75,7 +75,7 @@ void modifier_init_texture(const Depsgraph *depsgraph, Tex *tex)
|
|||||||
|
|
||||||
/* TODO to be renamed to get_texture_coords once we are done with moving modifiers to Mesh. */
|
/* TODO to be renamed to get_texture_coords once we are done with moving modifiers to Mesh. */
|
||||||
/** \param cos may be NULL, in which case we use directly mesh vertices' coordinates. */
|
/** \param cos may be NULL, in which case we use directly mesh vertices' coordinates. */
|
||||||
void get_texture_coords_mesh(
|
void MOD_get_texture_coords(
|
||||||
MappingInfoModifierData *dmd,
|
MappingInfoModifierData *dmd,
|
||||||
Object *ob,
|
Object *ob,
|
||||||
Mesh *mesh,
|
Mesh *mesh,
|
||||||
@@ -155,7 +155,7 @@ void get_texture_coords_mesh(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void modifier_vgroup_cache(ModifierData *md, float (*vertexCos)[3])
|
void MOD_previous_vcos_store(ModifierData *md, float (*vertexCos)[3])
|
||||||
{
|
{
|
||||||
while ((md = md->next) && md->type == eModifierType_Armature) {
|
while ((md = md->next) && md->type == eModifierType_Armature) {
|
||||||
ArmatureModifierData *amd = (ArmatureModifierData *) md;
|
ArmatureModifierData *amd = (ArmatureModifierData *) md;
|
||||||
@@ -168,7 +168,7 @@ void modifier_vgroup_cache(ModifierData *md, float (*vertexCos)[3])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* returns a mesh if mesh == NULL, for deforming modifiers that need it */
|
/* returns a mesh if mesh == NULL, for deforming modifiers that need it */
|
||||||
Mesh *get_mesh(
|
Mesh *MOD_get_mesh_eval(
|
||||||
Object *ob, struct BMEditMesh *em, Mesh *mesh,
|
Object *ob, struct BMEditMesh *em, Mesh *mesh,
|
||||||
float (*vertexCos)[3], bool use_normals, bool use_orco)
|
float (*vertexCos)[3], bool use_normals, bool use_orco)
|
||||||
{
|
{
|
||||||
@@ -218,8 +218,7 @@ Mesh *get_mesh(
|
|||||||
return mesh;
|
return mesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO(sybren): replace the above function with this one, once we got rid of DerivedMesh for modifiers. */
|
void MOD_get_vgroup(Object *ob, struct Mesh *mesh, const char *name, MDeformVert **dvert, int *defgrp_index)
|
||||||
void modifier_get_vgroup_mesh(Object *ob, struct Mesh *mesh, const char *name, MDeformVert **dvert, int *defgrp_index)
|
|
||||||
{
|
{
|
||||||
*defgrp_index = defgroup_name_index(ob, name);
|
*defgrp_index = defgroup_name_index(ob, name);
|
||||||
*dvert = NULL;
|
*dvert = NULL;
|
||||||
|
@@ -41,19 +41,21 @@ struct Object;
|
|||||||
struct Scene;
|
struct Scene;
|
||||||
struct Tex;
|
struct Tex;
|
||||||
|
|
||||||
void modifier_init_texture(const struct Depsgraph *depsgraph, struct Tex *texture);
|
void MOD_init_texture(const struct Depsgraph *depsgraph, struct Tex *texture);
|
||||||
void get_texture_coords_mesh(
|
void MOD_get_texture_coords(
|
||||||
struct MappingInfoModifierData *dmd,
|
struct MappingInfoModifierData *dmd,
|
||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
struct Mesh *mesh,
|
struct Mesh *mesh,
|
||||||
float (*cos)[3],
|
float (*cos)[3],
|
||||||
float (*r_texco)[3]);
|
float (*r_texco)[3]);
|
||||||
void modifier_vgroup_cache(struct ModifierData *md, float (*vertexCos)[3]);
|
|
||||||
struct Mesh *get_mesh(
|
void MOD_previous_vcos_store(struct ModifierData *md, float (*vertexCos)[3]);
|
||||||
|
|
||||||
|
struct Mesh *MOD_get_mesh_eval(
|
||||||
struct Object *ob, struct BMEditMesh *em, struct Mesh *mesh,
|
struct Object *ob, struct BMEditMesh *em, struct Mesh *mesh,
|
||||||
float (*vertexCos)[3], bool use_normals, bool use_orco);
|
float (*vertexCos)[3], bool use_normals, bool use_orco);
|
||||||
|
|
||||||
void modifier_get_vgroup_mesh(
|
void MOD_get_vgroup(
|
||||||
struct Object *ob, struct Mesh *mesh,
|
struct Object *ob, struct Mesh *mesh,
|
||||||
const char *name, struct MDeformVert **dvert, int *defgrp_index);
|
const char *name, struct MDeformVert **dvert, int *defgrp_index);
|
||||||
|
|
||||||
|
@@ -198,7 +198,7 @@ static Mesh *applyModifier(
|
|||||||
mloop = mesh->mloop;
|
mloop = mesh->mloop;
|
||||||
/* make sure we are not modifying the original UV map */
|
/* make sure we are not modifying the original UV map */
|
||||||
mloopuv = CustomData_duplicate_referenced_layer_named(&mesh->ldata, CD_MLOOPUV, uvname, numLoops);
|
mloopuv = CustomData_duplicate_referenced_layer_named(&mesh->ldata, CD_MLOOPUV, uvname, numLoops);
|
||||||
modifier_get_vgroup_mesh(ctx->object, mesh, umd->vgroup_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ctx->object, mesh, umd->vgroup_name, &dvert, &defgrp_index);
|
||||||
|
|
||||||
UVWarpData data = {.mpoly = mpoly, .mloop = mloop, .mloopuv = mloopuv,
|
UVWarpData data = {.mpoly = mpoly, .mloop = mloop, .mloopuv = mloopuv,
|
||||||
.dvert = dvert, .defgrp_index = defgrp_index,
|
.dvert = dvert, .defgrp_index = defgrp_index,
|
||||||
|
@@ -178,7 +178,7 @@ static void warpModifier_do(
|
|||||||
if (!(wmd->object_from && wmd->object_to))
|
if (!(wmd->object_from && wmd->object_to))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
modifier_get_vgroup_mesh(ob, mesh, wmd->defgrp_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ob, mesh, wmd->defgrp_name, &dvert, &defgrp_index);
|
||||||
if (dvert == NULL) {
|
if (dvert == NULL) {
|
||||||
defgrp_index = -1;
|
defgrp_index = -1;
|
||||||
}
|
}
|
||||||
@@ -216,9 +216,9 @@ static void warpModifier_do(
|
|||||||
|
|
||||||
if (wmd->texture) {
|
if (wmd->texture) {
|
||||||
tex_co = MEM_malloc_arrayN(numVerts, sizeof(*tex_co), "warpModifier_do tex_co");
|
tex_co = MEM_malloc_arrayN(numVerts, sizeof(*tex_co), "warpModifier_do tex_co");
|
||||||
get_texture_coords_mesh((MappingInfoModifierData *)wmd, ob, mesh, vertexCos, tex_co);
|
MOD_get_texture_coords((MappingInfoModifierData *)wmd, ob, mesh, vertexCos, tex_co);
|
||||||
|
|
||||||
modifier_init_texture(depsgraph, wmd->texture);
|
MOD_init_texture(depsgraph, wmd->texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < numVerts; i++) {
|
for (i = 0; i < numVerts; i++) {
|
||||||
|
@@ -174,7 +174,7 @@ static void waveModifier_do(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* get the index of the deform group */
|
/* get the index of the deform group */
|
||||||
modifier_get_vgroup_mesh(ob, mesh, wmd->defgrp_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ob, mesh, wmd->defgrp_name, &dvert, &defgrp_index);
|
||||||
|
|
||||||
if (wmd->damp == 0) wmd->damp = 10.0f;
|
if (wmd->damp == 0) wmd->damp = 10.0f;
|
||||||
|
|
||||||
@@ -192,9 +192,9 @@ static void waveModifier_do(
|
|||||||
if (wmd->texture) {
|
if (wmd->texture) {
|
||||||
tex_co = MEM_malloc_arrayN(numVerts, sizeof(*tex_co),
|
tex_co = MEM_malloc_arrayN(numVerts, sizeof(*tex_co),
|
||||||
"waveModifier_do tex_co");
|
"waveModifier_do tex_co");
|
||||||
get_texture_coords_mesh((MappingInfoModifierData *)wmd, ob, mesh, vertexCos, tex_co);
|
MOD_get_texture_coords((MappingInfoModifierData *)wmd, ob, mesh, vertexCos, tex_co);
|
||||||
|
|
||||||
modifier_init_texture(depsgraph, wmd->texture);
|
MOD_init_texture(depsgraph, wmd->texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lifefac != 0.0f) {
|
if (lifefac != 0.0f) {
|
||||||
@@ -308,9 +308,9 @@ static void deformVerts(
|
|||||||
WaveModifierData *wmd = (WaveModifierData *)md;
|
WaveModifierData *wmd = (WaveModifierData *)md;
|
||||||
|
|
||||||
if (wmd->flag & MOD_WAVE_NORM)
|
if (wmd->flag & MOD_WAVE_NORM)
|
||||||
mesh_src = get_mesh(ctx->object, NULL, mesh, vertexCos, true, false);
|
mesh_src = MOD_get_mesh_eval(ctx->object, NULL, mesh, vertexCos, true, false);
|
||||||
else if (wmd->texture || wmd->defgrp_name[0])
|
else if (wmd->texture || wmd->defgrp_name[0])
|
||||||
mesh_src = get_mesh(ctx->object, NULL, mesh, NULL, false, false);
|
mesh_src = MOD_get_mesh_eval(ctx->object, NULL, mesh, NULL, false, false);
|
||||||
|
|
||||||
waveModifier_do(wmd, ctx->depsgraph, ctx->object, mesh_src, vertexCos, numVerts);
|
waveModifier_do(wmd, ctx->depsgraph, ctx->object, mesh_src, vertexCos, numVerts);
|
||||||
|
|
||||||
@@ -327,9 +327,9 @@ static void deformVertsEM(
|
|||||||
WaveModifierData *wmd = (WaveModifierData *)md;
|
WaveModifierData *wmd = (WaveModifierData *)md;
|
||||||
|
|
||||||
if (wmd->flag & MOD_WAVE_NORM)
|
if (wmd->flag & MOD_WAVE_NORM)
|
||||||
mesh_src = get_mesh(ctx->object, editData, mesh, vertexCos, true, false);
|
mesh_src = MOD_get_mesh_eval(ctx->object, editData, mesh, vertexCos, true, false);
|
||||||
else if (wmd->texture || wmd->defgrp_name[0])
|
else if (wmd->texture || wmd->defgrp_name[0])
|
||||||
mesh_src = get_mesh(ctx->object, editData, mesh, NULL, false, false);
|
mesh_src = MOD_get_mesh_eval(ctx->object, editData, mesh, NULL, false, false);
|
||||||
|
|
||||||
waveModifier_do(wmd, ctx->depsgraph, ctx->object, mesh_src, vertexCos, numVerts);
|
waveModifier_do(wmd, ctx->depsgraph, ctx->object, mesh_src, vertexCos, numVerts);
|
||||||
|
|
||||||
|
@@ -150,9 +150,9 @@ void weightvg_do_mask(
|
|||||||
t_map.texmapping = tex_mapping;
|
t_map.texmapping = tex_mapping;
|
||||||
|
|
||||||
tex_co = MEM_calloc_arrayN(numVerts, sizeof(*tex_co), "WeightVG Modifier, TEX mode, tex_co");
|
tex_co = MEM_calloc_arrayN(numVerts, sizeof(*tex_co), "WeightVG Modifier, TEX mode, tex_co");
|
||||||
get_texture_coords_mesh(&t_map, ob, mesh, NULL, tex_co);
|
MOD_get_texture_coords(&t_map, ob, mesh, NULL, tex_co);
|
||||||
|
|
||||||
modifier_init_texture(depsgraph, texture);
|
MOD_init_texture(depsgraph, texture);
|
||||||
|
|
||||||
/* For each weight (vertex), make the mix between org and new weights. */
|
/* For each weight (vertex), make the mix between org and new weights. */
|
||||||
for (i = 0; i < num; ++i) {
|
for (i = 0; i < num; ++i) {
|
||||||
|
Reference in New Issue
Block a user