|
Blender V4.3
|
#include "BLI_utildefines.h"#include "BLI_kdtree.h"#include "BLI_map.hh"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_rand.h"#include "BLT_translation.hh"#include "DNA_defaults.h"#include "DNA_mesh_types.h"#include "DNA_meshdata_types.h"#include "DNA_object_types.h"#include "DNA_screen_types.h"#include "BKE_customdata.hh"#include "BKE_deform.hh"#include "BKE_lib_id.hh"#include "BKE_mesh.hh"#include "BKE_mesh_legacy_convert.hh"#include "BKE_modifier.hh"#include "BKE_particle.h"#include "BKE_scene.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "RNA_access.hh"#include "RNA_prototypes.hh"#include "DEG_depsgraph_query.hh"#include "MEM_guardedalloc.h"#include "MOD_ui_common.hh"Go to the source code of this file.
Macros | |
| #define | DNA_DEPRECATED_ALLOW /* For #ME_FACE_SEL. */ |
| #define | SET_VERTS(a, b, c, d) |
| #define | GET_ES(v1, v2) edgecut_get(eh, v1, v2) |
| #define | INT_UV(uvf, c0, c1) mid_v2_v2v2(uvf, mf->uv[c0], mf->uv[c1]) |
Functions | |
| static void | init_data (ModifierData *md) |
| static void | free_data (ModifierData *md) |
| static void | copy_data (const ModifierData *md, ModifierData *target, const int flag) |
| static bool | depends_on_time (Scene *, ModifierData *) |
| static void | required_data_mask (ModifierData *md, CustomData_MeshMasks *r_cddata_masks) |
| static void | createFacepa (ExplodeModifierData *emd, ParticleSystemModifierData *psmd, Mesh *mesh) |
| static int | edgecut_get (const blender::Map< blender::OrderedEdge, int > &edgehash, uint v1, uint v2) |
| static MFace * | get_dface (Mesh *mesh, Mesh *split, int cur, int i, MFace *mf) |
| static void | remap_faces_3_6_9_12 (Mesh *mesh, Mesh *split, MFace *mf, int *facepa, const int *vertpa, int i, const blender::Map< blender::OrderedEdge, int > &eh, int cur, int v1, int v2, int v3, int v4) |
| static void | remap_uvs_3_6_9_12 (Mesh *mesh, Mesh *split, int layers_num, int i, int cur, int c0, int c1, int c2, int c3) |
| static void | remap_faces_5_10 (Mesh *mesh, Mesh *split, MFace *mf, int *facepa, const int *vertpa, int i, const blender::Map< blender::OrderedEdge, int > &eh, int cur, int v1, int v2, int v3, int v4) |
| static void | remap_uvs_5_10 (Mesh *mesh, Mesh *split, int layers_num, int i, int cur, int c0, int c1, int c2, int c3) |
| static void | remap_faces_15 (Mesh *mesh, Mesh *split, MFace *mf, int *facepa, const int *vertpa, int i, const blender::Map< blender::OrderedEdge, int > &eh, int cur, int v1, int v2, int v3, int v4) |
| static void | remap_uvs_15 (Mesh *mesh, Mesh *split, int layers_num, int i, int cur, int c0, int c1, int c2, int c3) |
| static void | remap_faces_7_11_13_14 (Mesh *mesh, Mesh *split, MFace *mf, int *facepa, const int *vertpa, int i, const blender::Map< blender::OrderedEdge, int > &eh, int cur, int v1, int v2, int v3, int v4) |
| static void | remap_uvs_7_11_13_14 (Mesh *mesh, Mesh *split, int layers_num, int i, int cur, int c0, int c1, int c2, int c3) |
| static void | remap_faces_19_21_22 (Mesh *mesh, Mesh *split, MFace *mf, int *facepa, const int *vertpa, int i, const blender::Map< blender::OrderedEdge, int > &eh, int cur, int v1, int v2, int v3) |
| static void | remap_uvs_19_21_22 (Mesh *mesh, Mesh *split, int layers_num, int i, int cur, int c0, int c1, int c2) |
| static void | remap_faces_23 (Mesh *mesh, Mesh *split, MFace *mf, int *facepa, const int *vertpa, int i, const blender::Map< blender::OrderedEdge, int > &eh, int cur, int v1, int v2, int v3) |
| static void | remap_uvs_23 (Mesh *mesh, Mesh *split, int layers_num, int i, int cur, int c0, int c1, int c2) |
| static Mesh * | cutEdges (ExplodeModifierData *emd, Mesh *mesh) |
| static Mesh * | explodeMesh (ExplodeModifierData *emd, ParticleSystemModifierData *psmd, const ModifierEvalContext *ctx, Scene *scene, Mesh *to_explode) |
| static ParticleSystemModifierData * | findPrecedingParticlesystem (Object *ob, ModifierData *emd) |
| static Mesh * | modify_mesh (ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh) |
| static void | panel_draw (const bContext *, Panel *panel) |
| static void | panel_register (ARegionType *region_type) |
| static void | blend_read (BlendDataReader *, ModifierData *md) |
Variables | |
| static const short | add_faces [24] |
| ModifierTypeInfo | modifierType_Explode |
| #define DNA_DEPRECATED_ALLOW /* For #ME_FACE_SEL. */ |
Definition at line 9 of file MOD_explode.cc.
| #define GET_ES | ( | v1, | |
| v2 ) edgecut_get(eh, v1, v2) |
Definition at line 237 of file MOD_explode.cc.
Referenced by remap_faces_15(), remap_faces_19_21_22(), remap_faces_23(), remap_faces_3_6_9_12(), remap_faces_5_10(), and remap_faces_7_11_13_14().
| #define INT_UV | ( | uvf, | |
| c0, | |||
| c1 ) mid_v2_v2v2(uvf, mf->uv[c0], mf->uv[c1]) |
Definition at line 238 of file MOD_explode.cc.
Referenced by remap_uvs_15(), remap_uvs_19_21_22(), remap_uvs_23(), remap_uvs_3_6_9_12(), remap_uvs_5_10(), and remap_uvs_7_11_13_14().
Definition at line 224 of file MOD_explode.cc.
Referenced by cutEdges().
|
static |
Definition at line 1205 of file MOD_explode.cc.
References ExplodeModifierData::facepa.
|
static |
Definition at line 63 of file MOD_explode.cc.
References BKE_modifier_copydata_generic(), ExplodeModifierData::facepa, and flag.
|
static |
Definition at line 87 of file MOD_explode.cc.
References add_v3_v3(), add_v3_v3v3(), BKE_defvert_find_weight(), BLI_rng_free(), BLI_rng_get_float(), BLI_rng_new_srandom(), CD_MFACE, CustomData_get_layer_for_write(), eExplodeFlag_INVERT_VGROUP, ExplodeModifierData::facepa, ExplodeModifierData::flag, ParticleData::foffset, ParticleSettings::from, ParticleData::fuv, MEM_calloc_arrayN, MEM_freeN(), mul_v3_fl(), ParticleData::num, ParticleData::num_dmcache, ParticleSystem::part, ParticleSystem::particles, ExplodeModifierData::protect, ParticleSystemModifierData::psys, psys_particle_on_emitter(), ParticleSystem::seed, ParticleSystem::totpart, tree, MFace::v1, MFace::v2, v2, MFace::v3, MFace::v4, and ExplodeModifierData::vgroup.
Referenced by modify_mesh().
|
static |
Definition at line 649 of file MOD_explode.cc.
References add_faces, BKE_mesh_calc_edges_tessface(), BKE_mesh_convert_mfaces_to_mpolys(), BKE_mesh_legacy_convert_polys_to_offsets(), BKE_mesh_mface_index_validate(), BKE_mesh_new_nomain_from_template_ex(), CD_MASK_EVERYTHING, CD_MFACE, CD_MTFACE, copy_v3_v3(), CustomData_copy_data(), CustomData_free_elem(), CustomData_get_layer_for_write(), CustomData_number_of_layers(), ExplodeModifierData::facepa, Mesh::fdata_legacy, MFace::flag, get_dface(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_cb(), MEM_calloc_arrayN, MEM_freeN(), mid_v3_v3v3(), remap_faces_15(), remap_faces_19_21_22(), remap_faces_23(), remap_faces_3_6_9_12(), remap_faces_5_10(), remap_faces_7_11_13_14(), remap_uvs_15(), remap_uvs_19_21_22(), remap_uvs_23(), remap_uvs_3_6_9_12(), remap_uvs_5_10(), remap_uvs_7_11_13_14(), SET_VERTS, Mesh::totface_legacy, v, MFace::v1, MFace::v2, v2, MFace::v3, MFace::v4, and Mesh::vert_data.
Referenced by modify_mesh().
|
static |
Definition at line 74 of file MOD_explode.cc.
|
static |
Definition at line 205 of file MOD_explode.cc.
References int, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), and v2.
Referenced by explodeMesh().
|
static |
Definition at line 893 of file MOD_explode.cc.
References add_v3_v3(), ParticleData::alive, BKE_mesh_calc_edges_tessface(), BKE_mesh_convert_mfaces_to_mpolys(), BKE_mesh_legacy_convert_polys_to_offsets(), BKE_mesh_mface_index_validate(), BKE_mesh_new_nomain_from_template_ex(), BKE_scene_ctime_get(), CD_MASK_EVERYTHING, CD_MFACE, CD_MTFACE, CLAMP, ParticleKey::co, copy_v3_v3(), CustomData_copy_data(), CustomData_get_layer_for_write(), CustomData_get_layer_named_for_write(), ModifierEvalContext::depsgraph, ParticleSimulationData::depsgraph, edgecut_get(), eExplodeFlag_Alive, eExplodeFlag_Dead, eExplodeFlag_PaSize, eExplodeFlag_Unborn, ExplodeModifierData::facepa, Mesh::fdata_legacy, ExplodeModifierData::flag, invert_m4_m4(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), ParticleData::lifetime, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_cb(), mul_m4_v3(), mul_qt_v3(), mul_v3_fl(), ParticleSimulationData::ob, ModifierEvalContext::object, PARS_ALIVE, PARS_DEAD, PARS_UNBORN, ParticleSystem::particles, ParticleSimulationData::psmd, ParticleSimulationData::psys, ParticleSystemModifierData::psys, psys_get_birth_coords(), psys_get_particle_state(), psys_sim_data_free(), psys_sim_data_init(), ParticleKey::rot, rot, ParticleSimulationData::scene, scene, ParticleData::size, state, sub_qt_qtqt(), sub_v3_v3(), ParticleData::time, Mesh::totface_legacy, ParticleSystem::totpart, MTFace::uv, ExplodeModifierData::uvname, v, MFace::v1, MFace::v2, MFace::v3, MFace::v4, and Mesh::vert_data.
Referenced by modify_mesh().
|
static |
Definition at line 1099 of file MOD_explode.cc.
References eModifierType_ParticleSystem, ListBase::first, Object::modifiers, ModifierData::next, and ModifierData::type.
Referenced by modify_mesh().
|
static |
Definition at line 57 of file MOD_explode.cc.
References ExplodeModifierData::facepa, and MEM_SAFE_FREE.
Definition at line 214 of file MOD_explode.cc.
References CD_MFACE, CustomData_copy_data(), and CustomData_get_layer_for_write().
Referenced by cutEdges(), remap_faces_15(), remap_faces_19_21_22(), remap_faces_23(), remap_faces_3_6_9_12(), remap_faces_5_10(), and remap_faces_7_11_13_14().
|
static |
Definition at line 49 of file MOD_explode.cc.
References BLI_assert, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, and MEMCPY_STRUCT_AFTER.
|
static |
Definition at line 1111 of file MOD_explode.cc.
References BKE_id_free(), BKE_mesh_tessface_ensure(), createFacepa(), cutEdges(), DEG_get_evaluated_scene(), ModifierEvalContext::depsgraph, eExplodeFlag_CalcFaces, eExplodeFlag_EdgeCut, eParticleSystemFlag_Pars, explodeMesh(), ExplodeModifierData::facepa, findPrecedingParticlesystem(), ExplodeModifierData::flag, ParticleSystemModifierData::flag, MEM_allocN_len, MEM_freeN(), mesh, ParticleSystemModifierData::mesh_final, ModifierEvalContext::object, ParticleSystem::part, ParticleSystem::particles, ParticleSystemModifierData::psys, and ParticleSystem::totpart.
Definition at line 1162 of file MOD_explode.cc.
References col, IFACE_, Panel::layout, modifier_panel_end(), modifier_panel_get_property_pointers(), modifier_vgroup_ui(), ptr, RNA_pointer_get(), RNA_string_length(), UI_ITEM_NONE, UI_ITEM_R_FORCE_BLANK_DECORATE, UI_ITEM_R_TOGGLE, uiItemO(), uiItemPointerR(), uiItemR(), uiLayoutColumn(), uiLayoutRow(), uiLayoutRowWithHeading(), uiLayoutSetActive(), and uiLayoutSetPropSep().
Referenced by panel_register().
|
static |
Definition at line 1200 of file MOD_explode.cc.
References eModifierType_Explode, modifier_panel_register(), and panel_draw().
|
static |
Definition at line 368 of file MOD_explode.cc.
References MFace::flag, get_dface(), GET_ES, MFace::v1, MFace::v2, v2, MFace::v3, and MFace::v4.
Referenced by cutEdges().
|
static |
Definition at line 525 of file MOD_explode.cc.
References MFace::flag, get_dface(), GET_ES, MFace::v1, MFace::v2, v2, MFace::v3, and MFace::v4.
Referenced by cutEdges().
|
static |
Definition at line 581 of file MOD_explode.cc.
References MFace::flag, get_dface(), GET_ES, MFace::v1, MFace::v2, v2, MFace::v3, and MFace::v4.
Referenced by cutEdges().
|
static |
Definition at line 240 of file MOD_explode.cc.
References MFace::flag, get_dface(), GET_ES, MFace::v1, MFace::v2, v2, MFace::v3, and MFace::v4.
Referenced by cutEdges().
|
static |
Definition at line 310 of file MOD_explode.cc.
References MFace::flag, get_dface(), GET_ES, MFace::v1, MFace::v2, v2, MFace::v3, and MFace::v4.
Referenced by cutEdges().
|
static |
Definition at line 454 of file MOD_explode.cc.
References MFace::flag, get_dface(), GET_ES, MFace::v1, MFace::v2, v2, MFace::v3, and MFace::v4.
Referenced by cutEdges().
|
static |
Definition at line 415 of file MOD_explode.cc.
References CD_MTFACE, copy_v2_v2(), CustomData_get_layer_n_for_write(), INT_UV, l, and MTFace::uv.
Referenced by cutEdges().
|
static |
Definition at line 555 of file MOD_explode.cc.
References CD_MTFACE, copy_v2_v2(), CustomData_get_layer_n_for_write(), INT_UV, l, and MTFace::uv.
Referenced by cutEdges().
|
static |
Definition at line 619 of file MOD_explode.cc.
References CD_MTFACE, copy_v2_v2(), CustomData_get_layer_n_for_write(), INT_UV, l, and MTFace::uv.
Referenced by cutEdges().
|
static |
Definition at line 279 of file MOD_explode.cc.
References CD_MTFACE, copy_v2_v2(), CustomData_get_layer_n_for_write(), INT_UV, l, and MTFace::uv.
Referenced by cutEdges().
|
static |
Definition at line 341 of file MOD_explode.cc.
References CD_MTFACE, copy_v2_v2(), CustomData_get_layer_n_for_write(), INT_UV, l, and MTFace::uv.
Referenced by cutEdges().
|
static |
Definition at line 493 of file MOD_explode.cc.
References CD_MTFACE, copy_v2_v2(), CustomData_get_layer_n_for_write(), INT_UV, l, and MTFace::uv.
Referenced by cutEdges().
|
static |
Definition at line 78 of file MOD_explode.cc.
References CD_MASK_MDEFORMVERT, ExplodeModifierData::vgroup, and CustomData_MeshMasks::vmask.
|
static |
Definition at line 210 of file MOD_explode.cc.
Referenced by cutEdges().
| ModifierTypeInfo modifierType_Explode |
Definition at line 1212 of file MOD_explode.cc.