Blender V4.3
space_image.cc File Reference
#include "DNA_defaults.h"
#include "DNA_gpencil_legacy_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_threads.h"
#include "BKE_colortools.hh"
#include "BKE_context.hh"
#include "BKE_image.hh"
#include "BKE_layer.hh"
#include "BKE_lib_query.hh"
#include "BKE_lib_remap.hh"
#include "BKE_screen.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "RNA_enum_types.hh"
#include "IMB_imbuf_types.hh"
#include "ED_asset_shelf.hh"
#include "ED_image.hh"
#include "ED_mask.hh"
#include "ED_node.hh"
#include "ED_render.hh"
#include "ED_screen.hh"
#include "ED_space_api.hh"
#include "ED_transform.hh"
#include "ED_util.hh"
#include "ED_uvedit.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "UI_interface.hh"
#include "UI_resources.hh"
#include "UI_view2d.hh"
#include "BLO_read_write.hh"
#include "DRW_engine.hh"
#include "image_intern.hh"

Go to the source code of this file.

Functions

static void image_scopes_tag_refresh (ScrArea *area)
 
static void image_user_refresh_scene (const bContext *C, SpaceImage *sima)
 
static SpaceLinkimage_create (const ScrArea *, const Scene *)
 
static void image_free (SpaceLink *sl)
 
static void image_init (wmWindowManager *, ScrArea *area)
 
static SpaceLinkimage_duplicate (SpaceLink *sl)
 
static void image_operatortypes ()
 
static void image_keymap (wmKeyConfig *keyconf)
 
static void image_dropboxes ()
 
static void image_refresh (const bContext *C, ScrArea *area)
 
static void image_listener (const wmSpaceTypeListenerParams *params)
 
static int image_context (const bContext *C, const char *member, bContextDataResult *result)
 
static void IMAGE_GGT_gizmo2d (wmGizmoGroupType *gzgt)
 
static void IMAGE_GGT_gizmo2d_translate (wmGizmoGroupType *gzgt)
 
static void IMAGE_GGT_gizmo2d_resize (wmGizmoGroupType *gzgt)
 
static void IMAGE_GGT_gizmo2d_rotate (wmGizmoGroupType *gzgt)
 
static void IMAGE_GGT_navigate (wmGizmoGroupType *gzgt)
 
static void image_widgets ()
 
static void image_main_region_set_view2d (SpaceImage *sima, ARegion *region)
 
static void image_main_region_init (wmWindowManager *wm, ARegion *region)
 
static void image_main_region_draw (const bContext *C, ARegion *region)
 
static void image_main_region_listener (const wmRegionListenerParams *params)
 
static void image_buttons_region_init (wmWindowManager *wm, ARegion *region)
 
static void image_buttons_region_layout (const bContext *C, ARegion *region)
 
static void image_buttons_region_draw (const bContext *C, ARegion *region)
 
static void image_buttons_region_listener (const wmRegionListenerParams *params)
 
static void image_tools_region_init (wmWindowManager *wm, ARegion *region)
 
static void image_tools_region_draw (const bContext *C, ARegion *region)
 
static void image_tools_region_listener (const wmRegionListenerParams *params)
 
static void image_tools_header_region_draw (const bContext *C, ARegion *region)
 
static void image_header_region_init (wmWindowManager *, ARegion *region)
 
static void image_header_region_draw (const bContext *C, ARegion *region)
 
static void image_header_region_listener (const wmRegionListenerParams *params)
 
static void image_asset_shelf_region_init (wmWindowManager *wm, ARegion *region)
 
static void image_id_remap (ScrArea *, SpaceLink *slink, const blender::bke::id::IDRemapper &mappings)
 
static void image_foreach_id (SpaceLink *space_link, LibraryForeachIDData *data)
 
static int image_space_subtype_get (ScrArea *area)
 
static void image_space_subtype_set (ScrArea *area, int value)
 
