Blender  V3.3
Classes | Typedefs | Functions
ED_image.h File Reference
#include "DNA_listBase.h"
#include "DNA_space_types.h"

Go to the source code of this file.

Classes

struct  ImageFrameRange
 

Typedefs

typedef struct ImageFrameRange ImageFrameRange
 

Functions

float ED_space_image_zoom_level (const struct View2D *v2d, int grid_dimension)
 
void ED_space_image_grid_steps (struct SpaceImage *sima, float grid_steps[SI_GRID_STEPS_LEN], int grid_dimension)
 
float ED_space_image_increment_snap_value (int grid_dimesnions, const float grid_steps[SI_GRID_STEPS_LEN], float zoom_factor)
 
struct ImageED_space_image (const struct SpaceImage *sima)
 
void ED_space_image_set (struct Main *bmain, struct SpaceImage *sima, struct Image *ima, bool automatic)
 
void ED_space_image_auto_set (const struct bContext *C, struct SpaceImage *sima)
 
struct MaskED_space_image_get_mask (const struct SpaceImage *sima)
 
void ED_space_image_set_mask (struct bContext *C, struct SpaceImage *sima, struct Mask *mask)
 
bool ED_space_image_get_position (struct SpaceImage *sima, struct ARegion *region, int mval[2], float fpos[2])
 
bool ED_space_image_color_sample (struct SpaceImage *sima, struct ARegion *region, const int mval[2], float r_col[3], bool *r_is_data)
 
struct ImBufED_space_image_acquire_buffer (struct SpaceImage *sima, void **r_lock, int tile)
 
int ED_space_image_get_display_channel_mask (struct ImBuf *ibuf)
 
void ED_space_image_release_buffer (struct SpaceImage *sima, struct ImBuf *ibuf, void *lock)
 
bool ED_space_image_has_buffer (struct SpaceImage *sima)
 
void ED_space_image_get_size (struct SpaceImage *sima, int *r_width, int *r_height)
 
void ED_space_image_get_size_fl (struct SpaceImage *sima, float r_size[2])
 
void ED_space_image_get_aspect (struct SpaceImage *sima, float *r_aspx, float *r_aspy)
 
void ED_space_image_get_zoom (struct SpaceImage *sima, const struct ARegion *region, float *r_zoomx, float *r_zoomy)
 
void ED_space_image_get_uv_aspect (struct SpaceImage *sima, float *r_aspx, float *r_aspy)
 
void ED_space_image_scopes_update (const struct bContext *C, struct SpaceImage *sima, struct ImBuf *ibuf, bool use_view_settings)
 
void ED_space_image_paint_update (struct Main *bmain, struct wmWindowManager *wm, struct Scene *scene)
 
void ED_image_get_uv_aspect (struct Image *ima, struct ImageUser *iuser, float *r_aspx, float *r_aspy)
 
void ED_image_mouse_pos (struct SpaceImage *sima, const struct ARegion *region, const int mval[2], float co[2])
 
void ED_image_view_center_to_point (struct SpaceImage *sima, float x, float y)
 
void ED_image_point_pos (struct SpaceImage *sima, const struct ARegion *region, float x, float y, float *r_x, float *r_y)
 
void ED_image_point_pos__reverse (struct SpaceImage *sima, const struct ARegion *region, const float co[2], float r_co[2])
 
bool ED_image_slot_cycle (struct Image *image, int direction)
 
bool ED_space_image_show_render (const struct SpaceImage *sima)
 
bool ED_space_image_show_paint (const struct SpaceImage *sima)
 
bool ED_space_image_show_uvedit (const struct SpaceImage *sima, struct Object *obedit)
 
bool ED_space_image_paint_curve (const struct bContext *C)
 
bool ED_space_image_check_show_maskedit (struct SpaceImage *sima, struct Object *obedit)
 
bool ED_space_image_maskedit_poll (struct bContext *C)
 
bool ED_space_image_maskedit_visible_splines_poll (struct bContext *C)
 
bool ED_space_image_maskedit_mask_poll (struct bContext *C)
 
bool ED_space_image_maskedit_mask_visible_splines_poll (struct bContext *C)
 
bool ED_space_image_cursor_poll (struct bContext *C)
 
void ED_image_draw_info (struct Scene *scene, struct ARegion *region, bool color_manage, bool use_default_view, int channels, int x, int y, const unsigned char cp[4], const float fp[4], const float linearcol[4], const int *zp, const float *zpf)
 
bool ED_space_image_show_cache (const struct SpaceImage *sima)
 
bool ED_space_image_show_cache_and_mval_over (const struct SpaceImage *sima, struct ARegion *region, const int mval[2])
 
bool ED_image_should_save_modified (const struct Main *bmain)
 
int ED_image_save_all_modified_info (const struct Main *bmain, struct ReportList *reports)
 
bool ED_image_save_all_modified (const struct bContext *C, struct ReportList *reports)
 
