|
Blender V4.5
|
#include <cfloat>#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_bit_vector.hh"#include "BLI_listbase.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_string.h"#include "BLI_utildefines.h"#include "BLI_vector.hh"#include "BKE_action.hh"#include "BKE_armature.hh"#include "BKE_context.hh"#include "BKE_curve.hh"#include "BKE_curves.hh"#include "BKE_customdata.hh"#include "BKE_deform.hh"#include "BKE_editmesh.hh"#include "BKE_layer.hh"#include "BKE_library.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_curves.hh"#include "ED_grease_pencil.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 |
| struct | TransformMedian_GreasePencil |
| struct | TransformMedian_Curves |
| 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 } |
Functions | |
| static TransformProperties * | v3d_transform_props_ensure (View3D *v3d) |
| static float | compute_scale_factor (const float ve_median, const float median) |
| static void | apply_raw_diff (float *val, const int tot, const float ve_median, const float median) |
| static void | apply_raw_diff_v3 (float val[3], const int tot, const float ve_median[3], const float median[3]) |
| static void | apply_scale_factor (float *val, const int tot, const float ve_median, const float median, const float sca) |
| static void | apply_scale_factor_clamp (float *val, const int tot, const float ve_median, const float sca) |
| static void | v3d_editvertex_buts (const bContext *C, uiLayout *layout, View3D *v3d, Object *ob, float lim) |
| static void | v3d_object_dimension_buts (bContext *C, uiLayout *layout, View3D *v3d, Object *ob) |
| static void | do_view3d_vgroup_buttons (bContext *C, void *, int event) |
| static bool | view3d_panel_vgroup_poll (const bContext *C, PanelType *) |
| static void | update_active_vertex_weight (bContext *C, void *arg1, void *) |
| static void | view3d_panel_vgroup (const bContext *C, Panel *panel) |
| static void | v3d_transform_butsR (uiLayout *layout, PointerRNA *ptr) |
| static void | v3d_posearmature_buts (uiLayout *layout, Object *ob) |
| static void | v3d_editarmature_buts (uiLayout *layout, Object *ob) |
| static void | v3d_editmetaball_buts (uiLayout *layout, Object *ob) |
| static void | do_view3d_region_buttons (bContext *C, void *, int event) |
| static bool | view3d_panel_transform_poll (const bContext *C, PanelType *) |
| static void | view3d_panel_transform (const bContext *C, Panel *panel) |
| static void | hide_collections_menu_draw (const bContext *C, Menu *menu) |
| void | view3d_buttons_register (ARegionType *art) |
| static wmOperatorStatus | view3d_object_mode_menu_exec (bContext *C, wmOperator *op) |
| void | VIEW3D_OT_object_mode_pie_or_toggle (wmOperatorType *ot) |
Edit Mesh Partial Updates | |
| static void * | editmesh_partial_update_begin_fn (bContext *, const uiBlockInteraction_Params *params, void *arg1) |
| static void | editmesh_partial_update_end_fn (bContext *, const uiBlockInteraction_Params *, void *, void *user_data) |
| static void | editmesh_partial_update_update_fn (bContext *C, const uiBlockInteraction_Params *, void *arg1, void *user_data) |
| #define B_VGRP_PNL_EDIT_SINGLE 8 /* or greater */ |
Definition at line 1383 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 129 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 75 of file view3d_buttons.cc.
|
static |
Apply helpers.
Definition at line 246 of file view3d_buttons.cc.
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 251 of file view3d_buttons.cc.
References add_v3_v3(), and copy_v3_v3().
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 264 of file view3d_buttons.cc.
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 275 of file view3d_buttons.cc.
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 214 of file view3d_buttons.cc.
References CLAMP.
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 1787 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(), C, 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().
|
static |
Definition at line 1385 of file view3d_buttons.cc.
References B_VGRP_PNL_EDIT_SINGLE, BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, 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 137 of file view3d_buttons.cc.
References B_TRANSFORM_PANEL_MEDIAN, BLI_array_findindex, 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_normals, BMPartialUpdate_Params::do_tessellate, i, params, and BMesh::totvert.
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 173 of file view3d_buttons.cc.
References BM_mesh_partial_destroy().
Referenced by v3d_editvertex_buts().
|
static |
Definition at line 185 of file view3d_buttons.cc.
References BKE_editmesh_looptris_and_normals_calc_with_partial(), C, CTX_wm_view3d(), TransformProperties::tag_for_update, and v3d_transform_props_ensure().
Referenced by v3d_editvertex_buts().
Definition at line 1869 of file view3d_buttons.cc.
References C, blender::ed::object::collection_hide_menu_draw(), and Menu::layout.
Referenced by view3d_buttons_register().
|
static |
Definition at line 1417 of file view3d_buttons.cc.
References BKE_defvert_find_index(), BKE_view_layer_active_object_get(), C, 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 1706 of file view3d_buttons.cc.
References bArmature::act_edbone, ANIM_bonecoll_is_visible_editbone(), BONE_CONNECTED, col, uiLayout::column(), Object::data, EditBone::flag, bArmature::id, IFACE_, uiLayout::label(), EditBone::parent, RNA_pointer_create_discrete(), RNA_pointer_get(), and UI_ITEM_NONE.
Referenced by view3d_panel_transform().
Definition at line 1739 of file view3d_buttons.cc.
References col, uiLayout::column(), Object::data, MetaBall::id, IFACE_, uiLayout::label(), MetaBall::lastelem, MB_BALL, MB_CUBE, MB_ELIPSOID, MB_PLANE, MB_TUBE, ptr, RNA_enum_get(), RNA_pointer_create_discrete(), and UI_ITEM_NONE.
Referenced by view3d_panel_transform().
|
static |
Definition at line 309 of file view3d_buttons.cc.
References uiLayout::absolute_block(), add_v2_v2(), add_v3_v3(), apply_raw_diff(), apply_raw_diff_v3(), apply_scale_factor(), apply_scale_factor_clamp(), uiBlockInteraction_CallbackData::arg1, 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, C, CD_MVERT_SKIN, CD_PROP_FLOAT, BMVert::co, compute_scale_factor(), copy_vn_fl(), CTX_data_scene(), CU_BEZIER, CU_IS_2D, TransformMedian::curve, TransformMedian::curves, CustomData_get_offset(), CustomData_get_offset_named(), CustomData_has_layer_named(), Object::data, Lattice::def, DEG2RADF, blender::ed::greasepencil::MutableDrawingInfo::drawing, TransformMedian_Mesh::e_crease, Lattice::editlatt, editmesh_partial_update_begin_fn(), editmesh_partial_update_end_fn(), editmesh_partial_update_update_fn(), ELEM, uiBlockInteraction_CallbackData::end_fn, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, View3D::flag, IndexMask::foreach_index(), TransformMedian::generic, Curves::geometry, i, Curve::id, Lattice::id, IFACE_, Span< T >::index_range(), invert_m4_m4(), IndexMask::is_empty(), EditLatt::latt, TransformMedian::lattice, len_squared_v3(), LISTBASE_FOREACH, TransformMedian_Curve::location, TransformMedian_Curves::location, TransformMedian_Generic::location, TransformMedian_GreasePencil::location, TransformMedian_Lattice::location, TransformMedian_Mesh::location, TransformMedian::mesh, mul_m4_v3(), mul_v3_fl(), NURB_HANDLE_TEST_EACH, OB_CURVES, OB_CURVES_LEGACY, OB_GREASE_PENCIL, OB_LATTICE, OB_MESH, OB_SURF, blender::threading::parallel_for_each(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, PROP_UNIT_LENGTH, PROP_UNIT_ROTATION, BezTriple::radius, BPoint::radius, MVertSkin::radius, TransformMedian_Curve::radius, blender::ed::greasepencil::retrieve_editable_drawings(), RNA_pointer_create_discrete(), RNA_TRANSLATION_PREC_DEFAULT, Mesh::runtime, Object::runtime, SELECT, IndexMask::size(), TransformMedian_Mesh::skin, blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::strokes_for_write(), sub_vn_vnvn(), TransformProperties::tag_for_update, blender::bke::greasepencil::Drawing::tag_positions_changed(), BezTriple::tilt, BPoint::tilt, TransformMedian_Curve::tilt, tilt_limit, TIP_, 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(), uiBlockInteraction_CallbackData::update_fn, V3D_GLOBAL_STATS, v3d_transform_props_ensure(), TransformMedian_Mesh::v_crease, 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 1312 of file view3d_buttons.cc.
References uiLayout::absolute_block(), B_TRANSFORM_PANEL_DIMS, BKE_object_dimensions_eval_cached_get(), BKE_object_dimensions_set_ex(), BLI_assert, C, copy_m4_m4(), copy_v3_v3(), FLT_MAX, i, Object::id, ID_IS_EDITABLE, 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_disable(), UI_but_number_precision_set(), UI_but_number_step_size_set(), UI_but_unit_type_set(), UI_SCALE_FAC, uiDefBut(), uiDefButF(), and v3d_transform_props_ensure().
Referenced by do_view3d_region_buttons(), and view3d_panel_transform().
Definition at line 1684 of file view3d_buttons.cc.
References BKE_pose_channel_active_if_bonecoll_visible(), col, uiLayout::column(), Object::id, IFACE_, uiLayout::label(), RNA_pointer_create_discrete(), and v3d_transform_butsR().
Referenced by view3d_panel_transform().
|
static |
Definition at line 1590 of file view3d_buttons.cc.
References BONE_CONNECTED, PointerRNA::data, Bone::flag, IFACE_, uiLayout::label(), blender::ui::NoneOrStatus, Bone::parent, uiLayout::prop(), ptr, RNA_boolean_get(), RNA_enum_get(), RNA_pointer_get(), ROT_MODE_AXISANGLE, ROT_MODE_QUAT, split(), uiLayout::split(), UI_ITEM_NONE, UI_ITEM_R_ICON_ONLY, UI_ITEM_R_TOGGLE, uiLayoutSetActive(), and uiLayoutSetEmboss().
Referenced by v3d_posearmature_buts(), and view3d_panel_transform().
|
static |
Definition at line 293 of file view3d_buttons.cc.
References 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 1874 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 1906 of file view3d_buttons.cc.
References BKE_report(), C, 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 1922 of file view3d_buttons.cc.
References ED_operator_view3d_active(), ot, and view3d_object_mode_menu_exec().
Referenced by view3d_operatortypes().
Definition at line 1826 of file view3d_buttons.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), C, col, uiLayout::column(), 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(), 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 1818 of file view3d_buttons.cc.
References BKE_view_layer_active_base_get(), BKE_view_layer_synced_ensure(), C, CTX_data_scene(), and CTX_data_view_layer().
Referenced by view3d_buttons_register().
Definition at line 1429 of file view3d_buttons.cc.
References uiLayout::absolute_block(), 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(), C, col, uiLayout::column(), 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, i, IFACE_, Panel::layout, MEM_freeN(), bDeformGroup::name, bDeformGroup::next, uiLayout::op(), ot, POINTER_FROM_INT, uiLayout::prop(), Vector< T, InlineBufferCapacity, Allocator >::resize(), RNA_int_set(), RNA_pointer_create_discrete(), uiLayout::row(), 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_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(), uiLayoutSetEnabled(), 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 1401 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(), C, CTX_data_scene(), CTX_data_view_layer(), ED_mesh_active_dvert_get_only(), and MDeformVert::totweight.
Referenced by view3d_buttons_register().