Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "DNA_curve_types.h"
#include "DNA_lattice_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "BKE_context.h"
#include "BKE_lattice.h"
#include "BKE_layer.h"
#include "DEG_depsgraph.h"
#include "ED_screen.h"
#include "WM_api.h"
#include "WM_types.h"
#include "lattice_intern.h"
Go to the source code of this file.
Functions | |
Make Regular Operator | |
static bool | make_regular_poll (bContext *C) |
static int | make_regular_exec (bContext *C, wmOperator *UNUSED(op)) |
void | LATTICE_OT_make_regular (wmOperatorType *ot) |
Flip Verts Operator | |
enum | eLattice_FlipAxes { LATTICE_FLIP_U = 0 , LATTICE_FLIP_V = 1 , LATTICE_FLIP_W = 2 } |
typedef enum eLattice_FlipAxes | eLattice_FlipAxes |
static void | lattice_flip_point_value (Lattice *lt, int u, int v, int w, float mid, eLattice_FlipAxes axis) |
static void | lattice_swap_point_pairs (Lattice *lt, int u, int v, int w, float mid, eLattice_FlipAxes axis) |
static int | lattice_flip_exec (bContext *C, wmOperator *op) |
void | LATTICE_OT_flip (wmOperatorType *ot) |
typedef enum eLattice_FlipAxes eLattice_FlipAxes |
enum eLattice_FlipAxes |
Enumerator | |
---|---|
LATTICE_FLIP_U | |
LATTICE_FLIP_V | |
LATTICE_FLIP_W |
Definition at line 114 of file editlattice_tools.c.
|
static |
Definition at line 196 of file editlattice_tools.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_view_layer(), CTX_wm_view3d(), Object::data, Lattice::def, DEG_id_tag_update(), Lattice::editlatt, float(), Object::id, ID_RECALC_GEOMETRY, EditLatt::latt, lattice_flip_point_value(), LATTICE_FLIP_U, LATTICE_FLIP_V, LATTICE_FLIP_W, lattice_swap_point_pairs(), MEM_freeN, NC_GEOM, ND_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, wmOperator::ptr, RNA_enum_get(), v, BPoint::vec, w(), and WM_event_add_notifier().
Referenced by LATTICE_OT_flip().
|
static |
Flip midpoint value so that relative distances between midpoint and neighbor-pair is maintained. Assumes that uvw <=> xyz (i.e. axis-aligned index-axes with coordinate-axes).
Definition at line 125 of file editlattice_tools.c.
References BKE_lattice_index_from_uvw(), Lattice::def, KDL::diff(), v, BPoint::vec, and w().
Referenced by lattice_flip_exec(), and lattice_swap_point_pairs().
void LATTICE_OT_flip | ( | wmOperatorType * | ot | ) |
Definition at line 328 of file editlattice_tools.c.
References wmOperatorType::description, ED_operator_editlattice(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, lattice_flip_exec(), LATTICE_FLIP_U, LATTICE_FLIP_V, LATTICE_FLIP_W, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_lattice().
void LATTICE_OT_make_regular | ( | wmOperatorType * | ot | ) |
Definition at line 92 of file editlattice_tools.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, make_regular_exec(), make_regular_poll(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_lattice().
|
static |
Swap pairs of lattice points along a specified axis.
Definition at line 143 of file editlattice_tools.c.
References BKE_lattice_index_from_uvw(), Lattice::def, lattice_flip_point_value(), LATTICE_FLIP_U, LATTICE_FLIP_V, LATTICE_FLIP_W, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, swap_v3_v3(), u1, v, v1, BPoint::vec, and w().
Referenced by lattice_flip_exec().
|
static |
Definition at line 50 of file editlattice_tools.c.
References BKE_lattice_resize(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_edit_object(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), Lattice::editlatt, FOREACH_SELECTED_OBJECT_BEGIN, FOREACH_SELECTED_OBJECT_END, Object::id, ID_RECALC_GEOMETRY, EditLatt::latt, MEM_freeN, NC_GEOM, ND_DATA, NULL, OB_LATTICE, OPERATOR_FINISHED, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, and WM_event_add_notifier().
Referenced by LATTICE_OT_make_regular().
Definition at line 38 of file editlattice_tools.c.
References C, CTX_data_active_object(), ED_operator_editlattice(), OB_LATTICE, and Object::type.
Referenced by LATTICE_OT_make_regular().