static void image_space_subtype_item_extend (bContext *, EnumPropertyItem **item, int *totitem)
 
static blender::StringRefNull image_space_name_get (const ScrArea *area)
 
static int image_space_icon_get (const ScrArea *area)
 
static void image_space_blend_read_data (BlendDataReader *, SpaceLink *sl)
 
static void image_space_blend_write (BlendWriter *writer, SpaceLink *sl)
 
void ED_spacetype_image ()
 

Variables

const char * image_context_dir [] = {"edit_image", "edit_mask", nullptr}
 

Function Documentation

◆ ED_spacetype_image()

void ED_spacetype_image ( )

Definition at line 1132 of file space_image.cc.

References BKE_spacetype_register(), BLI_addhead(), ARegionType::context, ARegionType::draw, ARegionType::duplicate, ED_area_do_mgs_subscribe_for_tool_header(), ED_area_do_mgs_subscribe_for_tool_ui(), ED_area_type_hud(), ED_KEYMAP_ASSET_SHELF, ED_KEYMAP_FOOTER, 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(), ARegionType::free, HEADERY, image_asset_shelf_region_init(), 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_foreach_id(), 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_blend_read_data(), image_space_blend_write(), image_space_icon_get(), image_space_name_get(), image_space_subtype_get(), image_space_subtype_item_extend(), image_space_subtype_set(), image_tools_header_region_draw(), image_tools_region_draw(), image_tools_region_init(), image_tools_region_listener(), image_widgets(), ARegionType::init, int, ARegionType::keymapflag, ARegionType::layout, ARegionType::listener, MEM_callocN, ARegionType::message_subscribe, ARegionType::on_poll_success, ARegionType::on_user_resize, ARegionType::poll, ARegionType::prefsizex, ARegionType::prefsizey, ARegionType::regionid, RGN_TYPE_ASSET_SHELF, RGN_TYPE_ASSET_SHELF_HEADER, RGN_TYPE_HEADER, RGN_TYPE_TOOL_HEADER, RGN_TYPE_TOOLS, RGN_TYPE_UI, RGN_TYPE_WINDOW, ARegionType::snap_size, SPACE_IMAGE, STRNCPY, UI_SIDEBAR_PANEL_WIDTH, and UI_TOOLBAR_WIDTH.

Referenced by ED_spacetypes_init().

◆ image_asset_shelf_region_init()

static void image_asset_shelf_region_init ( wmWindowManager * wm,
ARegion * region )
static

◆ image_buttons_region_draw()

◆ image_buttons_region_init()

◆ image_buttons_region_layout()

◆ image_buttons_region_listener()

◆ image_context()

◆ image_create()

◆ image_dropboxes()

static void image_dropboxes ( )
static

Definition at line 266 of file space_image.cc.

Referenced by ED_spacetype_image().

◆ image_duplicate()

static SpaceLink * image_duplicate ( SpaceLink * sl)
static

Definition at line 192 of file space_image.cc.

References BKE_scopes_new(), MEM_dupallocN, and SpaceImage::scopes.

Referenced by ED_spacetype_image().

◆ image_foreach_id()

◆ image_free()

static void image_free ( SpaceLink * sl)
static

Definition at line 176 of file space_image.cc.

References BKE_scopes_free(), and SpaceImage::scopes.

Referenced by ED_spacetype_image().

◆ IMAGE_GGT_gizmo2d()

◆ IMAGE_GGT_gizmo2d_resize()

◆ IMAGE_GGT_gizmo2d_rotate()

◆ IMAGE_GGT_gizmo2d_translate()

◆ IMAGE_GGT_navigate()

static void IMAGE_GGT_navigate ( wmGizmoGroupType * gzgt)
static

Definition at line 509 of file space_image.cc.

References VIEW2D_GGT_navigate_impl().

Referenced by image_widgets().

◆ image_header_region_draw()

static void image_header_region_draw ( const bContext * C,
ARegion * region )
static

