|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BKE_context.hh"#include "BKE_editmesh.hh"#include "BKE_object_types.hh"#include "BKE_scene.hh"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_math_vector.h"#include "ED_gizmo_library.hh"#include "ED_gizmo_utils.hh"#include "ED_mesh.hh"#include "ED_object.hh"#include "ED_screen.hh"#include "ED_undo.hh"#include "ED_view3d.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "WM_api.hh"#include "WM_types.hh"#include "UI_resources.hh"#include "mesh_intern.hh"Go to the source code of this file.
Classes | |
| struct | GizmoPlacementGroup |
Creation gizmos.
Definition in file editmesh_add_gizmo.cc.
|
static |
Definition at line 308 of file editmesh_add_gizmo.cc.
References BKE_editmesh_from_object(), CTX_data_edit_object(), Object::data, ED_mesh_uv_ensure(), EDBM_op_call_and_selectf(), EDBM_selectmode_flush_ex(), EDBM_update(), invert_m4_m4(), mul_m4_m4m4(), OPERATOR_CANCELLED, OPERATOR_FINISHED, params, wmOperator::ptr, RNA_boolean_get(), RNA_property_float_get_array(), RNA_property_is_set(), RNA_struct_find_property(), Object::runtime, and SCE_SELECT_VERTEX.
Referenced by add_primitive_cube_gizmo_invoke(), and MESH_OT_primitive_cube_add_gizmo().
|
static |
Definition at line 356 of file editmesh_add_gizmo.cc.
References add_primitive_cube_gizmo_exec(), CTX_data_main(), CTX_wm_view3d(), View3D::gizmo_flag, OPERATOR_FINISHED, ret, V3D_GIZMO_HIDE, WM_gizmo_group_type_ensure_ptr(), WM_gizmo_group_type_reinit_ptr(), and WM_gizmogrouptype_find().
Referenced by MESH_OT_primitive_cube_add_gizmo().
|
static |
When we place a shape, pick a plane.
We may base this choice on context, for now pick the "ground" based on the 3D cursor's dominant plane pointing down relative to the view.
Definition at line 54 of file editmesh_add_gizmo.cc.
References axis_dominant_v3_single(), copy_m3_m3(), copy_v3_v3(), CTX_data_scene(), CTX_wm_region(), dot_v3v3(), ED_view3d_win_to_3d_on_plane(), is_negative_m3(), negate_v3(), plane_from_point_normal_v3(), swap_v3_v3(), and RegionView3D::viewinv.
Referenced by gizmo_mesh_placement_modal_from_setup().
|
static |
Definition at line 274 of file editmesh_add_gizmo.cc.
References GizmoPlacementGroup::context, wmGizmoGroup::customdata, GizmoPlacementGroup::data, gizmo_mesh_placement_update_from_op(), wmOperator::next, GizmoPlacementGroup::op, and WM_operator_last_redo().
Referenced by MESH_GGT_add_bounds().
|
static |
Definition at line 185 of file editmesh_add_gizmo.cc.
References GizmoPlacementGroup::cage, calc_initial_placement_point_from_view(), copy_m4_m3(), copy_v3_v3(), CTX_wm_region(), CTX_wm_window(), wmGizmoGroup::customdata, ED_GIZMO_CAGE3D_PART_SCALE_MAX_X_MAX_Y_MAX_Z, wmWindow::eventstate, float, wmGizmo::matrix_basis, wmGizmo::matrix_offset, wmGizmoGroup::parent_gzmap, WM_gizmo_modal_set_from_setup(), wmEvent::xy, and zero_m4().
Referenced by gizmo_mesh_placement_setup().
|
static |
Definition at line 179 of file editmesh_add_gizmo.cc.
References ED_gizmo_poll_or_unlink_delayed_from_operator().
Referenced by MESH_GGT_add_bounds().
|
static |
Definition at line 230 of file editmesh_add_gizmo.cc.
References GizmoPlacementGroup::cage, wmGizmo::color, GizmoPlacementGroup::context, wmGizmoGroup::customdata, GizmoPlacementGroup::data, ED_GIZMO_CAGE_XFORM_FLAG_SCALE, ED_GIZMO_CAGE_XFORM_FLAG_SCALE_SIGNED, ED_GIZMO_CAGE_XFORM_FLAG_TRANSLATE, gizmo_mesh_placement_modal_from_setup(), gizmo_mesh_placement_update_from_op(), gizmo_placement_prop_matrix_get(), gizmo_placement_prop_matrix_set(), wmOperatorType::idname, MEM_callocN, GizmoPlacementGroup::op, params, GizmoPlacementGroup::prop_matrix, wmGizmo::ptr, wmOperator::ptr, RNA_enum_set(), RNA_struct_find_property(), STREQ, TH_GIZMO_PRIMARY, wmOperator::type, UI_GetThemeColor3fv(), WM_GIZMO_DRAW_VALUE, WM_gizmo_new_ptr(), WM_gizmo_set_flag(), WM_gizmo_target_property_def_func(), WM_gizmotype_find(), and WM_operator_last_redo().
Referenced by MESH_GGT_add_bounds().
|
static |
Definition at line 129 of file editmesh_add_gizmo.cc.
References GizmoPlacementGroup::cage, GizmoPlacementGroup::data, wmGizmo::matrix_offset, GizmoPlacementGroup::op, GizmoPlacementGroup::prop_matrix, wmOperator::ptr, RNA_property_float_get_array(), and UNUSED_VARS.
Referenced by gizmo_mesh_placement_draw_prepare(), and gizmo_mesh_placement_setup().
|
static |
Definition at line 121 of file editmesh_add_gizmo.cc.
References GizmoPlacementGroup::context, GizmoPlacementGroup::data, ED_undo_operator_repeat(), GizmoPlacementGroup::op, and WM_operator_last_redo().
Referenced by gizmo_placement_prop_matrix_set().
|
static |
Definition at line 140 of file editmesh_add_gizmo.cc.
References wmGizmoPropertyType::array_length, BLI_assert, GizmoPlacementGroup::cage, wmGizmoGroup::customdata, GizmoPlacementGroup::data, wmGizmo::matrix_basis, wmGizmo::matrix_offset, mul_m4_m4m4(), GizmoPlacementGroup::op, wmGizmo::parent_gzgroup, GizmoPlacementGroup::prop_matrix, wmOperator::ptr, RNA_property_float_get_array(), wmGizmoProperty::type, and UNUSED_VARS_NDEBUG.
Referenced by gizmo_mesh_placement_setup().
|
static |
Definition at line 157 of file editmesh_add_gizmo.cc.
References wmGizmoPropertyType::array_length, BLI_assert, GizmoPlacementGroup::cage, wmGizmoGroup::customdata, GizmoPlacementGroup::data, gizmo_placement_exec(), is_negative_m4(), wmGizmo::matrix_basis, mul_m4_m4m4(), negate_mat3_m4(), GizmoPlacementGroup::op, wmGizmo::parent_gzgroup, GizmoPlacementGroup::prop_matrix, wmOperator::ptr, RNA_property_float_set_array(), wmGizmoProperty::type, and UNUSED_VARS_NDEBUG.
Referenced by gizmo_mesh_placement_setup().
|
static |
Definition at line 283 of file editmesh_add_gizmo.cc.
References wmGizmoGroupType::draw_prepare, wmGizmoGroupType::flag, gizmo_mesh_placement_draw_prepare(), gizmo_mesh_placement_poll(), gizmo_mesh_placement_setup(), wmGizmoGroupType::gzmap_params, wmGizmoGroupType::idname, wmGizmoGroupType::name, wmGizmoGroupType::poll, wmGizmoMapType_Params::regionid, RGN_TYPE_WINDOW, wmGizmoGroupType::setup, SPACE_VIEW3D, wmGizmoMapType_Params::spaceid, and WM_GIZMOGROUPTYPE_3D.
Referenced by MESH_OT_primitive_cube_add_gizmo().
| void MESH_OT_primitive_cube_add_gizmo | ( | wmOperatorType * | ot | ) |
Definition at line 375 of file editmesh_add_gizmo.cc.
References blender::ed::object::add_generic_props(), blender::ed::object::add_mesh_props(), add_primitive_cube_gizmo_exec(), add_primitive_cube_gizmo_invoke(), wmOperatorType::description, ED_operator_editmesh_view3d(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, MESH_GGT_add_bounds(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_float_matrix(), RNA_def_property_flag(), wmOperatorType::srna, and WM_gizmogrouptype_append().
Referenced by ED_operatortypes_mesh().