91 if (ima != sima->
image) {
122 if (sima && sima->
image) {
127 return BIF_render_spare_imbuf();
160 if (sima && sima->
image) {
173 const bool alpha = ibuf->
channels == 4;
195 has_buffer = (ibuf !=
NULL);
210 if (ibuf && ibuf->
x > 0 && ibuf->
y > 0) {
232 r_size[0] = size_i[0];
233 r_size[1] = size_i[1];
239 if ((ima ==
NULL) || (ima->
aspx == 0.0f || ima->
aspy == 0.0f)) {
240 *r_aspx = *r_aspy = 1.0;
272 if (*r_aspx < *r_aspy) {
273 *r_aspy = *r_aspy / *r_aspx;
277 *r_aspx = *r_aspx / *r_aspy;
309 co[0] = ((mval[0] -
sx) / zoomx) /
width;
310 co[1] = ((mval[1] -
sy) / zoomy) /
height;
353 r_co[0] = (co[0] *
width * zoomx) + (
float)
sx;
354 r_co[1] = (co[1] *
height * zoomy) + (
float)
sy;
359 const int cur =
image->render_slot;
365 for (i = 1; i < num_slots; i++) {
366 slot = (cur + ((direction == -1) ? -i : i)) % num_slots;
372 if ((render_slot && render_slot->
render) || slot ==
image->last_render_slot) {
373 image->render_slot = slot;
378 if (num_slots == 1) {
379 image->render_slot = 0;
381 else if (i == num_slots) {
382 image->render_slot = ((cur == 1) ? 0 : 1);
385 if ((cur !=
image->render_slot)) {
388 return (cur !=
image->render_slot);
394 bool use_view_settings)
408 if (
G.is_rendering) {
typedef float(TangentPoint)[2]
struct Scene * CTX_data_scene(const bContext *C)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct SpaceImage * CTX_wm_space_image(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct ToolSettings * CTX_data_tool_settings(const bContext *C)
BMEditMesh * BKE_editmesh_from_object(struct Object *ob)
Return the BMEditMesh for a given object.
void BKE_image_release_ibuf(struct Image *ima, struct ImBuf *ibuf, void *lock)
struct ImBuf * BKE_image_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, void **r_lock)
void BKE_image_partial_update_mark_full_update(struct Image *image)
Mark the whole image to be updated.
void BKE_image_get_aspect(struct Image *image, float *r_aspx, float *r_aspy)
void BKE_image_get_size(struct Image *image, struct ImageUser *iuser, int *r_width, int *r_height)
#define IMA_SIGNAL_USER_NEW_IMAGE
void BKE_image_signal(struct Main *bmain, struct Image *ima, struct ImageUser *iuser, int signal)
struct RenderSlot * BKE_image_get_renderslot(struct Image *ima, int index)
void id_us_ensure_real(struct ID *id)
void BKE_render_resolution(const struct RenderData *r, const bool use_crop, int *r_width, int *r_height)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
#define MASK_DRAWFLAG_SPLINE
Object is a sort of wrapper for general info.
#define OBEDIT_FROM_VIEW_LAYER(view_layer)
#define IMG_SIZE_FALLBACK
bool EDBM_uv_check(struct BMEditMesh *em)
bool ED_operator_uvedit_space_image(struct bContext *C)
bool ED_object_get_active_image(struct Object *ob, int mat_nr, struct Image **r_ima, struct ImageUser **r_iuser, struct bNode **r_node, struct bNodeTree **r_ntree)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
Contains defines and structs used throughout the imbuf module.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
void UI_view2d_view_to_region(const struct View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT BMesh * bm
BMFace * BM_mesh_active_face_get(BMesh *bm, const bool is_sloppy, const bool is_selected)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
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_space_image_maskedit_visible_splines_poll(bContext *C)
bool ED_space_image_maskedit_mask_visible_splines_poll(bContext *C)
Image * ED_space_image(const SpaceImage *sima)
int ED_space_image_get_display_channel_mask(ImBuf *ibuf)
bool ED_space_image_maskedit_mask_poll(bContext *C)
bool ED_space_image_show_paint(const SpaceImage *sima)
void ED_image_mouse_pos(SpaceImage *sima, const ARegion *region, const int mval[2], float co[2])
ImBuf * ED_space_image_acquire_buffer(SpaceImage *sima, void **r_lock, int tile)
void ED_space_image_get_uv_aspect(SpaceImage *sima, float *r_aspx, float *r_aspy)
bool ED_space_image_paint_curve(const bContext *C)
bool ED_space_image_check_show_maskedit(SpaceImage *sima, Object *obedit)
bool ED_space_image_show_render(const SpaceImage *sima)
void ED_image_point_pos(SpaceImage *sima, const ARegion *region, float x, float y, float *r_x, float *r_y)
void ED_space_image_set(Main *bmain, SpaceImage *sima, Image *ima, bool automatic)
void ED_image_get_uv_aspect(Image *ima, ImageUser *iuser, 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)
bool ED_space_image_has_buffer(SpaceImage *sima)
bool ED_space_image_show_uvedit(const SpaceImage *sima, Object *obedit)
bool ED_space_image_maskedit_poll(bContext *C)
void ED_space_image_get_aspect(SpaceImage *sima, float *r_aspx, float *r_aspy)
bool ED_image_slot_cycle(struct Image *image, int direction)
void ED_space_image_get_size_fl(SpaceImage *sima, float r_size[2])
void ED_space_image_get_zoom(SpaceImage *sima, const ARegion *region, float *r_zoomx, float *r_zoomy)
void ED_space_image_set_mask(bContext *C, SpaceImage *sima, Mask *mask)
void ED_image_point_pos__reverse(SpaceImage *sima, const ARegion *region, const float co[2], float r_co[2])
bool ED_space_image_cursor_poll(bContext *C)
void ED_image_view_center_to_point(SpaceImage *sima, float x, float y)
Mask * ED_space_image_get_mask(const SpaceImage *sima)
ccl_gpu_kernel_postfix ccl_global float int int sy
ccl_global const KernelWorkTile * tile
ccl_gpu_kernel_postfix ccl_global float int sx
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
struct RenderResult * render
ColorManagedViewSettings view_settings
ColorManagedDisplaySettings display_settings
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)