Blender V2.61 - r43446
|
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_global.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_deform.h"
#include "depsgraph_private.h"
#include "MEM_guardedalloc.h"
#include "MOD_util.h"
Go to the source code of this file.
Defines | |
#define | MESHDEFORM_MIN_INFLUENCE 0.00001f |
Functions | |
static void | initData (ModifierData *md) |
static void | freeData (ModifierData *md) |
static void | copyData (ModifierData *md, ModifierData *target) |
static CustomDataMask | requiredDataMask (Object *UNUSED(ob), ModifierData *md) |
static int | isDisabled (ModifierData *md, int UNUSED(useRenderParams)) |
static void | foreachObjectLink (ModifierData *md, Object *ob, void(*walk)(void *userData, Object *ob, Object **obpoin), void *userData) |
static void | updateDepgraph (ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene), Object *UNUSED(ob), DagNode *obNode) |
static float | meshdeform_dynamic_bind (MeshDeformModifierData *mmd, float(*dco)[3], float *vec) |
static void | meshdeformModifier_do (ModifierData *md, Object *ob, DerivedMesh *dm, float(*vertexCos)[3], int numVerts) |
static void | deformVerts (ModifierData *md, Object *ob, DerivedMesh *derivedData, float(*vertexCos)[3], int numVerts, int UNUSED(useRenderParams), int UNUSED(isFinalCalc)) |
static void | deformVertsEM (ModifierData *md, Object *ob, struct EditMesh *UNUSED(editData), DerivedMesh *derivedData, float(*vertexCos)[3], int numVerts) |
void | modifier_mdef_compact_influences (ModifierData *md) |
Variables | |
ModifierTypeInfo | modifierType_MeshDeform |
Definition in file MOD_meshdeform.c.
#define MESHDEFORM_MIN_INFLUENCE 0.00001f |
Definition at line 369 of file MOD_meshdeform.c.
Referenced by modifier_mdef_compact_influences().
static void copyData | ( | ModifierData * | md, |
ModifierData * | target | ||
) | [static] |
Definition at line 77 of file MOD_meshdeform.c.
References MeshDeformModifierData::gridsize, and MeshDeformModifierData::object.
static void deformVerts | ( | ModifierData * | md, |
Object * | ob, | ||
DerivedMesh * | derivedData, | ||
float(*) | vertexCos[3], | ||
int | numVerts, | ||
int | UNUSEDuseRenderParams, | ||
int | UNUSEDisFinalCalc | ||
) | [static] |
Definition at line 338 of file MOD_meshdeform.c.
References get_dm(), meshdeformModifier_do(), modifier_vgroup_cache(), NULL, and DerivedMesh::release.
static void deformVertsEM | ( | ModifierData * | md, |
Object * | ob, | ||
struct EditMesh * | UNUSEDeditData, | ||
DerivedMesh * | derivedData, | ||
float(*) | vertexCos[3], | ||
int | numVerts | ||
) | [static] |
Definition at line 355 of file MOD_meshdeform.c.
References get_dm(), meshdeformModifier_do(), NULL, and DerivedMesh::release.
static void foreachObjectLink | ( | ModifierData * | md, |
Object * | ob, | ||
void(*)(void *userData, Object *ob, Object **obpoin) | walk, | ||
void * | userData | ||
) | [static] |
Definition at line 104 of file MOD_meshdeform.c.
References MeshDeformModifierData::object.
static void freeData | ( | ModifierData * | md | ) | [static] |
Definition at line 63 of file MOD_meshdeform.c.
References MeshDeformModifierData::bindcagecos, MeshDeformModifierData::bindcos, MeshDeformModifierData::bindinfluences, MeshDeformModifierData::bindoffsets, MeshDeformModifierData::bindweights, MeshDeformModifierData::dyngrid, MeshDeformModifierData::dyninfluences, MeshDeformModifierData::dynverts, and MEM_freeN().
static void initData | ( | ModifierData * | md | ) | [static] |
Definition at line 56 of file MOD_meshdeform.c.
References MeshDeformModifierData::gridsize.
static int isDisabled | ( | ModifierData * | md, |
int | UNUSEDuseRenderParams | ||
) | [static] |
Definition at line 97 of file MOD_meshdeform.c.
References MeshDeformModifierData::object.
static float meshdeform_dynamic_bind | ( | MeshDeformModifierData * | mmd, |
float(*) | dco[3], | ||
float * | vec | ||
) | [static] |
Definition at line 130 of file MOD_meshdeform.c.
References CLAMP(), co, copy_v3_v3(), MeshDeformModifierData::dyncellmin, MeshDeformModifierData::dyncellwidth, MeshDeformModifierData::dyngrid, MeshDeformModifierData::dyngridsize, MeshDeformModifierData::dyninfluences, i, MDefCell::offset, size(), MDefCell::totinfluence, MDefInfluence::vertex, MDefInfluence::weight, and zero_v3().
Referenced by meshdeformModifier_do().
static void meshdeformModifier_do | ( | ModifierData * | md, |
Object * | ob, | ||
DerivedMesh * | dm, | ||
float(*) | vertexCos[3], | ||
int | numVerts | ||
) | [static] |
Definition at line 182 of file MOD_meshdeform.c.
References add_v3_v3(), MeshDeformModifierData::bindcagecos, MeshDeformModifierData::bindfunc, MeshDeformModifierData::bindinfluences, MeshDeformModifierData::bindmat, MeshDeformModifierData::bindoffsets, BKE_mesh_end_editmesh(), BKE_mesh_get_editmesh(), co, copy_m3_m4(), copy_v3_v3(), Object::data, MeshDeformModifierData::defgrp_name, defvert_find_weight(), Object::derivedFinal, Mesh::dvert, MeshDeformModifierData::dynverts, editmesh_get_derived_cage_and_final(), MeshDeformModifierData::flag, G, get_dm(), DerivedMesh::getNumVerts, DerivedMesh::getVertCos, invert_m4_m4(), madd_v3_v3fl(), MEM_callocN(), MEM_freeN(), meshdeform_dynamic_bind(), MOD_MDEF_DYNAMIC_BIND, MOD_MDEF_INVERT_VGROUP, modifier_get_vgroup(), modifier_setError(), mul_m3_v3(), mul_m4_v3(), mul_v3_fl(), mul_v3_m4v3(), mult_m4_m4m4(), DerivedMesh::needsFree, NULL, MeshDeformModifierData::object, Object::obmat, DerivedMesh::release, ModifierData::scene, sub_v3_v3v3(), MeshDeformModifierData::totcagevert, MeshDeformModifierData::totvert, Mesh::totvert, MDefInfluence::weight, and zero_v3().
Referenced by deformVerts(), and deformVertsEM().
void modifier_mdef_compact_influences | ( | ModifierData * | md | ) |
Definition at line 371 of file MOD_meshdeform.c.
References MeshDeformModifierData::bindinfluences, MeshDeformModifierData::bindoffsets, MeshDeformModifierData::bindweights, MEM_callocN(), MEM_freeN(), MESHDEFORM_MIN_INFLUENCE, NULL, MeshDeformModifierData::totcagevert, MeshDeformModifierData::totinfluence, MeshDeformModifierData::totvert, Mesh::totvert, MDefInfluence::vertex, and MDefInfluence::weight.
Referenced by do_version_mdef_250(), and mesh_deform_bind().
static CustomDataMask requiredDataMask | ( | Object * | UNUSEDob, |
ModifierData * | md | ||
) | [static] |
Definition at line 86 of file MOD_meshdeform.c.
References CD_MASK_MDEFORMVERT, and MeshDeformModifierData::defgrp_name.
static void updateDepgraph | ( | ModifierData * | md, |
DagForest * | forest, | ||
struct Scene * | UNUSEDscene, | ||
Object * | UNUSEDob, | ||
DagNode * | obNode | ||
) | [static] |
Definition at line 114 of file MOD_meshdeform.c.
References dag_add_relation(), dag_get_node(), DAG_RL_DATA_DATA, DAG_RL_DATA_OB, DAG_RL_OB_DATA, DAG_RL_OB_OB, and MeshDeformModifierData::object.
{ "MeshDeform", "MeshDeformModifierData", sizeof(MeshDeformModifierData), eModifierTypeType_OnlyDeform, eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_SupportsEditmode, copyData, deformVerts, NULL, deformVertsEM, NULL, NULL, NULL, initData, requiredDataMask, freeData, isDisabled, updateDepgraph, NULL, NULL, foreachObjectLink, NULL, NULL, }
Definition at line 432 of file MOD_meshdeform.c.