Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
#include "BLI_math.h"
#include "BLT_translation.h"
#include "DNA_curve_types.h"
#include "DNA_defaults.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "BKE_anim_path.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_displist.h"
#include "BKE_lib_id.h"
#include "BKE_lib_query.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_object_deform.h"
#include "BKE_screen.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
#include "MOD_ui_common.h"
#include "MOD_util.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
Go to the source code of this file.
Classes | |
struct | SortVertsElem |
Typedefs | |
typedef struct SortVertsElem | SortVertsElem |
Functions | |
static void | initData (ModifierData *md) |
static void | foreachIDLink (ModifierData *md, Object *ob, IDWalkFunc walk, void *userData) |
static void | updateDepsgraph (ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) |
BLI_INLINE float | sum_v3 (const float v[3]) |
static int | svert_sum_cmp (const void *e1, const void *e2) |
static void | svert_from_mvert (SortVertsElem *sv, const MVert *mv, const int i_begin, const int i_end) |
static void | dm_mvert_map_doubles (int *doubles_map, const MVert *mverts, const int target_start, const int target_verts_num, const int source_start, const int source_verts_num, const float dist) |
static void | mesh_merge_transform (Mesh *result, Mesh *cap_mesh, const float cap_offset[4][4], uint cap_verts_index, uint cap_edges_index, int cap_loops_index, int cap_polys_index, int cap_nverts, int cap_nedges, int cap_nloops, int cap_npolys, int *remap, int remap_len, const bool recalc_normals_later) |
static Mesh * | arrayModifier_doArray (ArrayModifierData *amd, const ModifierEvalContext *ctx, Mesh *mesh) |
static Mesh * | modifyMesh (ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh) |
static bool | isDisabled (const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams)) |
static void | panel_draw (const bContext *UNUSED(C), Panel *panel) |
static void | relative_offset_header_draw (const bContext *UNUSED(C), Panel *panel) |
static void | relative_offset_draw (const bContext *UNUSED(C), Panel *panel) |
static void | constant_offset_header_draw (const bContext *UNUSED(C), Panel *panel) |
static void | constant_offset_draw (const bContext *UNUSED(C), Panel *panel) |
static void | object_offset_header_draw (const bContext *UNUSED(C), Panel *panel) |
static void | object_offset_draw (const bContext *UNUSED(C), Panel *panel) |
static void | symmetry_panel_header_draw (const bContext *UNUSED(C), Panel *panel) |
static void | symmetry_panel_draw (const bContext *UNUSED(C), Panel *panel) |
static void | uv_panel_draw (const bContext *UNUSED(C), Panel *panel) |
static void | caps_panel_draw (const bContext *UNUSED(C), Panel *panel) |
static void | panelRegister (ARegionType *region_type) |
Variables | |
ModifierTypeInfo | modifierType_Array |
Array modifier: duplicates the object multiple times along an axis.
Definition in file MOD_array.c.
typedef struct SortVertsElem SortVertsElem |
|
static |
Definition at line 353 of file MOD_array.c.
References add_v3_v3(), CurveCache::anim_path_accum_length, BKE_anim_path_get_length(), BKE_mesh_merge_verts(), BKE_mesh_new_nomain_from_template(), BKE_mesh_vertex_normals_are_dirty(), BKE_mesh_vertex_normals_clear_dirty(), BKE_mesh_vertex_normals_ensure(), BKE_mesh_vertex_normals_for_write(), BKE_modifier_get_evaluated_mesh_from_evaluated_object(), BKE_modifier_set_error(), BKE_object_defgroup_index_map_create(), Freestyle::c, CD_MEDGE, CD_MLOOPUV, CD_MPOLY, CD_MVERT, MVert::co, compare_len_v3v3(), copy_m4_m4(), copy_v3_v3(), copy_vn_i(), count, ArrayModifierData::count, Object_Runtime::curve_cache, ArrayModifierData::curve_ob, CustomData_copy_data(), CustomData_get_layer_n(), CustomData_has_layer(), CustomData_number_of_layers(), dm_mvert_map_doubles(), MLoop::e, Mesh::edata, ELEM, ArrayModifierData::end_cap, ArrayModifierData::fit_type, ArrayModifierData::flags, float(), INIT_MINMAX, invert_m4_m4(), is_one_v3(), is_zero_v2(), Mesh::ldata, len_v3(), blender::math::length(), ArrayModifierData::length, MPoly::loopstart, mat4_to_scale(), mat4_to_size(), max, Mesh::medge, MEM_freeN, MEM_malloc_arrayN, ArrayModifierData::merge_dist, mesh, mesh_merge_transform(), MESH_MERGE_VERTS_DUMP_IF_EQUAL, min, minmax_v3v3_v3(), Mesh::mloop, MOD_ARR_FITCURVE, MOD_ARR_FITLENGTH, MOD_ARR_MERGE, MOD_ARR_MERGEFINAL, MOD_ARR_OFF_CONST, MOD_ARR_OFF_OBJ, MOD_ARR_OFF_RELATIVE, ArrayModifierData::modifier, Mesh::mpoly, mul_m4_m4m4(), mul_m4_series, mul_m4_v3(), mul_mat3_m4_v3(), Mesh::mvert, normalize_v3(), NULL, OB_MESH, ModifierEvalContext::object, Object::obmat, offset, ArrayModifierData::offset, ArrayModifierData::offset_ob, ArrayModifierData::offset_type, Mesh::pdata, result, Object::runtime, ArrayModifierData::scale, ArrayModifierData::start_cap, Mesh::totedge, Mesh::totloop, Mesh::totpoly, Mesh::totvert, Object::type, unit_m4(), MLoopUV::uv, ArrayModifierData::uv_offset, MLoop::v, MEdge::v1, MEdge::v2, and Mesh::vdata.
Referenced by modifyMesh().
Definition at line 967 of file MOD_array.c.
References col, IFACE_, Panel::layout, modifier_panel_get_property_pointers(), NULL, ptr, uiItemR(), uiLayoutColumn(), and uiLayoutSetPropSep().
Referenced by panelRegister().
Definition at line 890 of file MOD_array.c.
References col, IFACE_, Panel::layout, modifier_panel_get_property_pointers(), NULL, ptr, RNA_boolean_get(), uiItemR(), uiLayoutColumn(), uiLayoutSetActive(), and uiLayoutSetPropSep().
Referenced by panelRegister().
Definition at line 881 of file MOD_array.c.
References Panel::layout, modifier_panel_get_property_pointers(), NULL, ptr, and uiItemR().
Referenced by panelRegister().
|
static |
Take as inputs two sets of verts, to be processed for detection of doubles and mapping. Each set of verts is defined by its start within mverts array and its verts_num; It builds a mapping for all vertices within source, to vertices within target, or -1 if no double found. The int doubles_map[verts_source_num]
array must have been allocated by caller.
Definition at line 147 of file MOD_array.c.
References MVert::co, SortVertsElem::co, compare_len_v3v3(), ELEM, float(), len_squared_v3v3(), M_SQRT3, MEM_freeN, MEM_malloc_arrayN, SortVertsElem::sum_co, sum_v3(), svert_from_mvert(), svert_sum_cmp(), and SortVertsElem::vertex_num.
Referenced by arrayModifier_doArray().
|
static |
Definition at line 62 of file MOD_array.c.
References ArrayModifierData::curve_ob, ArrayModifierData::end_cap, IDWALK_CB_NOP, ArrayModifierData::offset_ob, and ArrayModifierData::start_cap.
|
static |
Definition at line 49 of file MOD_array.c.
References BLI_assert, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, MEMCPY_STRUCT_AFTER, ModifierData::ui_expand_flag, UI_PANEL_DATA_EXPAND_ROOT, and UI_SUBPANEL_DATA_EXPAND_1.
|
static |
Definition at line 808 of file MOD_array.c.
References ArrayModifierData::curve_ob, ArrayModifierData::end_cap, OB_CURVES_LEGACY, OB_MESH, ArrayModifierData::start_cap, and Object::type.
|
static |
Definition at line 261 of file MOD_array.c.
References BKE_mesh_vertex_normals_for_write(), BKE_object_defgroup_index_map_apply(), CD_ORIGINDEX, copy_vn_i(), CustomData_copy_data(), CustomData_get_layer(), MLoop::e, Mesh::edata, float(), Mesh::ldata, MPoly::loopstart, mul_m4_v3(), mul_mat3_m4_v3(), normalize_v3(), NULL, ORIGINDEX_NONE, Mesh::pdata, result, MLoop::v, MEdge::v1, MEdge::v2, and Mesh::vdata.
Referenced by arrayModifier_doArray().
|
static |
Definition at line 802 of file MOD_array.c.
References arrayModifier_doArray(), and mesh.
Definition at line 916 of file MOD_array.c.
References col, IFACE_, Panel::layout, modifier_panel_get_property_pointers(), NULL, ptr, RNA_boolean_get(), uiItemR(), uiLayoutColumn(), uiLayoutSetActive(), and uiLayoutSetPropSep().
Referenced by panelRegister().
Object offset in a subpanel for consistency with the other offset types.
Definition at line 907 of file MOD_array.c.
References Panel::layout, modifier_panel_get_property_pointers(), NULL, ptr, and uiItemR().
Referenced by panelRegister().
Definition at line 833 of file MOD_array.c.
References Panel::layout, MOD_ARR_FITCURVE, MOD_ARR_FITLENGTH, MOD_ARR_FIXEDCOUNT, modifier_panel_end(), modifier_panel_get_property_pointers(), NULL, ptr, RNA_enum_get(), uiItemR(), and uiLayoutSetPropSep().
Referenced by panelRegister().
|
static |
Definition at line 981 of file MOD_array.c.
References caps_panel_draw(), constant_offset_draw(), constant_offset_header_draw(), eModifierType_Array, modifier_panel_register(), modifier_subpanel_register(), NULL, object_offset_draw(), object_offset_header_draw(), panel_draw(), relative_offset_draw(), relative_offset_header_draw(), symmetry_panel_draw(), symmetry_panel_header_draw(), and uv_panel_draw().
Definition at line 867 of file MOD_array.c.
References col, IFACE_, Panel::layout, modifier_panel_get_property_pointers(), NULL, ptr, RNA_boolean_get(), uiItemR(), uiLayoutColumn(), uiLayoutSetActive(), and uiLayoutSetPropSep().
Referenced by panelRegister().
Definition at line 858 of file MOD_array.c.
References Panel::layout, modifier_panel_get_property_pointers(), NULL, ptr, and uiItemR().
Referenced by panelRegister().
BLI_INLINE float sum_v3 | ( | const float | v[3] | ) |
Definition at line 100 of file MOD_array.c.
References v.
Referenced by dm_mvert_map_doubles(), and svert_from_mvert().
|
static |
Definition at line 127 of file MOD_array.c.
References SortVertsElem::co, copy_v3_v3(), SortVertsElem::sum_co, sum_v3(), and SortVertsElem::vertex_num.
Referenced by dm_mvert_map_doubles().
Definition at line 112 of file MOD_array.c.
References SortVertsElem::sum_co.
Referenced by dm_mvert_map_doubles().
Definition at line 939 of file MOD_array.c.
References col, IFACE_, Panel::layout, modifier_panel_get_property_pointers(), NULL, ptr, RNA_boolean_get(), uiItemR(), uiLayoutColumn(), uiLayoutSetActive(), and uiLayoutSetPropSep().
Referenced by panelRegister().
Definition at line 930 of file MOD_array.c.
References IFACE_, Panel::layout, modifier_panel_get_property_pointers(), NULL, ptr, and uiItemR().
Referenced by panelRegister().
|
static |
Definition at line 72 of file MOD_array.c.
References ArrayModifierData::curve_ob, DAG_EVAL_NEED_CURVE_PATH, DEG_add_modifier_to_transform_relation(), DEG_add_object_relation(), DEG_add_special_eval_flag(), DEG_OB_COMP_GEOMETRY, DEG_OB_COMP_TRANSFORM, ArrayModifierData::end_cap, Object::id, ModifierUpdateDepsgraphContext::node, NULL, ArrayModifierData::offset_ob, and ArrayModifierData::start_cap.
Definition at line 953 of file MOD_array.c.
References col, IFACE_, Panel::layout, modifier_panel_get_property_pointers(), NULL, ptr, UI_ITEM_R_EXPAND, uiItemR(), uiLayoutColumn(), and uiLayoutSetPropSep().
Referenced by panelRegister().
ModifierTypeInfo modifierType_Array |
Definition at line 1004 of file MOD_array.c.