|
Blender
V2.93
|
Go to the source code of this file.
Classes | |
| struct | ImageFrameRange |
Typedefs | |
| typedef struct ImageFrameRange | ImageFrameRange |
Functions | |
| struct Image * | ED_space_image (struct SpaceImage *sima) |
| void | ED_space_image_set (struct Main *bmain, struct SpaceImage *sima, struct Object *obedit, struct Image *ima, bool automatic) |
| void | ED_space_image_auto_set (const struct bContext *C, struct SpaceImage *sima) |
| struct Mask * | ED_space_image_get_mask (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, int mval[2], float r_col[3], bool *r_is_data) |
| struct ImBuf * | ED_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 (struct SpaceImage *sima) |
| bool | ED_space_image_show_paint (struct SpaceImage *sima) |
| bool | ED_space_image_show_uvedit (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_mask_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 (struct SpaceImage *sima) |
| 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, const bool detect_udim) |
| 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 | ||
| ) |
Definition at line 145 of file image_draw.c.
References BLF_color3ub(), BLF_color3ubv(), BLF_draw_ascii(), 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, 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, IMB_colormanagement_pixel_to_display_space_v4(), imm_draw_box_wire_2d(), immBindBuiltinProgram(), immRecti(), immUnbindProgram(), immUniformColor3fv(), immUniformColor3fvAlpha(), immUniformColor3ub(), immUniformColor4ub(), immVertexFormat(), NULL, pos, rgb_to_hsv(), rgb_to_yuv(), 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 sample_draw().
| ListBase ED_image_filesel_detect_sequences | ( | struct Main * | bmain, |
| struct wmOperator * | op, | ||
| const bool | detect_udim | ||
| ) |
Definition at line 219 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 302 of file image_edit.c.
References BKE_image_get_aspect(), BKE_image_get_size(), float(), and w().
Referenced by ED_uvedit_get_aspect(), 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] | ||
| ) |
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().
| bool ED_image_should_save_modified | ( | const struct Main * | bmain | ) |
Referenced by wm_block_file_close_save(), and wm_file_or_image_is_modified().
| 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 382 of file image_edit.c.
References BKE_image_get_renderslot(), BLI_assert, BLI_listbase_count(), ELEM, Image::gpuflag, IMA_GPU_REFRESH, Image::last_render_slot, RenderSlot::render, Image::render_slot, and Image::renderslots.
Referenced by image_cycle_render_slot_exec(), and ui_imageuser_slot_menu_step().
| void ED_image_view_center_to_point | ( | struct SpaceImage * | sima, |
| float | x, | ||
| float | y | ||
| ) |
Definition at line 334 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 | ( | struct SpaceImage * | sima | ) |
Definition at line 55 of file image_edit.c.
References SpaceImage::image.
Referenced by draw_image_cache(), draw_image_main(), draw_image_main_helpers(), ED_space_image_show_cache(), IMAGE_cache_init(), 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 139 of file image_edit.c.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), IMA_TYPE_R_RESULT, SpaceImage::image, SpaceImage::iuser, NULL, ImBuf::rect, ImBuf::rect_float, ImageUser::tile, and Image::type.
Referenced by draw_image_main(), 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_cache_init(), 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 | ||
| ) |
Definition at line 484 of file image_edit.c.
References ED_space_image_show_uvedit(), SpaceImage::mode, and SI_MODE_MASK.
Referenced by ED_operator_mask(), ED_space_image_maskedit_poll(), image_listener(), and image_view_selected_exec().
| bool ED_space_image_color_sample | ( | struct SpaceImage * | sima, |
| struct ARegion * | region, | ||
| int | mval[2], | ||
| float | r_col[3], | ||
| bool * | r_is_data | ||
| ) |
Definition at line 3220 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(), Main::lock, NULL, ImBuf::rect, ImBuf::rect_colorspace, ImBuf::rect_float, ret, rgb_uchar_to_float(), UI_view2d_region_to_view(), ARegion::v2d, x, ImBuf::x, y, and ImBuf::y.
Referenced by eyedropper_color_sample_fl(), and paint_sample_color().
| bool ED_space_image_cursor_poll | ( | struct bContext * | C | ) |
Definition at line 532 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 256 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 | ) |
Definition at line 179 of file image_edit.c.
References alpha, ImBuf::channels, 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 draw_image_buffer(), image_cache_image(), and space_image_gpu_texture_get().
| struct Mask* ED_space_image_get_mask | ( | struct SpaceImage * | sima | ) |
Definition at line 122 of file image_edit.c.
References MaskSpaceInfo::mask, and SpaceImage::mask_info.
Referenced by draw_image_cache(), ED_space_image_show_cache(), image_context(), image_main_region_draw(), image_refresh(), and special_aftertrans_update__mask().
| bool ED_space_image_get_position | ( | struct SpaceImage * | sima, |
| struct ARegion * | region, | ||
| int | mval[2], | ||
| float | fpos[2] | ||
| ) |
Definition at line 3203 of file image_ops.c.
References ED_space_image_acquire_buffer(), ED_space_image_release_buffer(), Main::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 215 of file image_edit.c.
References BLI_rctf_size_x(), BLI_rctf_size_y(), RenderData::border, ED_space_image_acquire_buffer(), ED_space_image_release_buffer(), IMA_TYPE_R_RESULT, SpaceImage::image, IMG_SIZE_FALLBACK, SpaceImage::iuser, RenderData::mode, Scene::r, R_BORDER, R_CROP, scene, ImageUser::scene, RenderData::size, Image::type, ImBuf::x, RenderData::xsch, ImBuf::y, and RenderData::ysch.
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(), 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 248 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 282 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 | ||
| ) |
| bool ED_space_image_has_buffer | ( | struct SpaceImage * | sima | ) |
Definition at line 202 of file image_edit.c.
References ED_space_image_acquire_buffer(), ED_space_image_release_buffer(), and NULL.
Referenced by ED_imbuf_sample_invoke(), image_sample_line_invoke(), and OVERLAY_grid_init().
| bool ED_space_image_maskedit_mask_poll | ( | struct bContext * | C | ) |
Definition at line 522 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().
| bool ED_space_image_maskedit_poll | ( | struct bContext * | C | ) |
Definition at line 494 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(), and ED_space_image_maskedit_mask_poll().
| bool ED_space_image_paint_curve | ( | const struct bContext * | C | ) |
| void ED_space_image_paint_update | ( | struct Main * | bmain, |
| struct wmWindowManager * | wm, | ||
| struct Scene * | scene | ||
| ) |
Definition at line 807 of file paint_image.c.
References blender::compositor::area(), bScreen::areabase, BKE_paint_init(), enabled, image_paint_poll(), ToolSettings::imapaint, LISTBASE_FOREACH, ImagePaintSettings::paint, paint_cursor_delete_textures(), paint_cursor_start(), 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 171 of file image_edit.c.
References BKE_image_release_ibuf(), and SpaceImage::image.
Referenced by draw_image_main(), 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_draw_finish(), image_main_region_draw(), image_sample_apply(), and image_sample_line_exec().
| void ED_space_image_scopes_update | ( | const struct bContext * | C, |
| struct SpaceImage * | sima, | ||
| struct ImBuf * | ibuf, | ||
| bool | use_view_settings | ||
| ) |
Definition at line 416 of file image_edit.c.
References BKE_scopes_update(), C, CTX_data_active_object(), CTX_data_scene(), Scene::display_settings, G, IMA_TYPE_COMPOSITE, IMA_TYPE_R_RESULT, SpaceImage::image, Object::mode, SpaceImage::mode, NULL, OB_MODE_EDIT, OB_MODE_TEXTURE_PAINT, scene, SpaceImage::scopes, SI_MODE_PAINT, Image::type, and Scene::view_settings.
Referenced by image_buttons_region_draw().
| void ED_space_image_set | ( | struct Main * | bmain, |
| struct SpaceImage * | sima, | ||
| struct Object * | obedit, | ||
| struct Image * | ima, | ||
| bool | automatic | ||
| ) |
Definition at line 60 of file image_edit.c.
References BKE_image_signal(), Object::data, id_us_ensure_real(), IMA_SIGNAL_USER_NEW_IMAGE, IMA_TYPE_COMPOSITE, IMA_TYPE_R_RESULT, SpaceImage::image, SpaceImage::iuser, SpaceImage::mode, NC_GEOM, NC_SPACE, ND_DATA, 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_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 127 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 | ( | struct SpaceImage * | sima | ) |
Definition at line 982 of file image_draw.c.
References ED_space_image(), ED_space_image_get_mask(), ELEM, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, mask(), SpaceImage::mode, NULL, SI_MODE_MASK, and Image::source.
Referenced by change_frame_invoke(), draw_image_cache(), ED_imbuf_sample_invoke(), and uv_set_2d_cursor_invoke().
| bool ED_space_image_show_paint | ( | struct SpaceImage * | sima | ) |
Definition at line 451 of file image_edit.c.
References ED_space_image_show_render(), SpaceImage::mode, and SI_MODE_PAINT.
| bool ED_space_image_show_render | ( | struct SpaceImage * | sima | ) |
Definition at line 446 of file image_edit.c.
References ELEM, IMA_TYPE_COMPOSITE, IMA_TYPE_R_RESULT, SpaceImage::image, and Image::type.
Referenced by ED_space_image_show_paint(), ED_space_image_show_uvedit(), and image_listener().
| bool ED_space_image_show_uvedit | ( | struct SpaceImage * | sima, |
| struct Object * | obedit | ||
| ) |
Definition at line 460 of file image_edit.c.
References BKE_editmesh_from_object(), ED_space_image_show_render(), EDBM_uv_check(), SpaceImage::mode, OB_MESH, ret, SI_MODE_UV, and Object::type.
Referenced by createTransUVs(), ED_imbuf_sample_poll(), ED_operator_uvedit(), ED_operator_uvedit_space_image(), ED_space_image_auto_set(), ED_space_image_check_show_maskedit(), gizmo2d_generic_poll(), image_main_region_draw(), image_view_selected_exec(), and initTransInfo().