71 sima->
xof = ima->runtime->view_offset[0];
72 sima->
yof = ima->runtime->view_offset[1];
73 sima->
zoom = ima->runtime->view_zoom;
93 if (ignore_render_viewer && sima->
image &&
118 if (efa ==
nullptr) {
122 Image *ima =
nullptr;
125 if (ima != sima->
image) {
156 const bool ensure_host_buffer)
160 if (sima && sima->
image) {
165 return BIF_render_spare_imbuf();
171 if (ensure_host_buffer) {
203 if (sima && sima->
image) {
216 const bool alpha = ibuf->
channels == 4;
217 const bool zbuf = ibuf->
channels == 1;
238 has_buffer = (ibuf !=
nullptr);
253 if (ibuf && ibuf->
x > 0 && ibuf->
y > 0) {
275 r_size[0] = size_i[0];
276 r_size[1] = size_i[1];
282 if ((ima ==
nullptr) || (ima->aspx == 0.0f || ima->aspy == 0.0f)) {
283 *r_aspx = *r_aspy = 1.0;
315 if (*r_aspx < *r_aspy) {
316 *r_aspy = *r_aspy / *r_aspx;
320 *r_aspx = *r_aspx / *r_aspy;
344 int sx, sy, width, height;
352 co[0] = ((mval[0] - sx) / zoomx) / width;
353 co[1] = ((mval[1] - sy) / zoomy) / height;
364 sima->
xof = (
x - 0.5f) * width * aspx;
365 sima->
yof = (
y - 0.5f) * height * aspy;
371 int sx, sy, width, height;
379 *r_x = ((
x - sx) / zoomx) / width;
380 *r_y = ((
y - sy) / zoomy) / height;
396 r_co[0] = (co[0] * width * zoomx) +
float(sx);
397 r_co[1] = (co[1] * height * zoomy) +
float(sy);
402 const int cur =
image->render_slot;
407 int num_slots =
image->renderslots.count();
408 for (i = 1; i < num_slots; i++) {
409 slot = (cur + ((direction == -1) ? -i : i)) % num_slots;
415 if ((render_slot && render_slot->
render) || slot ==
image->last_render_slot) {
416 image->render_slot = slot;
421 if (num_slots == 1) {
422 image->render_slot = 0;
424 else if (i == num_slots) {
425 image->render_slot = ((cur == 1) ? 0 : 1);
428 return (cur !=
image->render_slot);
434 bool use_view_settings)
448 if (
G.is_rendering) {
#define IMA_SIGNAL_USER_NEW_IMAGE
Object is a sort of wrapper for general info.
#define IMG_SIZE_FALLBACK
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
const ccl_global KernelWorkTile * tile
void view2d_view_to_region(const View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL()
void WM_main_add_notifier(uint type, void *reference)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
bool ED_space_image_maskedit_mask_poll(bContext *C)
bool ED_image_slot_cycle(Image *image, int direction)
void ED_space_image_auto_set(const bContext *C, SpaceImage *sima)
BMesh * BKE_editmesh_bmesh_get_for_write(Mesh *mesh)
void ED_space_image_get_aspect(SpaceImage *sima, float *r_aspx, float *r_aspy)
bool ED_space_image_check_show_maskedit(SpaceImage *sima, Object *obedit)
void ED_space_image_sync(Main *bmain, Image *image, bool ignore_render_viewer)
void BKE_image_signal(Main *bmain, Image *ima, ImageUser *iuser, int signal)
void BKE_image_get_size(Image *image, ImageUser *iuser, int *r_width, int *r_height)
bool ED_space_image_maskedit_mask_visible_splines_poll(bContext *C)
ImBuf * ED_space_image_acquire_buffer(SpaceImage *sima, void **r_lock, int tile, const bool ensure_host_buffer)
void ED_space_image_get_size(SpaceImage *sima, int *r_width, int *r_height)
bool ED_space_image_region_cursor_poll(bContext *C)
void BKE_image_get_aspect(Image *image, float *r_aspx, float *r_aspy)
void ED_space_image_release_buffer(SpaceImage *sima, ImBuf *ibuf, void *lock)
void ED_space_image_set(Main *bmain, SpaceImage *sima, Image *ima, bool automatic)
bool EDBM_uv_check(const Mesh *mesh)
ViewLayer * CTX_data_view_layer(const bContext *C)
void BKE_render_resolution(const RenderData *r, const bool use_crop, int *r_width, int *r_height)
void ED_image_point_pos(SpaceImage *sima, const ARegion *region, float x, float y, float *r_x, float *r_y)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
ImBuf * BKE_image_acquire_ibuf_gpu(Image *ima, ImageUser *iuser, void **r_lock, bool *r_load_failed=nullptr, bool cached_only=false)
bool ED_space_image_paint_curve(const bContext *C)
bool ED_space_image_show_paint(const SpaceImage *sima)
bool ED_space_image_show_render(const SpaceImage *sima)
void ED_space_image_get_size_fl(SpaceImage *sima, float r_size[2])
void ED_image_mouse_pos(SpaceImage *sima, const ARegion *region, const int mval[2], float co[2])
bool ED_space_image_maskedit_visible_splines_poll(bContext *C)
Object * BKE_view_layer_edit_object_get(const ViewLayer *view_layer)
void ED_image_get_uv_aspect(Image *ima, ImageUser *iuser, float *r_aspx, float *r_aspy)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
RenderSlot * BKE_image_get_renderslot(Image *ima, int index)
bool BKE_view_layer_synced_ensure(const Main &bmain, const Scene *scene, ViewLayer *view_layer)
bool ED_space_image_has_buffer(SpaceImage *sima)
ToolSettings * CTX_data_tool_settings(const bContext *C)
int ED_space_image_get_display_channel_mask(ImBuf *ibuf)
bool ED_space_image_maskedit_poll(bContext *C)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
bool ED_operator_uvedit_space_image(bContext *C)
void ED_space_image_scopes_update(const bContext *C, SpaceImage *sima, ImBuf *ibuf, bool use_view_settings)
ImBuf * BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **r_lock)
SpaceImage * CTX_wm_space_image(const bContext *C)
void id_us_ensure_real(ID *id)
Main * CTX_data_main(const bContext *C)
BMFace * BM_mesh_active_face_get(BMesh *bm, const bool is_sloppy, const bool is_selected)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
void ED_space_image_get_uv_aspect(SpaceImage *sima, float *r_aspx, float *r_aspy)
void BKE_scopes_update(Scopes *scopes, ImBuf *ibuf, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings)
void ED_space_image_set_mask(bContext *C, SpaceImage *sima, Mask *mask)
void ED_space_image_get_zoom(SpaceImage *sima, const ARegion *region, float *r_zoomx, float *r_zoomy)
Brush * BKE_paint_brush(Paint *paint)
Scene * CTX_data_scene(const bContext *C)
bool ED_space_image_cursor_poll(bContext *C)
void ED_image_view_center_to_point(SpaceImage *sima, float x, float y)
void ED_image_point_pos__reverse(SpaceImage *sima, const ARegion *region, const float co[2], float r_co[2])
bScreen * WM_window_get_active_screen(const wmWindow *win)
Object * CTX_data_active_object(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
Image * ED_space_image(const SpaceImage *sima)
bool ED_space_image_show_uvedit(const SpaceImage *sima, Object *obedit)
Mask * ED_space_image_get_mask(const SpaceImage *sima)
bool ED_space_image_show_mask(const SpaceImage *sima)
void BKE_image_release_ibuf(Image *ima, ImBuf *ibuf, void *lock)
bool ED_object_get_active_image(Object *ob, int mat_nr, Image **r_ima, ImageUser **r_iuser, const bNode **r_node, const bNodeTree **r_ntree)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
eBrushStrokeType stroke_method
std::atomic< gpu::Texture * > texture
const uint8_t * byte_data() const
const float * float_data() const
ListBaseT< wmWindowManager > wm
struct RenderResult * render
ColorManagedViewSettings view_settings
ColorManagedDisplaySettings display_settings
ListBaseT< SpaceLink > spacedata
ListBaseT< struct ScrArea > areabase