112 if (ima != sima->
image) {
143 if (sima && sima->
image) {
146 return BIF_render_spare_imbuf();
173 if (sima && sima->
image) {
186 const bool color = ibuf->
channels >= 3;
209 has_buffer = (ibuf !=
NULL);
224 if (ibuf && ibuf->
x > 0 && ibuf->
y > 0) {
252 r_size[0] = size_i[0];
253 r_size[1] = size_i[1];
259 if ((ima ==
NULL) || (ima->
aspx == 0.0f || ima->
aspy == 0.0f)) {
260 *r_aspx = *r_aspy = 1.0;
292 if (*r_aspx < *r_aspy) {
293 *r_aspy = *r_aspy / *r_aspx;
297 *r_aspx = *r_aspx / *r_aspy;
330 co[0] = ((mval[0] - sx) / zoomx) /
width;
331 co[1] = ((mval[1] - sy) / zoomy) /
height;
357 *r_x = ((
x - sx) / zoomx) /
width;
358 *r_y = ((
y - sy) / zoomy) /
height;
374 r_co[0] = (co[0] *
width * zoomx) + (
float)sx;
375 r_co[1] = (co[1] *
height * zoomy) + (
float)sy;
390 for (i = 1; i < num_slots; i++) {
391 slot = (cur + ((direction == -1) ? -i : i)) % num_slots;
403 if (num_slots == 1) {
406 else if (i == num_slots) {
419 bool use_view_settings)
433 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_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)
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)
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 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
_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
Contains defines and structs used throughout the imbuf module.
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.
static CCL_NAMESPACE_BEGIN const double alpha
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)
int ED_space_image_get_display_channel_mask(ImBuf *ibuf)
bool ED_space_image_maskedit_mask_poll(bContext *C)
Image * ED_space_image(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)
void ED_image_point_pos(SpaceImage *sima, const ARegion *region, float x, float y, float *r_x, float *r_y)
Mask * ED_space_image_get_mask(SpaceImage *sima)
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_show_uvedit(SpaceImage *sima, Object *obedit)
bool ED_space_image_has_buffer(SpaceImage *sima)
bool ED_space_image_show_paint(SpaceImage *sima)
void ED_space_image_set(Main *bmain, SpaceImage *sima, Object *obedit, Image *ima, bool automatic)
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)
bool ED_space_image_show_render(SpaceImage *sima)
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)
struct RenderResult * render
ColorManagedViewSettings view_settings
ColorManagedDisplaySettings display_settings
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)