Blender V2.61 - r43446
|
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_string.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_modifier.h"
#include "BKE_texture.h"
#include "BKE_deform.h"
#include "depsgraph_private.h"
#include "MEM_guardedalloc.h"
#include "MOD_util.h"
#include "RE_shader_ext.h"
Go to the source code of this file.
Functions | |
static void | initData (ModifierData *md) |
static void | copyData (ModifierData *md, ModifierData *target) |
static CustomDataMask | requiredDataMask (Object *UNUSED(ob), ModifierData *md) |
static int | dependsOnTime (ModifierData *md) |
static int | dependsOnNormals (ModifierData *md) |
static void | foreachObjectLink (ModifierData *md, Object *ob, ObjectWalkFunc walk, void *userData) |
static void | foreachIDLink (ModifierData *md, Object *ob, IDWalkFunc walk, void *userData) |
static void | foreachTexLink (ModifierData *md, Object *ob, TexWalkFunc walk, void *userData) |
static int | isDisabled (ModifierData *md, int UNUSED(useRenderParams)) |
static void | updateDepgraph (ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene), Object *UNUSED(ob), DagNode *obNode) |
static void | displaceModifier_do (DisplaceModifierData *dmd, 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 *editData, DerivedMesh *derivedData, float(*vertexCos)[3], int numVerts) |
Variables | |
ModifierTypeInfo | modifierType_Displace |
Definition in file MOD_displace.c.
static void copyData | ( | ModifierData * | md, |
ModifierData * | target | ||
) | [static] |
Definition at line 69 of file MOD_displace.c.
References BLI_strncpy(), DisplaceModifierData::defgrp_name, DisplaceModifierData::direction, DisplaceModifierData::map_object, DisplaceModifierData::midlevel, DisplaceModifierData::strength, DisplaceModifierData::texmapping, DisplaceModifierData::texture, and DisplaceModifierData::uvlayer_name.
static void deformVerts | ( | ModifierData * | md, |
Object * | ob, | ||
DerivedMesh * | derivedData, | ||
float(*) | vertexCos[3], | ||
int | numVerts, | ||
int | UNUSEDuseRenderParams, | ||
int | UNUSEDisFinalCalc | ||
) | [static] |
Definition at line 237 of file MOD_displace.c.
References displaceModifier_do(), get_cddm(), NULL, and DerivedMesh::release.
static void deformVertsEM | ( | ModifierData * | md, |
Object * | ob, | ||
struct EditMesh * | editData, | ||
DerivedMesh * | derivedData, | ||
float(*) | vertexCos[3], | ||
int | numVerts | ||
) | [static] |
Definition at line 253 of file MOD_displace.c.
References displaceModifier_do(), get_cddm(), and DerivedMesh::release.
static int dependsOnNormals | ( | ModifierData * | md | ) | [static] |
Definition at line 112 of file MOD_displace.c.
References DisplaceModifierData::direction, and MOD_DISP_DIR_NOR.
static int dependsOnTime | ( | ModifierData * | md | ) | [static] |
Definition at line 98 of file MOD_displace.c.
References BKE_texture_dependsOnTime(), and DisplaceModifierData::texture.
static void displaceModifier_do | ( | DisplaceModifierData * | dmd, |
Object * | ob, | ||
DerivedMesh * | dm, | ||
float(*) | vertexCos[3], | ||
int | numVerts | ||
) | [static] |
Definition at line 171 of file MOD_displace.c.
References CDDM_get_verts(), CLAMP(), DisplaceModifierData::defgrp_name, defvert_find_weight(), get_texture_coords(), get_texture_value(), i, MEM_callocN(), MEM_freeN(), MOD_DISP_DIR_NOR, MOD_DISP_DIR_RGB_XYZ, MOD_DISP_DIR_X, MOD_DISP_DIR_Y, MOD_DISP_DIR_Z, modifier_get_vgroup(), MVert::no, TexResult::nor, NULL, DisplaceModifierData::strength, TexResult::tb, MappingInfoModifierData::texture, DisplaceModifierData::texture, TexResult::tg, TexResult::tin, and TexResult::tr.
Referenced by deformVerts(), and deformVertsEM().
static void foreachIDLink | ( | ModifierData * | md, |
Object * | ob, | ||
IDWalkFunc | walk, | ||
void * | userData | ||
) | [static] |
Definition at line 126 of file MOD_displace.c.
References foreachObjectLink(), and DisplaceModifierData::texture.
static void foreachObjectLink | ( | ModifierData * | md, |
Object * | ob, | ||
ObjectWalkFunc | walk, | ||
void * | userData | ||
) | [static] |
Definition at line 118 of file MOD_displace.c.
References DisplaceModifierData::map_object.
Referenced by foreachIDLink().
static void foreachTexLink | ( | ModifierData * | md, |
Object * | ob, | ||
TexWalkFunc | walk, | ||
void * | userData | ||
) | [static] |
Definition at line 136 of file MOD_displace.c.
static void initData | ( | ModifierData * | md | ) | [static] |
Definition at line 59 of file MOD_displace.c.
References DisplaceModifierData::direction, DisplaceModifierData::midlevel, MOD_DISP_DIR_NOR, NULL, DisplaceModifierData::strength, and DisplaceModifierData::texture.
static int isDisabled | ( | ModifierData * | md, |
int | UNUSEDuseRenderParams | ||
) | [static] |
Definition at line 142 of file MOD_displace.c.
References DisplaceModifierData::strength, and DisplaceModifierData::texture.
static CustomDataMask requiredDataMask | ( | Object * | UNUSEDob, |
ModifierData * | md | ||
) | [static] |
Definition at line 84 of file MOD_displace.c.
References CD_MASK_MDEFORMVERT, CD_MASK_MTFACE, DisplaceModifierData::defgrp_name, MOD_DISP_MAP_UV, and DisplaceModifierData::texmapping.
static void updateDepgraph | ( | ModifierData * | md, |
DagForest * | forest, | ||
struct Scene * | UNUSEDscene, | ||
Object * | UNUSEDob, | ||
DagNode * | obNode | ||
) | [static] |
Definition at line 149 of file MOD_displace.c.
References dag_add_relation(), dag_get_node(), DAG_RL_DATA_DATA, DAG_RL_OB_DATA, DisplaceModifierData::map_object, MOD_DISP_MAP_GLOBAL, MOD_DISP_MAP_OBJECT, and DisplaceModifierData::texmapping.
{ "Displace", "DisplaceModifierData", sizeof(DisplaceModifierData), eModifierTypeType_OnlyDeform, eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode, copyData, deformVerts, NULL, deformVertsEM, NULL, NULL, NULL, initData, requiredDataMask, NULL, isDisabled, updateDepgraph, dependsOnTime, dependsOnNormals, foreachObjectLink, foreachIDLink, foreachTexLink, }
Definition at line 267 of file MOD_displace.c.