|
Blender
V2.93
|
#include "DNA_camera_types.h"#include "DNA_gpencil_modifier_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "MEM_guardedalloc.h"#include "BLI_linklist.h"#include "BLI_listbase.h"#include "BLI_math.h"#include "BLI_rect.h"#include "BLI_utildefines.h"#include "BKE_action.h"#include "BKE_camera.h"#include "BKE_context.h"#include "BKE_global.h"#include "BKE_gpencil_modifier.h"#include "BKE_idprop.h"#include "BKE_layer.h"#include "BKE_main.h"#include "BKE_modifier.h"#include "BKE_object.h"#include "BKE_report.h"#include "BKE_scene.h"#include "DEG_depsgraph.h"#include "DEG_depsgraph_query.h"#include "UI_resources.h"#include "GPU_matrix.h"#include "GPU_select.h"#include "GPU_state.h"#include "WM_api.h"#include "WM_types.h"#include "ED_object.h"#include "ED_screen.h"#include "DRW_engine.h"#include "RNA_access.h"#include "RNA_define.h"#include "view3d_intern.h"Go to the source code of this file.
Classes | |
| struct | SmoothView3DState |
| struct | SmoothView3DStore |
| struct | DrawSelectLoopUserData |
|
static |
Implement VIEW3D_SELECT_FILTER_OBJECT_MODE_LOCK.
Definition at line 952 of file view3d_view.c.
References BKE_object_is_mode_compat(), Object::mode, and user_data.
Referenced by view3d_opengl_select().
|
static |
Implement VIEW3D_SELECT_FILTER_WPAINT_POSE_MODE_LOCK for special case when we want to select pose bones (this doesn't switch modes).
Definition at line 962 of file view3d_view.c.
References BLI_linklist_index(), DEG_get_original_object(), and user_data.
Referenced by view3d_opengl_select().
|
static |
Definition at line 911 of file view3d_view.c.
References BLI_assert, data, DRW_SELECT_PASS_POST, DRW_SELECT_PASS_PRE, GPU_select_begin(), GPU_select_end(), GPU_SELECT_NEAREST_FIRST_PASS, GPU_SELECT_NEAREST_SECOND_PASS, DrawSelectLoopUserData::hits, stage, and user_data.
Referenced by view3d_opengl_select().
| bool ED_operator_rv3d_user_region_poll | ( | bContext * | C | ) |
Definition at line 684 of file view3d_view.c.
References C, and ED_view3d_context_user_region().
Referenced by VIEW3D_OT_object_as_camera(), VIEW3D_OT_view_axis(), VIEW3D_OT_view_camera(), VIEW3D_OT_view_orbit(), VIEW3D_OT_view_persportho(), and VIEW3D_OT_view_roll().
| void ED_view3d_local_collections_reset | ( | struct bContext * | C, |
| const bool | reset_all | ||
| ) |
Definition at line 1661 of file view3d_view.c.
References blender::compositor::area(), BKE_layer_collection_local_sync(), C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), DEG_id_tag_update(), View3D::flag, ID_RECALC_BASE_FLAGS, LISTBASE_FOREACH, View3D::local_collections_uuid, Main::screens, SPACE_VIEW3D, V3D_LOCAL_COLLECTIONS, and view3d_local_collections_reset().
Referenced by wm_open_mainfile__open().
See if current uuid is valid, otherwise set a valid uuid to v3d, Try to keep the same uuid previously used to allow users to quickly toggle back and forth.
Definition at line 1637 of file view3d_view.c.
References View3D::flag, free_localcollection_bit(), View3D::local_collections_uuid, reset(), V3D_LOCAL_COLLECTIONS, and view3d_local_collections_reset().
| eV3DSelectObjectFilter ED_view3d_select_filter_from_mode | ( | const Scene * | scene, |
| const Object * | obact | ||
| ) |
Definition at line 939 of file view3d_view.c.
References BKE_object_pose_armature_get(), Object::mode, OB_MODE_ALL_WEIGHT_PAINT, ToolSettings::object_flag, SCE_OBJECT_MODE_LOCK, scene, Scene::toolsettings, VIEW3D_SELECT_FILTER_NOP, VIEW3D_SELECT_FILTER_OBJECT_MODE_LOCK, and VIEW3D_SELECT_FILTER_WPAINT_POSE_MODE_LOCK.
| void ED_view3d_smooth_view | ( | bContext * | C, |
| View3D * | v3d, | ||
| ARegion * | region, | ||
| const int | smooth_viewtx, | ||
| const struct V3D_SmoothParams * | sview | ||
| ) |
Definition at line 306 of file view3d_view.c.
References blender::compositor::area(), C, CTX_data_ensure_evaluated_depsgraph(), CTX_wm_area(), CTX_wm_manager(), CTX_wm_window(), depsgraph, and ED_view3d_smooth_view_ex().
Referenced by sync_viewport_camera_smoothview(), and view3d_setobjectascamera_exec().
| void ED_view3d_smooth_view_ex | ( | const Depsgraph * | depsgraph, |
| wmWindowManager * | wm, | ||
| wmWindow * | win, | ||
| ScrArea * | area, | ||
| View3D * | v3d, | ||
| ARegion * | region, | ||
| const int | smooth_viewtx, | ||
| const V3D_SmoothParams * | sview | ||
| ) |
Definition at line 127 of file view3d_view.c.
References angle_signed_normalized_qtqt(), blender::compositor::area(), BLI_assert, CAM_ORTHO, V3D_SmoothParams::camera, V3D_SmoothParams::camera_old, copy_qt_qt(), copy_v3_v3(), Object::data, DEG_get_evaluated_object(), depsgraph, V3D_SmoothParams::dist, SmoothView3DState::dist, RegionView3D::dist, double(), SmoothView3DStore::dst, V3D_SmoothParams::dyn_ofs, SmoothView3DStore::dyn_ofs, ED_region_tag_redraw(), ED_view3d_camera_lock_init(), ED_view3d_camera_lock_sync(), ED_view3d_from_object(), ED_view3d_offset_distance(), equals_v3v3(), equals_v4v4(), fabsf, RegionView3D::is_persp, V3D_SmoothParams::lens, SmoothView3DState::lens, View3D::lens, M_PI, MEM_mallocN, NULL, OB_CAMERA, OB_RENDER, Object::obmat, V3D_SmoothParams::ofs, SmoothView3DState::ofs, RegionView3D::ofs, SmoothView3DStore::org, SmoothView3DStore::org_view, RegionView3D::persp, V3D_SmoothParams::quat, SmoothView3DState::quat, ARegion::regiondata, RegionView3D::render_engine, RegionView3D::rflag, RV3D_BOXVIEW, RV3D_LOCK_FLAGS, RV3D_LOCK_ROTATION, RV3D_NAVIGATING, RV3D_ORTHO, RV3D_PERSP, RV3D_VIEW_USER, View3D::shading, RegionView3D::smooth_timer, RegionView3D::sms, SmoothView3DStore::src, SmoothView3DStore::time_allowed, TIMER1, SmoothView3DStore::to_camera, Object::type, View3DShading::type, SmoothView3DStore::use_dyn_ofs, RegionView3D::view, view3d_boxview_copy(), VIEW3D_DIST_FALLBACK, view3d_orbit_apply_dyn_ofs(), view3d_smooth_view_state_backup(), view3d_smooth_view_state_restore(), RegionView3D::viewquat, WM_event_add_timer(), and WM_event_remove_timer().
Referenced by ED_view3d_smooth_view(), view3d_localview_exit(), and view3d_localview_init().
Apply the smooth-view immediately, use when we need to start a new view operation. (so we don't end up half-applying a view operation when pressing keys quickly).
Definition at line 428 of file view3d_view.c.
References C, CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), depsgraph, ED_view3d_update_viewmat(), NULL, ARegion::regiondata, scene, RegionView3D::sms, SmoothView3DStore::time_allowed, and view3d_smoothview_apply().
Referenced by view3d_from_minmax(), view_axis_exec(), view_camera_exec(), viewcenter_cursor_exec(), viewcenter_pick_invoke(), viewdolly_invoke(), viewmove_invoke(), vieworbit_exec(), viewroll_exec(), viewroll_invoke(), viewrotate_invoke(), and viewzoom_invoke().
|
static |
Definition at line 1568 of file view3d_view.c.
References blender::compositor::area(), bScreen::areabase, ListBase::first, View3D::flag, bScreen::id, View3D::local_collections_uuid, ID::next, SpaceLink::next, Main::screens, SPACE_VIEW3D, SpaceLink::spacetype, and V3D_LOCAL_COLLECTIONS.
Referenced by ED_view3d_local_collections_set().
Definition at line 1213 of file view3d_view.c.
References blender::compositor::area(), bScreen::areabase, ListBase::first, bScreen::id, View3D::local_view_uuid, View3D::localvd, ID::next, SpaceLink::next, Main::screens, SPACE_VIEW3D, and SpaceLink::spacetype.
Referenced by view3d_localview_init().
|
static |
Definition at line 1606 of file view3d_view.c.
References LayerCollection::flag, LAYER_COLLECTION_HIDE, LayerCollection::layer_collections, LISTBASE_FOREACH, and LayerCollection::local_collections_bits.
Referenced by view3d_local_collections_reset().
|
static |
Definition at line 1445 of file view3d_view.c.
References blender::compositor::area(), C, CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_area(), CTX_wm_manager(), CTX_wm_view3d(), CTX_wm_window(), DEG_id_tag_update(), DEG_id_type_tag(), depsgraph, ED_area_tag_redraw(), Scene::id, ID_OB, ID_RECALC_BASE_FLAGS, ID_RECALC_SELECT, View3D::localvd, NC_SCENE, ND_OB_SELECT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), scene, view3d_localview_exit(), view3d_localview_init(), WM_event_add_notifier(), and WM_operator_smooth_viewtx_get().
Referenced by VIEW3D_OT_localview().
|
static |
Definition at line 1506 of file view3d_view.c.
References BA_DESELECT, ViewLayer::basact, BASACT, BASE_SELECTED, BKE_report(), C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), DEG_id_tag_update(), DEG_on_visible_update(), ED_object_base_select(), FIRSTBASE, Scene::id, ID_RECALC_SELECT, View3D::local_view_uuid, NC_SCENE, ND_OB_ACTIVE, ND_OB_SELECT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, scene, and WM_event_add_notifier().
Referenced by VIEW3D_OT_localview_remove_from().
|
static |
Definition at line 1538 of file view3d_view.c.
References C, CTX_data_edit_object(), CTX_wm_view3d(), View3D::localvd, and NULL.
Referenced by VIEW3D_OT_localview_remove_from().
|
static |
Definition at line 773 of file view3d_view.c.
References invert_m4_m4(), mat4_normalized_to_quat(), normalize_m4_m4(), Object::obmat, RV3D_VIEW_USER, RegionView3D::view, RegionView3D::viewmat, and RegionView3D::viewquat.
Referenced by view3d_viewmatrix_set().
|
static |
Definition at line 576 of file view3d_view.c.
References blender::compositor::area(), C, View3D::camera, CTX_data_main(), RegionView3D::dist, ED_view3d_lastview_store(), ED_view3d_smooth_view(), ListBase::first, View3D::lens, NULL, RegionView3D::ofs, RegionView3D::persp, RGN_TYPE_WINDOW, RV3D_CAMOB, View3D::scenelock, Main::screens, SPACE_VIEW3D, and RegionView3D::viewquat.
Referenced by view3d_setobjectascamera_exec().
|
static |
Definition at line 465 of file view3d_view.c.
References BKE_object_tfm_protected_backup(), BKE_object_tfm_protected_restore(), C, View3D::camera, CTX_data_ensure_evaluated_depsgraph(), DEG_id_tag_update(), depsgraph, RegionView3D::dist, ED_view3d_context_user_region(), ED_view3d_lastview_store(), ED_view3d_to_object(), Object::id, ID_RECALC_TRANSFORM, NC_OBJECT, ND_TRANSFORM, RegionView3D::ofs, OPERATOR_FINISHED, RegionView3D::persp, Object::protectflag, ARegion::regiondata, RV3D_CAMOB, RegionView3D::viewquat, and WM_event_add_notifier().
Referenced by VIEW3D_OT_camera_to_view().
|
static |
Definition at line 493 of file view3d_view.c.
References C, View3D::camera, ED_view3d_context_user_region(), ID_IS_LINKED, RegionView3D::persp, ARegion::regiondata, RV3D_CAMOB, RV3D_LOCK_ANY_TRANSFORM, and RV3D_LOCK_FLAGS.
Referenced by VIEW3D_OT_camera_to_view().
|
static |
Definition at line 535 of file view3d_view.c.
References BKE_report(), C, Scene::camera, View3D::camera, CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_wm_view3d(), depsgraph, ED_view3d_camera_to_view_selected(), NC_OBJECT, ND_TRANSFORM, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, scene, and WM_event_add_notifier().
Referenced by VIEW3D_OT_camera_to_view_selected().
Definition at line 1621 of file view3d_view.c.
References LayerCollection::layer_collections, LISTBASE_FOREACH, local_collections_reset_uuid(), scene, Main::scenes, and Scene::view_layers.
Referenced by ED_view3d_local_collections_reset(), and ED_view3d_local_collections_set().
|
static |
Definition at line 1376 of file view3d_view.c.
References blender::compositor::area(), View3D::camera, RegionView3D::camzoom, depsgraph, RegionView3D::dist, ED_view3d_smooth_view_ex(), FIRSTBASE, LISTBASE_FOREACH, View3D::local_view_uuid, RegionView3D::localvd, View3D::localvd, MEM_freeN, NULL, RegionView3D::ofs, RegionView3D::persp, RGN_TYPE_WINDOW, RV3D_CAMOB, RegionView3D::view, and RegionView3D::viewquat.
Referenced by localview_exec().
|
static |
Definition at line 1245 of file view3d_view.c.
References blender::compositor::area(), BASE_SELECTED, BKE_object_minmax(), BKE_report(), View3D::camera, View3D::clip_start, depsgraph, ED_view3d_radius_to_dist(), ED_view3d_smooth_view_ex(), FIRSTBASE, FOREACH_BASE_IN_EDIT_MODE_BEGIN, FOREACH_BASE_IN_EDIT_MODE_END, free_localview_bit(), INIT_MINMAX, View3D::lens, Base::local_view_bits, View3D::local_view_uuid, RegionView3D::localvd, View3D::localvd, max, max_ff(), max_fff(), MEM_mallocN, mid_v3_v3v3(), min, negate_v3_v3(), Base::next, ARegion::next, NULL, OBEDIT_FROM_VIEW_LAYER, Base::object, RegionView3D::persp, Object::quat, ARegion::regiondata, ARegion::regiontype, RGN_TYPE_WINDOW, RPT_ERROR, RV3D_CAMOB, RV3D_ORTHO, RV3D_PERSP, size(), sub_v3_v3v3(), VIEW3D_MARGIN, and RegionView3D::viewquat.
Referenced by localview_exec().
| int view3d_opengl_select | ( | ViewContext * | vc, |
| uint * | buffer, | ||
| uint | bufsize, | ||
| const rcti * | input, | ||
| eV3DSelectMode | select_mode, | ||
| eV3DSelectObjectFilter | select_filter | ||
| ) |
Definition at line 975 of file view3d_view.c.
References BKE_gpencil_modifiers_get_virtual_modifierlist(), BKE_modifiers_get_virtual_modifierlist(), BLI_assert, BLI_linklist_prepend_alloca, BLI_rcti_init_pt_radius(), buffer, ViewContext::C, CTX_wm_manager(), depsgraph, ViewContext::depsgraph, DRW_draw_select_loop(), DRW_opengl_context_disable(), DRW_opengl_context_enable(), drw_select_filter_object_mode_lock(), drw_select_filter_object_mode_lock_for_weight_paint(), drw_select_loop_pass(), ED_view3d_draw_setup_view(), eGpencilModifierType_Armature, eModifierType_Armature, G, G_FLAG_PICKSEL, GPU_DEPTH_LESS_EQUAL, GPU_DEPTH_NONE, GPU_depth_test(), GPU_SELECT_ALL, GPU_select_begin(), GPU_select_cache_end(), GPU_select_cache_load_id(), GPU_select_end(), GPU_select_is_cached(), DrawSelectLoopUserData::gpu_select_mode, GPU_SELECT_NEAREST_FIRST_PASS, GPU_SELECT_PICK_ALL, GPU_SELECT_PICK_NEAREST, DrawSelectLoopUserData::hits, Object::mode, GpencilModifierData::next, ModifierData::next, NULL, OB_GPENCIL, OB_MODE_ALL_WEIGHT_PAINT, OB_MODE_OBJECT, OB_MODE_POSE, OB_WIRE, ViewContext::obact, ViewContext::obedit, OBEDIT_FROM_VIEW_LAYER, ArmatureGpencilModifierData::object, ArmatureModifierData::object, DrawSelectLoopUserData::pass, DrawSelectLoopUserData::rect, ViewContext::region, RGN_TYPE_WINDOW, ViewContext::rv3d, scene, ViewContext::scene, View3D::shading, SPACE_VIEW3D, GpencilModifierData::type, ModifierData::type, Object::type, View3DShading::type, UI_SetTheme(), UI_Theme_Restore(), UI_Theme_Store(), user_data, USER_GPU_FLAG_NO_DEPT_PICK, ViewContext::v3d, VIEW3D_SELECT_FILTER_NOP, VIEW3D_SELECT_FILTER_OBJECT_MODE_LOCK, VIEW3D_SELECT_FILTER_WPAINT_POSE_MODE_LOCK, VIEW3D_SELECT_PICK_ALL, VIEW3D_SELECT_PICK_NEAREST, ViewContext::view_layer, RegionView3D::viewmat, ViewContext::win, rcti::xmax, rcti::xmin, XRAY_ACTIVE, XRAY_ENABLED, and rcti::ymin.
Referenced by view3d_opengl_select_with_id_filter().
| void view3d_opengl_select_cache_begin | ( | void | ) |
Optionally cache data for multiple calls to view3d_opengl_select
just avoid GPU_select headers outside this file
Definition at line 892 of file view3d_view.c.
References GPU_select_cache_begin().
Referenced by get_nearest_editbonepoint(), and mixed_bones_object_selectbuffer().
| void view3d_opengl_select_cache_end | ( | void | ) |
Definition at line 897 of file view3d_view.c.
References GPU_select_cache_end().
Referenced by get_nearest_editbonepoint(), and mixed_bones_object_selectbuffer().
| int view3d_opengl_select_with_id_filter | ( | ViewContext * | vc, |
| uint * | buffer, | ||
| uint | bufsize, | ||
| const rcti * | input, | ||
| eV3DSelectMode | select_mode, | ||
| eV3DSelectObjectFilter | select_filter, | ||
| uint | select_id | ||
| ) |
Definition at line 1189 of file view3d_view.c.
References buffer, GPU_select_buffer_remove_by_id(), DrawSelectLoopUserData::hits, and view3d_opengl_select().
| void VIEW3D_OT_camera_to_view | ( | wmOperatorType * | ot | ) |
Definition at line 512 of file view3d_view.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, view3d_camera_to_view_exec(), and view3d_camera_to_view_poll().
Referenced by view3d_operatortypes().
| void VIEW3D_OT_camera_to_view_selected | ( | wmOperatorType * | ot | ) |
Definition at line 555 of file view3d_view.c.
References wmOperatorType::description, ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and view3d_camera_to_view_selected_exec().
Referenced by view3d_operatortypes().
| void VIEW3D_OT_localview | ( | wmOperatorType * | ot | ) |
Definition at line 1486 of file view3d_view.c.
References wmOperatorType::description, ED_operator_view3d_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, localview_exec(), wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by view3d_operatortypes().
| void VIEW3D_OT_localview_remove_from | ( | wmOperatorType * | ot | ) |
Definition at line 1548 of file view3d_view.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, localview_remove_from_exec(), localview_remove_from_poll(), wmOperatorType::name, OPTYPE_UNDO, ot, wmOperatorType::poll, and WM_operator_confirm().
Referenced by view3d_operatortypes().
| void VIEW3D_OT_object_as_camera | ( | wmOperatorType * | ot | ) |
Definition at line 692 of file view3d_view.c.
References wmOperatorType::description, ED_operator_rv3d_user_region_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and view3d_setobjectascamera_exec().
Referenced by view3d_operatortypes().
| void VIEW3D_OT_smoothview | ( | wmOperatorType * | ot | ) |
Definition at line 444 of file view3d_view.c.
References ED_operator_view3d_active(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_INTERNAL, ot, wmOperatorType::poll, and view3d_smoothview_invoke().
Referenced by view3d_operatortypes().
|
static |
Definition at line 632 of file view3d_view.c.
References C, Scene::camera, View3D::camera, CTX_data_active_object(), CTX_data_scene(), DEG_id_tag_update(), RegionView3D::dist, ED_view3d_context_user_region(), ED_view3d_lastview_store(), ED_view3d_smooth_view(), Scene::id, ID_RECALC_COPY_ON_WRITE, View3D::lens, NC_OBJECT, NC_SCENE, ND_DRAW, NULL, RegionView3D::ofs, OPERATOR_FINISHED, RegionView3D::persp, ARegion::regiondata, RV3D_CAMOB, scene, View3D::scenelock, sync_viewport_camera_smoothview(), V3D_CAMERA_SCENE, RegionView3D::viewquat, WM_event_add_notifier(), and WM_operator_smooth_viewtx_get().
Referenced by VIEW3D_OT_object_as_camera().
|
static |
Definition at line 105 of file view3d_view.c.
References copy_qt_qt(), copy_v3_v3(), SmoothView3DState::dist, RegionView3D::dist, SmoothView3DState::lens, View3D::lens, SmoothView3DState::ofs, RegionView3D::ofs, SmoothView3DState::quat, and RegionView3D::viewquat.
Referenced by ED_view3d_smooth_view_ex().
|
static |
Definition at line 115 of file view3d_view.c.
References copy_qt_qt(), copy_v3_v3(), SmoothView3DState::dist, RegionView3D::dist, SmoothView3DState::lens, View3D::lens, SmoothView3DState::ofs, RegionView3D::ofs, SmoothView3DState::quat, and RegionView3D::viewquat.
Referenced by ED_view3d_smooth_view_ex(), and view3d_smoothview_apply().
|
static |
Definition at line 321 of file view3d_view.c.
References C, CTX_data_ensure_evaluated_depsgraph(), CTX_wm_area(), CTX_wm_manager(), CTX_wm_window(), depsgraph, SmoothView3DState::dist, RegionView3D::dist, SmoothView3DStore::dst, wmTimer::duration, SmoothView3DStore::dyn_ofs, ED_region_tag_redraw(), ED_screen_animation_playing(), ED_view3d_camera_lock_autokey(), ED_view3d_camera_lock_sync(), float(), interp_qt_qtqt(), interp_v3_v3v3(), SmoothView3DState::lens, View3D::lens, MEM_freeN, NC_SPACE, ND_SPACE_VIEW3D, NULL, SmoothView3DState::ofs, RegionView3D::ofs, SmoothView3DStore::org, SmoothView3DStore::org_view, RegionView3D::persp, SmoothView3DState::quat, ARegion::regiondata, RegionView3D::rflag, RV3D_BOXVIEW, RV3D_CAMOB, RV3D_LOCK_FLAGS, RV3D_LOCK_ROTATION, RV3D_NAVIGATING, RegionView3D::smooth_timer, RegionView3D::sms, SmoothView3DStore::src, SmoothView3DStore::time_allowed, SmoothView3DStore::to_camera, SmoothView3DStore::use_dyn_ofs, RegionView3D::view, view3d_boxview_copy(), view3d_orbit_apply_dyn_ofs(), view3d_smooth_view_state_restore(), RegionView3D::viewquat, WM_event_add_mousemove(), WM_event_add_notifier(), and WM_event_remove_timer().
Referenced by ED_view3d_smooth_view_force_finish(), and view3d_smoothview_invoke().
|
static |
Definition at line 408 of file view3d_view.c.
References C, CTX_wm_region(), CTX_wm_view3d(), wmEvent::customdata, NULL, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, ARegion::regiondata, RegionView3D::smooth_timer, and view3d_smoothview_apply().
Referenced by VIEW3D_OT_smoothview().
| void view3d_viewmatrix_set | ( | Depsgraph * | depsgraph, |
| const Scene * | scene, | ||
| const View3D * | v3d, | ||
| RegionView3D * | rv3d, | ||
| const float | rect_scale[2] | ||
| ) |
Sets RegionView3D.viewmat
| depsgraph | Depsgraph. |
| scene | Scene for camera and cursor location. |
| v3d | View 3D space data. |
| rv3d | 3D region which stores the final matrices. |
| rect_scale | Optional 2D scale argument, Use when displaying a sub-region, eg: when view3d_winmatrix_set takes a 'rect' argument. |
Definition at line 798 of file view3d_view.c.
References BKE_pose_channel_find_name(), View3D::camera, copy_v3_v3(), Scene::cursor, DEG_get_evaluated_object(), depsgraph, RegionView3D::dist, ED_view3d_lock(), invert_m4_m4(), RegionView3D::is_persp, View3DCursor::location, mul_m4_m4m4(), mul_m4_v3(), mul_mat3_m4_v3(), mul_v2_v2fl(), OB_ARMATURE, View3D::ob_center, View3D::ob_center_bone, View3D::ob_center_cursor, Object::obmat, obmat_to_viewmat(), RegionView3D::ofs, RegionView3D::ofs_lock, RegionView3D::persp, Object::pose, bPoseChannel::pose_mat, quat_to_mat4(), RV3D_CAMOB, RV3D_LOCK_FLAGS, RV3D_LOCK_ROTATION, RV3D_PERSP, scene, translate_m4(), Object::type, RegionView3D::viewmat, RegionView3D::viewquat, and RegionView3D::winmat.
| void view3d_winmatrix_set | ( | Depsgraph * | depsgraph, |
| ARegion * | region, | ||
| const View3D * | v3d, | ||
| const rcti * | rect | ||
| ) |
| rect | optional for picking (can be NULL). |
Definition at line 716 of file view3d_view.c.
References BLI_rctf_size_x(), BLI_rctf_size_y(), depsgraph, ED_view3d_viewplane_get(), float(), GPU_matrix_frustum_set(), GPU_matrix_ortho_set(), GPU_matrix_projection_get, RegionView3D::is_persp, NULL, ARegion::regiondata, RegionView3D::winmat, ARegion::winx, ARegion::winy, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by ED_view3d_update_viewmat().