Blender V2.61 - r43446
|
#include "BLI_utildefines.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_deform.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_texture.h"
#include "depsgraph_private.h"
#include "MEM_guardedalloc.h"
#include "MOD_util.h"
#include "MOD_weightvg_util.h"
Go to the source code of this file.
Functions | |
static float | mix_weight (float weight, float weight2, char mix_mode) |
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 | foreachObjectLink (ModifierData *md, Object *ob, void(*walk)(void *userData, Object *ob, Object **obpoin), 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 int | isDisabled (ModifierData *md, int UNUSED(useRenderParams)) |
static DerivedMesh * | applyModifier (ModifierData *md, Object *ob, DerivedMesh *derivedData, int UNUSED(useRenderParams), int UNUSED(isFinalCalc)) |
static DerivedMesh * | applyModifierEM (ModifierData *md, Object *ob, struct EditMesh *UNUSED(editData), DerivedMesh *derivedData) |
Variables | |
ModifierTypeInfo | modifierType_WeightVGMix |
Definition in file MOD_weightvgmix.c.
static DerivedMesh* applyModifier | ( | ModifierData * | md, |
Object * | ob, | ||
DerivedMesh * | derivedData, | ||
int | UNUSEDuseRenderParams, | ||
int | UNUSEDisFinalCalc | ||
) | [static] |
Definition at line 218 of file MOD_weightvgmix.c.
References CD_MDEFORMVERT, CustomData_duplicate_referenced_layer(), WeightVGMixModifierData::default_weight_a, WeightVGMixModifierData::default_weight_b, Object::defbase, defgroup_name_index(), WeightVGMixModifierData::defgrp_name_a, WeightVGMixModifierData::defgrp_name_b, defvert_find_index(), FALSE, ListBase::first, FLT_MAX, DerivedMesh::getNumVerts, i, indices, WeightVGMixModifierData::mask_constant, WeightVGMixModifierData::mask_defgrp_name, WeightVGMixModifierData::mask_tex_map_obj, WeightVGMixModifierData::mask_tex_mapping, WeightVGMixModifierData::mask_tex_use_channel, WeightVGMixModifierData::mask_tex_uvlayer_name, WeightVGMixModifierData::mask_texture, MEM_freeN(), MEM_mallocN(), WeightVGMixModifierData::mix_mode, WeightVGMixModifierData::mix_set, mix_weight(), MOD_WVG_SET_A, MOD_WVG_SET_ALL, MOD_WVG_SET_AND, MOD_WVG_SET_B, MOD_WVG_SET_OR, NULL, TRUE, DerivedMesh::vertData, MDeformWeight::weight, weightvg_do_mask(), and weightvg_update_vg().
Referenced by applyModifierEM().
static DerivedMesh* applyModifierEM | ( | ModifierData * | md, |
Object * | ob, | ||
struct EditMesh * | UNUSEDeditData, | ||
DerivedMesh * | derivedData | ||
) | [static] |
Definition at line 377 of file MOD_weightvgmix.c.
References applyModifier().
static void copyData | ( | ModifierData * | md, |
ModifierData * | target | ||
) | [static] |
Definition at line 126 of file MOD_weightvgmix.c.
References BLI_strncpy(), WeightVGMixModifierData::default_weight_a, WeightVGMixModifierData::default_weight_b, WeightVGMixModifierData::defgrp_name_a, WeightVGMixModifierData::defgrp_name_b, WeightVGMixModifierData::mask_constant, WeightVGMixModifierData::mask_defgrp_name, WeightVGMixModifierData::mask_tex_map_obj, WeightVGMixModifierData::mask_tex_mapping, WeightVGMixModifierData::mask_tex_use_channel, WeightVGMixModifierData::mask_tex_uvlayer_name, WeightVGMixModifierData::mask_texture, WeightVGMixModifierData::mix_mode, and WeightVGMixModifierData::mix_set.
static int dependsOnTime | ( | ModifierData * | md | ) | [static] |
Definition at line 162 of file MOD_weightvgmix.c.
References BKE_texture_dependsOnTime(), and WeightVGMixModifierData::mask_texture.
static void foreachIDLink | ( | ModifierData * | md, |
Object * | ob, | ||
IDWalkFunc | walk, | ||
void * | userData | ||
) | [static] |
Definition at line 179 of file MOD_weightvgmix.c.
References foreachObjectLink(), and WeightVGMixModifierData::mask_texture.
static void foreachObjectLink | ( | ModifierData * | md, |
Object * | ob, | ||
void(*)(void *userData, Object *ob, Object **obpoin) | walk, | ||
void * | userData | ||
) | [static] |
Definition at line 171 of file MOD_weightvgmix.c.
References WeightVGMixModifierData::mask_tex_map_obj.
Referenced by foreachIDLink().
static void foreachTexLink | ( | ModifierData * | md, |
Object * | ob, | ||
TexWalkFunc | walk, | ||
void * | userData | ||
) | [static] |
Definition at line 188 of file MOD_weightvgmix.c.
static void initData | ( | ModifierData * | md | ) | [static] |
Definition at line 112 of file MOD_weightvgmix.c.
References WeightVGMixModifierData::default_weight_a, WeightVGMixModifierData::default_weight_b, WeightVGMixModifierData::mask_constant, WeightVGMixModifierData::mask_tex_mapping, WeightVGMixModifierData::mask_tex_use_channel, WeightVGMixModifierData::mix_mode, WeightVGMixModifierData::mix_set, MOD_DISP_MAP_LOCAL, MOD_WVG_MASK_TEX_USE_INT, MOD_WVG_MIX_SET, and MOD_WVG_SET_AND.
static int isDisabled | ( | ModifierData * | md, |
int | UNUSEDuseRenderParams | ||
) | [static] |
Definition at line 211 of file MOD_weightvgmix.c.
References WeightVGMixModifierData::defgrp_name_a.
static float mix_weight | ( | float | weight, |
float | weight2, | ||
char | mix_mode | ||
) | [static] |
This mixes the old weight with the new weight factor.
Definition at line 55 of file MOD_weightvgmix.c.
References MOD_WVG_MIX_ADD, MOD_WVG_MIX_AVG, MOD_WVG_MIX_DIF, MOD_WVG_MIX_DIV, MOD_WVG_MIX_MUL, MOD_WVG_MIX_SET, MOD_WVG_MIX_SUB, and MOD_WVG_ZEROFLOOR.
Referenced by applyModifier(), svm_node_closure_background(), svm_node_closure_bsdf(), svm_node_closure_emission(), svm_node_closure_holdout(), svm_node_closure_set_mix_weight(), and svm_node_closure_volume().
static CustomDataMask requiredDataMask | ( | Object * | UNUSEDob, |
ModifierData * | md | ||
) | [static] |
Definition at line 147 of file MOD_weightvgmix.c.
References CD_MASK_MDEFORMVERT, CD_MASK_MTFACE, WeightVGMixModifierData::mask_tex_mapping, and MOD_DISP_MAP_UV.
static void updateDepgraph | ( | ModifierData * | md, |
DagForest * | forest, | ||
struct Scene * | UNUSEDscene, | ||
Object * | UNUSEDob, | ||
DagNode * | obNode | ||
) | [static] |
Definition at line 193 of file MOD_weightvgmix.c.
References dag_add_relation(), dag_get_node(), DAG_RL_DATA_DATA, DAG_RL_OB_DATA, WeightVGMixModifierData::mask_tex_map_obj, WeightVGMixModifierData::mask_tex_mapping, MOD_DISP_MAP_GLOBAL, and MOD_DISP_MAP_OBJECT.
{ "VertexWeightMix", "WeightVGMixModifierData", sizeof(WeightVGMixModifierData), eModifierTypeType_NonGeometrical, eModifierTypeFlag_AcceptsMesh |eModifierTypeFlag_SupportsEditmode, copyData, NULL, NULL, NULL, NULL, applyModifier, applyModifierEM, initData, requiredDataMask, NULL, isDisabled, updateDepgraph, dependsOnTime, NULL, foreachObjectLink, foreachIDLink, foreachTexLink, }
Definition at line 385 of file MOD_weightvgmix.c.