ListBase ED_image_filesel_detect_sequences (struct Main *bmain, struct wmOperator *op, bool detect_udim)
 
bool ED_image_tools_paint_poll (struct bContext *C)
 
void ED_paint_cursor_start (struct Paint *p, bool(*poll)(struct bContext *C))
 

Typedef Documentation

◆ ImageFrameRange

Function Documentation

◆ ED_image_draw_info()

void ED_image_draw_info ( struct Scene scene,
struct ARegion region,
bool  color_manage,
bool  use_default_view,
int  channels,
int  x,
int  y,
const unsigned char  cp[4],
const float  fp[4],
const float  linearcol[4],
const int *  zp,
const float zpf 
)

◆ ED_image_filesel_detect_sequences()

ListBase ED_image_filesel_detect_sequences ( struct Main bmain,
struct wmOperator op,
bool  detect_udim 
)

◆ ED_image_get_uv_aspect()

void ED_image_get_uv_aspect ( struct Image ima,
struct ImageUser iuser,
float r_aspx,
float r_aspy 
)

◆ ED_image_mouse_pos()

void ED_image_mouse_pos ( struct SpaceImage sima,
const struct ARegion region,
const int  mval[2],
float  co[2] 
)

Takes event->mval.

Referenced by ED_mask_mouse_pos().

◆ ED_image_point_pos()

void ED_image_point_pos ( struct SpaceImage sima,
const struct ARegion region,
float  x,
float  y,
float r_x,
float r_y 
)

Referenced by ED_mask_point_pos().

◆ ED_image_point_pos__reverse()

void ED_image_point_pos__reverse ( struct SpaceImage sima,
const struct ARegion region,
const float  co[2],
float  r_co[2] 
)

◆ ED_image_save_all_modified()

bool ED_image_save_all_modified ( const struct bContext C,
struct ReportList reports 
)

◆ ED_image_save_all_modified_info()

int ED_image_save_all_modified_info ( const struct Main bmain,
struct ReportList reports 
)

◆ ED_image_should_save_modified()

bool ED_image_should_save_modified ( const struct Main bmain)

◆ ED_image_slot_cycle()

bool ED_image_slot_cycle ( struct Image image,
int  direction 
)

This is more a user-level functionality, for going to next/prev used slot, Stepping onto the last unused slot too.

Definition at line 357 of file image_edit.c.

References BKE_image_get_renderslot(), BKE_image_partial_update_mark_full_update(), BLI_assert, BLI_listbase_count(), ELEM, image(), and RenderSlot::render.

Referenced by image_cycle_render_slot_exec(), and ui_imageuser_slot_menu_step().

◆ ED_image_tools_paint_poll()

bool ED_image_tools_paint_poll ( struct bContext C)

◆ ED_image_view_center_to_point()

void ED_image_view_center_to_point ( struct SpaceImage sima,
float  x,
float  y 
)

◆ ED_paint_cursor_start()

