Beispiel #1
0
static void deformVerts(ModifierData *md, Object *ob,
                        DerivedMesh *derivedData,
                        float (*vertexCos)[3],
                        int numVerts,
                        ModifierApplyFlag UNUSED(flag))
{
	LatticeModifierData *lmd = (LatticeModifierData *) md;


	modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
	
	lattice_deform_verts(lmd->object, ob, derivedData,
	                     vertexCos, numVerts, lmd->name, lmd->strength);
}
Beispiel #2
0
static void deformVerts(ModifierData *md, Object *ob,
                        DerivedMesh *derivedData,
                        float (*vertexCos)[3],
                        int numVerts,
                        ModifierApplyFlag UNUSED(flag))
{
	DerivedMesh *dm = get_dm(ob, NULL, derivedData, NULL, 0);

	modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
	
	meshdeformModifier_do(md, ob, dm, vertexCos, numVerts);

	if (dm && dm != derivedData)
		dm->release(dm);
}
Beispiel #3
0
static void deformVerts(ModifierData *md, Object *ob,
                        DerivedMesh *derivedData,
                        float (*vertexCos)[3],
                        int numVerts,
                        ModifierApplyFlag UNUSED(flag))
{
	ArmatureModifierData *amd = (ArmatureModifierData *) md;

	modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
	
	armature_deform_verts(amd->object, ob, derivedData, vertexCos, NULL,
	                      numVerts, amd->deformflag, (float(*)[3])amd->prevCos, amd->defgrp_name);

	/* free cache */
	if (amd->prevCos) {
		MEM_freeN(amd->prevCos);
		amd->prevCos = NULL;
	}
}
Beispiel #4
0
static void deformVertsEM(
        ModifierData *md, Object *ob, struct BMEditMesh *em,
        DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts)
{
	ArmatureModifierData *amd = (ArmatureModifierData *) md;
	DerivedMesh *dm = derivedData;

	if (!derivedData) dm = CDDM_from_editbmesh(em, FALSE, FALSE);

	modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */

	armature_deform_verts(amd->object, ob, dm, vertexCos, NULL,
	                      numVerts, amd->deformflag, (float(*)[3])amd->prevCos, amd->defgrp_name);

	/* free cache */
	if (amd->prevCos) {
		MEM_freeN(amd->prevCos);
		amd->prevCos = NULL;
	}

	if (!derivedData) dm->release(dm);
}