Blender
V3.3
|
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "DNA_armature_types.h"
#include "DNA_curve_types.h"
#include "DNA_lattice_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_meta_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"
#include "BLT_translation.h"
#include "BLI_array_utils.h"
#include "BLI_bitmap.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_action.h"
#include "BKE_armature.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_customdata.h"
#include "BKE_deform.h"
#include "BKE_editmesh.h"
#include "BKE_object.h"
#include "BKE_object_deform.h"
#include "BKE_report.h"
#include "BKE_screen.h"
#include "DEG_depsgraph.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
#include "ED_mesh.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "view3d_intern.h"
Go to the source code of this file.
Classes | |
struct | TransformMedian_Generic |
struct | TransformMedian_Mesh |
struct | TransformMedian_Curve |
struct | TransformMedian_Lattice |
union | TransformMedian |
struct | TransformProperties |
Macros | |
#define | TRANSFORM_MEDIAN_ARRAY_LEN (sizeof(TransformMedian) / sizeof(float)) |
#define | B_VGRP_PNL_EDIT_SINGLE 8 /* or greater */ |
Enumerations | |
enum | { B_REDR = 2 , B_TRANSFORM_PANEL_MEDIAN = 1008 , B_TRANSFORM_PANEL_DIMS = 1009 } |
#define B_VGRP_PNL_EDIT_SINGLE 8 /* or greater */ |
Definition at line 1267 of file view3d_buttons.c.
#define TRANSFORM_MEDIAN_ARRAY_LEN (sizeof(TransformMedian) / sizeof(float)) |
Definition at line 105 of file view3d_buttons.c.
anonymous enum |
Enumerator | |
---|---|
B_REDR | |
B_TRANSFORM_PANEL_MEDIAN | |
B_TRANSFORM_PANEL_DIMS |
Definition at line 62 of file view3d_buttons.c.
|
static |
Apply helpers.
Definition at line 227 of file view3d_buttons.c.
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 232 of file view3d_buttons.c.
References add_v3_v3(), and copy_v3_v3().
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 245 of file view3d_buttons.c.
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 256 of file view3d_buttons.c.
Referenced by v3d_editvertex_buts().
Definition at line 195 of file view3d_buttons.c.
References CLAMP.
Referenced by v3d_editvertex_buts().
Definition at line 1682 of file view3d_buttons.c.
References B_REDR, B_TRANSFORM_PANEL_DIMS, B_TRANSFORM_PANEL_MEDIAN, C, CTX_data_view_layer(), CTX_wm_area(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), ED_area_tag_redraw(), ID_RECALC_GEOMETRY, NC_SPACE, ND_SPACE_VIEW3D, NULL, OBACT, v3d_editvertex_buts(), v3d_object_dimension_buts(), and WM_event_add_notifier().
Referenced by view3d_panel_transform().
Definition at line 1269 of file view3d_buttons.c.
References B_VGRP_PNL_EDIT_SINGLE, ViewLayer::basact, C, CTX_data_view_layer(), Object::data, DEG_id_tag_update(), ED_vgroup_vert_active_mirror(), ID_RECALC_GEOMETRY, NC_GEOM, ND_DATA, Base::object, and WM_event_add_notifier().
Referenced by view3d_panel_vgroup().
|
static |
Definition at line 113 of file view3d_buttons.c.
References B_TRANSFORM_PANEL_MEDIAN, BLI_array_findindex, BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_SELECT, BM_ITER_MESH_INDEX, BM_mesh_partial_create_from_verts_group_single(), BM_VERTS_OF_MESH, MEM_freeN, NULL, params, and BMesh::totvert.
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 153 of file view3d_buttons.c.
References BM_mesh_partial_destroy(), NULL, and user_data.
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 165 of file view3d_buttons.c.
References BKE_editmesh_looptri_and_normals_calc_with_partial(), C, CTX_wm_view3d(), NULL, TransformProperties::tag_for_update, user_data, and v3d_transform_props_ensure().
Referenced by v3d_editvertex_buts().
Definition at line 1760 of file view3d_buttons.c.
References C, ED_collection_hide_menu_draw(), and Menu::layout.
Referenced by view3d_buttons_register().
Definition at line 1597 of file view3d_buttons.c.
References bArmature::act_edbone, BONE_CONNECTED, col, Object::data, EditBone::flag, bArmature::id, IFACE_, EditBone::layer, bArmature::layer, NULL, EditBone::parent, RNA_pointer_create(), RNA_pointer_get(), uiItemL(), uiItemR(), and uiLayoutColumn().
Referenced by view3d_panel_transform().
Definition at line 1631 of file view3d_buttons.c.
References col, Object::data, MetaBall::id, IFACE_, MetaBall::lastelem, MB_BALL, MB_CUBE, MB_ELIPSOID, MB_PLANE, MB_TUBE, NULL, ptr, RNA_enum_get(), RNA_pointer_create(), uiItemL(), uiItemR(), and uiLayoutColumn().
Referenced by view3d_panel_transform().
Definition at line 284 of file view3d_buttons.c.
References Freestyle::a, add_v2_v2(), add_v3_v3(), apply_raw_diff(), apply_raw_diff_v3(), apply_scale_factor(), apply_scale_factor_clamp(), B_REDR, B_TRANSFORM_PANEL_MEDIAN, TransformMedian_Curve::b_weight, TransformMedian_Mesh::be_weight, BKE_curve_editNurbs_get(), BKE_nurb_handles_test(), BKE_nurb_project_2d(), BLI_assert, BMEditMesh::bm, bm, BM_EDGES_OF_MESH, BM_ELEM_CD_GET_FLOAT, BM_ELEM_CD_GET_VOID_P, BM_elem_flag_test, BM_ELEM_SELECT, BM_ITER_MESH, BM_mesh_cd_flag_ensure(), BM_VERTS_OF_MESH, TransformMedian_Mesh::bv_weight, Freestyle::c, CD_BWEIGHT, CD_CREASE, CD_MVERT_SKIN, BMVert::co, compute_scale_factor(), copy_vn_fl(), CU_BEZIER, CU_IS_2D, TransformMedian::curve, CustomData_get_offset(), Object::data, Lattice::def, DEG2RADF, TransformMedian_Mesh::e_crease, BMesh::edata, Mesh::edit_mesh, Lattice::editlatt, editmesh_partial_update_begin_fn(), editmesh_partial_update_end_fn(), editmesh_partial_update_update_fn(), ELEM, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, View3D::flag, float(), TransformMedian::generic, Curve::id, Lattice::id, IFACE_, Object::imat, invert_m4_m4(), EditLatt::latt, TransformMedian::lattice, len_squared_v3(), LISTBASE_FOREACH, TransformMedian_Generic::location, TransformMedian_Mesh::location, TransformMedian_Curve::location, TransformMedian_Lattice::location, ME_CDFLAG_EDGE_BWEIGHT, ME_CDFLAG_EDGE_CREASE, ME_CDFLAG_VERT_BWEIGHT, ME_CDFLAG_VERT_CREASE, TransformMedian::mesh, mul_m4_v3(), mul_v3_fl(), NULL, OB_CURVES_LEGACY, OB_LATTICE, OB_MESH, OB_SURF, Object::obmat, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, PROP_UNIT_LENGTH, PROP_UNIT_ROTATION, TransformMedian_Curve::radius, BezTriple::radius, BPoint::radius, MVertSkin::radius, RNA_pointer_create(), RNA_TRANSLATION_PREC_DEFAULT, SELECT, TransformMedian_Mesh::skin, sub_vn_vnvn(), TransformProperties::tag_for_update, TransformMedian_Curve::tilt, BezTriple::tilt, BPoint::tilt, tilt_limit, TIP_, BMesh::totedgesel, BMesh::totvertsel, TRANSFORM_MEDIAN_ARRAY_LEN, Object::type, UI_block_align_begin(), UI_block_align_end(), UI_block_interaction_set(), UI_BTYPE_LABEL, UI_BTYPE_NUM, UI_BTYPE_TOGGLE, UI_BTYPE_TOGGLE_N, UI_but_number_precision_set(), UI_but_number_step_size_set(), UI_but_unit_type_set(), UI_DPI_FAC, uiDefBut(), uiDefButBitS(), uiDefButF(), uiDefButR(), uiLayoutAbsoluteBlock(), V3D_GLOBAL_STATS, v3d_transform_props_ensure(), TransformMedian_Mesh::v_crease, BMesh::vdata, TransformProperties::ve_median, BezTriple::vec, BPoint::vec, TransformMedian_Curve::weight, TransformMedian_Lattice::weight, BezTriple::weight, and BPoint::weight.
Referenced by do_view3d_region_buttons(), and view3d_panel_transform().
|
static |
Definition at line 1195 of file view3d_buttons.c.
References B_TRANSFORM_PANEL_DIMS, BKE_object_dimensions_get(), BKE_object_dimensions_set_ex(), BLI_assert, C, copy_m4_m4(), copy_v3_v3(), Object::id, IFACE_, NULL, TransformProperties::ob_dims, TransformProperties::ob_dims_orig, TransformProperties::ob_obmat_orig, TransformProperties::ob_scale_orig, Object::obmat, PROP_UNIT_LENGTH, RNA_id_pointer_create(), RNA_property_update(), RNA_struct_find_property(), Object::scale, UI_block_align_begin(), UI_block_align_end(), UI_BTYPE_LABEL, UI_BTYPE_NUM, UI_but_number_precision_set(), UI_but_number_step_size_set(), UI_but_unit_type_set(), UI_DPI_FAC, uiDefBut(), uiDefButF(), uiLayoutAbsoluteBlock(), and v3d_transform_props_ensure().
Referenced by do_view3d_region_buttons(), and view3d_panel_transform().
Definition at line 1574 of file view3d_buttons.c.
References BKE_pose_channel_active_if_layer_visible(), col, Object::id, IFACE_, RNA_pointer_create(), uiItemL(), uiLayoutColumn(), and v3d_transform_butsR().
Referenced by view3d_panel_transform().
|
static |
Definition at line 1467 of file view3d_buttons.c.
References BONE_CONNECTED, PointerRNA::data, Bone::flag, IFACE_, NULL, Bone::parent, ptr, RNA_boolean_get(), RNA_enum_get(), RNA_pointer_get(), ROT_MODE_AXISANGLE, ROT_MODE_QUAT, blender::io::alembic::split(), PointerRNA::type, UI_EMBOSS_NONE_OR_STATUS, UI_ITEM_R_ICON_ONLY, UI_ITEM_R_TOGGLE, uiItemL(), uiItemR(), uiLayoutColumn(), uiLayoutSetActive(), uiLayoutSetEmboss(), and uiLayoutSplit().
Referenced by v3d_posearmature_buts(), and view3d_panel_transform().
|
static |
Definition at line 274 of file view3d_buttons.c.
References MEM_callocN, NULL, View3D_Runtime::properties_storage, and View3D::runtime.
Referenced by editmesh_partial_update_update_fn(), v3d_editvertex_buts(), and v3d_object_dimension_buts().
void view3d_buttons_register | ( | ARegionType * | art | ) |
Definition at line 1765 of file view3d_buttons.c.
References BLI_addtail(), BLT_I18NCONTEXT_DEFAULT_BPYRNA, PanelType::category, MenuType::draw, PanelType::draw, hide_collections_menu_draw(), PanelType::idname, MenuType::idname, PanelType::label, MenuType::label, MEM_callocN, N_, ARegionType::paneltypes, PanelType::poll, PanelType::translation_context, MenuType::translation_context, view3d_panel_transform(), view3d_panel_transform_poll(), view3d_panel_vgroup(), view3d_panel_vgroup_poll(), and WM_menutype_add().
Referenced by ED_spacetype_view3d().
|
static |
Definition at line 1797 of file view3d_buttons.c.
References BKE_report(), C, CTX_data_active_object(), CTX_wm_window(), ED_object_mode_set(), ELEM, Object::mode, NULL, OB_ARMATURE, OB_MODE_EDIT, OB_MODE_OBJECT, OB_MODE_POSE, OPERATOR_CANCELLED, wmOperator::reports, RPT_WARNING, Object::type, and UI_pie_menu_invoke().
Referenced by VIEW3D_OT_object_mode_pie_or_toggle().
void VIEW3D_OT_object_mode_pie_or_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 1813 of file view3d_buttons.c.
References ED_operator_view3d_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, and view3d_object_mode_menu().
Referenced by view3d_operatortypes().
Definition at line 1717 of file view3d_buttons.c.
References ViewLayer::basact, C, col, CTX_data_view_layer(), CTX_wm_view3d(), do_view3d_region_buttons(), ELEM, Object::id, Panel::layout, Object::mode, NULL, OB_ARMATURE, OB_CURVES, OB_MBALL, OB_MODE_POSE, OB_POINTCLOUD, OB_TYPE_SUPPORT_EDITMODE, OB_VOLUME, OBEDIT_FROM_OBACT, Base::object, RNA_id_pointer_create(), Object::type, UI_block_func_handle_set(), uiLayoutColumn(), uiLayoutGetBlock(), v3d_editarmature_buts(), v3d_editmetaball_buts(), v3d_editvertex_buts(), v3d_object_dimension_buts(), v3d_posearmature_buts(), and v3d_transform_butsR().
Referenced by view3d_buttons_register().
Definition at line 1711 of file view3d_buttons.c.
References ViewLayer::basact, C, CTX_data_view_layer(), and NULL.
Referenced by view3d_buttons_register().
Definition at line 1297 of file view3d_buttons.c.
References B_VGRP_PNL_EDIT_SINGLE, ViewLayer::basact, BKE_defvert_find_index(), BKE_object_defgroup_active_index_get(), BKE_object_defgroup_list(), BKE_object_defgroup_subset_from_select_type(), C, col, CTX_data_scene(), CTX_data_view_layer(), DG_LOCK_WEIGHT, do_view3d_vgroup_buttons(), ED_mesh_active_dvert_get_only(), ListBase::first, bDeformGroup::flag, Panel::layout, MEM_freeN, bDeformGroup::name, bDeformGroup::next, NULL, Base::object, ot, RNA_int_set(), RNA_pointer_create(), scene, blender::io::alembic::split(), TIP_, Scene::toolsettings, MDeformVert::totweight, UI_block_func_handle_set(), UI_BTYPE_BUT, UI_BTYPE_NUM, UI_BUT_DISABLED, UI_but_drawflag_enable(), UI_but_flag_enable(), UI_BUT_INACTIVE, UI_but_number_precision_set(), UI_but_number_step_size_set(), UI_but_operator_ptr_get(), UI_BUT_TEXT_LEFT, UI_BUT_TEXT_RIGHT, UI_ITEM_R_EXPAND, UI_UNIT_X, UI_UNIT_Y, uiDefButF(), uiDefButO_ptr(), uiItemFullO(), uiItemR(), uiLayoutAbsoluteBlock(), uiLayoutColumn(), uiLayoutRow(), uiLayoutSetEnabled(), uiLayoutSplit(), ToolSettings::vgroupsubset, MDeformWeight::weight, WM_OP_EXEC_DEFAULT, WM_OP_INVOKE_DEFAULT, WM_operatortype_find(), and x.
Referenced by view3d_buttons_register().
Definition at line 1283 of file view3d_buttons.c.
References BKE_object_is_in_editmode_vgroup(), BKE_object_is_in_wpaint_select_vert(), C, CTX_data_view_layer(), ED_mesh_active_dvert_get_only(), OBACT, and MDeformVert::totweight.
Referenced by view3d_buttons_register().