|
Blender V4.3
|
#include <cfloat>#include <cmath>#include <cstdio>#include <cstring>#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.hh"#include "BLI_array_utils.h"#include "BLI_bitmap.h"#include "BLI_blenlib.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_utildefines.h"#include "BKE_action.hh"#include "BKE_armature.hh"#include "BKE_context.hh"#include "BKE_curve.hh"#include "BKE_customdata.hh"#include "BKE_deform.hh"#include "BKE_editmesh.hh"#include "BKE_layer.hh"#include "BKE_mesh_types.hh"#include "BKE_object.hh"#include "BKE_object_deform.h"#include "BKE_object_types.hh"#include "BKE_report.hh"#include "BKE_screen.hh"#include "DEG_depsgraph.hh"#include "WM_api.hh"#include "WM_types.hh"#include "RNA_access.hh"#include "RNA_prototypes.hh"#include "ED_mesh.hh"#include "ED_object.hh"#include "ED_object_vgroup.hh"#include "ED_screen.hh"#include "ANIM_bone_collections.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "view3d_intern.hh"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 1247 of file view3d_buttons.cc.
Referenced by do_view3d_vgroup_buttons(), and view3d_panel_vgroup().
| #define TRANSFORM_MEDIAN_ARRAY_LEN (sizeof(TransformMedian) / sizeof(float)) |
Definition at line 115 of file view3d_buttons.cc.
Referenced by v3d_editvertex_buts().
| anonymous enum |
| Enumerator | |
|---|---|
| B_REDR | |
| B_TRANSFORM_PANEL_MEDIAN | |
| B_TRANSFORM_PANEL_DIMS | |
Definition at line 71 of file view3d_buttons.cc.
|
static |
Apply helpers.
Definition at line 234 of file view3d_buttons.cc.
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 239 of file view3d_buttons.cc.
References add_v3_v3(), and copy_v3_v3().
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 252 of file view3d_buttons.cc.
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 263 of file view3d_buttons.cc.
Referenced by v3d_editvertex_buts().
Definition at line 202 of file view3d_buttons.cc.
References CLAMP.
Referenced by v3d_editvertex_buts().
Definition at line 1679 of file view3d_buttons.cc.
References B_REDR, B_TRANSFORM_PANEL_DIMS, B_TRANSFORM_PANEL_MEDIAN, BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), CTX_data_scene(), 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, v3d_editvertex_buts(), v3d_object_dimension_buts(), and WM_event_add_notifier().
Referenced by view3d_panel_transform().
Definition at line 1249 of file view3d_buttons.cc.
References B_VGRP_PNL_EDIT_SINGLE, BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), CTX_data_scene(), CTX_data_view_layer(), Object::data, DEG_id_tag_update(), ID_RECALC_GEOMETRY, NC_GEOM, ND_DATA, blender::ed::object::vgroup_vert_active_mirror(), and WM_event_add_notifier().
Referenced by view3d_panel_vgroup().
|
static |
Definition at line 123 of file view3d_buttons.cc.
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, BMPartialUpdate_Params::do_tessellate, MEM_freeN(), params, and BMesh::totvert.
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 161 of file view3d_buttons.cc.
References BM_mesh_partial_destroy().
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 173 of file view3d_buttons.cc.
References BKE_editmesh_looptris_and_normals_calc_with_partial(), CTX_wm_view3d(), TransformProperties::tag_for_update, and v3d_transform_props_ensure().
Referenced by v3d_editvertex_buts().
Definition at line 1761 of file view3d_buttons.cc.
References blender::ed::object::collection_hide_menu_draw(), and Menu::layout.
Referenced by view3d_buttons_register().
|
static |
Definition at line 1281 of file view3d_buttons.cc.
References BKE_defvert_find_index(), BKE_view_layer_active_object_get(), CTX_data_view_layer(), CTX_wm_view3d(), ED_mesh_active_dvert_get_only(), POINTER_AS_INT, v3d_transform_props_ensure(), TransformProperties::vertex_weights, and MDeformWeight::weight.
Referenced by view3d_panel_vgroup().
Definition at line 1598 of file view3d_buttons.cc.
References bArmature::act_edbone, ANIM_bonecoll_is_visible_editbone(), BONE_CONNECTED, col, Object::data, EditBone::flag, bArmature::id, IFACE_, EditBone::parent, RNA_pointer_create(), RNA_pointer_get(), UI_ITEM_NONE, uiItemL(), uiItemR(), and uiLayoutColumn().
Referenced by view3d_panel_transform().
Definition at line 1631 of file view3d_buttons.cc.
References col, Object::data, MetaBall::id, IFACE_, MetaBall::lastelem, MB_BALL, MB_CUBE, MB_ELIPSOID, MB_PLANE, MB_TUBE, ptr, RNA_enum_get(), RNA_pointer_create(), UI_ITEM_NONE, uiItemL(), uiItemR(), and uiLayoutColumn().
Referenced by view3d_panel_transform().
Definition at line 298 of file view3d_buttons.cc.
References 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, uiBlockInteraction_CallbackData::begin_fn, BKE_curve_editNurbs_get(), BKE_nurb_handles_test(), BKE_nurb_project_2d(), BLI_assert, bm, BMEditMesh::bm, BM_data_layer_add_named(), 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_VERTS_OF_MESH, TransformMedian_Mesh::bv_weight, CD_MVERT_SKIN, CD_PROP_FLOAT, BMVert::co, compute_scale_factor(), copy_vn_fl(), CU_BEZIER, CU_IS_2D, TransformMedian::curve, CustomData_get_offset(), CustomData_get_offset_named(), CustomData_has_layer_named(), Object::data, Lattice::def, DEG2RADF, TransformMedian_Mesh::e_crease, BMesh::edata, 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_, invert_m4_m4(), EditLatt::latt, TransformMedian::lattice, len_squared_v3(), LISTBASE_FOREACH, TransformMedian_Curve::location, TransformMedian_Generic::location, TransformMedian_Lattice::location, TransformMedian_Mesh::location, TransformMedian::mesh, mul_m4_v3(), mul_v3_fl(), NURB_HANDLE_TEST_EACH, OB_CURVES_LEGACY, OB_LATTICE, OB_MESH, OB_SURF, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, PROP_UNIT_LENGTH, PROP_UNIT_ROTATION, BezTriple::radius, BPoint::radius, MVertSkin::radius, TransformMedian_Curve::radius, RNA_pointer_create(), RNA_TRANSLATION_PREC_DEFAULT, Object::runtime, SELECT, TransformMedian_Mesh::skin, sub_vn_vnvn(), TransformProperties::tag_for_update, BezTriple::tilt, BPoint::tilt, TransformMedian_Curve::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_SCALE_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, BezTriple::weight, BPoint::weight, TransformMedian_Curve::weight, and TransformMedian_Lattice::weight.
Referenced by do_view3d_region_buttons(), and view3d_panel_transform().
|
static |
Definition at line 1180 of file view3d_buttons.cc.
References B_TRANSFORM_PANEL_DIMS, BKE_object_dimensions_eval_cached_get(), BKE_object_dimensions_set_ex(), BLI_assert, copy_m4_m4(), copy_v3_v3(), FLT_MAX, Object::id, IFACE_, TransformProperties::ob_dims, TransformProperties::ob_dims_orig, TransformProperties::ob_obmat_orig, TransformProperties::ob_scale_orig, 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_SCALE_FAC, uiDefBut(), uiDefButF(), uiLayoutAbsoluteBlock(), and v3d_transform_props_ensure().
Referenced by do_view3d_region_buttons(), and view3d_panel_transform().
Definition at line 1576 of file view3d_buttons.cc.
References BKE_pose_channel_active_if_bonecoll_visible(), col, Object::id, IFACE_, RNA_pointer_create(), uiItemL(), uiLayoutColumn(), and v3d_transform_butsR().
Referenced by view3d_panel_transform().
|
static |
Definition at line 1469 of file view3d_buttons.cc.
References BONE_CONNECTED, PointerRNA::data, Bone::flag, IFACE_, Bone::parent, ptr, RNA_boolean_get(), RNA_enum_get(), RNA_pointer_get(), ROT_MODE_AXISANGLE, ROT_MODE_QUAT, split(), PointerRNA::type, UI_EMBOSS_NONE_OR_STATUS, UI_ITEM_NONE, 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 281 of file view3d_buttons.cc.
References MEM_callocN, View3D_Runtime::properties_storage, View3D_Runtime::properties_storage_free, and View3D::runtime.
Referenced by editmesh_partial_update_update_fn(), update_active_vertex_weight(), v3d_editvertex_buts(), v3d_object_dimension_buts(), and view3d_panel_vgroup().
| void view3d_buttons_register | ( | ARegionType * | art | ) |
Definition at line 1766 of file view3d_buttons.cc.
References BLI_addtail(), BLT_I18NCONTEXT_DEFAULT_BPYRNA, PanelType::category, MenuType::draw, PanelType::draw, hide_collections_menu_draw(), MenuType::idname, PanelType::idname, MenuType::label, PanelType::label, MEM_callocN, N_, ARegionType::paneltypes, PanelType::poll, STRNCPY, MenuType::translation_context, PanelType::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 1798 of file view3d_buttons.cc.
References BKE_report(), CTX_data_active_object(), CTX_wm_window(), ELEM, Object::mode, blender::ed::object::mode_set(), 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 1814 of file view3d_buttons.cc.
References ED_operator_view3d_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, ot, wmOperatorType::poll, and view3d_object_mode_menu_exec().
Referenced by view3d_operatortypes().
Definition at line 1718 of file view3d_buttons.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), col, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), do_view3d_region_buttons(), ELEM, FLT_MAX, Object::id, Panel::layout, Object::mode, OB_ARMATURE, OB_CURVES, OB_MBALL, OB_MODE_POSE, OB_POINTCLOUD, OB_TYPE_SUPPORT_EDITMODE, OB_VOLUME, OBEDIT_FROM_OBACT, 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 1710 of file view3d_buttons.cc.
References BKE_view_layer_active_base_get(), BKE_view_layer_synced_ensure(), CTX_data_scene(), and CTX_data_view_layer().
Referenced by view3d_buttons_register().
Definition at line 1293 of file view3d_buttons.cc.
References B_VGRP_PNL_EDIT_SINGLE, BKE_defvert_find_index(), BKE_object_defgroup_active_index_get(), BKE_object_defgroup_list(), BKE_object_defgroup_subset_from_select_type(), BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), BLI_listbase_count(), col, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), DG_LOCK_WEIGHT, do_view3d_vgroup_buttons(), ED_mesh_active_dvert_get_only(), ListBase::first, bDeformGroup::flag, IFACE_, Panel::layout, MEM_freeN(), bDeformGroup::name, bDeformGroup::next, ot, POINTER_FROM_INT, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), RNA_int_set(), RNA_pointer_create(), TIP_, 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_func_set(), UI_BUT_INACTIVE, UI_but_number_precision_set(), UI_but_number_step_size_set(), UI_but_operator_ptr_ensure(), UI_BUT_TEXT_LEFT, UI_BUT_TEXT_RIGHT, UI_ITEM_NONE, UI_ITEM_R_EXPAND, UI_UNIT_X, UI_UNIT_Y, uiDefButF(), uiDefButO_ptr(), uiItemFullO(), uiItemR(), uiLayoutAbsoluteBlock(), uiLayoutColumn(), uiLayoutRow(), uiLayoutSetEnabled(), uiLayoutSplit(), update_active_vertex_weight(), v3d_transform_props_ensure(), TransformProperties::vertex_weights, 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 1265 of file view3d_buttons.cc.
References BKE_object_is_in_editmode_vgroup(), BKE_object_is_in_wpaint_select_vert(), BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), CTX_data_scene(), CTX_data_view_layer(), ED_mesh_active_dvert_get_only(), and MDeformVert::totweight.
Referenced by view3d_buttons_register().