void ED_paint_cursor_start ( struct Paint p,
bool(*)(struct bContext *C poll 
)

◆ ED_space_image()

struct Image* ED_space_image ( const struct SpaceImage sima)

◆ ED_space_image_acquire_buffer()

struct ImBuf* ED_space_image_acquire_buffer ( struct SpaceImage sima,
void **  r_lock,
int  tile 
)

◆ ED_space_image_auto_set()

void ED_space_image_auto_set ( const struct bContext C,
struct SpaceImage sima 
)

◆ ED_space_image_check_show_maskedit()

bool ED_space_image_check_show_maskedit ( struct SpaceImage sima,
struct Object obedit 
)

Matches clip function.

Definition at line 458 of file image_edit.c.

References ED_space_image_show_uvedit(), SpaceImage::mode, and SI_MODE_MASK.

Referenced by ED_space_image_maskedit_poll(), image_listener(), and image_view_selected_exec().

◆ ED_space_image_color_sample()

bool ED_space_image_color_sample ( struct SpaceImage sima,
struct ARegion region,
const int  mval[2],
float  r_col[3],
bool r_is_data 
)

◆ ED_space_image_cursor_poll()

bool ED_space_image_cursor_poll ( struct bContext C)

◆ ED_space_image_get_aspect()

void ED_space_image_get_aspect ( struct SpaceImage sima,
float r_aspx,
float r_aspy 
)

◆ ED_space_image_get_display_channel_mask()

int ED_space_image_get_display_channel_mask ( struct ImBuf ibuf)

◆ ED_space_image_get_mask()

struct Mask* ED_space_image_get_mask ( const struct SpaceImage sima)

◆ ED_space_image_get_position()

bool ED_space_image_get_position ( struct SpaceImage sima,
struct ARegion region,
int  mval[2],
float  fpos[2] 
)

Returns mouse position in image space.

Definition at line 3196 of file image_ops.c.

References ED_space_image_acquire_buffer(), ED_space_image_release_buffer(), lock, NULL, UI_view2d_region_to_view(), and ARegion::v2d.

Referenced by eyedropper_cryptomatte_sample_fl().

◆ ED_space_image_get_size()

void ED_space_image_get_size ( struct SpaceImage sima,
int *  r_width,
int *  r_height 
)

◆ ED_space_image_get_size_fl()

void ED_space_image_get_size_fl ( struct SpaceImage sima,
float  r_size[2] 
)

Definition at line 228 of file image_edit.c.

References ED_space_image_get_size().

◆ ED_space_image_get_uv_aspect()

void ED_space_image_get_uv_aspect ( struct SpaceImage sima,
float r_aspx,
float r_aspy 
)

◆ ED_space_image_get_zoom()

void ED_space_image_get_zoom ( struct SpaceImage sima,
const struct ARegion region,
float r_zoomx,
float r_zoomy 
)

◆ ED_space_image_grid_steps()

void ED_space_image_grid_steps ( struct SpaceImage sima,
float  grid_steps[SI_GRID_STEPS_LEN],
int  grid_dimension 
)

◆ ED_space_image_has_buffer()

bool ED_space_image_has_buffer ( struct SpaceImage sima)

◆ ED_space_image_increment_snap_value()

float ED_space_image_increment_snap_value ( int  grid_dimesnions,
const float  grid_steps[SI_GRID_STEPS_LEN],
float  zoom_factor 
)

Calculate the increment snapping value for UV/image editor based on the zoom factor The code in here (except the offset part) is used in grid_frag.glsl (see grid_res) for drawing the grid overlay for the UV/Image editor.

Definition at line 604 of file image_draw.c.

References offset, and SI_GRID_STEPS_LEN.

Referenced by initSnapSpatial().

◆ ED_space_image_maskedit_mask_poll()

bool ED_space_image_maskedit_mask_poll ( struct bContext C)

◆ ED_space_image_maskedit_mask_visible_splines_poll()

bool ED_space_image_maskedit_mask_visible_splines_poll ( struct bContext C)

◆ ED_space_image_maskedit_poll()

bool ED_space_image_maskedit_poll ( struct bContext C)

◆ ED_space_image_maskedit_visible_splines_poll()

bool ED_space_image_maskedit_visible_splines_poll ( struct bContext C)

◆ ED_space_image_paint_curve()

bool ED_space_image_paint_curve ( const struct bContext C)

◆ ED_space_image_paint_update()

void ED_space_image_paint_update ( struct Main bmain,
struct wmWindowManager wm,
struct Scene scene 
)

Enable the paint cursor if it isn't already.

purpose is to make sure the paint cursor is shown if paint mode is enabled in the image editor. The paint poll will ensure that the cursor is hidden when not in paint mode.

Definition at line 438 of file paint_image.cc.

References blender::compositor::area(), bScreen::areabase, BKE_paint_init(), ED_image_tools_paint_poll(), ED_paint_cursor_start(), enabled, ToolSettings::imapaint, LISTBASE_FOREACH, ImagePaintSettings::paint, paint_cursor_delete_textures(), PAINT_CURSOR_TEXTURE_PAINT, PAINT_MODE_TEXTURE_2D, scene, SI_MODE_PAINT, SPACE_IMAGE, Scene::toolsettings, wmWindowManager::windows, and WM_window_get_active_screen().

Referenced by ED_editors_init().

◆ ED_space_image_release_buffer()

void ED_space_image_release_buffer ( struct SpaceImage sima,
struct ImBuf ibuf,
void lock 
)

◆ ED_space_image_scopes_update()

void ED_space_image_scopes_update ( const struct bContext C,
struct SpaceImage sima,
struct ImBuf ibuf,
bool  use_view_settings 
)

◆ ED_space_image_set()

void ED_space_image_set ( struct Main bmain,
struct SpaceImage sima,
struct Image ima,
bool  automatic 
)

◆ ED_space_image_set_mask()

void ED_space_image_set_mask ( struct bContext C,
struct SpaceImage sima,
struct Mask mask 
)

◆ ED_space_image_show_cache()

bool ED_space_image_show_cache ( const struct SpaceImage sima)

◆ ED_space_image_show_cache_and_mval_over()

bool ED_space_image_show_cache_and_mval_over ( const struct SpaceImage sima,
struct ARegion region,
const int  mval[2] 
)

◆ ED_space_image_show_paint()

bool ED_space_image_show_paint ( const struct SpaceImage sima)

◆ ED_space_image_show_render()

bool ED_space_image_show_render ( const struct SpaceImage sima)

Referenced by image_listener().

◆ ED_space_image_show_uvedit()

bool ED_space_image_show_uvedit ( const struct SpaceImage sima,
struct Object obedit 
)

◆ ED_space_image_zoom_level()

float ED_space_image_zoom_level ( const struct View2D v2d,
int  grid_dimension 
)