|
Blender
V2.59
|
#include <string.h>#include <stdio.h>#include "DNA_meshdata_types.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_editVert.h"#include "BLI_rand.h"#include "BLI_utildefines.h"#include "BKE_colortools.h"#include "BKE_context.h"#include "BKE_image.h"#include "BKE_mesh.h"#include "BKE_screen.h"#include "IMB_imbuf_types.h"#include "ED_image.h"#include "ED_mesh.h"#include "ED_space_api.h"#include "ED_screen.h"#include "ED_uvedit.h"#include "BIF_gl.h"#include "RNA_access.h"#include "WM_api.h"#include "WM_types.h"#include "UI_resources.h"#include "UI_view2d.h"#include "image_intern.h"Go to the source code of this file.
Definition in file space_image.c.
| void ED_image_aspect | ( | Image * | ima, |
| float * | aspx, | ||
| float * | aspy | ||
| ) |
Definition at line 202 of file space_image.c.
References Image::aspx, Image::aspy, IMA_TYPE_COMPOSITE, IMA_TYPE_R_RESULT, NULL, and Image::type.
Referenced by draw_image_main(), ED_image_uv_aspect(), ED_space_image_aspect(), and view_selected_exec().
| void ED_image_size | ( | Image * | ima, |
| int * | width, | ||
| int * | height | ||
| ) |
Definition at line 148 of file space_image.c.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), NULL, ImBuf::x, and ImBuf::y.
Referenced by ED_image_uv_aspect().
| void ED_image_uv_aspect | ( | Image * | ima, |
| float * | aspx, | ||
| float * | aspy | ||
| ) |
Definition at line 249 of file space_image.c.
References ED_image_aspect(), ED_image_size(), and simple_enum_gen::w.
Referenced by construct_param_handle(), and correct_uv_aspect().
| Image* ED_space_image | ( | SpaceImage * | sima | ) | [read] |
Definition at line 78 of file space_image.c.
References SpaceImage::image.
Referenced by CalcSnapGeometry(), draw_image_main(), ED_space_image_aspect(), image_context(), image_main_area_set_view2d(), image_refresh(), save_as_exec(), save_as_invoke(), save_exec(), save_image_doit(), and view_selected_exec().
| ImBuf* ED_space_image_acquire_buffer | ( | SpaceImage * | sima, |
| void ** | lock_r | ||
| ) | [read] |
Definition at line 110 of file space_image.c.
References BKE_image_acquire_ibuf(), IMA_TYPE_R_RESULT, SpaceImage::image, SpaceImage::iuser, NULL, ImBuf::rect, ImBuf::rect_float, and Image::type.
Referenced by draw_image_grease_pencil(), draw_image_main(), ED_space_image_has_buffer(), ED_space_image_size(), image_panel_curves(), image_panel_poll(), image_scope_area_draw(), sample_apply(), sample_line_exec(), save_as_invoke(), save_exec(), save_image_doit(), and space_image_file_exists_poll().
| void ED_space_image_aspect | ( | SpaceImage * | sima, |
| float * | aspx, | ||
| float * | aspy | ||
| ) |
Definition at line 214 of file space_image.c.
References ED_image_aspect(), and ED_space_image().
Referenced by ED_space_image_uv_aspect(), and view_all_exec().
| int ED_space_image_has_buffer | ( | SpaceImage * | sima | ) |
Definition at line 135 of file space_image.c.
References ED_space_image_acquire_buffer(), ED_space_image_release_buffer(), and NULL.
Referenced by sample_invoke(), sample_line_invoke(), and space_image_buffer_exists_poll().
| void ED_space_image_release_buffer | ( | SpaceImage * | sima, |
| void * | lock | ||
| ) |
Definition at line 129 of file space_image.c.
References BKE_image_release_ibuf(), and SpaceImage::image.
Referenced by draw_image_grease_pencil(), draw_image_main(), ED_space_image_has_buffer(), ED_space_image_size(), image_panel_curves(), image_panel_poll(), image_scope_area_draw(), sample_apply(), sample_line_exec(), save_as_invoke(), save_exec(), save_image_doit(), and space_image_file_exists_poll().
| void ED_space_image_set | ( | bContext * | C, |
| SpaceImage * | sima, | ||
| Scene * | scene, | ||
| Object * | obedit, | ||
| Image * | ima | ||
| ) |
Definition at line 84 of file space_image.c.
References BKE_image_signal(), CTX_wm_area(), Object::data, ED_area_tag_redraw(), ED_uvedit_assign_image(), SpaceImage::flag, Image::id, IMA_SIGNAL_USER_NEW_IMAGE, IMA_TYPE_COMPOSITE, IMA_TYPE_R_RESULT, SpaceImage::image, SpaceImage::iuser, NC_GEOM, ND_DATA, NULL, SI_DRAWTOOL, Image::type, ID::us, and WM_event_add_notifier().
Referenced by image_new_exec(), and open_exec().
| int ED_space_image_show_paint | ( | SpaceImage * | sima | ) |
Definition at line 265 of file space_image.c.
References ED_space_image_show_render(), SpaceImage::flag, and SI_DRAWTOOL.
Referenced by ED_space_image_show_uvedit(), and ED_space_image_show_uvshadow().
| int ED_space_image_show_render | ( | SpaceImage * | sima | ) |
Definition at line 260 of file space_image.c.
References ELEM, IMA_TYPE_COMPOSITE, IMA_TYPE_R_RESULT, SpaceImage::image, and Image::type.
Referenced by ED_space_image_show_paint(), ED_space_image_show_uvedit(), ED_space_image_show_uvshadow(), and image_listener().
| int ED_space_image_show_uvedit | ( | SpaceImage * | sima, |
| Object * | obedit | ||
| ) |
Definition at line 273 of file space_image.c.
References BKE_mesh_end_editmesh(), BKE_mesh_get_editmesh(), Object::data, ED_space_image_show_paint(), ED_space_image_show_render(), EM_texFaceCheck(), OB_MESH, and Object::type.
Referenced by createTransUVs(), draw_uvedit_main(), and ED_operator_uvedit().
| int ED_space_image_show_uvshadow | ( | SpaceImage * | sima, |
| Object * | obedit | ||
| ) |
Definition at line 291 of file space_image.c.
References BKE_mesh_end_editmesh(), BKE_mesh_get_editmesh(), Object::data, ED_space_image_show_paint(), ED_space_image_show_render(), EM_texFaceCheck(), OB_MESH, and Object::type.
Referenced by draw_uvedit_main().
| void ED_space_image_size | ( | SpaceImage * | sima, |
| int * | width, | ||
| int * | height | ||
| ) |
Definition at line 169 of file space_image.c.
References RenderData::border, ED_space_image_acquire_buffer(), ED_space_image_release_buffer(), IMA_TYPE_R_RESULT, SpaceImage::image, SpaceImage::iuser, RenderData::mode, Scene::r, R_BORDER, R_CROP, ImageUser::scene, RenderData::size, Image::type, ImBuf::x, rctf::xmax, rctf::xmin, RenderData::xsch, ImBuf::y, rctf::ymax, rctf::ymin, and RenderData::ysch.
Referenced by applyAspectRatio(), circle_select_exec(), do_uvedit_vertex(), drawcursor_sima(), ED_space_image_uv_aspect(), ED_space_image_zoom(), flushTransUVs(), image_main_area_set_view2d(), removeAspectRatio(), sima_zoom_set(), snap_cursor_to_pixels(), snap_uvs_to_pixels(), uvedit_pixel_to_float(), uvedit_vertex_buttons(), view_all_exec(), and view_selected_exec().
| void ED_space_image_uv_aspect | ( | SpaceImage * | sima, |
| float * | aspx, | ||
| float * | aspy | ||
| ) |
Definition at line 229 of file space_image.c.
References ED_space_image_aspect(), ED_space_image_size(), and simple_enum_gen::w.
Referenced by applyAspectRatio(), applyGrid(), CalcSnapGeometry(), calculateCenterCursor2D(), clipUVTransform(), convertViewVec(), draw_uvs_stretch(), drawPropCircle(), flushTransUVs(), projectIntView(), removeAspectRatio(), and UVsToTransData().
| void ED_space_image_zoom | ( | SpaceImage * | sima, |
| ARegion * | ar, | ||
| float * | zoomx, | ||
| float * | zoomy | ||
| ) |
Definition at line 219 of file space_image.c.
References View2D::cur, ED_space_image_size(), ARegion::v2d, ARegion::winrct, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by circle_select_exec(), draw_image_main(), drawcursor_sima(), and get_imapaint_zoom().
| void ED_spacetype_image | ( | void | ) |
Definition at line 947 of file space_image.c.
References BKE_spacetype_register(), BKE_ST_MAXNAME, BLI_addhead(), SpaceType::context, ARegionType::draw, SpaceType::dropboxes, SpaceType::duplicate, ED_KEYMAP_FRAMES, ED_KEYMAP_GPENCIL, ED_KEYMAP_HEADER, ED_KEYMAP_UI, ED_KEYMAP_VIEW2D, ED_uvedit_buttons_register(), SpaceType::free, HEADERY, image_buttons_area_draw(), image_buttons_area_init(), image_buttons_area_listener(), image_buttons_register(), image_context(), image_dropboxes(), image_duplicate(), image_free(), image_header_area_draw(), image_header_area_init(), image_header_area_listener(), image_init(), image_keymap(), image_listener(), image_main_area_draw(), image_main_area_init(), image_main_area_listener(), image_new(), image_operatortypes(), image_refresh(), image_scope_area_draw(), image_scope_area_init(), image_scope_area_listener(), SpaceType::init, ARegionType::init, SpaceType::keymap, ARegionType::keymapflag, SpaceType::listener, ARegionType::listener, MEM_callocN(), SpaceType::name, SpaceType::new, SpaceType::operatortypes, ARegionType::prefsizex, ARegionType::prefsizey, SpaceType::refresh, ARegionType::regionid, SpaceType::regiontypes, RGN_TYPE_HEADER, RGN_TYPE_PREVIEW, RGN_TYPE_UI, RGN_TYPE_WINDOW, SPACE_IMAGE, and SpaceType::spaceid.
Referenced by ED_spacetypes_init().
Definition at line 838 of file space_image.c.
References ED_region_panels(), and NULL.
Referenced by ED_spacetype_image().
| static void image_buttons_area_init | ( | wmWindowManager * | wm, |
| ARegion * | ar | ||
| ) | [static] |
Definition at line 828 of file space_image.c.
References wmWindowManager::defaultconf, ED_region_panels_init(), ARegion::handlers, SPACE_IMAGE, WM_event_add_keymap_handler(), and WM_keymap_find().
Referenced by ED_spacetype_image().
| static void image_buttons_area_listener | ( | ARegion * | ar, |
| wmNotifier * | wmn | ||
| ) | [static] |
Definition at line 843 of file space_image.c.
References wmNotifier::action, wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), NA_EDITED, NC_BRUSH, NC_SCREEN, and ND_GPENCIL.
Referenced by ED_spacetype_image().
| static int image_context | ( | const bContext * | C, |
| const char * | member, | ||
| bContextDataResult * | result | ||
| ) | [static] |
Definition at line 674 of file space_image.c.
References CTX_data_dir(), CTX_data_dir_set(), CTX_data_equals(), CTX_data_id_pointer_set(), CTX_wm_space_image(), and ED_space_image().
Referenced by ED_spacetype_image().
Definition at line 559 of file space_image.c.
References wmDrag::path, wmDropBox::ptr, and RNA_string_set().
Referenced by image_dropboxes().
Definition at line 551 of file space_image.c.
References ELEM3, wmDrag::icon, wmDrag::type, and WM_DRAG_PATH.
Referenced by image_dropboxes().
| static void image_dropboxes | ( | void | ) | [static] |
Definition at line 566 of file space_image.c.
References image_drop_copy(), image_drop_poll(), SPACE_IMAGE, WM_dropbox_add(), and WM_dropboxmap_find().
Referenced by ED_spacetype_image().
Definition at line 450 of file space_image.c.
References SpaceImage::cumap, curvemapping_copy(), MEM_dupallocN(), SpaceImage::scopes, and scopes_new().
Referenced by ED_spacetype_image().
| static void image_free | ( | SpaceLink * | sl | ) | [static] |
Definition at line 430 of file space_image.c.
References SpaceImage::cumap, curvemapping_free(), SpaceImage::scopes, and scopes_free().
Referenced by ED_spacetype_image().
Definition at line 328 of file space_image.c.
References ARegion::alignment, BKE_area_find_region_type(), BLI_insertlinkafter(), ARegion::flag, MEM_callocN(), NULL, ScrArea::regionbase, ARegion::regiontype, RGN_ALIGN_LEFT, RGN_FLAG_HIDDEN, RGN_TYPE_HEADER, and RGN_TYPE_UI.
Referenced by image_properties().
Definition at line 352 of file space_image.c.
References ARegion::alignment, BKE_area_find_region_type(), BLI_insertlinkafter(), ARegion::flag, image_scopes_tag_refresh(), MEM_callocN(), NULL, ScrArea::regionbase, ARegion::regiontype, RGN_ALIGN_RIGHT, RGN_FLAG_HIDDEN, RGN_TYPE_PREVIEW, and RGN_TYPE_UI.
Referenced by image_scopes().
Definition at line 916 of file space_image.c.
References ED_region_header().
Referenced by ED_spacetype_image().
| static void image_header_area_init | ( | wmWindowManager * | UNUSEDwm, |
| ARegion * | ar | ||
| ) | [static] |
Definition at line 911 of file space_image.c.
References ED_region_header_init().
Referenced by ED_spacetype_image().
| static void image_header_area_listener | ( | ARegion * | ar, |
| wmNotifier * | wmn | ||
| ) | [static] |
Definition at line 921 of file space_image.c.
References wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), NC_GEOM, NC_SCENE, ND_DATA, ND_MODE, ND_SELECT, and ND_TOOLSETTINGS.
Referenced by ED_spacetype_image().
| static void image_init | ( | struct wmWindowManager * | UNUSEDwm, |
| ScrArea * | sa | ||
| ) | [static] |
Definition at line 441 of file space_image.c.
References ScrArea::handlers, SPACE_IMAGE, WM_dropboxmap_find(), and WM_event_add_dropbox_handler().
Referenced by ED_spacetype_image().
| static void image_keymap | ( | struct wmKeyConfig * | keyconf | ) | [static] |
Definition at line 498 of file space_image.c.
References ACTIONMOUSE, F3KEY, HOMEKEY, JKEY, KM_ALT, KM_CTRL, KM_PRESS, KM_SHIFT, MIDDLEMOUSE, MOUSEPAN, MOUSEZOOM, NDOF_BUTTON_FIT, NDOF_MOTION, NKEY, OB_MODE_EDIT, OKEY, PAD1, PAD2, PAD4, PAD8, PADMINUS, PADPERIOD, PADPLUSKEY, wmKeyMapItem::ptr, RKEY, RNA_boolean_set(), RNA_enum_set(), RNA_float_set(), SKEY, SPACE_IMAGE, TABKEY, TKEY, TRUE, WHEELINMOUSE, WHEELOUTMOUSE, WM_keymap_add_item(), and WM_keymap_find().
Referenced by ED_spacetype_image().
| static void image_listener | ( | ScrArea * | sa, |
| wmNotifier * | wmn | ||
| ) | [static] |
Definition at line 611 of file space_image.c.
References wmNotifier::category, wmNotifier::data, ED_area_tag_redraw(), ED_area_tag_refresh(), ED_space_image_show_render(), ListBase::first, SpaceImage::flag, SpaceImage::image, image_scopes_tag_refresh(), SpaceImage::lock, Object::mode, NC_GEOM, NC_IMAGE, NC_OBJECT, NC_SCENE, NC_SPACE, ND_COMPO_RESULT, ND_DATA, ND_FRAME, ND_MODE, ND_MODIFIER, ND_RENDER_RESULT, ND_SELECT, ND_SPACE_IMAGE, ND_TRANSFORM, OB_MODE_EDIT, wmNotifier::reference, SI_DRAWSHADOW, and ScrArea::spacedata.
Referenced by ED_spacetype_image().
Definition at line 767 of file space_image.c.
References CTX_data_edit_object(), CTX_data_scene(), CTX_wm_space_image(), draw_image_grease_pencil(), draw_image_main(), draw_uvedit_main(), ED_region_draw_cb_draw(), image_main_area_set_view2d(), SpaceImage::iuser, Scene::r, R_COMP_CROP, REGION_DRAW_POST_VIEW, RenderData::scemode, ImageUser::scene, TH_BACK, UI_GetThemeColor3fv(), UI_view2d_view_ortho(), UI_view2d_view_restore(), and ARegion::v2d.
Referenced by ED_spacetype_image().
| static void image_main_area_init | ( | wmWindowManager * | wm, |
| ARegion * | ar | ||
| ) | [static] |
Definition at line 745 of file space_image.c.
References wmWindowManager::defaultconf, ARegion::handlers, View2D::mask, SPACE_IMAGE, ARegion::v2d, ARegion::winrct, WM_event_add_keymap_handler(), WM_event_add_keymap_handler_bb(), and WM_keymap_find().
Referenced by ED_spacetype_image().
| static void image_main_area_listener | ( | ARegion * | ar, |
| wmNotifier * | wmn | ||
| ) | [static] |
Definition at line 814 of file space_image.c.
References wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), NC_SCREEN, and ND_GPENCIL.
Referenced by ED_spacetype_image().
| static void image_main_area_set_view2d | ( | SpaceImage * | sima, |
| ARegion * | ar | ||
| ) | [static] |
Definition at line 692 of file space_image.c.
References Image::aspx, Image::aspy, View2D::cur, ED_space_image(), ED_space_image_size(), View2D::mask, View2D::tot, ARegion::v2d, simple_enum_gen::w, ARegion::winrct, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, SpaceImage::xof, rcti::ymax, rctf::ymax, rcti::ymin, rctf::ymin, SpaceImage::yof, and SpaceImage::zoom.
Referenced by image_main_area_draw().
Definition at line 380 of file space_image.c.
References ARegion::alignment, BLI_addtail(), ImageUser::fie_ima, ARegion::flag, ImageUser::frames, Histogram::height, SpaceImage::iuser, SpaceImage::lock, MEM_callocN(), ImageUser::ok, SpaceImage::regionbase, ARegion::regiontype, RGN_ALIGN_BOTTOM, RGN_ALIGN_LEFT, RGN_ALIGN_RIGHT, RGN_FLAG_HIDDEN, RGN_TYPE_HEADER, RGN_TYPE_PREVIEW, RGN_TYPE_UI, RGN_TYPE_WINDOW, SpaceImage::sample_line_hist, SpaceImage::scopes, scopes_new(), SPACE_IMAGE, SpaceImage::spacetype, and SpaceImage::zoom.
Referenced by ED_spacetype_image().
| static void image_operatortypes | ( | void | ) | [static] |
Definition at line 463 of file space_image.c.
References IMAGE_OT_curves_point_set(), IMAGE_OT_cycle_render_slot(), IMAGE_OT_invert(), IMAGE_OT_new(), IMAGE_OT_open(), IMAGE_OT_pack(), IMAGE_OT_properties(), IMAGE_OT_record_composite(), IMAGE_OT_reload(), IMAGE_OT_replace(), IMAGE_OT_sample(), IMAGE_OT_sample_line(), IMAGE_OT_save(), IMAGE_OT_save_as(), IMAGE_OT_save_sequence(), IMAGE_OT_scopes(), IMAGE_OT_unpack(), IMAGE_OT_view_all(), IMAGE_OT_view_ndof(), IMAGE_OT_view_pan(), IMAGE_OT_view_selected(), IMAGE_OT_view_zoom(), IMAGE_OT_view_zoom_in(), IMAGE_OT_view_zoom_out(), IMAGE_OT_view_zoom_ratio(), and WM_operatortype_append().
Referenced by ED_spacetype_image().
Definition at line 575 of file space_image.c.
References BKE_image_user_calc_frame(), BKE_mesh_end_editmesh(), BKE_mesh_get_editmesh(), CTX_data_edit_object(), CTX_data_scene(), CTX_wm_space_image(), SpaceImage::curtile, Object::data, ED_space_image(), EM_get_active_mtface(), EM_texFaceCheck(), ImageUser::flag, SpaceImage::flag, IMA_ANIM_ALWAYS, IMA_SRC_VIEWER, SpaceImage::image, SpaceImage::iuser, MTFace::mode, NULL, OB_MESH, SpaceImage::pin, SI_EDITTILE, Image::source, TF_TEX, MTFace::tile, MTFace::tpage, and Object::type.
Referenced by ED_spacetype_image().
Definition at line 871 of file space_image.c.
References RenderData::color_mgt_flag, CTX_data_scene(), CTX_wm_space_image(), ED_region_panels(), ED_space_image_acquire_buffer(), ED_space_image_release_buffer(), NULL, Scene::r, R_COLOR_MANAGEMENT, SpaceImage::scopes, and scopes_update().
Referenced by ED_spacetype_image().
| static void image_scope_area_init | ( | wmWindowManager * | wm, |
| ARegion * | ar | ||
| ) | [static] |
Definition at line 861 of file space_image.c.
References wmWindowManager::defaultconf, ED_region_panels_init(), ARegion::handlers, SPACE_IMAGE, WM_event_add_keymap_handler(), and WM_keymap_find().
Referenced by ED_spacetype_image().
| static void image_scope_area_listener | ( | ARegion * | ar, |
| wmNotifier * | wmn | ||
| ) | [static] |
Definition at line 885 of file space_image.c.
References wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), NC_IMAGE, NC_NODE, NC_SCENE, ND_COMPO_RESULT, ND_MODE, and ND_RENDER_RESULT.
Referenced by ED_spacetype_image().
| static void image_scopes_tag_refresh | ( | ScrArea * | sa | ) | [static] |
Definition at line 311 of file space_image.c.
References ListBase::first, Scopes::ok, ScrArea::regionbase, RGN_FLAG_HIDDEN, RGN_TYPE_PREVIEW, SpaceImage::scopes, and ScrArea::spacedata.
Referenced by image_has_scope_region(), and image_listener().
| const char* image_context_dir[] = {"edit_image", NULL} |
Definition at line 672 of file space_image.c.