Blender
V3.3
|
Go to the source code of this file.
Classes | |
struct | ImageFrameRange |
Typedefs | |
typedef struct ImageFrameRange | ImageFrameRange |
typedef struct ImageFrameRange ImageFrameRange |
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 | ||
) |
Used by node view too.
Definition at line 122 of file image_draw.c.
References BLF_color3ub(), BLF_color3ubv(), BLF_draw(), blf_mono_font, BLF_position(), BLF_size(), BLF_width(), BLI_assert, BLI_rcti_cent_x(), BLI_rcti_cent_y(), BLI_rcti_init(), BLI_rcti_size_x(), BLI_YUV_ITU_BT709, blue, channels(), col, copy_v3_v3(), copy_v4_v4(), Scene::display_settings, ED_region_visible_rect(), float(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_COMP_I32, GPU_FETCH_FLOAT, GPU_FETCH_INT_TO_FLOAT, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), green, hue, IMB_colormanagement_pixel_to_display_space_v4(), imm_draw_box_wire_2d(), immBindBuiltinProgram(), immRecti(), immUnbindProgram(), immUniformColor3fv(), immUniformColor3fvAlpha(), immUniformColor3ub(), immUniformColor4ub(), immVertexFormat(), NULL, pos, red, rgb_to_hsv(), rgb_to_yuv(), usdtokens::rgba(), scene, SNPRINTF, str, STRNCPY, UI_ALPHA_CHECKER_DARK, UI_ALPHA_CHECKER_LIGHT, UI_UNIT_X, UI_UNIT_Y, v, Scene::view_settings, ARegion::winrct, x, rcti::xmax, rcti::xmin, y, rcti::ymax, rcti::ymin, and zero_v4().
Referenced by ED_imbuf_sample_draw(), and blender::ed::space_node::sample_draw().
ListBase ED_image_filesel_detect_sequences | ( | struct Main * | bmain, |
struct wmOperator * | op, | ||
bool | detect_udim | ||
) |
Used for both images and volume file loading.
Definition at line 141 of file image_sequence.c.
References BKE_main_blendfile_path(), BLI_addtail(), BLI_freelistN(), BLI_listbase_clear(), BLI_path_is_rel(), BLI_path_rel(), BLI_strncpy(), FILE_MAX, ImageFrameRange::filepath, image_detect_frame_range(), image_sequence_get_frame_ranges(), LISTBASE_FOREACH, MEM_callocN, wmOperator::ptr, RNA_string_get(), and RNA_struct_property_is_set().
Referenced by image_open_exec(), and volume_import_exec().
void ED_image_get_uv_aspect | ( | struct Image * | ima, |
struct ImageUser * | iuser, | ||
float * | r_aspx, | ||
float * | r_aspy | ||
) |
Definition at line 282 of file image_edit.c.
References BKE_image_get_aspect(), BKE_image_get_size(), float(), and w().
Referenced by ED_uvedit_get_aspect_from_material(), and stencil_fit_image_aspect_exec().
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().
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().
void ED_image_point_pos__reverse | ( | struct SpaceImage * | sima, |
const struct ARegion * | region, | ||
const float | co[2], | ||
float | r_co[2] | ||
) |
Referenced by ED_mask_point_pos__reverse(), and projectIntViewEx().
bool ED_image_save_all_modified | ( | const struct bContext * | C, |
struct ReportList * | reports | ||
) |
Referenced by wm_block_file_close_save().
int ED_image_save_all_modified_info | ( | const struct Main * | bmain, |
struct ReportList * | reports | ||
) |
Referenced by block_create__close_file_dialog(), and wm_block_file_close_save().
Referenced by wm_block_file_close_save(), and wm_file_or_session_data_has_unsaved_changes().
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().
Definition at line 291 of file paint_image.cc.
References C, and image_paint_poll_ex().
Referenced by brush_colors_flip_poll(), ED_space_image_paint_update(), image_listener(), image_paint_2d_clone_poll(), image_texture_paint_poll(), PAINT_OT_image_paint(), blender::ed::sculpt_paint::image::ops::paint::texture_paint_init(), and toggle_paint_cursor().
void ED_image_view_center_to_point | ( | struct SpaceImage * | sima, |
float | x, | ||
float | y | ||
) |
Definition at line 313 of file image_edit.c.
References ED_space_image_get_aspect(), ED_space_image_get_size(), height, width, x, SpaceImage::xof, y, and SpaceImage::yof.
Referenced by view_center_cursor_exec().
struct Image* ED_space_image | ( | const struct SpaceImage * | sima | ) |
Referenced by draw_image_cache(), draw_image_main_helpers(), DRW_engine_external_acquire_for_image_editor(), ED_space_image_show_cache(), blender::draw::image_engine::SpaceImageAccessor::get_image(), image_context(), image_main_region_draw(), image_main_region_set_view2d(), image_refresh(), image_sample_apply(), and image_sample_line_exec().
struct ImBuf* ED_space_image_acquire_buffer | ( | struct SpaceImage * | sima, |
void ** | r_lock, | ||
int | tile | ||
) |
Definition at line 118 of file image_edit.c.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), IMA_TYPE_R_RESULT, image(), SpaceImage::image, SpaceImage::iuser, NULL, ImBuf::rect, ImBuf::rect_float, tile, ImageUser::tile, ImBuf::x, and ImBuf::y.
Referenced by blender::draw::image_engine::SpaceImageAccessor::acquire_image_buffer(), ED_space_image_color_sample(), ED_space_image_get_position(), ED_space_image_get_size(), ED_space_image_has_buffer(), image_buttons_region_draw(), image_main_region_draw(), image_sample_apply(), and image_sample_line_exec().
void ED_space_image_auto_set | ( | const struct bContext * | C, |
struct SpaceImage * | sima | ||
) |
Referenced by image_user_refresh_scene().
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().
bool ED_space_image_color_sample | ( | struct SpaceImage * | sima, |
struct ARegion * | region, | ||
const int | mval[2], | ||
float | r_col[3], | ||
bool * | r_is_data | ||
) |
Returns color in linear space, matching ED_space_node_color_sample().
Definition at line 3215 of file image_ops.c.
References BKE_image_get_tile_from_pos(), ImBuf::channels, CLAMP, ImBuf::colormanage_flag, copy_v3_v3(), ED_space_image_acquire_buffer(), ED_space_image_release_buffer(), SpaceImage::image, IMB_COLORMANAGE_IS_DATA, IMB_colormanagement_colorspace_to_scene_linear_v3(), lock, NULL, ImBuf::rect, ImBuf::rect_colorspace, ImBuf::rect_float, ret, rgb_uchar_to_float(), tile, UI_view2d_region_to_view(), ARegion::v2d, x, ImBuf::x, y, and ImBuf::y.
Referenced by eyedropper_color_sample_fl(), and paint_sample_color().
Definition at line 526 of file image_edit.c.
References C, ED_operator_uvedit_space_image(), ED_space_image_maskedit_poll(), and ED_space_image_paint_curve().
Referenced by IMAGE_OT_view_center_cursor(), IMAGE_OT_view_cursor_center(), and UV_OT_cursor_set().
void ED_space_image_get_aspect | ( | struct SpaceImage * | sima, |
float * | r_aspx, | ||
float * | r_aspy | ||
) |
Definition at line 236 of file image_edit.c.
References Image::aspx, Image::aspy, BKE_image_get_aspect(), SpaceImage::image, and NULL.
Referenced by ED_image_view_center_to_point(), ED_mask_get_aspect(), ED_mask_pixelspace_factor(), ED_space_image_get_uv_aspect(), image_main_region_draw(), image_view_all(), OVERLAY_edit_uv_init(), setTransformViewAspect(), sima_zoom_set(), and sima_zoom_set_from_bounds().
int ED_space_image_get_display_channel_mask | ( | struct ImBuf * | ibuf | ) |
Get the SpaceImage flag that is valid for the given ibuf.
Definition at line 165 of file image_edit.c.
References ImBuf::channels, color, result, SI_SHOW_ALPHA, SI_SHOW_B, SI_SHOW_G, SI_SHOW_R, SI_SHOW_ZBUF, SI_USE_ALPHA, ImBuf::zbuf, and ImBuf::zbuf_float.
Referenced by blender::draw::image_engine::SpaceImageAccessor::get_gpu_textures(), and blender::draw::image_engine::SpaceImageAccessor::get_shader_parameters().
struct Mask* ED_space_image_get_mask | ( | const struct SpaceImage * | sima | ) |
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().
void ED_space_image_get_size | ( | struct SpaceImage * | sima, |
int * | r_width, | ||
int * | r_height | ||
) |
Definition at line 201 of file image_edit.c.
References BKE_render_resolution(), ED_space_image_acquire_buffer(), ED_space_image_release_buffer(), IMA_TYPE_R_RESULT, SpaceImage::image, IMG_SIZE_FALLBACK, SpaceImage::iuser, lock, Scene::r, scene, ImageUser::scene, Image::type, ImBuf::x, and ImBuf::y.
Referenced by applyAspectRatio(), do_uvedit_vertex(), ED_image_mouse_pos(), ED_image_point_pos(), ED_image_point_pos__reverse(), ED_image_view_center_to_point(), ED_mask_get_size(), ED_space_image_get_size_fl(), ED_space_image_get_uv_aspect(), ED_space_image_get_zoom(), external_image_space_matrix_set(), flushTransUVs(), image_main_region_draw(), image_main_region_set_view2d(), image_view_all(), OVERLAY_edit_uv_init(), removeAspectRatio(), sima_zoom_set(), sima_zoom_set_from_bounds(), uv_circle_select_exec(), uv_sculpt_stroke_apply(), uv_sculpt_stroke_init(), uv_snap_cursor_to_pixels(), uv_snap_uvs_to_pixels(), and uvedit_vertex_buttons().
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().
void ED_space_image_get_uv_aspect | ( | struct SpaceImage * | sima, |
float * | r_aspx, | ||
float * | r_aspy | ||
) |
Definition at line 262 of file image_edit.c.
References ED_space_image_get_aspect(), ED_space_image_get_size(), float(), and w().
Referenced by OVERLAY_edit_uv_init(), and setTransformViewAspect().
void ED_space_image_get_zoom | ( | struct SpaceImage * | sima, |
const struct ARegion * | region, | ||
float * | r_zoomx, | ||
float * | r_zoomy | ||
) |
void ED_space_image_grid_steps | ( | struct SpaceImage * | sima, |
float | grid_steps[SI_GRID_STEPS_LEN], | ||
int | grid_dimension | ||
) |
Definition at line 587 of file image_draw.c.
References SpaceImage::custom_grid_subdiv, SpaceImage::flag, float(), powf, SI_CUSTOM_GRID, and SI_GRID_STEPS_LEN.
Referenced by initSnapSpatial(), and OVERLAY_grid_init().
bool ED_space_image_has_buffer | ( | struct SpaceImage * | sima | ) |
Definition at line 188 of file image_edit.c.
References ED_space_image_acquire_buffer(), ED_space_image_release_buffer(), lock, and NULL.
Referenced by ED_imbuf_sample_invoke(), image_sample_line_invoke(), OVERLAY_grid_init(), and render_border_exec().
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().
Definition at line 506 of file image_edit.c.
References C, CTX_wm_space_image(), ED_space_image_maskedit_poll(), MaskSpaceInfo::mask, SpaceImage::mask_info, and NULL.
Referenced by ED_maskedit_mask_poll(), and ED_space_image_maskedit_mask_visible_splines_poll().
Definition at line 516 of file image_edit.c.
References C, CTX_wm_space_image(), MaskSpaceInfo::draw_flag, ED_space_image_maskedit_mask_poll(), MASK_DRAWFLAG_SPLINE, and SpaceImage::mask_info.
Referenced by ED_maskedit_mask_visible_splines_poll().
Definition at line 468 of file image_edit.c.
References C, CTX_data_view_layer(), CTX_wm_space_image(), ED_space_image_check_show_maskedit(), and OBEDIT_FROM_VIEW_LAYER.
Referenced by ED_maskedit_poll(), ED_space_image_cursor_poll(), ED_space_image_maskedit_mask_poll(), and ED_space_image_maskedit_visible_splines_poll().
Definition at line 481 of file image_edit.c.
References C, CTX_wm_space_image(), MaskSpaceInfo::draw_flag, ED_space_image_maskedit_poll(), MASK_DRAWFLAG_SPLINE, and SpaceImage::mask_info.
Referenced by ED_maskedit_visible_splines_poll().
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().
void ED_space_image_release_buffer | ( | struct SpaceImage * | sima, |
struct ImBuf * | ibuf, | ||
void * | lock | ||
) |
Definition at line 158 of file image_edit.c.
References BKE_image_release_ibuf(), SpaceImage::image, and lock.
Referenced by ED_space_image_color_sample(), ED_space_image_get_position(), ED_space_image_get_size(), ED_space_image_has_buffer(), image_buttons_region_draw(), image_main_region_draw(), image_sample_apply(), image_sample_line_exec(), and blender::draw::image_engine::SpaceImageAccessor::release_buffer().
void ED_space_image_scopes_update | ( | const struct bContext * | C, |
struct SpaceImage * | sima, | ||
struct ImBuf * | ibuf, | ||
bool | use_view_settings | ||
) |
Definition at line 391 of file image_edit.c.
References BKE_scopes_update(), C, CTX_data_active_object(), CTX_data_scene(), Scene::display_settings, ELEM, G, IMA_TYPE_COMPOSITE, IMA_TYPE_R_RESULT, image(), SpaceImage::image, Object::mode, SpaceImage::mode, NULL, OB_MODE_EDIT, OB_MODE_TEXTURE_PAINT, scene, SpaceImage::scopes, SI_MODE_PAINT, and Scene::view_settings.
Referenced by image_buttons_region_draw().
void ED_space_image_set | ( | struct Main * | bmain, |
struct SpaceImage * | sima, | ||
struct Image * | ima, | ||
bool | automatic | ||
) |
Definition at line 45 of file image_edit.c.
References BKE_image_signal(), id_us_ensure_real(), IMA_SIGNAL_USER_NEW_IMAGE, IMA_TYPE_COMPOSITE, IMA_TYPE_R_RESULT, SpaceImage::image, SpaceImage::iuser, SpaceImage::mode, NC_SPACE, ND_SPACE_IMAGE, NULL, SpaceImage::pin, SI_MODE_PAINT, SI_MODE_UV, SI_MODE_VIEW, Image::type, and WM_main_add_notifier().
Referenced by ED_node_set_active(), ED_object_texture_paint_mode_enter_ex(), image_new_exec(), image_open_exec(), and image_read_viewlayers_exec().
void ED_space_image_set_mask | ( | struct bContext * | C, |
struct SpaceImage * | sima, | ||
struct Mask * | mask | ||
) |
Definition at line 106 of file image_edit.c.
References C, id_us_ensure_real(), mask(), MaskSpaceInfo::mask, SpaceImage::mask_info, NA_SELECTED, NC_MASK, and WM_event_add_notifier().
Referenced by ED_mask_new().
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] | ||
) |
Referenced by change_frame_invoke(), ED_imbuf_sample_invoke(), and uv_set_2d_cursor_invoke().
bool ED_space_image_show_paint | ( | const struct SpaceImage * | sima | ) |
bool ED_space_image_show_render | ( | const struct SpaceImage * | sima | ) |
Referenced by image_listener().
bool ED_space_image_show_uvedit | ( | const struct SpaceImage * | sima, |
struct Object * | obedit | ||
) |
Referenced by initSnapSpatial(), and OVERLAY_grid_init().