|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "BLI_array_utils.hh"#include "BLI_bitmap.h"#include "BLI_linklist.h"#include "BLI_math_vector.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_scene_types.h"#include "DNA_screen_types.h"#include "BKE_attribute.hh"#include "BKE_context.hh"#include "BKE_deform.hh"#include "BKE_lib_id.hh"#include "BKE_mesh.hh"#include "BKE_mesh_mapping.hh"#include "BKE_screen.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 "bmesh.hh"Go to the source code of this file.
Classes | |
| struct | ModePair |
| struct | WeightedNormalDataAggregateItem |
| struct | WeightedNormalData |
Macros | |
| #define | CLNORS_VALID_VEC_LEN (1e-6f) |
| #define | NUM_CACHED_INVERSE_POWERS_OF_WEIGHT 128 |
Variables | |
| ModifierTypeInfo | modifierType_WeightedNormal |
Definition at line 45 of file MOD_weighted_normal.cc.
Referenced by apply_weights_vertex_normal().
| #define NUM_CACHED_INVERSE_POWERS_OF_WEIGHT 128 |
Definition at line 71 of file MOD_weighted_normal.cc.
Referenced by aggregate_item_normal().
|
static |
Definition at line 129 of file MOD_weighted_normal.cc.
References BKE_defvert_find_index(), WeightedNormalData::cached_inverse_powers_of_weight, check_item_face_strength(), compare_ff(), WeightedNormalDataAggregateItem::curr_val, WeightedNormalData::defgrp_index, WeightedNormalData::dvert, WeightedNormalData::face_normals, WeightedNormalDataAggregateItem::loops_num, madd_v3_v3fl(), WeightedNormalDataAggregateItem::normal, NUM_CACHED_INVERSE_POWERS_OF_WEIGHT, powf, WeightedNormalModifierData::thresh, WeightedNormalData::use_invert_vgroup, and WeightedNormalData::weight.
Referenced by apply_weights_vertex_normal().
|
static |
Definition at line 186 of file MOD_weighted_normal.cc.
References aggregate_item_normal(), BLI_assert_unreachable, WeightedNormalData::clnors, CLNORS_VALID_VEC_LEN, copy_v3_v3(), WeightedNormalData::corner_edges, blender::bke::mesh::CornerNormalSpaceArray::corner_space_indices, WeightedNormalData::corner_verts, WeightedNormalDataAggregateItem::curr_strength, blender::MutableSpan< T >::data(), WeightedNormalData::dvert, WeightedNormalData::edges, WeightedNormalData::face_normals, WeightedNormalData::face_strength, FACE_STRENGTH_WEAK, WeightedNormalData::faces, WeightedNormalModifierData::flag, WeightedNormalData::has_clnors, ModePair::index, blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), is_zero_v3(), WeightedNormalData::items_data, WeightedNormalData::loop_to_face, MOD_WEIGHTEDNORMAL_FACE_INFLUENCE, MOD_WEIGHTEDNORMAL_KEEP_SHARP, MOD_WEIGHTEDNORMAL_MODE_ANGLE, MOD_WEIGHTEDNORMAL_MODE_FACE, MOD_WEIGHTEDNORMAL_MODE_FACE_ANGLE, WeightedNormalData::mode, WeightedNormalData::mode_pair, WeightedNormalDataAggregateItem::normal, normalize_v3(), blender::bke::mesh::normals_calc_corners(), blender::bke::mesh::normals_corner_custom_set(), blender::bke::mesh::normals_corner_custom_set_from_verts(), blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize(), WeightedNormalData::sharp_edges, WeightedNormalData::sharp_faces, blender::Span< T >::size(), blender::bke::mesh::CornerNormalSpaceArray::spaces, ModePair::val, WeightedNormalData::vert_normals, WeightedNormalData::vert_positions, WeightedNormalData::verts_num, and zero_v3().
Referenced by wn_corner_angle(), wn_face_area(), and wn_face_with_angle().
|
static |
Check strength of given face compared to those found so far for that given item (vertex or smooth fan), and reset matching item_data in case we get a stronger new strength.
Definition at line 111 of file MOD_weighted_normal.cc.
References BLI_assert, WeightedNormalDataAggregateItem::curr_strength, WeightedNormalDataAggregateItem::curr_val, WeightedNormalData::face_strength, WeightedNormalDataAggregateItem::loops_num, WeightedNormalDataAggregateItem::normal, and zero_v3().
Referenced by aggregate_item_normal().
|
static |
Definition at line 576 of file MOD_weighted_normal.cc.
References BLI_assert, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, and MEMCPY_STRUCT_AFTER.
|
static |
Definition at line 53 of file MOD_weighted_normal.cc.
References ModePair::val.
Referenced by wn_corner_angle(), wn_face_area(), and wn_face_with_angle().
|
static |
Definition at line 475 of file MOD_weighted_normal.cc.
References BKE_id_copy_ex(), CD_CUSTOMLOOPNORMAL, CD_PROP_INT32, CD_SET_DEFAULT, CustomData_add_layer(), CustomData_get_layer_for_write(), CustomData_get_layer_named(), WeightedNormalModifierData::defgrp_name, faces, blender::bke::SpanAttributeWriter< T >::finish(), WeightedNormalModifierData::flag, float, LIB_ID_COPY_LOCALIZE, MEM_SAFE_FREE, MOD_get_vgroup(), MOD_WEIGHTEDNORMAL_INVERT_VGROUP, MOD_WEIGHTEDNORMAL_MODE_ANGLE, MOD_WEIGHTEDNORMAL_MODE_FACE, MOD_WEIGHTEDNORMAL_MODE_FACE_ANGLE, MOD_WEIGHTEDNORMALS_FACEWEIGHT_CDLAYER_ID, WeightedNormalModifierData::mode, ModifierEvalContext::object, result, blender::Span< T >::size(), blender::bke::SpanAttributeWriter< T >::span, WeightedNormalData::verts_num, WeightedNormalModifierData::weight, wn_corner_angle(), wn_face_area(), and wn_face_with_angle().
Definition at line 600 of file MOD_weighted_normal.cc.
References col, IFACE_, Panel::layout, modifier_panel_end(), modifier_panel_get_property_pointers(), modifier_vgroup_ui(), ptr, UI_ITEM_NONE, uiItemR(), uiLayoutColumn(), and uiLayoutSetPropSep().
Referenced by panel_register().
|
static |
Definition at line 624 of file MOD_weighted_normal.cc.
References eModifierType_WeightedNormal, modifier_panel_register(), and panel_draw().
|
static |
Definition at line 585 of file MOD_weighted_normal.cc.
References CD_MASK_CUSTOMLOOPNORMAL, CD_MASK_MDEFORMVERT, CD_MASK_PROP_INT32, WeightedNormalModifierData::defgrp_name, WeightedNormalModifierData::flag, CustomData_MeshMasks::lmask, MOD_WEIGHTEDNORMAL_FACE_INFLUENCE, CustomData_MeshMasks::pmask, and CustomData_MeshMasks::vmask.
|
static |
Definition at line 408 of file MOD_weighted_normal.cc.
References apply_weights_vertex_normal(), WeightedNormalData::corner_verts, blender::bke::mesh::face_angles_calc(), WeightedNormalData::faces, float, ModePair::index, M_PI, MEM_freeN(), MEM_malloc_arrayN, WeightedNormalData::mode_pair, modepair_cmp_by_val_inverse(), blender::Span< T >::size(), blender::Span< T >::slice(), ModePair::val, and WeightedNormalData::vert_positions.
Referenced by modify_mesh().
|
static |
Definition at line 387 of file MOD_weighted_normal.cc.
References apply_weights_vertex_normal(), WeightedNormalData::corner_verts, blender::bke::mesh::face_area_calc(), WeightedNormalData::faces, ModePair::index, MEM_malloc_arrayN, WeightedNormalData::mode_pair, modepair_cmp_by_val_inverse(), blender::Span< T >::slice(), ModePair::val, and WeightedNormalData::vert_positions.
Referenced by modify_mesh().
|
static |
Definition at line 441 of file MOD_weighted_normal.cc.
References apply_weights_vertex_normal(), WeightedNormalData::corner_verts, blender::bke::mesh::face_angles_calc(), blender::bke::mesh::face_area_calc(), WeightedNormalData::faces, float, M_PI, MEM_freeN(), MEM_malloc_arrayN, WeightedNormalData::mode_pair, modepair_cmp_by_val_inverse(), blender::Span< T >::size(), blender::Span< T >::slice(), ModePair::val, and WeightedNormalData::vert_positions.
Referenced by modify_mesh().
| ModifierTypeInfo modifierType_WeightedNormal |
Definition at line 629 of file MOD_weighted_normal.cc.