Blender
V3.3
|
#include <limits.h>
#include "BLI_utildefines.h"
#include "BLI_alloca.h"
#include "BLI_bitmap.h"
#include "BLI_math.h"
#include "BLT_translation.h"
#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_context.h"
#include "BKE_lib_query.h"
#include "BKE_mesh.h"
#include "BKE_screen.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
#include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_query.h"
#include "MEM_guardedalloc.h"
#include "MOD_modifiertypes.h"
#include "MOD_ui_common.h"
#include "BLI_strict_flags.h"
Go to the source code of this file.
Classes | |
struct | ScrewVertConnect |
struct | ScrewVertIter |
Macros | |
#define | SV_UNUSED (UINT_MAX) |
#define | SV_INVALID ((UINT_MAX)-1) |
#define | SV_IS_VALID(v) ((v) < SV_INVALID) |
Typedefs | |
typedef struct ScrewVertConnect | ScrewVertConnect |
typedef struct ScrewVertIter | ScrewVertIter |
Functions | |
static void | initData (ModifierData *md) |
static void | screwvert_iter_init (ScrewVertIter *iter, ScrewVertConnect *array, uint v_init, uint dir) |
static void | screwvert_iter_step (ScrewVertIter *iter) |
static Mesh * | mesh_remove_doubles_on_axis (Mesh *result, MVert *mvert_new, const uint totvert, const uint step_tot, const float axis_vec[3], const float axis_offset[3], const float merge_threshold) |
static Mesh * | modifyMesh (ModifierData *md, const ModifierEvalContext *ctx, Mesh *meshData) |
static void | updateDepsgraph (ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) |
static void | foreachIDLink (ModifierData *md, Object *ob, IDWalkFunc walk, void *userData) |
static void | panel_draw (const bContext *UNUSED(C), Panel *panel) |
static void | normals_panel_draw (const bContext *UNUSED(C), Panel *panel) |
static void | panelRegister (ARegionType *region_type) |
Variables | |
ModifierTypeInfo | modifierType_Screw |
Definition at line 72 of file MOD_screw.c.
#define SV_IS_VALID | ( | v | ) | ((v) < SV_INVALID) |
Definition at line 73 of file MOD_screw.c.
Definition at line 71 of file MOD_screw.c.
typedef struct ScrewVertConnect ScrewVertConnect |
typedef struct ScrewVertIter ScrewVertIter |
|
static |
Definition at line 1058 of file MOD_screw.c.
References IDWALK_CB_NOP, and ScrewModifierData::ob_axis.
|
static |
Definition at line 44 of file MOD_screw.c.
References BLI_assert, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, and MEMCPY_STRUCT_AFTER.
|
static |
Definition at line 114 of file MOD_screw.c.
References add_v3_v3(), BKE_mesh_merge_verts(), BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, BLI_BITMAP_TEST, copy_v3_v3(), copy_vn_i(), len_squared_v3v3(), MEM_freeN, MEM_malloc_arrayN, MESH_MERGE_VERTS_DUMP_IF_MAPPED, NULL, project_v3_v3v3_normalized(), result, square_f(), and sub_v3_v3v3().
Referenced by modifyMesh().
|
static |
Definition at line 177 of file MOD_screw.c.
References add_v3_v3(), angle(), ScrewModifierData::angle, angle_v3v3(), ScrewModifierData::axis, axis_angle_normalized_to_mat3(), axis_angle_to_mat3_single(), BKE_mesh_new_nomain_from_template(), BLI_array_alloca, BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, BLI_BITMAP_TEST, CD_CALLOC, CD_MLOOPUV, CD_ORIGINDEX, closest_to_line_v3(), MVert::co, ScrewVertConnect::co, copy_m3_m4(), copy_m4_m3(), copy_m4_m4(), copy_v2_fl2(), copy_v3_v3(), MEdge::crease, cross_v3_v3v3(), CustomData_add_layer(), CustomData_copy_data(), CustomData_get_layer(), CustomData_get_layer_n(), CustomData_has_layer(), CustomData_number_of_layers(), ScrewVertConnect::dist, dist_signed_squared_to_plane_v3(), dist_signed_to_plane_v3(), e, MLoop::e, ScrewVertConnect::e, ScrewVertIter::e, fabsf, ModifierEvalContext::flag, MEdge::flag, MPoly::flag, ScrewModifierData::flag, ScrewVertConnect::flag, float(), i1, invert_m4_m4(), ScrewModifierData::iter, Mesh::ldata, len_v3(), len_v3v3(), MPoly::loopstart, M_PI, madd_v3_v3fl(), MPoly::mat_nr, max_ff(), ME_EDGEDRAW, ME_EDGERENDER, ME_LOOSEEDGE, ME_SMOOTH, Mesh::medge, MEM_freeN, MEM_malloc_arrayN, ScrewModifierData::merge_dist, mesh, mesh_remove_doubles_on_axis(), min_ff(), Mesh::mloop, MOD_APPLY_RENDER, MOD_SCREW_MERGE, MOD_SCREW_NORMAL_CALC, MOD_SCREW_NORMAL_FLIP, MOD_SCREW_OBJECT_OFFSET, MOD_SCREW_SMOOTH_SHADING, MOD_SCREW_UV_STRETCH_U, MOD_SCREW_UV_STRETCH_V, Mesh::mpoly, mul_m4_m4m4(), mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_m3v3(), Mesh::mvert, normalize_v3(), NULL, ScrewModifierData::ob_axis, ModifierEvalContext::object, Object::obmat, ORIGINDEX_NONE, Mesh::pdata, plane_from_point_normal_v3(), ScrewModifierData::render_steps, result, ScrewModifierData::screw_ofs, screwvert_iter_init(), screwvert_iter_step(), sqrtf_signed(), ScrewModifierData::steps, sub_v3_v3(), sub_v3_v3v3(), SV_INVALID, SV_IS_VALID, SV_UNUSED, SWAP, Mesh::totedge, MPoly::totloop, Mesh::totpoly, Mesh::totvert, UINT_MAX, MLoopUV::uv, v, MLoop::v, ScrewVertConnect::v, ScrewVertIter::v, v1, MEdge::v1, v2, MEdge::v2, ScrewVertIter::v_poin, Mesh::vdata, and zero_v3().
Definition at line 1118 of file MOD_screw.c.
References col, Panel::layout, modifier_panel_get_property_pointers(), NULL, ptr, uiItemR(), uiLayoutColumn(), and uiLayoutSetPropSep().
Referenced by panelRegister().
Definition at line 1065 of file MOD_screw.c.
References col, IFACE_, Panel::layout, modifier_panel_end(), modifier_panel_get_property_pointers(), NULL, ptr, RNA_boolean_get(), RNA_pointer_get(), RNA_pointer_is_null(), UI_ITEM_R_EXPAND, UI_ITEM_R_FORCE_BLANK_DECORATE, UI_ITEM_R_TOGGLE, uiItemR(), uiItemS(), uiLayoutColumn(), uiLayoutRow(), uiLayoutRowWithHeading(), uiLayoutSetActive(), and uiLayoutSetPropSep().
Referenced by panelRegister().
|
static |
Definition at line 1133 of file MOD_screw.c.
References eModifierType_Screw, modifier_panel_register(), modifier_subpanel_register(), normals_panel_draw(), NULL, and panel_draw().
|
static |
Definition at line 75 of file MOD_screw.c.
References ScrewVertConnect::e, ScrewVertIter::e, NULL, SV_IS_VALID, ScrewVertConnect::v, ScrewVertIter::v, ScrewVertIter::v_array, ScrewVertIter::v_other, and ScrewVertIter::v_poin.
Referenced by modifyMesh().
|
static |
Definition at line 94 of file MOD_screw.c.
References ScrewVertConnect::e, ScrewVertIter::e, NULL, SV_IS_VALID, ScrewVertConnect::v, ScrewVertIter::v, ScrewVertIter::v_array, ScrewVertIter::v_other, and ScrewVertIter::v_poin.
Referenced by modifyMesh().
|
static |
Definition at line 1049 of file MOD_screw.c.
References DEG_add_modifier_to_transform_relation(), DEG_add_object_relation(), DEG_OB_COMP_TRANSFORM, ModifierUpdateDepsgraphContext::node, NULL, and ScrewModifierData::ob_axis.
ModifierTypeInfo modifierType_Screw |
Definition at line 1140 of file MOD_screw.c.