Blender
V3.3
|
#include "DNA_defaults.h"
#include "DNA_gpencil_types.h"
#include "DNA_image_types.h"
#include "DNA_mask_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_threads.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_image.h"
#include "BKE_lib_id.h"
#include "BKE_lib_remap.h"
#include "BKE_screen.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "DEG_depsgraph.h"
#include "IMB_imbuf_types.h"
#include "ED_image.h"
#include "ED_mask.h"
#include "ED_node.h"
#include "ED_render.h"
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_transform.h"
#include "ED_util.h"
#include "ED_uvedit.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "DRW_engine.h"
#include "image_intern.h"
Go to the source code of this file.
Variables | |
const char * | image_context_dir [] = {"edit_image", "edit_mask", NULL} |
Definition at line 1029 of file space_image.c.
References BKE_spacetype_register(), BKE_ST_MAXNAME, BLI_addhead(), ARegionType::draw, ED_area_do_mgs_subscribe_for_tool_header(), ED_area_do_mgs_subscribe_for_tool_ui(), ED_area_type_hud(), ED_KEYMAP_FRAMES, ED_KEYMAP_GIZMO, ED_KEYMAP_GPENCIL, ED_KEYMAP_HEADER, ED_KEYMAP_TOOL, ED_KEYMAP_UI, ED_KEYMAP_VIEW2D, ED_region_generic_tools_region_message_subscribe(), ED_region_generic_tools_region_snap_size(), ED_uvedit_buttons_register(), HEADERY, image_buttons_region_draw(), image_buttons_region_init(), image_buttons_region_layout(), image_buttons_region_listener(), image_buttons_register(), image_context(), image_create(), image_dropboxes(), image_duplicate(), image_free(), image_header_region_draw(), image_header_region_init(), image_header_region_listener(), image_id_remap(), image_init(), image_keymap(), image_listener(), image_main_region_draw(), image_main_region_init(), image_main_region_listener(), image_operatortypes(), image_refresh(), image_space_subtype_get(), image_space_subtype_item_extend(), image_space_subtype_set(), image_tools_region_draw(), image_tools_region_init(), image_tools_region_listener(), image_widgets(), ARegionType::init, ARegionType::keymapflag, ARegionType::layout, ARegionType::listener, MEM_callocN, ARegionType::message_subscribe, ARegionType::prefsizex, ARegionType::prefsizey, ARegionType::regionid, RGN_TYPE_HEADER, RGN_TYPE_TOOL_HEADER, RGN_TYPE_TOOLS, RGN_TYPE_UI, RGN_TYPE_WINDOW, ARegionType::snap_size, SPACE_IMAGE, usdtokens::st(), and UI_SIDEBAR_PANEL_WIDTH.
Referenced by ED_spacetypes_init().
Definition at line 800 of file space_image.c.
References BKE_histogram_update_sample_line(), C, CTX_data_scene(), CTX_wm_space_image(), Scene::display_settings, ED_region_panels_draw(), ED_space_image_acquire_buffer(), ED_space_image_release_buffer(), ED_space_image_scopes_update(), Image::flag, IMA_VIEW_AS_RENDER, SpaceImage::image, lock, Scopes::ok, SpaceImage::sample_line_hist, scene, SpaceImage::scopes, UI_panel_category_active_find(), and Scene::view_settings.
Referenced by ED_spacetype_image().
|
static |
Definition at line 763 of file space_image.c.
References wmWindowManager::defaultconf, ED_region_panels_init(), ARegion::handlers, View2D::scroll, SPACE_IMAGE, ARegion::v2d, V2D_SCROLL_RIGHT, V2D_SCROLL_VERTICAL_HIDE, WM_event_add_keymap_handler(), and WM_keymap_ensure().
Referenced by ED_spacetype_image().
Definition at line 774 of file space_image.c.
References ARRAY_SET_ITEMS, C, CTX_data_mode_enum(), CTX_MODE_EDIT_MESH, CTX_wm_space_image(), ED_region_panels_layout_ex(), SpaceImage::mode, NULL, ARegionType::paneltypes, SI_MODE_MASK, SI_MODE_PAINT, SI_MODE_UV, SI_MODE_VIEW, and ARegion::type.
Referenced by ED_spacetype_image().
|
static |
Definition at line 831 of file space_image.c.
References wmNotifier::action, wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), ELEM, NA_EDITED, NA_PAINTING, NA_SELECTED, NC_BRUSH, NC_GPENCIL, NC_IMAGE, NC_MATERIAL, NC_NODE, NC_SCENE, NC_TEXTURE, ND_COMPO_RESULT, ND_MODE, ND_RENDER_RESULT, and params.
Referenced by ED_spacetype_image().
|
static |
Definition at line 430 of file space_image.c.
References C, CTX_data_dir(), CTX_data_dir_set(), CTX_data_equals(), CTX_data_id_pointer_set(), CTX_RESULT_MEMBER_NOT_FOUND, CTX_RESULT_OK, CTX_wm_space_image(), ED_space_image(), ED_space_image_get_mask(), image_context_dir, mask(), and result.
Referenced by ED_spacetype_image().
Definition at line 93 of file space_image.c.
References ARegion::alignment, BKE_imageuser_default(), BKE_scopes_new(), BLI_addtail(), SpaceImage::custom_grid_subdiv, DNA_struct_default_get, ImageUser::flag, ARegion::flag, SpaceImageOverlay::flag, SpaceImage::flag, Histogram::height, IMA_ANIM_ALWAYS, IMA_SHOW_STEREO, SpaceImage::iuser, SpaceImage::lock, SpaceImage::mask_info, MEM_callocN, SpaceImage::overlay, SpaceImage::regionbase, ARegion::regiontype, RGN_ALIGN_BOTTOM, RGN_ALIGN_LEFT, RGN_ALIGN_RIGHT, RGN_ALIGN_TOP, RGN_FLAG_HIDDEN, RGN_FLAG_HIDDEN_BY_USER, RGN_TYPE_HEADER, RGN_TYPE_TOOL_HEADER, RGN_TYPE_TOOLS, RGN_TYPE_UI, RGN_TYPE_WINDOW, SpaceImage::sample_line_hist, SpaceImage::scopes, SI_COORDFLOATS, SI_OVERLAY_SHOW_GRID_BACKGROUND, SI_OVERLAY_SHOW_OVERLAYS, SI_SHOW_GPENCIL, SI_USE_ALPHA, SPACE_IMAGE, SpaceImage::spacetype, SpaceImage::tile_grid_shape, USER_HEADER_BOTTOM, SpaceImage::uv_opacity, and SpaceImage::zoom.
Referenced by ED_spacetype_image().
Definition at line 262 of file space_image.c.
References wmDrag::path, wmDropBox::ptr, and RNA_string_set().
Referenced by image_dropboxes().
Definition at line 247 of file space_image.c.
References blender::compositor::area(), C, CTX_wm_area(), ED_region_overlap_isect_any_xy(), ELEM, wmDrag::icon, wmDrag::type, WM_DRAG_PATH, and wmEvent::xy.
Referenced by image_dropboxes().
Definition at line 269 of file space_image.c.
References image_drop_copy(), image_drop_poll(), NULL, SPACE_IMAGE, WM_dropbox_add(), and WM_dropboxmap_find().
Referenced by ED_spacetype_image().
Definition at line 176 of file space_image.c.
References BKE_scopes_new(), MEM_dupallocN, and SpaceImage::scopes.
Referenced by ED_spacetype_image().
Definition at line 160 of file space_image.c.
References BKE_scopes_free(), and SpaceImage::scopes.
Referenced by ED_spacetype_image().
|
static |
Definition at line 454 of file space_image.c.
References ED_widgetgroup_gizmo2d_xform_callbacks_set(), wmGizmoGroupType::flag, wmGizmoGroupType::gzmap_params, wmGizmoGroupType::idname, wmGizmoGroupType::name, wmGizmoMapType_Params::regionid, RGN_TYPE_WINDOW, SPACE_IMAGE, wmGizmoMapType_Params::spaceid, WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK, WM_GIZMOGROUPTYPE_DRAW_MODAL_EXCLUDE, and WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP.
Referenced by image_widgets().
|
static |
Definition at line 482 of file space_image.c.
References ED_widgetgroup_gizmo2d_resize_callbacks_set(), wmGizmoGroupType::flag, wmGizmoGroupType::gzmap_params, wmGizmoGroupType::idname, wmGizmoGroupType::name, wmGizmoMapType_Params::regionid, RGN_TYPE_WINDOW, SPACE_IMAGE, wmGizmoMapType_Params::spaceid, WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK, WM_GIZMOGROUPTYPE_DRAW_MODAL_EXCLUDE, and WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP.
Referenced by image_widgets().
|
static |
Definition at line 496 of file space_image.c.
References ED_widgetgroup_gizmo2d_rotate_callbacks_set(), wmGizmoGroupType::flag, wmGizmoGroupType::gzmap_params, wmGizmoGroupType::idname, wmGizmoGroupType::name, wmGizmoMapType_Params::regionid, RGN_TYPE_WINDOW, SPACE_IMAGE, wmGizmoMapType_Params::spaceid, WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK, WM_GIZMOGROUPTYPE_DRAW_MODAL_EXCLUDE, and WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP.
Referenced by image_widgets().
|
static |
Definition at line 468 of file space_image.c.
References ED_widgetgroup_gizmo2d_xform_no_cage_callbacks_set(), wmGizmoGroupType::flag, wmGizmoGroupType::gzmap_params, wmGizmoGroupType::idname, wmGizmoGroupType::name, wmGizmoMapType_Params::regionid, RGN_TYPE_WINDOW, SPACE_IMAGE, wmGizmoMapType_Params::spaceid, WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK, WM_GIZMOGROUPTYPE_DRAW_MODAL_EXCLUDE, and WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP.
Referenced by image_widgets().
|
static |
Definition at line 510 of file space_image.c.
References VIEW2D_GGT_navigate_impl().
Referenced by image_widgets().
Definition at line 939 of file space_image.c.
References blender::compositor::area(), C, CTX_wm_area(), ED_region_header(), and image_user_refresh_scene().
Referenced by ED_spacetype_image().
|
static |
Definition at line 934 of file space_image.c.
References ED_region_header_init().
Referenced by ED_spacetype_image().
|
static |
Definition at line 949 of file space_image.c.
References wmNotifier::action, wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), NA_EDITED, NC_BRUSH, NC_GEOM, NC_SCENE, ND_DATA, ND_MODE, ND_SELECT, ND_TOOLSETTINGS, and params.
Referenced by ED_spacetype_image().
|
static |
Definition at line 980 of file space_image.c.
References BKE_id_remapper_apply(), BKE_id_remapper_has_mapping_for(), FILTER_ID_GD, FILTER_ID_IM, FILTER_ID_MSK, SpaceImage::gpd, ID_REMAP_APPLY_ENSURE_REAL, ID_REMAP_APPLY_UPDATE_REFCOUNT, SpaceImage::image, MaskSpaceInfo::mask, and SpaceImage::mask_info.
Referenced by ED_spacetype_image().
|
static |
Definition at line 168 of file space_image.c.
References blender::compositor::area(), SPACE_IMAGE, WM_dropboxmap_find(), and WM_event_add_dropbox_handler().
Referenced by ED_spacetype_image().
|
static |
Definition at line 240 of file space_image.c.
References SPACE_IMAGE, and WM_keymap_ensure().
Referenced by ED_spacetype_image().
|
static |
Definition at line 300 of file space_image.c.
References wmNotifier::action, blender::compositor::area(), BKE_image_partial_update_mark_full_update(), wmNotifier::category, wmNotifier::data, ED_area_tag_redraw(), ED_area_tag_refresh(), ED_image_tools_paint_poll(), ED_paint_cursor_start(), ED_space_image_check_show_maskedit(), ED_space_image_show_render(), SpaceImage::flag, SpaceImage::image, image_scopes_tag_refresh(), SpaceImage::lock, Object::mode, NA_EDITED, NA_PAINTING, NA_RENAME, NA_SELECTED, NC_GEOM, NC_ID, NC_IMAGE, NC_MASK, NC_OBJECT, NC_SCENE, NC_SPACE, NC_WINDOW, NC_WM, ND_COMPO_RESULT, ND_DATA, ND_DRAW, ND_FRAME, ND_MODE, ND_MODIFIER, ND_RENDER_OPTIONS, ND_RENDER_RESULT, ND_SELECT, ND_SPACE_IMAGE, ND_TRANSFORM, ND_UNDO, NS_EDITMODE_MESH, OB_MODE_EDIT, OBACT, OBEDIT_FROM_VIEW_LAYER, params, wmNotifier::reference, SI_DRAWSHADOW, wmNotifier::subtype, and WM_window_get_active_view_layer().
Referenced by ED_spacetype_image().
Definition at line 617 of file space_image.c.
References MaskSpaceInfo::blend_factor, BLI_rctf_init(), BLI_thread_lock(), BLI_thread_unlock(), C, CTX_data_edit_object(), CTX_data_expect_evaluated_depsgraph(), CTX_data_scene(), CTX_wm_space_image(), depsgraph, MaskSpaceInfo::draw_flag, draw_image_cache(), draw_image_main_helpers(), draw_image_sample_line(), MaskSpaceInfo::draw_type, DRW_draw_view(), ED_mask_draw_region(), ED_region_image_metadata_draw(), ED_space_image(), ED_space_image_acquire_buffer(), ED_space_image_get_aspect(), ED_space_image_get_mask(), ED_space_image_get_size(), ED_space_image_get_zoom(), ED_space_image_release_buffer(), ED_space_image_show_uvedit(), SpaceImageOverlay::flag, SpaceImage::flag, ARegion::gizmo_map, height, IMA_SRC_VIEWER, image(), image_main_region_set_view2d(), image_user_refresh_scene(), lock, LOCK_DRAW_IMAGE, mask(), MASK_DRAWFLAG_OVERLAY, SpaceImage::mask_info, SpaceImage::mode, NULL, SpaceImage::overlay, MaskSpaceInfo::overlay_mode, Scene::r, R_COMP_CROP, RenderData::scemode, scene, SI_DRAW_METADATA, SI_MODE_MASK, SI_OVERLAY_SHOW_OVERLAYS, UI_view2d_view_ortho(), UI_view2d_view_restore(), UI_view2d_view_to_region(), ARegion::v2d, width, WM_gizmomap_draw(), WM_GIZMOMAP_DRAWSTEP_2D, x, ImBuf::x, y, and ImBuf::y.
Referenced by ED_spacetype_image().
|
static |
Definition at line 586 of file space_image.c.
References wmWindowManager::defaultconf, ARegion::handlers, SPACE_IMAGE, WM_event_add_keymap_handler(), WM_event_add_keymap_handler_v2d_mask(), and WM_keymap_ensure().
Referenced by ED_spacetype_image().
|
static |
Definition at line 716 of file space_image.c.
References wmNotifier::action, blender::compositor::area(), wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), ELEM, ARegion::gizmo_map, SpaceImage::iuser, NA_EDITED, NA_PAINTING, NA_SELECTED, NC_GEOM, NC_GPENCIL, NC_IMAGE, NC_MATERIAL, NC_SCREEN, ND_DATA, ND_GPENCIL_EDITMODE, ND_LAYER, ND_SELECT, ND_SHADING_LINKS, params, ImageUser::scene, Scene::toolsettings, ToolSettings::uv_flag, UV_SHOW_SAME_IMAGE, and WM_gizmomap_tag_refresh().
Referenced by ED_spacetype_image().
|
static |
Definition at line 531 of file space_image.c.
References Image::aspx, Image::aspy, BLI_rcti_size_x(), BLI_rcti_size_y(), View2D::cur, ED_region_visible_rect(), ED_space_image(), ED_space_image_get_size(), float(), height, View2D::mask, View2D::tot, ARegion::v2d, w(), width, ARegion::winrct, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, SpaceImage::xof, y1, rcti::ymax, rctf::ymax, rcti::ymin, rctf::ymin, SpaceImage::yof, and SpaceImage::zoom.
Referenced by image_main_region_draw().
Definition at line 187 of file space_image.c.
References IMAGE_OT_add_render_slot(), IMAGE_OT_change_frame(), IMAGE_OT_clear_render_border(), IMAGE_OT_clear_render_slot(), IMAGE_OT_curves_point_set(), IMAGE_OT_cycle_render_slot(), IMAGE_OT_file_browse(), IMAGE_OT_flip(), IMAGE_OT_invert(), IMAGE_OT_match_movie_length(), IMAGE_OT_new(), IMAGE_OT_open(), IMAGE_OT_pack(), IMAGE_OT_read_viewlayers(), IMAGE_OT_reload(), IMAGE_OT_remove_render_slot(), IMAGE_OT_render_border(), IMAGE_OT_replace(), IMAGE_OT_resize(), IMAGE_OT_sample(), IMAGE_OT_sample_line(), IMAGE_OT_save(), IMAGE_OT_save_all_modified(), IMAGE_OT_save_as(), IMAGE_OT_save_sequence(), IMAGE_OT_tile_add(), IMAGE_OT_tile_fill(), IMAGE_OT_tile_remove(), IMAGE_OT_unpack(), IMAGE_OT_view_all(), IMAGE_OT_view_center_cursor(), IMAGE_OT_view_cursor_center(), IMAGE_OT_view_pan(), IMAGE_OT_view_selected(), IMAGE_OT_view_zoom(), IMAGE_OT_view_zoom_border(), 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 280 of file space_image.c.
References blender::compositor::area(), BKE_image_user_frame_calc(), C, RenderData::cfra, CTX_data_scene(), ED_node_composite_job(), ED_space_image(), ED_space_image_get_mask(), IMA_SRC_VIEWER, SpaceImage::iuser, mask(), SpaceImage::mode, Scene::nodetree, Scene::r, scene, SI_MODE_MASK, and Image::source.
Referenced by ED_spacetype_image().
Definition at line 59 of file space_image.c.
References blender::compositor::area(), Scopes::ok, RGN_FLAG_HIDDEN, RGN_TYPE_TOOL_PROPS, and SpaceImage::scopes.
Referenced by image_listener().
|
static |
Definition at line 1000 of file space_image.c.
References blender::compositor::area(), SpaceImage::mode, SI_MODE_UV, and SI_MODE_VIEW.
Referenced by ED_spacetype_image().
|
static |
Definition at line 1020 of file space_image.c.
References RNA_enum_items_add(), and rna_enum_space_image_mode_items.
Referenced by ED_spacetype_image().
Definition at line 1006 of file space_image.c.
References blender::compositor::area(), SpaceImage::mode, SpaceImage::mode_prev, and SI_MODE_UV.
Referenced by ED_spacetype_image().
Definition at line 888 of file space_image.c.
References C, and ED_region_panels().
Referenced by ED_spacetype_image().
|
static |
Definition at line 877 of file space_image.c.
References wmWindowManager::defaultconf, ED_region_panels_init(), ARegion::handlers, View2D::scroll, SPACE_IMAGE, ARegion::v2d, V2D_SCROLL_RIGHT, V2D_SCROLL_VERTICAL_HIDE, WM_event_add_keymap_handler(), and WM_keymap_ensure().
Referenced by ED_spacetype_image().
|
static |
Definition at line 893 of file space_image.c.
References wmNotifier::action, wmNotifier::category, wmNotifier::data, ED_region_tag_redraw(), ELEM, NA_EDITED, NA_PAINTING, NA_SELECTED, NC_BRUSH, NC_GPENCIL, NC_IMAGE, NC_NODE, NC_SCENE, ND_COMPO_RESULT, ND_DATA, ND_MODE, ND_RENDER_RESULT, and params.
Referenced by ED_spacetype_image().
|
static |
Definition at line 74 of file space_image.c.
References C, CTX_data_scene(), ED_render_job_get_current_scene(), ED_space_image_auto_set(), IMA_TYPE_R_RESULT, SpaceImage::image, SpaceImage::iuser, ImageUser::scene, and Image::type.
Referenced by image_header_region_draw(), and image_main_region_draw().
Definition at line 515 of file space_image.c.
References IMAGE_GGT_gizmo2d(), IMAGE_GGT_gizmo2d_resize(), IMAGE_GGT_gizmo2d_rotate(), IMAGE_GGT_gizmo2d_translate(), IMAGE_GGT_navigate(), RGN_TYPE_WINDOW, SPACE_IMAGE, WM_gizmogrouptype_append(), WM_gizmogrouptype_append_and_link(), and WM_gizmomaptype_ensure().
Referenced by ED_spacetype_image().
const char* image_context_dir[] = {"edit_image", "edit_mask", NULL} |
Definition at line 428 of file space_image.c.
Referenced by bpy_context_members(), and image_context().