Blender V2.61 - r43446
|
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_string.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_modifier.h"
#include "BKE_deform.h"
#include "BKE_texture.h"
#include "BKE_colortools.h"
#include "DNA_object_types.h"
#include "DNA_meshdata_types.h"
#include "depsgraph_private.h"
#include "RE_shader_ext.h"
#include "MOD_util.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 void | freeData (ModifierData *md) |
static int | isDisabled (ModifierData *md, int UNUSED(userRenderParams)) |
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 void | updateDepgraph (ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene), Object *UNUSED(ob), DagNode *obNode) |
static void | warpModifier_do (WarpModifierData *wmd, Object *ob, DerivedMesh *dm, float(*vertexCos)[3], int numVerts) |
static int | warp_needs_dm (WarpModifierData *wmd) |
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_Warp |
Definition in file MOD_warp.c.
static void copyData | ( | ModifierData * | md, |
ModifierData * | target | ||
) | [static] |
Definition at line 64 of file MOD_warp.c.
References BLI_strncpy(), WarpModifierData::curfalloff, curvemapping_copy(), WarpModifierData::defgrp_name, WarpModifierData::falloff_radius, WarpModifierData::falloff_type, WarpModifierData::map_object, WarpModifierData::object_from, WarpModifierData::object_to, WarpModifierData::strength, WarpModifierData::texmapping, WarpModifierData::texture, and WarpModifierData::uvlayer_name.
static void deformVerts | ( | ModifierData * | md, |
Object * | ob, | ||
DerivedMesh * | derivedData, | ||
float(*) | vertexCos[3], | ||
int | numVerts, | ||
int | UNUSEDuseRenderParams, | ||
int | UNUSEDisFinalCalc | ||
) | [static] |
Definition at line 316 of file MOD_warp.c.
References get_cddm(), NULL, DerivedMesh::release, warp_needs_dm(), and warpModifier_do().
Referenced by deformVertsEM().
static void deformVertsEM | ( | ModifierData * | md, |
Object * | ob, | ||
struct EditMesh * | editData, | ||
DerivedMesh * | derivedData, | ||
float(*) | vertexCos[3], | ||
int | numVerts | ||
) | [static] |
Definition at line 333 of file MOD_warp.c.
References CDDM_from_editmesh(), Object::data, deformVerts(), DerivedMesh::release, and warp_needs_dm().
static int dependsOnTime | ( | ModifierData * | md | ) | [static] |
Definition at line 100 of file MOD_warp.c.
References BKE_texture_dependsOnTime(), and WarpModifierData::texture.
static void foreachIDLink | ( | ModifierData * | md, |
Object * | ob, | ||
IDWalkFunc | walk, | ||
void * | userData | ||
) | [static] |
Definition at line 135 of file MOD_warp.c.
References WarpModifierData::map_object, WarpModifierData::object_from, WarpModifierData::object_to, and WarpModifierData::texture.
static void foreachObjectLink | ( | ModifierData * | md, |
Object * | ob, | ||
ObjectWalkFunc | walk, | ||
void * | userData | ||
) | [static] |
Definition at line 126 of file MOD_warp.c.
References WarpModifierData::map_object, WarpModifierData::object_from, and WarpModifierData::object_to.
static void foreachTexLink | ( | ModifierData * | md, |
Object * | ob, | ||
TexWalkFunc | walk, | ||
void * | userData | ||
) | [static] |
Definition at line 146 of file MOD_warp.c.
static void freeData | ( | ModifierData * | md | ) | [static] |
Definition at line 112 of file MOD_warp.c.
References WarpModifierData::curfalloff, and curvemapping_free().
static void initData | ( | ModifierData * | md | ) | [static] |
Definition at line 52 of file MOD_warp.c.
References WarpModifierData::curfalloff, curvemapping_add(), eWarp_Falloff_Smooth, WarpModifierData::falloff_radius, WarpModifierData::falloff_type, WarpModifierData::flag, NULL, WarpModifierData::strength, and WarpModifierData::texture.
static int isDisabled | ( | ModifierData * | md, |
int | UNUSEDuserRenderParams | ||
) | [static] |
Definition at line 119 of file MOD_warp.c.
References WarpModifierData::object_from, and WarpModifierData::object_to.
static CustomDataMask requiredDataMask | ( | Object * | UNUSEDob, |
ModifierData * | md | ||
) | [static] |
Definition at line 85 of file MOD_warp.c.
References CD_MASK_MDEFORMVERT, CD_MTFACE, WarpModifierData::defgrp_name, MOD_DISP_MAP_UV, and WarpModifierData::texmapping.
static void updateDepgraph | ( | ModifierData * | md, |
DagForest * | forest, | ||
struct Scene * | UNUSEDscene, | ||
Object * | UNUSEDob, | ||
DagNode * | obNode | ||
) | [static] |
Definition at line 151 of file MOD_warp.c.
References dag_add_relation(), dag_get_node(), DAG_RL_DATA_DATA, DAG_RL_OB_DATA, WarpModifierData::map_object, MOD_DISP_MAP_OBJECT, WarpModifierData::object_from, WarpModifierData::object_to, and WarpModifierData::texmapping.
static int warp_needs_dm | ( | WarpModifierData * | wmd | ) | [static] |
Definition at line 311 of file MOD_warp.c.
References WarpModifierData::defgrp_name, and WarpModifierData::texture.
Referenced by deformVerts(), and deformVertsEM().
static void warpModifier_do | ( | WarpModifierData * | wmd, |
Object * | ob, | ||
DerivedMesh * | dm, | ||
float(*) | vertexCos[3], | ||
int | numVerts | ||
) | [static] |
Definition at line 170 of file MOD_warp.c.
References blend_m4_m4m4(), co, copy_v3_v3(), WarpModifierData::curfalloff, curvemapping_add(), curvemapping_evaluateF(), WarpModifierData::defgrp_name, defvert_find_weight(), eWarp_Falloff_Const, eWarp_Falloff_Curve, eWarp_Falloff_Linear, eWarp_Falloff_None, eWarp_Falloff_Root, eWarp_Falloff_Sharp, eWarp_Falloff_Smooth, eWarp_Falloff_Sphere, WarpModifierData::falloff_radius, WarpModifierData::falloff_type, WarpModifierData::flag, get_texture_coords(), get_texture_value(), i, interp_v3_v3v3(), invert_m4(), invert_m4_m4(), len_v3v3(), MEM_freeN(), MEM_mallocN(), MOD_WARP_VOLUME_PRESERVE, modifier_get_vgroup(), mul_m4_v3(), mul_v3_m4v3(), mult_m4_m4m4(), negate_v3_v3(), TexResult::nor, NULL, WarpModifierData::object_from, WarpModifierData::object_to, Object::obmat, sqrt(), WarpModifierData::strength, WarpModifierData::texture, TexResult::tin, and unit_m4().
Referenced by deformVerts().
{ "Warp", "WarpModifierData", sizeof(WarpModifierData), eModifierTypeType_OnlyDeform, eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_SupportsEditmode, copyData, deformVerts, NULL, deformVertsEM, NULL, 0, 0, initData, requiredDataMask, freeData, isDisabled, updateDepgraph, dependsOnTime, NULL, foreachObjectLink, foreachIDLink, foreachTexLink, }
Definition at line 352 of file MOD_warp.c.