Blender V2.61 - r43446
|
#include <string.h>
#include <stdio.h>
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "BKE_object.h"
#include "BKE_context.h"
#include "BKE_screen.h"
#include "ED_space_api.h"
#include "ED_screen.h"
#include "ED_object.h"
#include "BIF_gl.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RE_engine.h"
#include "RNA_access.h"
#include "UI_resources.h"
#include "view3d_intern.h"
Go to the source code of this file.
Definition in file space_view3d.c.
void ED_spacetype_view3d | ( | void | ) |
Definition at line 1145 of file space_view3d.c.
References BKE_spacetype_register(), BKE_ST_MAXNAME, BLI_addhead(), SpaceType::context, ARegionType::cursor, ARegionType::draw, SpaceType::dropboxes, ARegionType::duplicate, SpaceType::duplicate, ED_KEYMAP_FRAMES, ED_KEYMAP_GPENCIL, ED_KEYMAP_HEADER, ED_KEYMAP_UI, ED_KEYMAP_VIEW2D, ARegionType::free, SpaceType::free, HEADERY, ARegionType::init, SpaceType::init, SpaceType::keymap, ARegionType::keymapflag, ARegionType::listener, SpaceType::listener, ARegionType::lock, MEM_callocN(), SpaceType::name, SpaceType::new, SpaceType::operatortypes, ARegionType::prefsizex, ARegionType::prefsizey, ARegionType::regionid, SpaceType::regiontypes, RGN_TYPE_HEADER, RGN_TYPE_TOOL_PROPS, RGN_TYPE_TOOLS, RGN_TYPE_UI, RGN_TYPE_WINDOW, SPACE_VIEW3D, space_view3d_listener(), SpaceType::spaceid, view3d_buttons_area_draw(), view3d_buttons_area_init(), view3d_buttons_area_listener(), view3d_buttons_register(), view3d_context(), view3d_dropboxes(), view3d_duplicate(), view3d_free(), view3d_header_area_draw(), view3d_header_area_init(), view3d_header_area_listener(), view3d_init(), view3d_keymap(), view3d_main_area_cursor(), view3d_main_area_draw(), view3d_main_area_duplicate(), view3d_main_area_free(), view3d_main_area_init(), view3d_main_area_listener(), view3d_new(), view3d_operatortypes(), view3d_props_area_listener(), view3d_tool_props_register(), view3d_tools_area_draw(), view3d_tools_area_init(), and view3d_toolshelf_register().
Referenced by ED_spacetypes_init().
RegionView3D* ED_view3d_context_rv3d | ( | bContext * | C | ) | [read] |
Definition at line 139 of file space_view3d.c.
References BKE_area_find_region_type(), CTX_wm_area(), CTX_wm_region_view3d(), NULL, ARegion::regiondata, RGN_TYPE_WINDOW, SPACE_VIEW3D, and ScrArea::spacetype.
Referenced by add_nurbs_primitive(), extrude_repeat_mesh_invoke(), render_border_exec(), screw_mesh_invoke(), sort_faces_exec(), spin_exec(), spin_invoke(), and spin_mesh_invoke().
Definition at line 157 of file space_view3d.c.
References CTX_wm_area(), CTX_wm_region(), ListBase::first, ARegion::next, NULL, RegionView3D::persp, ScrArea::regionbase, ARegion::regiondata, ARegion::regiontype, RGN_TYPE_WINDOW, RV3D_CAMOB, RV3D_PERSP, SPACE_VIEW3D, ScrArea::spacedata, ScrArea::spacetype, and RegionView3D::viewlock.
Referenced by ED_operator_rv3d_user_region_poll(), screen_opengl_render_init(), view3d_camera_user_poll(), view3d_center_camera_exec(), view3d_setobjectascamera_exec(), view3d_zoom_1_to_1_camera_exec(), viewnumpad_exec(), vieworbit_exec(), and viewpersportho_exec().
void ED_view3d_init_mats_rv3d | ( | struct Object * | ob, |
struct RegionView3D * | rv3d | ||
) |
Definition at line 222 of file space_view3d.c.
References ED_view3d_local_clipping(), mult_m4_m4m4(), Object::obmat, RegionView3D::persmat, RegionView3D::persmatob, RegionView3D::viewmat, and RegionView3D::viewmatob.
Referenced by armature_circle_select(), do_lasso_select_curve(), do_lasso_select_lattice(), do_lasso_select_mesh(), do_lattice_box_select(), do_mesh_box_select(), do_nurbs_box_select(), ED_view3d_init_mats_rv3d_gl(), findnearestedge(), findnearestface(), findnearestLattvert(), findnearestNurbvert(), findnearestvert(), lattice_circle_select(), mesh_circle_select(), nurbscurve_circle_select(), pose_circle_select(), sculpt_stroke_test_start(), and xsortvert_flag().
void ED_view3d_init_mats_rv3d_gl | ( | struct Object * | ob, |
struct RegionView3D * | rv3d | ||
) |
Definition at line 232 of file space_view3d.c.
References ED_view3d_init_mats_rv3d(), glMultMatrixf, and Object::obmat.
Referenced by draw_object().
static void space_view3d_listener | ( | struct ScrArea * | sa, |
struct wmNotifier * | wmn | ||
) | [static] |
Definition at line 994 of file space_view3d.c.
References View3D::bgpicbase, BKE_image_user_calc_frame(), wmNotifier::category, RenderData::cfra, wmNotifier::data, View3D::drawtype, ED_area_tag_redraw_regiontype(), ListBase::first, View3D::flag2, BGpic::ima, BGpic::iuser, NC_MATERIAL, NC_SCENE, NC_WORLD, ND_FRAME, ND_NODES, ND_WORLD, ND_WORLD_DRAW, BGpic::next, OB_TEXTURE, Scene::r, wmNotifier::reference, RGN_TYPE_WINDOW, ScrArea::spacedata, and V3D_RENDER_OVERRIDE.
Referenced by ED_spacetype_view3d().
Definition at line 871 of file space_view3d.c.
References ED_region_panels(), and NULL.
Referenced by ED_spacetype_view3d().
static void view3d_buttons_area_init | ( | wmWindowManager * | wm, |
ARegion * | ar | ||
) | [static] |
Definition at line 861 of file space_view3d.c.
References wmWindowManager::defaultconf, ED_region_panels_init(), ARegion::handlers, SPACE_VIEW3D, WM_event_add_keymap_handler(), and WM_keymap_find().
Referenced by ED_spacetype_view3d().
static void view3d_buttons_area_listener | ( | ARegion * | ar, |
wmNotifier * | wmn | ||
) | [static] |
Definition at line 876 of file space_view3d.c.
References wmNotifier::action, wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), NA_EDITED, NA_RENAME, NC_ANIMATION, NC_BRUSH, NC_GEOM, NC_ID, NC_OBJECT, NC_SCENE, NC_SCREEN, NC_SPACE, NC_TEXTURE, ND_BONE_ACTIVE, ND_BONE_SELECT, ND_DATA, ND_DRAW, ND_FRAME, ND_GPENCIL, ND_KEYFRAME, ND_KEYFRAME_PROP, ND_KEYS, ND_LAYER, ND_LAYER_CONTENT, ND_MODE, ND_MODIFIER, ND_NLA, ND_NLA_ACTCHANGE, ND_OB_ACTIVE, ND_OB_SELECT, ND_OB_VISIBLE, ND_POSE, ND_SELECT, ND_SPACE_VIEW3D, ND_TOOLSETTINGS, and ND_TRANSFORM.
Referenced by ED_spacetype_view3d().
static int view3d_context | ( | const bContext * | C, |
const char * | member, | ||
bContextDataResult * | result | ||
) | [static] |
Definition at line 1046 of file space_view3d.c.
References Scene::basact, Scene::base, CTX_data_dir(), CTX_data_dir_set(), CTX_data_equals(), CTX_data_id_list_add(), CTX_data_id_pointer_set(), CTX_data_list_add(), CTX_data_pointer_set(), CTX_data_scene(), CTX_DATA_TYPE_COLLECTION, CTX_data_type_set(), CTX_wm_view3d(), ListBase::first, Base::flag, Scene::id, Object::id, Base::lay, Scene::lay, View3D::lay, Base::next, OB_RESTRICT_SELECT, OB_RESTRICT_VIEW, Base::object, object_is_libdata(), Object::restrictflag, RNA_ObjectBase, and SELECT.
Referenced by ED_spacetype_view3d().
static void view3d_dropboxes | ( | void | ) | [static] |
Definition at line 553 of file space_view3d.c.
References RGN_TYPE_WINDOW, SPACE_VIEW3D, view3d_id_drop_copy(), view3d_id_path_drop_copy(), view3d_ima_bg_drop_poll(), view3d_ima_ob_drop_poll(), view3d_mat_drop_poll(), view3d_ob_drop_copy(), view3d_ob_drop_poll(), WM_dropbox_add(), and WM_dropboxmap_find().
Referenced by ED_spacetype_view3d().
Definition at line 354 of file space_view3d.c.
References View3D::bgpicbase, BLI_duplicatelist(), View3D::drawtype, ListBase::first, Image::id, BGpic::ima, View3D::lay, View3D::localvd, MEM_dupallocN(), BGpic::next, NULL, OB_RENDER, OB_SOLID, View3D::properties_storage, and ID::us.
Referenced by ED_spacetype_view3d().
static void view3d_free | ( | SpaceLink * | sl | ) | [static] |
Definition at line 332 of file space_view3d.c.
References View3D::bgpicbase, BLI_freelistN(), ListBase::first, Image::id, BGpic::ima, View3D::localvd, MEM_freeN(), BGpic::next, View3D::properties_storage, and ID::us.
Referenced by ED_spacetype_view3d().
Definition at line 69 of file space_view3d.c.
References ARegion::alignment, BKE_area_find_region_type(), BLI_insertlinkafter(), ARegion::flag, MEM_callocN(), NULL, ScrArea::regionbase, ARegion::regiontype, RGN_ALIGN_RIGHT, RGN_FLAG_HIDDEN, RGN_TYPE_HEADER, and RGN_TYPE_UI.
Referenced by view3d_properties().
Definition at line 93 of file space_view3d.c.
References ARegion::alignment, BLI_insertlinkafter(), ListBase::first, ARegion::flag, MEM_callocN(), ARegion::next, NULL, ScrArea::regionbase, ARegion::regiontype, RGN_ALIGN_BOTTOM, RGN_ALIGN_LEFT, RGN_FLAG_HIDDEN, RGN_SPLIT_PREV, RGN_TYPE_HEADER, RGN_TYPE_TOOL_PROPS, and RGN_TYPE_TOOLS.
Referenced by view3d_toolshelf().
Definition at line 830 of file space_view3d.c.
References ED_region_header().
Referenced by ED_spacetype_view3d().
static void view3d_header_area_init | ( | wmWindowManager * | wm, |
ARegion * | ar | ||
) | [static] |
Definition at line 821 of file space_view3d.c.
References wmWindowManager::defaultconf, ED_region_header_init(), ARegion::handlers, SPACE_VIEW3D, WM_event_add_keymap_handler(), and WM_keymap_find().
Referenced by ED_spacetype_view3d().
static void view3d_header_area_listener | ( | ARegion * | ar, |
wmNotifier * | wmn | ||
) | [static] |
Definition at line 835 of file space_view3d.c.
References wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), NC_SCENE, NC_SPACE, ND_FRAME, ND_LAYER, ND_LAYER_CONTENT, ND_MODE, ND_OB_ACTIVE, ND_OB_SELECT, ND_OB_VISIBLE, ND_SPACE_VIEW3D, and ND_TOOLSETTINGS.
Referenced by ED_spacetype_view3d().
Definition at line 534 of file space_view3d.c.
References ID::name, wmDrag::poin, wmDropBox::ptr, and RNA_string_set().
Referenced by view3d_dropboxes().
Definition at line 541 of file space_view3d.c.
References ID::name, wmDrag::path, wmDrag::poin, wmDropBox::ptr, and RNA_string_set().
Referenced by view3d_dropboxes().
Definition at line 505 of file space_view3d.c.
References ED_view3d_give_base_under_cursor(), wmEvent::mval, and view3d_ima_drop_poll().
Referenced by view3d_dropboxes().
static int view3d_ima_drop_poll | ( | bContext * | UNUSEDC, |
wmDrag * | drag, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 490 of file space_view3d.c.
References ELEM, GS, wmDrag::icon, ID_IM, ID::name, wmDrag::poin, wmDrag::type, WM_DRAG_ID, and WM_DRAG_PATH.
Referenced by view3d_ima_bg_drop_poll(), and view3d_ima_ob_drop_poll().
Definition at line 513 of file space_view3d.c.
References ED_view3d_give_base_under_cursor(), wmEvent::mval, and view3d_ima_drop_poll().
Referenced by view3d_dropboxes().
static void view3d_init | ( | struct wmWindowManager * | UNUSEDwm, |
ScrArea * | UNUSEDsa | ||
) | [static] |
Definition at line 349 of file space_view3d.c.
Referenced by ED_spacetype_view3d().
static void view3d_main_area_cursor | ( | wmWindow * | win, |
ScrArea * | UNUSEDsa, | ||
ARegion * | UNUSEDar | ||
) | [static] |
Definition at line 808 of file space_view3d.c.
References CURSOR_EDIT, CURSOR_STD, Scene::obedit, bScreen::scene, wmWindow::screen, and WM_cursor_set().
Referenced by ED_spacetype_view3d().
static void* view3d_main_area_duplicate | ( | void * | poin | ) | [static] |
Definition at line 591 of file space_view3d.c.
References RegionView3D::clipbb, RegionView3D::localvd, MEM_dupallocN(), and NULL.
Referenced by ED_spacetype_view3d().
static void view3d_main_area_free | ( | ARegion * | ar | ) | [static] |
Definition at line 566 of file space_view3d.c.
References RegionView3D::clipbb, ViewDepths::depths, RegionView3D::depths, RegionView3D::localvd, MEM_freeN(), NULL, RE_engine_free(), ARegion::regiondata, RegionView3D::render_engine, and RegionView3D::ri.
Referenced by ED_spacetype_view3d().
static void view3d_main_area_init | ( | wmWindowManager * | wm, |
ARegion * | ar | ||
) | [static] |
Definition at line 387 of file space_view3d.c.
References wmWindowManager::defaultconf, ARegion::handlers, RGN_TYPE_WINDOW, SPACE_VIEW3D, WM_dropboxmap_find(), WM_event_add_dropbox_handler(), WM_event_add_keymap_handler(), and WM_keymap_find().
Referenced by ED_spacetype_view3d().
static void view3d_main_area_listener | ( | ARegion * | ar, |
wmNotifier * | wmn | ||
) | [static] |
Definition at line 644 of file space_view3d.c.
References wmNotifier::action, wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), ED_region_tag_redraw_overlay(), NA_ADDED, NA_EDITED, NA_RENAME, NA_SELECTED, NC_ANIMATION, NC_BRUSH, NC_GEOM, NC_GROUP, NC_ID, NC_IMAGE, NC_LAMP, NC_MATERIAL, NC_MOVIECLIP, NC_OBJECT, NC_SCENE, NC_SCREEN, NC_SPACE, NC_TEXTURE, NC_WORLD, ND_ANIMCHAN, ND_ANIMPLAY, ND_BONE_ACTIVE, ND_BONE_SELECT, ND_CONSTRAINT, ND_DATA, ND_DISPLAY, ND_DRAW, ND_FRAME, ND_GPENCIL, ND_KEYFRAME, ND_KEYFRAME_PROP, ND_KEYS, ND_LAYER, ND_LAYER_CONTENT, ND_LIGHTING_DRAW, ND_MODE, ND_MODIFIER, ND_NLA, ND_NLA_ACTCHANGE, ND_OB_ACTIVE, ND_OB_SELECT, ND_OB_VISIBLE, ND_PARTICLE, ND_POSE, ND_RENDER_OPTIONS, ND_SCREENBROWSE, ND_SCREENDELETE, ND_SCREENSET, ND_SELECT, ND_SHADING_DRAW, ND_SKETCH, ND_SPACE_VIEW3D, ND_TRANSFORM, ND_WORLD, ND_WORLD_DRAW, ND_WORLD_STARS, NS_VIEW3D_GPU, RegionView3D::persp, wmNotifier::reference, ARegion::regiondata, RegionView3D::rflag, RV3D_CAMOB, RV3D_GPULIGHT_UPDATE, bScreen::scene, wmNotifier::subtype, and view3d_recalc_used_layers().
Referenced by ED_spacetype_view3d().
static int view3d_mat_drop_poll | ( | bContext * | UNUSEDC, |
wmDrag * | drag, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 480 of file space_view3d.c.
References GS, ID_MA, ID::name, wmDrag::poin, wmDrag::type, and WM_DRAG_ID.
Referenced by view3d_dropboxes().
Definition at line 244 of file space_view3d.c.
References ARegion::alignment, View3D::around, BLI_addtail(), View3D::blockscale, View3D::bundle_drawtype, View3D::bundle_size, Scene::camera, View3D::camera, CTX_data_scene(), RegionView3D::dist, View3D::drawtype, View3D::far, ARegion::flag, View3D::flag, View3D::flag2, View3D::grid, View3D::gridflag, View3D::gridlines, View3D::gridsubdiv, Scene::lay, View3D::lay, View3D::layact, View3D::lens, MEM_callocN(), View3D::near, OB_PLAINAXES, OB_SOLID, RegionView3D::persp, View3D::regionbase, ARegion::regiondata, ARegion::regiontype, RGN_ALIGN_BOTTOM, RGN_ALIGN_LEFT, RGN_ALIGN_RIGHT, RGN_FLAG_HIDDEN, RGN_SPLIT_PREV, RGN_TYPE_HEADER, RGN_TYPE_TOOL_PROPS, RGN_TYPE_TOOLS, RGN_TYPE_UI, RGN_TYPE_WINDOW, RV3D_PERSP, RV3D_VIEW_PERSPORTHO, View3D::scenelock, SPACE_VIEW3D, View3D::spacetype, TRUE, UserDef::tw_flag, View3D::twflag, View3D::twtype, U, V3D_CENTROID, V3D_MANIP_TRANSLATE, V3D_SELECT_OUTLINE, V3D_SHOW_FLOOR, V3D_SHOW_RECONSTRUCTION, V3D_SHOW_X, V3D_SHOW_Y, V3D_SHOW_Z, V3D_USE_MANIPULATOR, RegionView3D::view, and RegionView3D::viewquat.
Referenced by ED_spacetype_view3d().
Definition at line 521 of file space_view3d.c.
References ID::name, wmDrag::poin, wmDropBox::ptr, RNA_pointer_get(), and RNA_string_set().
Referenced by view3d_dropboxes().
static int view3d_ob_drop_poll | ( | bContext * | UNUSEDC, |
wmDrag * | drag, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 470 of file space_view3d.c.
References GS, ID_OB, ID::name, wmDrag::poin, wmDrag::type, and WM_DRAG_ID.
Referenced by view3d_dropboxes().
static void view3d_props_area_listener | ( | ARegion * | ar, |
wmNotifier * | wmn | ||
) | [static] |
Definition at line 974 of file space_view3d.c.
References wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), NC_SCENE, NC_SPACE, NC_WM, ND_HISTORY, ND_MODE, and ND_SPACE_VIEW3D.
Referenced by ED_spacetype_view3d().
static void view3d_recalc_used_layers | ( | ARegion * | ar, |
wmNotifier * | wmn, | ||
Scene * | scene | ||
) | [static] |
Definition at line 614 of file space_view3d.c.
References bScreen::areabase, Scene::base, BLI_findindex(), ListBase::first, Base::lay, View3D::lay_used, ScrArea::next, Base::next, ScrArea::regionbase, wmWindow::screen, SPACE_VIEW3D, ScrArea::spacedata, ScrArea::spacetype, wmWindowManager::winactive, and wmNotifier::wm.
Referenced by view3d_main_area_listener().
Definition at line 969 of file space_view3d.c.
References CTX_data_mode_string(), and ED_region_panels().
Referenced by ED_spacetype_view3d().
static void view3d_tools_area_init | ( | wmWindowManager * | wm, |
ARegion * | ar | ||
) | [static] |
Definition at line 959 of file space_view3d.c.
References wmWindowManager::defaultconf, ED_region_panels_init(), ARegion::handlers, SPACE_VIEW3D, WM_event_add_keymap_handler(), and WM_keymap_find().
Referenced by ED_spacetype_view3d().
const char* view3d_context_dir[] |
{ "selected_objects", "selected_bases", "selected_editable_objects", "selected_editable_bases", "visible_objects", "visible_bases", "selectable_objects", "selectable_bases", "active_base", "active_object", NULL}
Definition at line 1041 of file space_view3d.c.