|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "BLI_utildefines.h"#include "BLI_math_matrix.h"#include "BLI_math_vector.h"#include "BLI_span.hh"#include "BLT_translation.hh"#include "DNA_defaults.h"#include "DNA_meshdata_types.h"#include "DNA_object_types.h"#include "DNA_screen_types.h"#include "BKE_anim_path.h"#include "BKE_attribute.hh"#include "BKE_curve.hh"#include "BKE_customdata.hh"#include "BKE_lib_id.hh"#include "BKE_lib_query.hh"#include "BKE_mesh.hh"#include "BKE_mesh_wrapper.hh"#include "BKE_modifier.hh"#include "BKE_object_deform.h"#include "BKE_object_types.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "RNA_access.hh"#include "RNA_prototypes.hh"#include "MOD_ui_common.hh"#include "DEG_depsgraph.hh"#include "GEO_mesh_merge_by_distance.hh"Go to the source code of this file.
Classes | |
| struct | SortVertsElem |
Functions | |
| static void | init_data (ModifierData *md) |
| static void | foreach_ID_link (ModifierData *md, Object *ob, IDWalkFunc walk, void *user_data) |
| static void | update_depsgraph (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 Span< float3 > vert_positions, const int i_begin, const int i_end) |
| static void | dm_mvert_map_doubles (int *doubles_map, const Span< float3 > vert_positions, 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_faces_index, int cap_nverts, int cap_nedges, int cap_nloops, int cap_nfaces, int *remap, int remap_len, MutableSpan< float3 > dst_vert_normals) |
| static Mesh * | arrayModifier_doArray (ArrayModifierData *amd, const ModifierEvalContext *ctx, Mesh *mesh) |
| static Mesh * | modify_mesh (ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh) |
| static bool | is_disabled (const Scene *, ModifierData *md, bool) |
| static void | panel_draw (const bContext *, Panel *panel) |
| static void | relative_offset_header_draw (const bContext *, Panel *panel) |
| static void | relative_offset_draw (const bContext *, Panel *panel) |
| static void | constant_offset_header_draw (const bContext *, Panel *panel) |
| static void | constant_offset_draw (const bContext *, Panel *panel) |
| static void | object_offset_header_draw (const bContext *, Panel *panel) |
| static void | object_offset_draw (const bContext *, Panel *panel) |
| static void | symmetry_panel_header_draw (const bContext *, Panel *panel) |
| static void | symmetry_panel_draw (const bContext *, Panel *panel) |
| static void | uv_panel_draw (const bContext *, Panel *panel) |
| static void | caps_panel_draw (const bContext *, Panel *panel) |
| static void | panel_register (ARegionType *region_type) |
Variables | |
| ModifierTypeInfo | modifierType_Array |
Array modifier: duplicates the object multiple times along an axis.
Definition in file MOD_array.cc.
|
static |
Definition at line 375 of file MOD_array.cc.
References add_v3_v3(), CurveCache::anim_path_accum_length, blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), BKE_anim_path_get_length(), BKE_id_free(), BKE_mesh_copy_for_eval(), BKE_mesh_new_nomain_from_template(), BKE_mesh_vert_normals_are_dirty(), BKE_mesh_wrapper_ensure_mdata(), BKE_modifier_get_evaluated_mesh_from_evaluated_object(), BKE_modifier_set_error(), BKE_object_defgroup_index_map_create(), CD_PROP_FLOAT2, compare_len_v3v3(), blender::bits::MutableBitSpan::copy_from(), blender::MutableSpan< T >::copy_from(), copy_m4_m4(), copy_v3_v3(), copy_vn_i(), Mesh::corners_num, ArrayModifierData::count, count, ArrayModifierData::curve_ob, CustomData_copy_data(), CustomData_get_layer_n_for_write(), CustomData_number_of_layers(), dm_mvert_map_doubles(), Mesh::edges_num, ELEM, ArrayModifierData::end_cap, Mesh::faces_num, ArrayModifierData::fit_type, ArrayModifierData::flags, float, invert_m4_m4(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), is_one_v3(), is_zero_v2(), len_v3(), ArrayModifierData::length, mat4_to_scale(), mat4_to_size(), blender::Bounds< T >::max, MEM_freeN(), MEM_malloc_arrayN, ArrayModifierData::merge_dist, mesh, mesh_merge_transform(), blender::bke::mesh_vert_normals_assign(), blender::Bounds< T >::min, 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, mul_m4_m4m4(), mul_m4_series, mul_m4_v3(), mul_mat3_m4_v3(), normalize_v3(), OB_MESH, ModifierEvalContext::object, ArrayModifierData::offset, ArrayModifierData::offset_ob, ArrayModifierData::offset_type, blender::Vector< T, InlineBufferCapacity, Allocator >::reinitialize(), result, Mesh::runtime, Object::runtime, ArrayModifierData::scale, blender::bits::MutableBitSpan::set_all(), blender::Span< T >::size(), blender::bits::MutableBitSpan::slice(), ArrayModifierData::start_cap, blender::MutableSpan< T >::take_front(), Object::type, unit_m4(), ArrayModifierData::uv_offset, and Mesh::verts_num.
Referenced by modify_mesh().
Definition at line 1030 of file MOD_array.cc.
References col, IFACE_, Panel::layout, modifier_panel_get_property_pointers(), ptr, UI_ITEM_NONE, uiItemR(), uiLayoutColumn(), and uiLayoutSetPropSep().
Referenced by panel_register().
Definition at line 948 of file MOD_array.cc.
References col, IFACE_, Panel::layout, modifier_panel_get_property_pointers(), ptr, RNA_boolean_get(), UI_ITEM_NONE, uiItemR(), uiLayoutColumn(), uiLayoutSetActive(), and uiLayoutSetPropSep().
Referenced by panel_register().
Definition at line 939 of file MOD_array.cc.
References Panel::layout, modifier_panel_get_property_pointers(), ptr, UI_ITEM_NONE, and uiItemR().
Referenced by panel_register().
|
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 150 of file MOD_array.cc.
References 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 65 of file MOD_array.cc.
References ArrayModifierData::curve_ob, ArrayModifierData::end_cap, IDWALK_CB_NOP, ArrayModifierData::offset_ob, and ArrayModifierData::start_cap.
|
static |
Definition at line 52 of file MOD_array.cc.
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 868 of file MOD_array.cc.
References ArrayModifierData::curve_ob, ArrayModifierData::end_cap, OB_CURVES_LEGACY, OB_MESH, ArrayModifierData::start_cap, and Object::type.
|
static |
Definition at line 269 of file MOD_array.cc.
References Geometry::attributes, BKE_object_defgroup_index_map_apply(), CD_ORIGINDEX, copy_vn_i(), Mesh::corner_data, CustomData_copy_data(), CustomData_get_layer_for_write(), Mesh::edge_data, Mesh::face_data, blender::bke::SpanAttributeWriter< T >::finish(), blender::MutableSpan< T >::is_empty(), blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), mul_m4_v3(), mul_mat3_m4_v3(), normalize_v3(), ORIGINDEX_NONE, blender::bke::SpanAttributeWriter< T >::span, and Mesh::vert_data.
Referenced by arrayModifier_doArray().
|
static |
Definition at line 862 of file MOD_array.cc.
References arrayModifier_doArray().
Definition at line 974 of file MOD_array.cc.
References col, IFACE_, Panel::layout, modifier_panel_get_property_pointers(), ptr, RNA_boolean_get(), UI_ITEM_NONE, uiItemR(), uiLayoutColumn(), uiLayoutSetActive(), and uiLayoutSetPropSep().
Referenced by panel_register().
Object offset in a subpanel for consistency with the other offset types.
Definition at line 965 of file MOD_array.cc.
References Panel::layout, modifier_panel_get_property_pointers(), ptr, UI_ITEM_NONE, and uiItemR().
Referenced by panel_register().
Definition at line 891 of file MOD_array.cc.
References Panel::layout, MOD_ARR_FITCURVE, MOD_ARR_FITLENGTH, MOD_ARR_FIXEDCOUNT, modifier_panel_end(), modifier_panel_get_property_pointers(), ptr, RNA_enum_get(), UI_ITEM_NONE, uiItemR(), and uiLayoutSetPropSep().
Referenced by panel_register().
|
static |
Definition at line 1044 of file MOD_array.cc.
References caps_panel_draw(), constant_offset_draw(), constant_offset_header_draw(), eModifierType_Array, modifier_panel_register(), modifier_subpanel_register(), 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 925 of file MOD_array.cc.
References col, IFACE_, Panel::layout, modifier_panel_get_property_pointers(), ptr, RNA_boolean_get(), UI_ITEM_NONE, uiItemR(), uiLayoutColumn(), uiLayoutSetActive(), and uiLayoutSetPropSep().
Referenced by panel_register().
Definition at line 916 of file MOD_array.cc.
References Panel::layout, modifier_panel_get_property_pointers(), ptr, UI_ITEM_NONE, and uiItemR().
Referenced by panel_register().
| BLI_INLINE float sum_v3 | ( | const float | v[3] | ) |
Definition at line 103 of file MOD_array.cc.
References v.
Referenced by dm_mvert_map_doubles(), and svert_from_mvert().
|
static |
Definition at line 130 of file MOD_array.cc.
References SortVertsElem::co, copy_v3_v3(), SortVertsElem::sum_co, sum_v3(), and SortVertsElem::vertex_num.
Referenced by dm_mvert_map_doubles().
|
static |
Definition at line 115 of file MOD_array.cc.
References SortVertsElem::sum_co.
Referenced by dm_mvert_map_doubles().
Definition at line 997 of file MOD_array.cc.
References col, IFACE_, Panel::layout, modifier_panel_get_property_pointers(), ptr, RNA_boolean_get(), UI_ITEM_NONE, uiItemR(), uiLayoutColumn(), uiLayoutSetActive(), and uiLayoutSetPropSep().
Referenced by panel_register().
Definition at line 988 of file MOD_array.cc.
References IFACE_, Panel::layout, modifier_panel_get_property_pointers(), ptr, UI_ITEM_NONE, and uiItemR().
Referenced by panel_register().
|
static |
Definition at line 75 of file MOD_array.cc.
References ArrayModifierData::curve_ob, DAG_EVAL_NEED_CURVE_PATH, DEG_add_depends_on_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, ArrayModifierData::offset_ob, and ArrayModifierData::start_cap.
Definition at line 1016 of file MOD_array.cc.
References col, IFACE_, Panel::layout, modifier_panel_get_property_pointers(), ptr, UI_ITEM_R_EXPAND, uiItemR(), uiLayoutColumn(), and uiLayoutSetPropSep().
Referenced by panel_register().
| ModifierTypeInfo modifierType_Array |
Definition at line 1067 of file MOD_array.cc.