130 region = MEM_cnew<ARegion>(
"asset shelf for view3d");
137 region = MEM_cnew<ARegion>(
"asset shelf header for view3d");
215#ifdef WITH_INPUT_NDOF
283 if (scene->nodetree) {
455 gzgt->
name =
"UV Transform Gizmo";
456 gzgt->
idname =
"IMAGE_GGT_gizmo2d";
469 gzgt->
name =
"UV Translate Gizmo";
470 gzgt->
idname =
"IMAGE_GGT_gizmo2d_translate";
483 gzgt->
name =
"UV Transform Gizmo Resize";
484 gzgt->
idname =
"IMAGE_GGT_gizmo2d_resize";
497 gzgt->
name =
"UV Transform Gizmo Resize";
498 gzgt->
idname =
"IMAGE_GGT_gizmo2d_rotate";
550 int visible_centerx = 0;
551 int visible_centery = visible_rect->
ymin + (visible_winy - winy) / 2;
553 region->v2d.tot.xmin = 0;
554 region->v2d.tot.ymin = 0;
555 region->v2d.tot.xmax =
w;
556 region->v2d.tot.ymax = h;
558 region->v2d.mask.xmin = region->v2d.mask.ymin = 0;
559 region->v2d.mask.xmax = winx;
560 region->v2d.mask.ymax = winy;
563 float x1 = region->winrct.xmin + visible_centerx + (winx - sima->
zoom *
w) / 2.0f;
564 float y1 = region->winrct.ymin + visible_centery + (winy - sima->
zoom * h) / 2.0f;
570 region->v2d.cur.xmin = ((region->winrct.xmin -
float(x1)) / sima->
zoom);
571 region->v2d.cur.xmax = region->v2d.cur.xmin + (
float(winx) / sima->
zoom);
574 region->v2d.cur.ymin = ((region->winrct.ymin -
float(y1)) / sima->
zoom);
575 region->v2d.cur.ymax = region->v2d.cur.ymin + (
float(winy) / sima->
zoom);
578 region->v2d.cur.xmin /=
w;
579 region->v2d.cur.xmax /=
w;
580 region->v2d.cur.ymin /= h;
581 region->v2d.cur.ymax /= h;
622 Mask *mask =
nullptr;
624 View2D *v2d = ®ion->v2d;
626 const bool show_viewer = (image && image->source ==
IMA_SRC_VIEWER);
629 scene->r.scemode &= ~R_COMP_CROP;
776 const char *contexts_base[3] = {
nullptr};
778 const char **contexts = contexts_base;
781 switch (sima->
mode) {
815 &sima->
sample_line_hist, ibuf, &scene->view_settings, &scene->display_settings);
1013 asset::shelf::region_init(wm, region);
1135 std::unique_ptr<SpaceType> st = std::make_unique<SpaceType>();
1160 st->blend_read_after_liblink =
nullptr;
1224 art = MEM_cnew<ARegionType>(
"spacetype image asset shelf region");
1227 art->
duplicate = asset::shelf::region_duplicate;
1228 art->
free = asset::shelf::region_free;
1230 art->
listener = asset::shelf::region_listen;
1232 art->
poll = asset::shelf::regions_poll;
1233 art->
snap_size = asset::shelf::region_snap;
1235 art->
context = asset::shelf::context;
1237 art->
layout = asset::shelf::region_layout;
1238 art->
draw = asset::shelf::region_draw;
1242 art = MEM_cnew<ARegionType>(
"spacetype image asset shelf header region");
1245 art->
init = asset::shelf::header_region_init;
1246 art->
poll = asset::shelf::regions_poll;
1247 art->
draw = asset::shelf::header_region;
1248 art->
listener = asset::shelf::header_region_listen;
1249 art->
context = asset::shelf::context;
Depsgraph * CTX_data_expect_evaluated_depsgraph(const bContext *C)
void CTX_data_dir_set(bContextDataResult *result, const char **dir)
SpaceImage * CTX_wm_space_image(const bContext *C)
bool CTX_data_equals(const char *member, const char *str)
bool CTX_data_dir(const char *member)
void CTX_data_id_pointer_set(bContextDataResult *result, ID *id)
ScrArea * CTX_wm_area(const bContext *C)
@ CTX_RESULT_MEMBER_NOT_FOUND
Scene * CTX_data_scene(const bContext *C)
Object * CTX_data_edit_object(const bContext *C)
enum eContextObjectMode CTX_data_mode_enum(const bContext *C)
void BKE_gpencil_blend_read_data(struct BlendDataReader *reader, struct bGPdata *gpd)
void BKE_image_user_frame_calc(Image *ima, ImageUser *iuser, int cfra)
void BKE_imageuser_default(ImageUser *iuser)
void BKE_image_partial_update_mark_full_update(Image *image)
Mark the whole image to be updated.
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
Object * BKE_view_layer_edit_object_get(const ViewLayer *view_layer)
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(data_, id_super_, cb_flag_)
@ IDWALK_CB_DIRECT_WEAK_LINK
int BKE_lib_query_foreachid_process_flags_get(const LibraryForeachIDData *data)
@ ID_REMAP_APPLY_UPDATE_REFCOUNT
@ ID_REMAP_APPLY_ENSURE_REAL
void BKE_spacetype_register(std::unique_ptr< SpaceType > st)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
void BLI_rctf_init(struct rctf *rect, float xmin, float xmax, float ymin, float ymax)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
#define STRNCPY(dst, src)
void BLI_thread_unlock(int type)
void BLI_thread_lock(int type)
#define ARRAY_SET_ITEMS(...)
#define BLO_write_struct(writer, struct_name, data_ptr)
#define FILTER_ID_GD_LEGACY
#define DNA_struct_default_get(struct_name)
Object is a sort of wrapper for general info.
#define RGN_ALIGN_ENUM_FROM_MASK(align)
@ RGN_ALIGN_HIDE_WITH_PREV
@ RGN_TYPE_ASSET_SHELF_HEADER
@ RGN_FLAG_HIDDEN_BY_USER
@ SI_OVERLAY_SHOW_OVERLAYS
@ SI_OVERLAY_SHOW_GRID_BACKGROUND
@ V2D_SCROLL_VERTICAL_HIDE
void DRW_draw_view(const bContext *C)
void ED_space_image_release_buffer(SpaceImage *sima, ImBuf *ibuf, void *lock)
void ED_space_image_auto_set(const bContext *C, SpaceImage *sima)
void ED_space_image_get_size(SpaceImage *sima, int *r_width, int *r_height)
bool ED_image_tools_paint_poll(bContext *C)
ImBuf * ED_space_image_acquire_buffer(SpaceImage *sima, void **r_lock, int tile)
bool ED_space_image_check_show_maskedit(SpaceImage *sima, Object *obedit)
bool ED_space_image_show_render(const SpaceImage *sima)
bool ED_space_image_show_uvedit(const SpaceImage *sima, Object *obedit)
void ED_space_image_get_aspect(SpaceImage *sima, float *r_aspx, float *r_aspy)
void ED_space_image_scopes_update(const bContext *C, SpaceImage *sima, ImBuf *ibuf, bool use_view_settings)
void ED_space_image_get_zoom(SpaceImage *sima, const ARegion *region, float *r_zoomx, float *r_zoomy)
Image * ED_space_image(const SpaceImage *sima)
void ED_paint_cursor_start(Paint *paint, bool(*poll)(bContext *C))
Mask * ED_space_image_get_mask(const SpaceImage *sima)
void ED_mask_draw_region(Depsgraph *depsgraph, Mask *mask, ARegion *region, char draw_flag, char draw_type, eMaskOverlayMode overlay_mode, float blend_factor, int width_i, int height_i, float aspx, float aspy, bool do_scale_applied, bool do_draw_cb, float stabmat[4][4], const bContext *C)
void ED_node_composite_job(const bContext *C, bNodeTree *nodetree, Scene *scene_owner)
Scene * ED_render_job_get_current_scene(const bContext *C)
void ED_area_do_mgs_subscribe_for_tool_header(const wmRegionMessageSubscribeParams *params)
void ED_area_tag_redraw(ScrArea *area)
ARegionType * ED_area_type_hud(int space_type)
void ED_area_do_mgs_subscribe_for_tool_ui(const wmRegionMessageSubscribeParams *params)
void ED_region_panels(const bContext *C, ARegion *region)
void ED_region_header(const bContext *C, ARegion *region)
const rcti * ED_region_visible_rect(ARegion *region)
void ED_region_header_init(ARegion *region)
void ED_region_panels_layout_ex(const bContext *C, ARegion *region, ListBase *paneltypes, wmOperatorCallContext op_context, const char *contexts[], const char *category_override)
void ED_region_header_with_button_sections(const bContext *C, ARegion *region, uiButtonSectionsAlign align)
int ED_region_generic_tools_region_snap_size(const ARegion *region, int size, int axis)
void ED_area_tag_refresh(ScrArea *area)
void ED_region_generic_tools_region_message_subscribe(const wmRegionMessageSubscribeParams *params)
void ED_region_panels_init(wmWindowManager *wm, ARegion *region)
void ED_region_tag_redraw(ARegion *region)
void ED_region_panels_draw(const bContext *C, ARegion *region)
void ED_region_image_metadata_draw(int x, int y, ImBuf *ibuf, const rctf *frame, float zoomx, float zoomy)
void ED_uvedit_buttons_register(ARegionType *art)
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
#define UI_SIDEBAR_PANEL_WIDTH
PanelCategoryStack * UI_panel_category_active_find(ARegion *region, const char *idname)
void UI_view2d_view_restore(const bContext *C)
void VIEW2D_GGT_navigate_impl(wmGizmoGroupType *gzgt, const char *idname)
void UI_view2d_view_ortho(const View2D *v2d)
void UI_view2d_view_to_region(const View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL()
@ WM_GIZMOMAP_DRAWSTEP_2D
@ WM_GIZMOGROUPTYPE_DRAW_MODAL_EXCLUDE
@ WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP
@ WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK
#define ND_GPENCIL_EDITMODE
#define ND_RENDER_OPTIONS
@ WM_OP_INVOKE_REGION_WIN
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
IDRemapperApplyResult apply(ID **r_id_ptr, IDRemapperApplyOptions options, ID *id_self=nullptr) const
bool contains_mappings_for_any(IDTypeFilter filter) const
const Depsgraph * depsgraph
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
void draw_image_main_helpers(const bContext *C, ARegion *region)
void draw_image_cache(const bContext *C, ARegion *region)
void draw_image_sample_line(SpaceImage *sima)
void IMAGE_OT_view_cursor_center(wmOperatorType *ot)
void IMAGE_OT_change_frame(wmOperatorType *ot)
void IMAGE_OT_save_sequence(wmOperatorType *ot)
void IMAGE_OT_view_zoom(wmOperatorType *ot)
void IMAGE_OT_cycle_render_slot(wmOperatorType *ot)
void IMAGE_OT_match_movie_length(wmOperatorType *ot)
void IMAGE_OT_save_all_modified(wmOperatorType *ot)
void IMAGE_OT_save_as(wmOperatorType *ot)
void IMAGE_OT_sample(wmOperatorType *ot)
void IMAGE_OT_tile_fill(wmOperatorType *ot)
void IMAGE_OT_remove_render_slot(wmOperatorType *ot)
void IMAGE_OT_view_zoom_border(wmOperatorType *ot)
void IMAGE_OT_reload(wmOperatorType *ot)
void IMAGE_OT_unpack(wmOperatorType *ot)
void IMAGE_OT_view_selected(wmOperatorType *ot)
void IMAGE_OT_tile_add(wmOperatorType *ot)
void IMAGE_OT_pack(wmOperatorType *ot)
void IMAGE_OT_open(wmOperatorType *ot)
void IMAGE_OT_read_viewlayers(wmOperatorType *ot)
void IMAGE_OT_invert(wmOperatorType *ot)
void IMAGE_OT_resize(wmOperatorType *ot)
void IMAGE_OT_clear_render_slot(wmOperatorType *ot)
void IMAGE_OT_view_zoom_in(wmOperatorType *ot)
void IMAGE_OT_view_zoom_out(wmOperatorType *ot)
void IMAGE_OT_rotate_orthogonal(wmOperatorType *ot)
void IMAGE_OT_view_all(wmOperatorType *ot)
void IMAGE_OT_render_border(wmOperatorType *ot)
void IMAGE_OT_view_pan(wmOperatorType *ot)
void IMAGE_OT_clipboard_copy(wmOperatorType *ot)
void IMAGE_OT_save(wmOperatorType *ot)
void IMAGE_OT_file_browse(wmOperatorType *ot)
void IMAGE_OT_clipboard_paste(wmOperatorType *ot)
void IMAGE_OT_add_render_slot(wmOperatorType *ot)
void IMAGE_OT_tile_remove(wmOperatorType *ot)
void IMAGE_OT_flip(wmOperatorType *ot)
void IMAGE_OT_sample_line(wmOperatorType *ot)
void IMAGE_OT_replace(wmOperatorType *ot)
void IMAGE_OT_view_center_cursor(wmOperatorType *ot)
void IMAGE_OT_view_zoom_ratio(wmOperatorType *ot)
void IMAGE_OT_new(wmOperatorType *ot)
void IMAGE_OT_clear_render_border(wmOperatorType *ot)
void IMAGE_OT_curves_point_set(wmOperatorType *ot)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_dupallocN)(const void *vmemh)
static void * newdataadr(FileData *fd, const void *adr)
int RNA_enum_from_value(const EnumPropertyItem *item, const int value)
void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
const EnumPropertyItem rna_enum_space_image_mode_items[]
static void image_buttons_region_init(wmWindowManager *wm, ARegion *region)
static int image_context(const bContext *C, const char *member, bContextDataResult *result)
static void image_space_blend_write(BlendWriter *writer, SpaceLink *sl)
static void image_header_region_listener(const wmRegionListenerParams *params)
static void IMAGE_GGT_gizmo2d(wmGizmoGroupType *gzgt)
static void image_operatortypes()
static void IMAGE_GGT_gizmo2d_translate(wmGizmoGroupType *gzgt)
static void IMAGE_GGT_navigate(wmGizmoGroupType *gzgt)
static void image_widgets()
static void image_main_region_listener(const wmRegionListenerParams *params)
static void image_dropboxes()
static void image_space_blend_read_data(BlendDataReader *, SpaceLink *sl)
static void image_asset_shelf_region_init(wmWindowManager *wm, ARegion *region)
static void image_init(wmWindowManager *, ScrArea *area)
static void image_main_region_set_view2d(SpaceImage *sima, ARegion *region)
static void image_listener(const wmSpaceTypeListenerParams *params)
static void image_tools_region_draw(const bContext *C, ARegion *region)
static void image_space_subtype_set(ScrArea *area, int value)
static void image_foreach_id(SpaceLink *space_link, LibraryForeachIDData *data)
void ED_spacetype_image()
static void IMAGE_GGT_gizmo2d_rotate(wmGizmoGroupType *gzgt)
static void image_tools_header_region_draw(const bContext *C, ARegion *region)
static SpaceLink * image_create(const ScrArea *, const Scene *)
static void image_tools_region_listener(const wmRegionListenerParams *params)
static void image_user_refresh_scene(const bContext *C, SpaceImage *sima)
const char * image_context_dir[]
static void image_keymap(wmKeyConfig *keyconf)
static void image_tools_region_init(wmWindowManager *wm, ARegion *region)
static void image_free(SpaceLink *sl)
static int image_space_subtype_get(ScrArea *area)
static void image_header_region_draw(const bContext *C, ARegion *region)
static SpaceLink * image_duplicate(SpaceLink *sl)
static void image_main_region_init(wmWindowManager *wm, ARegion *region)
static void image_refresh(const bContext *C, ScrArea *area)
static void image_buttons_region_listener(const wmRegionListenerParams *params)
static void image_buttons_region_layout(const bContext *C, ARegion *region)
static void IMAGE_GGT_gizmo2d_resize(wmGizmoGroupType *gzgt)
static blender::StringRefNull image_space_name_get(const ScrArea *area)
static void image_id_remap(ScrArea *, SpaceLink *slink, const blender::bke::id::IDRemapper &mappings)
static void image_scopes_tag_refresh(ScrArea *area)
static void image_main_region_draw(const bContext *C, ARegion *region)
static void image_buttons_region_draw(const bContext *C, ARegion *region)
static void image_header_region_init(wmWindowManager *, ARegion *region)
static int image_space_icon_get(const ScrArea *area)
static void image_space_subtype_item_extend(bContext *, EnumPropertyItem **item, int *totitem)
bool(* poll)(const RegionPollParams *params)
void(* on_poll_success)(const bContext *C, ARegion *region)
void(* message_subscribe)(const wmRegionMessageSubscribeParams *params)
void(* listener)(const wmRegionListenerParams *params)
void *(* duplicate)(void *poin)
bContextDataCallback context
void(* draw)(const bContext *C, ARegion *region)
void(* layout)(const bContext *C, ARegion *region)
void(* on_user_resize)(const ARegion *region)
int(* snap_size)(const ARegion *region, int size, int axis)
void(* init)(wmWindowManager *wm, ARegion *region)
struct ToolSettings * toolsettings
SpaceImageOverlay overlay
struct Histogram sample_line_hist
int custom_grid_subdiv[2]
wmGizmoMapType_Params gzmap_params
eWM_GizmoFlagGroupTypeFlag flag
struct wmKeyConfig * defaultconf
ListBase * WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
wmEventHandler_Dropbox * WM_event_add_dropbox_handler(ListBase *handlers, ListBase *dropboxes)
wmEventHandler_Keymap * WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap)
wmEventHandler_Keymap * WM_event_add_keymap_handler_v2d_mask(ListBase *handlers, wmKeyMap *keymap)
wmGizmoGroupType * WM_gizmogrouptype_append(void(*wtfunc)(wmGizmoGroupType *))
wmGizmoGroupTypeRef * WM_gizmogrouptype_append_and_link(wmGizmoMapType *gzmap_type, void(*wtfunc)(wmGizmoGroupType *))
void WM_gizmomap_tag_refresh(wmGizmoMap *gzmap)
void WM_gizmomap_draw(wmGizmoMap *gzmap, const bContext *C, const eWM_GizmoFlagMapDrawStep drawstep)
wmGizmoMapType * WM_gizmomaptype_ensure(const wmGizmoMapType_Params *gzmap_params)
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)
Scene * WM_window_get_active_scene(const wmWindow *win)