|
Blender V4.3
|
#include "BLI_math_base.hh"#include "BLI_math_matrix.h"#include "BLI_math_vector.h"#include "BLI_utildefines.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 "MEM_guardedalloc.h"#include "BKE_deform.hh"#include "BKE_editmesh.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "RNA_access.hh"#include "RNA_prototypes.hh"#include "MOD_modifiertypes.hh"#include "MOD_ui_common.hh"#include "MOD_util.hh"#include "BLO_read_write.hh"#include "DEG_depsgraph_query.hh"#include "BLI_time.h"#include "BLI_strict_flags.h"Go to the source code of this file.
Functions | |
| static void | init_data (ModifierData *md) |
| static void | copy_data (const ModifierData *md, ModifierData *target, const int flag) |
| static void | freeBind (CorrectiveSmoothModifierData *csmd) |
| static void | free_data (ModifierData *md) |
| static void | required_data_mask (ModifierData *md, CustomData_MeshMasks *r_cddata_masks) |
| static void | mesh_get_weights (const MDeformVert *dvert, const int defgrp_index, const uint verts_num, const bool use_invert_vgroup, float *smooth_weights) |
| static void | mesh_get_boundaries (Mesh *mesh, float *smooth_weights) |
| static void | smooth_iter__simple (CorrectiveSmoothModifierData *csmd, Mesh *mesh, blender::MutableSpan< blender::float3 > vertexCos, const float *smooth_weights, uint iterations) |
| static void | smooth_iter__length_weight (CorrectiveSmoothModifierData *csmd, Mesh *mesh, blender::MutableSpan< blender::float3 > vertexCos, const float *smooth_weights, uint iterations) |
| static void | smooth_iter (CorrectiveSmoothModifierData *csmd, Mesh *mesh, blender::MutableSpan< blender::float3 > vertexCos, const float *smooth_weights, uint iterations) |
| static void | smooth_verts (CorrectiveSmoothModifierData *csmd, Mesh *mesh, const MDeformVert *dvert, const int defgrp_index, blender::MutableSpan< blender::float3 > vertexCos) |
| static bool | calc_tangent_loop (const float v_dir_prev[3], const float v_dir_next[3], float r_tspace[3][3]) |
| static void | calc_tangent_spaces (const Mesh *mesh, blender::Span< blender::float3 > vertexCos, float(*r_tangent_spaces)[3][3], float *r_tangent_weights, float *r_tangent_weights_per_vertex) |
| static void | store_cache_settings (CorrectiveSmoothModifierData *csmd) |
| static bool | cache_settings_equal (CorrectiveSmoothModifierData *csmd) |
| static void | calc_deltas (CorrectiveSmoothModifierData *csmd, Mesh *mesh, const MDeformVert *dvert, const int defgrp_index, const blender::Span< blender::float3 > rest_coords) |
| static void | correctivesmooth_modifier_do (ModifierData *md, Depsgraph *depsgraph, Object *ob, Mesh *mesh, blender::MutableSpan< blender::float3 > vertexCos, BMEditMesh *em) |
| static void | deform_verts (ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh, blender::MutableSpan< blender::float3 > positions) |
| static void | panel_draw (const bContext *, Panel *panel) |
| static void | panel_register (ARegionType *region_type) |
| static void | blend_write (BlendWriter *writer, const ID *id_owner, const ModifierData *md) |
| static void | blend_read (BlendDataReader *reader, ModifierData *md) |
Variables | |
| ModifierTypeInfo | modifierType_CorrectiveSmooth |
Method of smoothing deformation, also known as 'delta-mush'.
Definition in file MOD_correctivesmooth.cc.
|
static |
Definition at line 801 of file MOD_correctivesmooth.cc.
References CorrectiveSmoothModifierData::bind_coords, CorrectiveSmoothModifierData::bind_coords_num, BLO_read_float3_array(), CorrectiveSmoothModifierData::delta_cache, CorrectiveSmoothDeltaCache::deltas, and CorrectiveSmoothDeltaCache::deltas_num.
|
static |
Definition at line 778 of file MOD_correctivesmooth.cc.
References CorrectiveSmoothModifierData::bind_coords, CorrectiveSmoothModifierData::bind_coords_num, BLI_assert, BLO_write_float3_array(), BLO_write_is_undo(), BLO_write_struct_at_address, eModifierFlag_OverrideLibrary_Local, ModifierData::flag, ID_IS_LINKED, and ID_IS_OVERRIDE_LIBRARY.
|
static |
Definition at line 493 of file MOD_correctivesmooth.cc.
References CorrectiveSmoothModifierData::delta_cache, CorrectiveSmoothDeltaCache::flag, CorrectiveSmoothModifierData::flag, CorrectiveSmoothDeltaCache::lambda, CorrectiveSmoothModifierData::lambda, CorrectiveSmoothDeltaCache::repeat, CorrectiveSmoothModifierData::repeat, CorrectiveSmoothDeltaCache::rest_source, CorrectiveSmoothModifierData::rest_source, CorrectiveSmoothDeltaCache::smooth_type, and CorrectiveSmoothModifierData::smooth_type.
Referenced by correctivesmooth_modifier_do().
|
static |
This calculates CorrectiveSmoothModifierData.delta_cache It's not run on every update (during animation for example).
Definition at line 505 of file MOD_correctivesmooth.cc.
References calc_tangent_spaces(), copy_vn_fl(), CorrectiveSmoothModifierData::delta_cache, CorrectiveSmoothDeltaCache::deltas, CorrectiveSmoothDeltaCache::deltas_num, float, invert_m3_m3(), MEM_malloc_arrayN, MEM_SAFE_FREE, mul_v3_m3v3(), blender::Span< T >::size(), smooth_verts(), sub_v3_v3v3(), transpose_m3_m3(), and UNLIKELY.
Referenced by correctivesmooth_modifier_do().
|
static |
Calculate an orthogonal 3x3 matrix from 2 edge vectors.
Definition at line 385 of file MOD_correctivesmooth.cc.
References add_v3_v3(), compare_v3v3(), copy_v3_v3(), cross_v3_v3v3(), normalize_v3(), unit_m3(), and UNLIKELY.
Referenced by calc_tangent_spaces().
|
static |
| r_tangent_spaces | Loop aligned array of tangents. |
| r_tangent_weights | Loop aligned array of weights (may be nullptr). |
| r_tangent_weights_per_vertex | Vertex aligned array, accumulating weights for each loop (may be nullptr). |
Definition at line 421 of file MOD_correctivesmooth.cc.
References calc_tangent_loop(), copy_v3_v3(), copy_vn_fl(), dot_v3v3(), fabsf, float, int, normalize_v3(), blender::math::safe_acos_approx(), and sub_v3_v3v3().
Referenced by calc_deltas(), and correctivesmooth_modifier_do().
|
static |
Definition at line 63 of file MOD_correctivesmooth.cc.
References CorrectiveSmoothModifierData::bind_coords, BKE_modifier_copydata_generic(), CorrectiveSmoothModifierData::delta_cache, CorrectiveSmoothDeltaCache::deltas, CorrectiveSmoothDeltaCache::deltas_num, flag, and MEM_dupallocN.
|
static |
Definition at line 552 of file MOD_correctivesmooth.cc.
References CorrectiveSmoothModifierData::bind_coords, CorrectiveSmoothModifierData::bind_coords_num, BKE_editmesh_vert_coords_alloc_orco(), BKE_modifier_get_original(), BKE_modifier_set_error(), BLI_assert, BMEditMesh::bm, cache_settings_equal(), calc_deltas(), calc_tangent_spaces(), blender::MutableSpan< T >::data(), Object::data, CorrectiveSmoothModifierData::defgrp_name, DEG_is_active(), CorrectiveSmoothModifierData::delta_cache, CorrectiveSmoothDeltaCache::deltas, CorrectiveSmoothDeltaCache::deltas_num, depsgraph, error(), CorrectiveSmoothModifierData::flag, float, ID_RECALC_ALL, blender::Span< T >::index_range(), madd_v3_v3fl(), MEM_dupallocN, MEM_freeN(), MEM_malloc_arrayN, MEM_SAFE_FREE, MOD_CORRECTIVESMOOTH_ONLY_SMOOTH, MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND, MOD_CORRECTIVESMOOTH_RESTSOURCE_ORCO, MOD_get_vgroup(), CorrectiveSmoothModifierData::modifier, mul_v3_fl(), mul_v3_m3v3(), OB_MESH, CorrectiveSmoothModifierData::rest_source, CorrectiveSmoothModifierData::scale, blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::MutableSpan< T >::size_in_bytes(), smooth_verts(), store_cache_settings(), TIMEIT_END, TIMEIT_START, BMesh::totvert, Object::type, and UNLIKELY.
Referenced by deform_verts().
|
static |
Definition at line 735 of file MOD_correctivesmooth.cc.
References correctivesmooth_modifier_do(), ModifierEvalContext::depsgraph, and ModifierEvalContext::object.
|
static |
Definition at line 86 of file MOD_correctivesmooth.cc.
References freeBind().
|
static |
Definition at line 78 of file MOD_correctivesmooth.cc.
References CorrectiveSmoothModifierData::bind_coords, CorrectiveSmoothModifierData::bind_coords_num, CorrectiveSmoothModifierData::delta_cache, CorrectiveSmoothDeltaCache::deltas, and MEM_SAFE_FREE.
Referenced by free_data().
|
static |
Definition at line 52 of file MOD_correctivesmooth.cc.
References BLI_assert, CorrectiveSmoothModifierData::delta_cache, CorrectiveSmoothDeltaCache::deltas, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, and MEMCPY_STRUCT_AFTER.
Definition at line 123 of file MOD_correctivesmooth.cc.
References MEM_calloc_arrayN, MEM_freeN(), and blender::Span< T >::slice().
Referenced by smooth_verts().
|
static |
Definition at line 103 of file MOD_correctivesmooth.cc.
References BKE_defvert_find_weight(), and w().
Referenced by smooth_verts().
Definition at line 743 of file MOD_correctivesmooth.cc.
References IFACE_, Panel::layout, MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND, modifier_panel_end(), modifier_panel_get_property_pointers(), modifier_vgroup_ui(), ptr, RNA_boolean_get(), RNA_enum_get(), UI_ITEM_NONE, uiItemO(), uiItemR(), and uiLayoutSetPropSep().
Referenced by panel_register().
|
static |
Definition at line 773 of file MOD_correctivesmooth.cc.
References eModifierType_CorrectiveSmooth, modifier_panel_register(), and panel_draw().
|
static |
Definition at line 92 of file MOD_correctivesmooth.cc.
References CD_MASK_MDEFORMVERT, CorrectiveSmoothModifierData::defgrp_name, and CustomData_MeshMasks::vmask.
|
static |
Definition at line 327 of file MOD_correctivesmooth.cc.
References MOD_CORRECTIVESMOOTH_SMOOTH_LENGTH_WEIGHT, smooth_iter__length_weight(), smooth_iter__simple(), and CorrectiveSmoothModifierData::smooth_type.
Referenced by bevel_list_smooth(), make_bevel_list_3D(), and smooth_verts().
|
static |
Definition at line 232 of file MOD_correctivesmooth.cc.
References add_v3_v3(), eps, CorrectiveSmoothModifierData::lambda, len_v3(), madd_v3_v3fl(), MEM_calloc_arrayN, MEM_freeN(), mul_v3_fl(), blender::MutableSpan< T >::size(), sub_v3_v3(), and sub_v3_v3v3().
Referenced by smooth_iter().
|
static |
Definition at line 155 of file MOD_correctivesmooth.cc.
References add_v3_v3(), CorrectiveSmoothModifierData::lambda, madd_v3_v3fl(), MEM_calloc_arrayN, MEM_freeN(), blender::MutableSpan< T >::size(), sub_v3_v3(), and sub_v3_v3v3().
Referenced by smooth_iter().
|
static |
Definition at line 345 of file MOD_correctivesmooth.cc.
References copy_vn_fl(), CorrectiveSmoothModifierData::flag, MEM_freeN(), MEM_malloc_arrayN, mesh_get_boundaries(), mesh_get_weights(), MOD_CORRECTIVESMOOTH_INVERT_VGROUP, MOD_CORRECTIVESMOOTH_PIN_BOUNDARY, CorrectiveSmoothModifierData::repeat, blender::MutableSpan< T >::size(), and smooth_iter().
Referenced by calc_deltas(), and correctivesmooth_modifier_do().
|
static |
Definition at line 484 of file MOD_correctivesmooth.cc.
References CorrectiveSmoothModifierData::delta_cache, CorrectiveSmoothDeltaCache::flag, CorrectiveSmoothModifierData::flag, CorrectiveSmoothDeltaCache::lambda, CorrectiveSmoothModifierData::lambda, CorrectiveSmoothDeltaCache::repeat, CorrectiveSmoothModifierData::repeat, CorrectiveSmoothDeltaCache::rest_source, CorrectiveSmoothModifierData::rest_source, CorrectiveSmoothDeltaCache::smooth_type, and CorrectiveSmoothModifierData::smooth_type.
Referenced by correctivesmooth_modifier_do().
| ModifierTypeInfo modifierType_CorrectiveSmooth |
Definition at line 814 of file MOD_correctivesmooth.cc.