Blender
V3.3
|
#include <string.h>
#include "BLI_utildefines.h"
#include "BLI_bitmap.h"
#include "BLI_math_matrix.h"
#include "BLI_math_vector.h"
#include "DNA_image_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_action.h"
#include "BKE_deform.h"
#include "BKE_editmesh.h"
#include "BKE_image.h"
#include "BKE_lattice.h"
#include "BKE_lib_id.h"
#include "BKE_mesh.h"
#include "BKE_mesh_wrapper.h"
#include "BKE_object.h"
#include "BKE_modifier.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "MOD_modifiertypes.h"
#include "MOD_util.h"
#include "MEM_guardedalloc.h"
#include "bmesh.h"
Go to the source code of this file.
Macros | |
#define | INIT_TYPE(typeName) (types[eModifierType_##typeName] = &modifierType_##typeName) |
Functions | |
void | MOD_init_texture (MappingInfoModifierData *dmd, const ModifierEvalContext *ctx) |
void | MOD_get_texture_coords (MappingInfoModifierData *dmd, const ModifierEvalContext *UNUSED(ctx), Object *ob, Mesh *mesh, float(*cos)[3], float(*r_texco)[3]) |
void | MOD_previous_vcos_store (ModifierData *md, const float(*vert_coords)[3]) |
Mesh * | MOD_deform_mesh_eval_get (Object *ob, struct BMEditMesh *em, Mesh *mesh, const float(*vertexCos)[3], const int verts_num, const bool use_normals, const bool use_orco) |
void | MOD_get_vgroup (Object *ob, struct Mesh *mesh, const char *name, MDeformVert **dvert, int *defgrp_index) |
void | MOD_depsgraph_update_object_bone_relation (struct DepsNodeHandle *node, Object *object, const char *bonename, const char *description) |
void | modifier_type_init (ModifierTypeInfo *types[]) |
Mesh* MOD_deform_mesh_eval_get | ( | struct Object * | ob, |
struct BMEditMesh * | em, | ||
struct Mesh * | mesh, | ||
const float(*) | vertexCos[3], | ||
int | verts_num, | ||
bool | use_normals, | ||
bool | use_orco | ||
) |
Definition at line 167 of file MOD_util.c.
References BKE_id_copy_ex(), BKE_id_free(), BKE_mesh_new_nomain_from_curve(), BKE_mesh_orco_ensure(), BKE_mesh_vert_coords_apply(), BKE_mesh_vertex_normals_ensure(), BKE_mesh_wrapper_from_editmesh_with_coords(), BKE_object_get_pre_modified_mesh(), BLI_assert, Object::data, Mesh_Runtime::deformed_only, ELEM, Mesh::id, LIB_ID_COPY_CD_REFERENCE, LIB_ID_COPY_LOCALIZE, LIKELY, ME_WRAPPER_TYPE_MDATA, mesh, NULL, OB_CURVES_LEGACY, OB_FONT, OB_MESH, OB_SURF, Mesh::runtime, Mesh::totvert, Object::type, and Mesh_Runtime::wrapper_type.
Referenced by deformMatrices(), deformVerts(), and deformVertsEM().
void MOD_depsgraph_update_object_bone_relation | ( | struct DepsNodeHandle * | node, |
Object * | object, | ||
const char * | bonename, | ||
const char * | description | ||
) |
Definition at line 258 of file MOD_util.c.
References DEG_add_object_relation(), DEG_OB_COMP_EVAL_POSE, DEG_OB_COMP_TRANSFORM, node, NULL, OB_ARMATURE, and Object::type.
Referenced by updateDepsgraph().
void MOD_get_texture_coords | ( | MappingInfoModifierData * | dmd, |
const ModifierEvalContext * | UNUSEDctx, | ||
Object * | ob, | ||
Mesh * | mesh, | ||
float(*) | cos[3], | ||
float(*) | r_texco[3] | ||
) |
Definition at line 59 of file MOD_util.c.
References BKE_pose_channel_find_name(), BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, BLI_BITMAP_TEST, CD_MLOOPUV, copy_v3_v3(), KDL::cos(), CustomData_get_layer_named(), CustomData_has_layer(), CustomData_validate_layer_name(), invert_m4_m4(), Mesh::ldata, MPoly::loopstart, MappingInfoModifierData::map_bone, MappingInfoModifierData::map_object, MAX_CUSTOMDATA_LAYER_NAME, MEM_freeN, mesh, Mesh::mloop, MOD_DISP_MAP_GLOBAL, MOD_DISP_MAP_LOCAL, MOD_DISP_MAP_OBJECT, MOD_DISP_MAP_UV, Mesh::mpoly, mul_m4_m4m4(), mul_m4_v3(), mul_v3_m4v3(), Mesh::mvert, NULL, Object::obmat, Object::pose, bPoseChannel::pose_mat, MappingInfoModifierData::texmapping, MPoly::totloop, Mesh::totpoly, Mesh::totvert, MLoopUV::uv, MappingInfoModifierData::uvlayer_name, and MLoop::v.
Referenced by displaceModifier_do(), warpModifier_do(), waveModifier_do(), and weightvg_do_mask().
void MOD_get_vgroup | ( | Object * | ob, |
struct Mesh * | mesh, | ||
const char * | name, | ||
MDeformVert ** | dvert, | ||
int * | defgrp_index | ||
) |
Definition at line 235 of file MOD_util.c.
References BKE_id_defgroup_name_index(), BKE_lattice_deform_verts_get(), BKE_object_defgroup_name_index(), Mesh::dvert, Mesh::id, mesh, NULL, OB_LATTICE, and Object::type.
Referenced by correctivesmooth_modifier_do(), cuboid_do(), deformVerts(), deformVerts_do(), deformVertsEM(), displaceModifier_do(), initSystem(), isSystemDifferent(), isValidVertexGroup(), laplaciansmoothModifier_do(), meshcache_do(), meshdeformModifier_do(), MOD_solidify_extrude_modifyMesh(), MOD_solidify_nonmanifold_modifyMesh(), modifyMesh(), normalEditModifier_do(), SimpleDeformModifier_do(), smoothModifier_do(), sphere_do(), surfacedeformBind(), surfacedeformModifier_do(), warpModifier_do(), and waveModifier_do().
void MOD_init_texture | ( | MappingInfoModifierData * | dmd, |
const ModifierEvalContext * | ctx | ||
) |
Definition at line 45 of file MOD_util.c.
References BKE_image_is_animated(), BKE_image_user_frame_calc(), DEG_get_ctime(), ModifierEvalContext::depsgraph, Tex::ima, Tex::iuser, NULL, tex, and MappingInfoModifierData::texture.
Referenced by displaceModifier_do(), warpModifier_do(), waveModifier_do(), and weightvg_do_mask().
void MOD_previous_vcos_store | ( | ModifierData * | md, |
const float(*) | vert_coords[3] | ||
) |
Definition at line 153 of file MOD_util.c.
References eModifierType_Armature, MEM_dupallocN, ArmatureModifierData::multi, ModifierData::next, NULL, ModifierData::type, and ArmatureModifierData::vert_coords_prev.
Referenced by deformVerts(), and deformVertsEM().
void modifier_type_init | ( | ModifierTypeInfo * | types[] | ) |
Only called by BKE_modifier.h/modifier.c
Definition at line 274 of file MOD_util.c.
References Bevel, INIT_TYPE, None, and Wireframe.
Referenced by BKE_modifier_init().