Definition at line 956 of file space_image.cc.

References CTX_wm_area(), ED_region_header(), and image_user_refresh_scene().

Referenced by ED_spacetype_image().

◆ image_header_region_init()

static void image_header_region_init ( wmWindowManager * ,
ARegion * region )
static

Definition at line 951 of file space_image.cc.

References ED_region_header_init().

Referenced by ED_spacetype_image().

◆ image_header_region_listener()

◆ image_id_remap()

◆ image_init()

static void image_init ( wmWindowManager * ,
ScrArea * area )
static

◆ image_keymap()

static void image_keymap ( wmKeyConfig * keyconf)
static

Definition at line 259 of file space_image.cc.

References RGN_TYPE_WINDOW, SPACE_IMAGE, and WM_keymap_ensure().

Referenced by ED_spacetype_image().

◆ image_listener()

◆ image_main_region_draw()

◆ image_main_region_init()

static void image_main_region_init ( wmWindowManager * wm,
ARegion * region )
static

◆ image_main_region_listener()

◆ image_main_region_set_view2d()

◆ image_operatortypes()

◆ image_refresh()

static void image_refresh ( const bContext * C,
ScrArea * area )
static
Note
take care not to get into feedback loop here, calling composite job causes viewer to refresh.

Definition at line 272 of file space_image.cc.

References BKE_image_user_frame_calc(), CTX_data_scene(), ED_node_composite_job(), ED_space_image(), ED_space_image_get_mask(), IMA_SRC_VIEWER, SpaceImage::iuser, SpaceImage::mode, SI_MODE_MASK, and Image::source.

Referenced by ED_spacetype_image().

◆ image_scopes_tag_refresh()

static void image_scopes_tag_refresh ( ScrArea * area)
static

◆ image_space_blend_read_data()

◆ image_space_blend_write()

static void image_space_blend_write ( BlendWriter * writer,
SpaceLink * sl )
static

Definition at line 1125 of file space_image.cc.

References BLO_write_struct.

Referenced by ED_spacetype_image().

◆ image_space_icon_get()

static int image_space_icon_get ( const ScrArea * area)
static

◆ image_space_name_get()

static blender::StringRefNull image_space_name_get ( const ScrArea * area)
static

◆ image_space_subtype_get()

static int image_space_subtype_get ( ScrArea * area)
static
Note
Used for splitting out a subset of modes is more involved, The previous non-uv-edit mode is stored so switching back to the image doesn't always reset the sub-mode.

Definition at line 1053 of file space_image.cc.

References SpaceImage::mode, SI_MODE_UV, and SI_MODE_VIEW.

Referenced by ED_spacetype_image().

◆ image_space_subtype_item_extend()

static void image_space_subtype_item_extend ( bContext * ,
EnumPropertyItem ** item,
int * totitem )
static

Definition at line 1073 of file space_image.cc.

References RNA_enum_items_add(), and rna_enum_space_image_mode_items.

Referenced by ED_spacetype_image().

◆ image_space_subtype_set()

static void image_space_subtype_set ( ScrArea * area,
int value )
static

Definition at line 1059 of file space_image.cc.

References SpaceImage::mode, SpaceImage::mode_prev, and SI_MODE_UV.

Referenced by ED_spacetype_image().

◆ image_tools_header_region_draw()

static void image_tools_header_region_draw ( const bContext * C,
ARegion * region )
static

◆ image_tools_region_draw()

static void image_tools_region_draw ( const bContext * C,
ARegion * region )
static

Definition at line 888 of file space_image.cc.

References ED_region_panels().

Referenced by ED_spacetype_image().

◆ image_tools_region_init()

◆ image_tools_region_listener()

◆ image_user_refresh_scene()

◆ image_widgets()

Variable Documentation

◆ image_context_dir

const char* image_context_dir[] = {"edit_image", "edit_mask", nullptr}

Definition at line 427 of file space_image.cc.

Referenced by image_context().