45 {
IMA_GENTYPE_GRID,
"UV_GRID", 0,
"UV Grid",
"Generated grid to test UV mappings"},
50 "Generated improved UV grid to test UV mappings"},
55 {
IMA_SRC_FILE,
"FILE", 0,
"Single Image",
"Single image file"},
56 {
IMA_SRC_SEQUENCE,
"SEQUENCE", 0,
"Image Sequence",
"Multiple image files, as a sequence"},
59 {
IMA_SRC_VIEWER,
"VIEWER", 0,
"Viewer",
"Compositing node viewer"},
60 {
IMA_SRC_TILED,
"TILED", 0,
"UDIM Tiles",
"Tiled UDIM image texture"},
139 rna_Image_colormanage_update(bmain,
scene,
ptr);
181 rna_ImageUser_update(bmain,
scene,
ptr);
206 static void rna_Image_gpu_texture_update(
Main *
UNUSED(bmain),
250 ibuf ? &ibuf->foptions :
NULL);
257 static void rna_Image_file_format_set(
PointerRNA *
ptr,
int value)
267 static void rna_UDIMTile_label_get(
PointerRNA *
ptr,
char *value)
285 return strlen(
label);
288 static void rna_UDIMTile_tile_number_set(
PointerRNA *
ptr,
int value)
300 if (cur_tile ==
NULL || cur_tile == tile) {
311 static void rna_Image_active_tile_index_set(
PointerRNA *
ptr,
int value)
319 static void rna_Image_active_tile_index_range(
375 static void rna_Image_resolution_get(
PointerRNA *
ptr,
float *values)
383 values[0] = ibuf->
ppm[0];
384 values[1] = ibuf->ppm[1];
394 static void rna_Image_resolution_set(
PointerRNA *
ptr,
const float *values)
402 ibuf->
ppm[0] = values[0];
403 ibuf->ppm[1] = values[1];
428 else if (ibuf->rect_float) {
429 planes = ibuf->
planes * 4;
432 planes = ibuf->planes;
470 length[0] = ibuf->x * ibuf->y * ibuf->channels;
481 static void rna_Image_pixels_get(
PointerRNA *
ptr,
float *values)
491 size = ibuf->x * ibuf->y * ibuf->channels;
493 if (ibuf->rect_float) {
494 memcpy(values, ibuf->rect_float,
sizeof(
float) *
size);
497 for (i = 0; i <
size; i++) {
498 values[i] = ((
unsigned char *)ibuf->rect)[i] * (1.0f / 255.0f);
506 static void rna_Image_pixels_set(
PointerRNA *
ptr,
const float *values)
516 size = ibuf->x * ibuf->y * ibuf->channels;
518 if (ibuf->rect_float) {
519 memcpy(ibuf->rect_float, values,
sizeof(
float) *
size);
522 for (i = 0; i <
size; i++) {
560 bool is_float =
false;
617 static int rna_render_slots_active_index_get(
PointerRNA *
ptr)
623 static void rna_render_slots_active_index_set(
PointerRNA *
ptr,
int value)
632 static void rna_render_slots_active_index_range(
668 "Parameters defining how an Image data-block is used by another data-block");
681 prop,
"Current Frame",
"Current frame number in image sequence or movie");
700 prop,
"Offset",
"Offset the number of the frame to use in the animation");
709 "Global starting frame of the movie/sequence, assuming first picture has a #1");
790 "rna_render_slots_active_index_get",
791 "rna_render_slots_active_index_set",
792 "rna_render_slots_active_index_range");
799 prop,
"rna_render_slots_active_get",
"rna_render_slots_active_set",
NULL,
NULL);
807 parm =
RNA_def_pointer(func,
"result",
"RenderSlot",
"",
"Newly created render layer");
849 "rna_Image_active_tile_index_get",
850 "rna_Image_active_tile_index_set",
851 "rna_Image_active_tile_index_range");
857 prop,
"rna_Image_active_tile_get",
"rna_Image_active_tile_set",
NULL,
NULL);
864 func,
"tile_number", 1, 1, INT_MAX,
"",
"Number of the newly created tile", 1, 100);
867 parm =
RNA_def_pointer(func,
"result",
"UDIMTile",
"",
"Newly created image tile");
872 parm =
RNA_def_int(func,
"tile_number", 0, 0, INT_MAX,
"",
"Number of the tile", 0, 100);
879 parm =
RNA_def_pointer(func,
"tile",
"UDIMTile",
"",
"Image tile to remove");
901 "Store RGB and alpha channels separately with alpha acting as a mask, also known as "
902 "unassociated alpha. Commonly used by image editing applications and file formats like "
908 "Store RGB channels with alpha multiplied in, also known as associated alpha. The natural "
909 "format for renders and used by file formats like OpenEXR"},
914 "Different images are packed in the RGB and alpha channels, and they should not "
915 "affect each other. Channel packing is commonly used by game engines to save memory"},
920 "Ignore alpha channel from the file and make image fully opaque"},
926 srna,
"Image",
"Image data-block referencing an external or packed image");
943 prop,
"rna_Image_file_format_get",
"rna_Image_file_format_set",
NULL);
976 "Apply render part of display transformation when displaying this image on the screen");
1053 prop,
"Display Aspect",
"Display Aspect for this image, does not affect rendering");
1095 "Width and height in pixels, zero when image data cant be loaded",
1103 srna,
"resolution", 2,
NULL, 0, 0,
"Resolution",
"X/Y pixels per meter", 0, 0);
1110 prop,
"Duration",
"Duration (in frames) of the image (1 when not a video/sequence)");
1133 prop,
"Is Float",
"True if this image is stored in floating-point buffer");
1145 "Representation of alpha in the image file, to convert to and from "
1146 "when saving and loading the image");
1152 "Half Float Precision",
1153 "Use 16 bits per channel to lower the memory usage during rendering");
bool BKE_image_remove_tile(struct Image *ima, struct ImageTile *tile)
void BKE_image_release_ibuf(struct Image *ima, struct ImBuf *ibuf, void *lock)
bool BKE_image_is_stereo(struct Image *ima)
bool BKE_image_has_packedfile(struct Image *image)
struct ImBuf * BKE_image_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, void **r_lock)
bool BKE_image_is_multiview(struct Image *ima)
char BKE_image_ftype_to_imtype(const int ftype, const struct ImbFormatOptions *options)
bool BKE_image_has_loaded_ibuf(struct Image *image)
#define IMA_SIGNAL_COLORMANAGE
bool BKE_image_clear_renderslot(struct Image *ima, struct ImageUser *iuser, int slot)
void BKE_image_free_gputextures(struct Image *ima)
void BKE_image_mark_dirty(struct Image *image, struct ImBuf *ibuf)
#define IMA_SIGNAL_SRC_CHANGE
bool BKE_image_has_anim(struct Image *image)
bool BKE_imtype_is_movie(const char imtype)
bool BKE_image_is_dirty(struct Image *image)
#define IMA_SIGNAL_RELOAD
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)
int BKE_image_imtype_to_ftype(const char imtype, struct ImbFormatOptions *r_options)
struct ImageTile * BKE_image_add_tile(struct Image *ima, int tile_number, const char *label)
void BKE_image_user_frame_calc(struct Image *ima, struct ImageUser *iuser, int cfra)
void BKE_image_get_tile_label(struct Image *ima, struct ImageTile *tile, char *label, int len_label)
struct RenderSlot * BKE_image_get_renderslot(struct Image *ima, int index)
bool BKE_id_is_in_global_main(struct ID *id)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
@ IMA_ALPHA_CHANNEL_PACKED
void ED_node_tag_update_nodetree(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node)
struct GPUTexture GPUTexture
int GPU_texture_opengl_bindcode(const GPUTexture *tex)
int IMB_anim_get_duration(struct anim *anim, IMB_Timecode_Type tc)
Contains defines and structs used throughout the imbuf module.
@ IB_DISPLAY_BUFFER_INVALID
Group RGB to Bright Vector Camera CLAMP
#define RNA_MAX_ARRAY_DIMENSION
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
return(oflags[bm->toolflag_index].f &oflag) !=0
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
struct ListBase packedfiles
struct GPUTexture * gputexture[3][2]
CCL_NAMESPACE_BEGIN struct Options options
void * BKE_image_get_tile
MINLINE unsigned char unit_float_to_uchar_clamp(float val)
const PointerRNA PointerRNA_NULL
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength)
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
PropertyRNA * RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
PropertyRNA * RNA_def_int_vector(StructOrFunctionRNA *cont_, const char *identifier, int len, const int *default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
void RNA_def_property_subtype(PropertyRNA *prop, PropertySubType subtype)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item, int value)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_image(BlenderRNA *brna)
static void rna_def_image(BlenderRNA *brna)
static void rna_def_render_slot(BlenderRNA *brna)
static void rna_def_render_slots(BlenderRNA *brna, PropertyRNA *cprop)
static const EnumPropertyItem image_source_items[]
static void rna_def_image_packed_files(BlenderRNA *brna)
static void rna_def_udim_tile(BlenderRNA *brna)
static void rna_def_udim_tiles(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_imageuser(BlenderRNA *brna)
const EnumPropertyItem rna_enum_image_generated_type_items[]
void RNA_api_image(StructRNA *srna)
void RNA_api_image_packed_file(StructRNA *srna)
char * rna_Node_ImageUser_path(struct PointerRNA *ptr)
const EnumPropertyItem rna_enum_image_type_items[]
const EnumPropertyItem rna_enum_views_format_items[]
struct PackedFile * packedfile
void WM_main_add_notifier(unsigned int type, void *reference)