Blender  V3.3
BKE_image.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 #pragma once
4 
9 #include "BLI_compiler_attrs.h"
10 #include "BLI_utildefines.h"
11 
12 #include "BLI_rect.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 struct Depsgraph;
19 struct ID;
20 struct ImBuf;
21 struct Image;
22 struct ImageFormatData;
23 struct ImagePool;
24 struct ImageTile;
25 struct ImbFormatOptions;
26 struct ListBase;
27 struct Main;
28 struct Object;
29 struct RenderResult;
30 struct ReportList;
31 struct Scene;
32 struct StampData;
33 struct anim;
34 
35 #define IMA_MAX_SPACE 64
36 #define IMA_UDIM_MAX 2000
37 
39 void BKE_image_free_views(struct Image *image);
40 void BKE_image_free_buffers(struct Image *image);
45 void BKE_image_free_buffers_ex(struct Image *image, bool do_lock);
46 void BKE_image_free_gputextures(struct Image *ima);
51 void BKE_image_free_data(struct Image *image);
52 
53 typedef void(StampCallback)(void *data, const char *propname, char *propvalue, int len);
54 
56  struct Object *camera,
57  struct RenderResult *rr,
58  bool allocate_only);
67 bool BKE_stamp_is_known_field(const char *field_name);
68 void BKE_imbuf_stamp_info(const struct RenderResult *rr, struct ImBuf *ibuf);
69 void BKE_stamp_info_from_imbuf(struct RenderResult *rr, struct ImBuf *ibuf);
70 void BKE_stamp_info_callback(void *data,
71  struct StampData *stamp_data,
73  bool noskip);
74 void BKE_render_result_stamp_data(struct RenderResult *rr, const char *key, const char *value);
75 struct StampData *BKE_stamp_data_copy(const struct StampData *stamp_data);
76 void BKE_stamp_data_free(struct StampData *stamp_data);
78  struct Object *camera,
79  const struct StampData *stamp_data_template,
80  unsigned char *rect,
81  float *rectf,
82  int width,
83  int height,
84  int channels);
85 bool BKE_imbuf_alpha_test(struct ImBuf *ibuf);
86 int BKE_imbuf_write_stamp(const struct Scene *scene,
87  const struct RenderResult *rr,
88  struct ImBuf *ibuf,
89  const char *name,
90  const struct ImageFormatData *imf);
94 int BKE_imbuf_write(struct ImBuf *ibuf, const char *name, const struct ImageFormatData *imf);
99 int BKE_imbuf_write_as(struct ImBuf *ibuf,
100  const char *name,
101  const struct ImageFormatData *imf,
102  bool save_copy);
103 
107 struct anim *openanim(const char *name,
108  int flags,
109  int streamindex,
110  char colorspace[IMA_MAX_SPACE]);
111 struct anim *openanim_noload(const char *name,
112  int flags,
113  int streamindex,
114  char colorspace[IMA_MAX_SPACE]);
115 
116 void BKE_image_tag_time(struct Image *ima);
117 
118 /* ********************************** NEW IMAGE API *********************** */
119 
120 /* ImageUser is in Texture, in Nodes, Background Image, Image Window, .... */
121 /* should be used in conjunction with an ID * to Image. */
122 struct ImageUser;
123 struct RenderData;
124 struct RenderPass;
125 struct RenderResult;
126 
127 /* signals */
128 /* reload only frees, doesn't read until image_get_ibuf() called */
129 #define IMA_SIGNAL_RELOAD 0
130 #define IMA_SIGNAL_FREE 1
131 /* source changes, from image to sequence or movie, etc */
132 #define IMA_SIGNAL_SRC_CHANGE 5
133 /* image-user gets a new image, check settings */
134 #define IMA_SIGNAL_USER_NEW_IMAGE 6
135 #define IMA_SIGNAL_COLORMANAGE 7
136 
140 bool BKE_image_has_ibuf(struct Image *ima, struct ImageUser *iuser);
141 
149 struct ImBuf *BKE_image_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, void **r_lock);
150 void BKE_image_release_ibuf(struct Image *ima, struct ImBuf *ibuf, void *lock);
151 
152 struct ImagePool *BKE_image_pool_new(void);
153 void BKE_image_pool_free(struct ImagePool *pool);
154 struct ImBuf *BKE_image_pool_acquire_ibuf(struct Image *ima,
155  struct ImageUser *iuser,
156  struct ImagePool *pool);
157 void BKE_image_pool_release_ibuf(struct Image *ima, struct ImBuf *ibuf, struct ImagePool *pool);
158 
162 char BKE_image_alpha_mode_from_extension_ex(const char *filepath);
164 
168 struct Image *BKE_image_load(struct Main *bmain, const char *filepath);
175 struct Image *BKE_image_load_exists_ex(struct Main *bmain, const char *filepath, bool *r_exists);
176 struct Image *BKE_image_load_exists(struct Main *bmain, const char *filepath);
177 
181 struct Image *BKE_image_add_generated(struct Main *bmain,
182  unsigned int width,
183  unsigned int height,
184  const char *name,
185  int depth,
186  int floatbuf,
187  short gen_type,
188  const float color[4],
189  bool stereo3d,
190  bool is_data,
191  bool tiled);
196 struct Image *BKE_image_add_from_imbuf(struct Main *bmain, struct ImBuf *ibuf, const char *name);
197 
204 void BKE_image_replace_imbuf(struct Image *image, struct ImBuf *ibuf);
205 
209 void BKE_imageuser_default(struct ImageUser *iuser);
210 void BKE_image_init_imageuser(struct Image *ima, struct ImageUser *iuser);
211 void BKE_image_signal(struct Main *bmain, struct Image *ima, struct ImageUser *iuser, int signal);
212 
213 void BKE_image_walk_all_users(const struct Main *mainp,
214  void *customdata,
215  void callback(struct Image *ima,
216  struct ID *iuser_id,
217  struct ImageUser *iuser,
218  void *customdata));
219 
226 struct Image *BKE_image_ensure_viewer(struct Main *bmain, int type, const char *name);
232  struct Image *ima,
233  struct ImageUser *iuser);
234 
238 void BKE_image_user_frame_calc(struct Image *ima, struct ImageUser *iuser, int cfra);
239 int BKE_image_user_frame_get(const struct ImageUser *iuser, int cfra, bool *r_is_in_range);
240 void BKE_image_user_file_path(const struct ImageUser *iuser, const struct Image *ima, char *path);
241 void BKE_image_user_file_path_ex(const struct Main *bmain,
242  const struct ImageUser *iuser,
243  const struct Image *ima,
244  char *path,
245  const bool resolve_udim,
246  const bool resolve_multiview);
247 void BKE_image_editors_update_frame(const struct Main *bmain, int cfra);
248 
252 bool BKE_image_user_id_has_animation(struct ID *id);
253 void BKE_image_user_id_eval_animation(struct Depsgraph *depsgraph, struct ID *id);
254 
259 struct RenderPass *BKE_image_multilayer_index(struct RenderResult *rr, struct ImageUser *iuser);
260 
264 void BKE_image_multiview_index(const struct Image *ima, struct ImageUser *iuser);
265 
270 bool BKE_image_is_multilayer(const struct Image *ima);
271 bool BKE_image_is_multiview(const struct Image *ima);
272 bool BKE_image_is_stereo(const struct Image *ima);
273 struct RenderResult *BKE_image_acquire_renderresult(struct Scene *scene, struct Image *ima);
274 void BKE_image_release_renderresult(struct Scene *scene, struct Image *ima);
275 
279 bool BKE_image_is_openexr(struct Image *ima);
280 
284 void BKE_image_backup_render(struct Scene *scene, struct Image *ima, bool free_current_slot);
285 
289 void BKE_image_free_all_textures(struct Main *bmain);
290 
295 void BKE_image_free_anim_ibufs(struct Image *ima, int except_frame);
296 
300 void BKE_image_all_free_anim_ibufs(struct Main *bmain, int cfra);
301 
302 void BKE_image_free_all_gputextures(struct Main *bmain);
306 void BKE_image_free_anim_gputextures(struct Main *bmain);
307 void BKE_image_free_old_gputextures(struct Main *bmain);
308 
312 bool BKE_image_memorypack(struct Image *ima);
313 void BKE_image_packfiles(struct ReportList *reports, struct Image *ima, const char *basepath);
314 void BKE_image_packfiles_from_mem(struct ReportList *reports,
315  struct Image *ima,
316  char *data,
317  size_t data_len);
318 
322 void BKE_image_print_memlist(struct Main *bmain);
323 
327 void BKE_image_merge(struct Main *bmain, struct Image *dest, struct Image *source);
328 
332 bool BKE_image_scale(struct Image *image, int width, int height);
333 
337 bool BKE_image_has_alpha(struct Image *image);
338 
342 bool BKE_image_has_opengl_texture(struct Image *ima);
343 
347 void BKE_image_get_tile_label(struct Image *ima,
348  struct ImageTile *tile,
349  char *label,
350  int len_label);
351 
359 bool BKE_image_get_tile_info(char *filepath,
360  struct ListBase *tiles,
361  int *r_tile_start,
362  int *r_tile_range);
363 
364 struct ImageTile *BKE_image_add_tile(struct Image *ima, int tile_number, const char *label);
365 bool BKE_image_remove_tile(struct Image *ima, struct ImageTile *tile);
366 void BKE_image_reassign_tile(struct Image *ima, struct ImageTile *tile, int new_tile_number);
367 void BKE_image_sort_tiles(struct Image *ima);
368 
369 bool BKE_image_fill_tile(struct Image *ima,
370  struct ImageTile *tile,
371  int width,
372  int height,
373  const float color[4],
374  int gen_type,
375  int planes,
376  bool is_float);
377 
378 typedef enum {
383 
387 bool BKE_image_is_filename_tokenized(char *filepath);
388 
393 void BKE_image_ensure_tile_token(char *filename);
394 
401 bool BKE_image_tile_filepath_exists(const char *filepath);
402 
408 char *BKE_image_get_tile_strformat(const char *filepath, eUDIM_TILE_FORMAT *r_tile_format);
409 bool BKE_image_get_tile_number_from_filepath(const char *filepath,
410  const char *pattern,
411  eUDIM_TILE_FORMAT tile_format,
412  int *r_tile_number);
413 void BKE_image_set_filepath_from_tile_number(char *filepath,
414  const char *pattern,
415  eUDIM_TILE_FORMAT tile_format,
416  int tile_number);
417 
418 struct ImageTile *BKE_image_get_tile(struct Image *ima, int tile_number);
419 struct ImageTile *BKE_image_get_tile_from_iuser(struct Image *ima, const struct ImageUser *iuser);
420 
421 int BKE_image_get_tile_from_pos(struct Image *ima,
422  const float uv[2],
423  float r_uv[2],
424  float r_ofs[2]);
425 void BKE_image_get_tile_uv(const struct Image *ima, const int tile_number, float r_uv[2]);
426 
431  const float co[2],
432  float r_uv_offset[2]) ATTR_NONNULL(1, 2, 3);
433 int BKE_image_find_nearest_tile(const struct Image *image, const float co[2])
435 
436 void BKE_image_get_size(struct Image *image, struct ImageUser *iuser, int *r_width, int *r_height);
437 void BKE_image_get_size_fl(struct Image *image, struct ImageUser *iuser, float r_size[2]);
438 void BKE_image_get_aspect(struct Image *image, float *r_aspx, float *r_aspy);
439 
440 /* image_gen.c */
441 
443  unsigned char *rect, float *rect_float, int width, int height, const float color[4]);
444 void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int width, int height);
445 void BKE_image_buf_fill_checker_color(unsigned char *rect,
446  float *rect_float,
447  int width,
448  int height);
449 
450 /* Cycles hookup */
451 
452 unsigned char *BKE_image_get_pixels_for_frame(struct Image *image, int frame, int tile);
453 float *BKE_image_get_float_pixels_for_frame(struct Image *image, int frame, int tile);
454 
455 /* Image modifications */
456 
457 bool BKE_image_is_dirty(struct Image *image);
458 void BKE_image_mark_dirty(struct Image *image, struct ImBuf *ibuf);
459 bool BKE_image_buffer_format_writable(struct ImBuf *ibuf);
460 
461 bool BKE_image_is_dirty_writable(struct Image *image, bool *r_is_writable);
462 
467 bool BKE_image_has_anim(struct Image *image);
469 bool BKE_image_has_filepath(const struct Image *ima);
473 bool BKE_image_is_animated(struct Image *image);
479  int ftype,
480  const struct ImbFormatOptions *options);
486 struct ImBuf *BKE_image_get_ibuf_with_name(struct Image *image, const char *name);
496 struct ImBuf *BKE_image_get_first_ibuf(struct Image *image);
497 
502 
510  struct ImageUser *iuser,
511  struct ImBuf *ibuf);
513  struct ImageUser *iuser,
514  struct ImBuf *ibuf);
516  struct ImageUser *iuser,
517  struct ImBuf *ibuf);
522 
528  struct Image *ima, struct ImageUser *iuser, int x, int y, int w, int h);
529 
536  struct ImageTile *image_tile,
537  struct ImBuf *ibuf,
538  int x,
539  int y,
540  int w,
541  int h);
542 
548 void BKE_image_paint_set_mipmap(struct Main *bmain, bool mipmap);
549 
554 
555 struct RenderSlot *BKE_image_add_renderslot(struct Image *ima, const char *name);
556 bool BKE_image_remove_renderslot(struct Image *ima, struct ImageUser *iuser, int slot);
557 struct RenderSlot *BKE_image_get_renderslot(struct Image *ima, int index);
558 bool BKE_image_clear_renderslot(struct Image *ima, struct ImageUser *iuser, int slot);
559 
560 /* --- image_partial_update.cc --- */
562 struct PartialUpdateUser;
563 
567 struct PartialUpdateUser *BKE_image_partial_update_create(const struct Image *image);
568 
572 void BKE_image_partial_update_free(struct PartialUpdateUser *user);
573 
574 /* --- partial updater (image side) --- */
575 struct PartialUpdateRegister;
576 
580  const struct ImageTile *image_tile,
581  const struct ImBuf *image_buffer,
582  const rcti *updated_region);
585 
586 #ifdef __cplusplus
587 }
588 #endif
eUDIM_TILE_FORMAT
Definition: BKE_image.h:378
@ UDIM_TILE_FORMAT_UVTILE
Definition: BKE_image.h:381
@ UDIM_TILE_FORMAT_NONE
Definition: BKE_image.h:379
@ UDIM_TILE_FORMAT_UDIM
Definition: BKE_image.h:380
void BKE_image_pool_release_ibuf(struct Image *ima, struct ImBuf *ibuf, struct ImagePool *pool)
struct Image * BKE_image_load_exists(struct Main *bmain, const char *filepath)
void() StampCallback(void *data, const char *propname, char *propvalue, int len)
Definition: BKE_image.h:53
bool BKE_image_remove_renderslot(struct Image *ima, struct ImageUser *iuser, int slot)
bool BKE_image_remove_tile(struct Image *ima, struct ImageTile *tile)
struct Image * BKE_image_load(struct Main *bmain, const char *filepath)
void BKE_image_release_ibuf(struct Image *ima, struct ImBuf *ibuf, void *lock)
void BKE_stamp_data_free(struct StampData *stamp_data)
void BKE_image_replace_imbuf(struct Image *image, struct ImBuf *ibuf)
int BKE_imbuf_write_as(struct ImBuf *ibuf, const char *name, const struct ImageFormatData *imf, bool save_copy)
void BKE_image_free_buffers_ex(struct Image *image, bool do_lock)
struct RenderResult * BKE_image_acquire_renderresult(struct Scene *scene, struct Image *ima)
void BKE_image_get_tile_uv(const struct Image *ima, const int tile_number, float r_uv[2])
void BKE_image_sort_tiles(struct Image *ima)
void BKE_image_set_filepath_from_tile_number(char *filepath, const char *pattern, eUDIM_TILE_FORMAT tile_format, int tile_number)
struct ImBuf * BKE_image_pool_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, struct ImagePool *pool)
void BKE_image_user_file_path(const struct ImageUser *iuser, const struct Image *ima, char *path)
void BKE_image_partial_update_mark_region(struct Image *image, const struct ImageTile *image_tile, const struct ImBuf *image_buffer, const rcti *updated_region)
Mark a region of the image to update.
bool BKE_image_has_ibuf(struct Image *ima, struct ImageUser *iuser)
bool BKE_image_is_animated(struct Image *image)
void BKE_image_free_anim_gputextures(struct Main *bmain)
Definition: image_gpu.cc:530
void BKE_image_alpha_mode_from_extension(struct Image *image)
void BKE_image_editors_update_frame(const struct Main *bmain, int cfra)
struct PartialUpdateUser * BKE_image_partial_update_create(const struct Image *image)
Create a new PartialUpdateUser. An Object that contains data to use partial updates.
void BKE_image_free_anim_ibufs(struct Image *ima, int except_frame)
bool BKE_imbuf_alpha_test(struct ImBuf *ibuf)
int BKE_imbuf_write(struct ImBuf *ibuf, const char *name, const struct ImageFormatData *imf)
struct ImBuf * BKE_image_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, void **r_lock)
bool BKE_image_has_gpu_texture_premultiplied_alpha(struct Image *image, struct ImBuf *ibuf)
Definition: image_gpu.cc:44
struct ImagePool * BKE_image_pool_new(void)
struct RenderSlot * BKE_image_add_renderslot(struct Image *ima, const char *name)
void BKE_image_get_size_fl(struct Image *image, struct ImageUser *iuser, float r_size[2])
void BKE_image_partial_update_free(struct PartialUpdateUser *user)
free a partial update user.
void BKE_image_free_old_gputextures(struct Main *bmain)
Definition: image_gpu.cc:541
void BKE_image_free_buffers(struct Image *image)
bool BKE_image_is_multiview(const struct Image *ima)
void BKE_image_walk_all_users(const struct Main *mainp, void *customdata, void callback(struct Image *ima, struct ID *iuser_id, struct ImageUser *iuser, void *customdata))
void BKE_image_backup_render(struct Scene *scene, struct Image *ima, bool free_current_slot)
void BKE_image_user_id_eval_animation(struct Depsgraph *depsgraph, struct ID *id)
#define IMA_MAX_SPACE
Definition: BKE_image.h:35
struct Image * BKE_image_add_generated(struct Main *bmain, unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short gen_type, const float color[4], bool stereo3d, bool is_data, bool tiled)
bool BKE_image_has_alpha(struct Image *image)
struct anim * openanim_noload(const char *name, int flags, int streamindex, char colorspace[IMA_MAX_SPACE])
void BKE_imbuf_stamp_info(const struct RenderResult *rr, struct ImBuf *ibuf)
bool BKE_image_has_loaded_ibuf(struct Image *image)
void BKE_image_partial_update_mark_full_update(struct Image *image)
Mark the whole image to be updated.
void BKE_image_paint_set_mipmap(struct Main *bmain, bool mipmap)
Definition: image_gpu.cc:866
void BKE_image_free_unused_gpu_textures(void)
Definition: image_gpu.cc:481
struct ImBuf * BKE_image_get_ibuf_with_name(struct Image *image, const char *name)
bool BKE_image_scale(struct Image *image, int width, int height)
bool BKE_image_has_filepath(const struct Image *ima)
void BKE_image_packfiles(struct ReportList *reports, struct Image *ima, const char *basepath)
struct GPUTexture * BKE_image_get_gpu_tiles(struct Image *image, struct ImageUser *iuser, struct ImBuf *ibuf)
Definition: image_gpu.cc:443
bool BKE_image_is_dirty_writable(struct Image *image, bool *r_is_writable)
bool BKE_image_memorypack(struct Image *ima)
void BKE_image_buf_fill_checker_color(unsigned char *rect, float *rect_float, int width, int height)
Definition: image_gen.c:445
float * BKE_image_get_float_pixels_for_frame(struct Image *image, int frame, int tile)
struct RenderPass * BKE_image_multilayer_index(struct RenderResult *rr, struct ImageUser *iuser)
int int ATTR_WARN_UNUSED_RESULT
Definition: BKE_image.h:434
bool BKE_image_is_stereo(const struct Image *ima)
void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int width, int height)
Definition: image_gen.c:196
bool BKE_image_get_tile_number_from_filepath(const char *filepath, const char *pattern, eUDIM_TILE_FORMAT tile_format, int *r_tile_number)
void BKE_render_result_stamp_data(struct RenderResult *rr, const char *key, const char *value)
bool BKE_image_clear_renderslot(struct Image *ima, struct ImageUser *iuser, int slot)
void BKE_image_print_memlist(struct Main *bmain)
struct Image * BKE_image_ensure_viewer(struct Main *bmain, int type, const char *name)
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)
struct anim * openanim(const char *name, int flags, int streamindex, char colorspace[IMA_MAX_SPACE])
void BKE_image_ensure_viewer_views(const struct RenderData *rd, struct Image *ima, struct ImageUser *iuser)
int BKE_image_user_frame_get(const struct ImageUser *iuser, int cfra, bool *r_is_in_range)
void BKE_image_partial_update_register_free(struct Image *image)
void BKE_image_free_gputextures(struct Image *ima)
Definition: image_gpu.cc:516
struct StampData * BKE_stamp_data_copy(const struct StampData *stamp_data)
int BKE_image_sequence_guess_offset(struct Image *image)
void BKE_image_mark_dirty(struct Image *image, struct ImBuf *ibuf)
bool BKE_image_has_packedfile(const struct Image *image)
bool BKE_image_is_multilayer(const struct Image *ima)
void BKE_image_multiview_index(const struct Image *ima, struct ImageUser *iuser)
bool BKE_image_has_anim(struct Image *image)
bool BKE_image_has_opengl_texture(struct Image *ima)
void BKE_image_ensure_tile_token(char *filename)
struct ImageTile * BKE_image_get_tile(struct Image *ima, int tile_number)
void BKE_image_user_file_path_ex(const struct Main *bmain, const struct ImageUser *iuser, const struct Image *ima, char *path, const bool resolve_udim, const bool resolve_multiview)
struct StampData * BKE_stamp_info_from_scene_static(const struct Scene *scene)
struct GPUTexture * BKE_image_get_gpu_texture(struct Image *image, struct ImageUser *iuser, struct ImBuf *ibuf)
Definition: image_gpu.cc:438
bool BKE_image_is_dirty(struct Image *image)
void BKE_stamp_info_callback(void *data, struct StampData *stamp_data, StampCallback callback, bool noskip)
int BKE_imbuf_write_stamp(const struct Scene *scene, const struct RenderResult *rr, struct ImBuf *ibuf, const char *name, const struct ImageFormatData *imf)
bool BKE_image_is_openexr(struct Image *ima)
struct GPUTexture * BKE_image_create_gpu_texture_from_ibuf(struct Image *image, struct ImBuf *ibuf)
char BKE_image_alpha_mode_from_extension_ex(const char *filepath)
void BKE_image_file_format_set(struct Image *image, int ftype, const struct ImbFormatOptions *options)
void BKE_image_signal(struct Main *bmain, struct Image *ima, struct ImageUser *iuser, int signal)
struct Image * BKE_image_add_from_imbuf(struct Main *bmain, struct ImBuf *ibuf, const char *name)
struct GPUTexture * BKE_image_get_gpu_tilemap(struct Image *image, struct ImageUser *iuser, struct ImBuf *ibuf)
Definition: image_gpu.cc:448
void BKE_image_release_renderresult(struct Scene *scene, struct Image *ima)
int BKE_image_get_tile_from_pos(struct Image *ima, const float uv[2], float r_uv[2], float r_ofs[2])
bool BKE_image_buffer_format_writable(struct ImBuf *ibuf)
bool BKE_image_get_tile_info(char *filepath, struct ListBase *tiles, int *r_tile_start, int *r_tile_range)
bool BKE_stamp_is_known_field(const char *field_name)
bool BKE_image_user_id_has_animation(struct ID *id)
bool BKE_image_is_filename_tokenized(char *filepath)
void BKE_image_free_views(struct Image *image)
void BKE_image_packfiles_from_mem(struct ReportList *reports, struct Image *ima, char *data, size_t data_len)
void BKE_image_free_all_gputextures(struct Main *bmain)
Definition: image_gpu.cc:521
int int BKE_image_find_nearest_tile(const struct Image *image, const float co[2]) ATTR_NONNULL(1
char * BKE_image_get_tile_strformat(const char *filepath, eUDIM_TILE_FORMAT *r_tile_format)
void BKE_image_update_gputexture_delayed(struct Image *ima, struct ImageTile *image_tile, struct ImBuf *ibuf, int x, int y, int w, int h)
Definition: image_gpu.cc:846
void BKE_image_init_imageuser(struct Image *ima, struct ImageUser *iuser)
void BKE_image_free_data(struct Image *image)
struct ImageTile * BKE_image_get_tile_from_iuser(struct Image *ima, const struct ImageUser *iuser)
void BKE_image_free_packedfiles(struct Image *image)
bool BKE_image_fill_tile(struct Image *ima, struct ImageTile *tile, int width, int height, const float color[4], int gen_type, int planes, bool is_float)
struct ImageTile * BKE_image_add_tile(struct Image *ima, int tile_number, const char *label)
struct Image * BKE_image_load_exists_ex(struct Main *bmain, const char *filepath, bool *r_exists)
void BKE_stamp_info_from_imbuf(struct RenderResult *rr, struct ImBuf *ibuf)
unsigned char * BKE_image_get_pixels_for_frame(struct Image *image, int frame, int tile)
int BKE_image_find_nearest_tile_with_offset(const struct Image *image, const float co[2], float r_uv_offset[2]) ATTR_NONNULL(1
void BKE_image_user_frame_calc(struct Image *ima, struct ImageUser *iuser, int cfra)
void BKE_render_result_stamp_info(struct Scene *scene, struct Object *camera, struct RenderResult *rr, bool allocate_only)
void BKE_image_update_gputexture(struct Image *ima, struct ImageUser *iuser, int x, int y, int w, int h)
Definition: image_gpu.cc:838
void BKE_imageuser_default(struct ImageUser *iuser)
void BKE_image_stamp_buf(struct Scene *scene, struct Object *camera, const struct StampData *stamp_data_template, unsigned char *rect, float *rectf, int width, int height, int channels)
void BKE_image_buf_fill_color(unsigned char *rect, float *rect_float, int width, int height, const float color[4])
Definition: image_gen.c:68
void BKE_image_get_tile_label(struct Image *ima, struct ImageTile *tile, char *label, int len_label)
void BKE_image_pool_free(struct ImagePool *pool)
void BKE_image_tag_time(struct Image *ima)
void BKE_image_merge(struct Main *bmain, struct Image *dest, struct Image *source)
struct RenderSlot * BKE_image_get_renderslot(struct Image *ima, int index)
bool BKE_image_tile_filepath_exists(const char *filepath)
bool BKE_image_has_multiple_ibufs(struct Image *image)
void BKE_image_reassign_tile(struct Image *ima, struct ImageTile *tile, int new_tile_number)
struct ImBuf * BKE_image_get_first_ibuf(struct Image *image)
void BKE_image_all_free_anim_ibufs(struct Main *bmain, int cfra)
void BKE_image_free_all_textures(struct Main *bmain)
#define ATTR_NONNULL(...)
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
_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 type
_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
struct GPUTexture GPUTexture
Definition: GPU_texture.h:17
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between camera
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 producing a negative Combine Generate a color from its and blue channels(Deprecated)") DefNode(ShaderNode
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
volatile int lock
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition: btQuadWord.h:119
char gen_type
char filepath[1024]
CCL_NAMESPACE_BEGIN struct Options options
const char * label
Scene scene
const Depsgraph * depsgraph
DEGForeachIDComponentCallback callback
SyclQueue void void size_t num_bytes void
SyclQueue void * dest
int len
Definition: draw_manager.c:108
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
ccl_gpu_kernel_postfix ccl_global KernelWorkTile * tiles
ccl_global const KernelWorkTile * tile
Definition: DNA_ID.h:368
Definition: BKE_main.h:121
Definition: IMB_anim.h:71
char colorspace[64]
Definition: IMB_anim.h:138
int streamindex
Definition: IMB_anim.h:93
char name[1024]
Definition: IMB_anim.h:82