Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_image.c
| Show First 20 Lines • Show All 663 Lines • ▼ Show 20 Lines | static const EnumPropertyItem alpha_mode_items[] = { | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| srna = RNA_def_struct(brna, "Image", "ID"); | srna = RNA_def_struct(brna, "Image", "ID"); | ||||
| RNA_def_struct_ui_text(srna, "Image", "Image data-block referencing an external or packed image"); | RNA_def_struct_ui_text(srna, "Image", "Image data-block referencing an external or packed image"); | ||||
| RNA_def_struct_ui_icon(srna, ICON_IMAGE_DATA); | RNA_def_struct_ui_icon(srna, ICON_IMAGE_DATA); | ||||
| prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); | prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_string_sdna(prop, NULL, "name"); | RNA_def_property_string_sdna(prop, NULL, "name"); | ||||
| RNA_def_property_ui_text(prop, "File Name", "Image/Movie file name"); | RNA_def_property_ui_text(prop, "File Name", "Image/Movie file name"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_reload_update"); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_reload_update"); | ||||
| /* eek. this is horrible but needed so we can save to a new name without blanking the data :( */ | /* eek. this is horrible but needed so we can save to a new name without blanking the data :( */ | ||||
| prop = RNA_def_property(srna, "filepath_raw", PROP_STRING, PROP_FILEPATH); | prop = RNA_def_property(srna, "filepath_raw", PROP_STRING, PROP_FILEPATH); | ||||
| RNA_def_property_string_sdna(prop, NULL, "name"); | RNA_def_property_string_sdna(prop, NULL, "name"); | ||||
| RNA_def_property_ui_text(prop, "File Name", "Image/Movie file name (without data refreshing)"); | RNA_def_property_ui_text(prop, "File Name", "Image/Movie file name (without data refreshing)"); | ||||
| Show All 23 Lines | static void rna_def_image(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "packed_files", PROP_COLLECTION, PROP_NONE); | prop = RNA_def_property(srna, "packed_files", PROP_COLLECTION, PROP_NONE); | ||||
| RNA_def_property_collection_sdna(prop, NULL, "packedfiles", NULL); | RNA_def_property_collection_sdna(prop, NULL, "packedfiles", NULL); | ||||
| RNA_def_property_struct_type(prop, "ImagePackedFile"); | RNA_def_property_struct_type(prop, "ImagePackedFile"); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_ui_text(prop, "Packed Files", "Collection of packed images"); | RNA_def_property_ui_text(prop, "Packed Files", "Collection of packed images"); | ||||
| prop = RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); | RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); | ||||
| RNA_def_property_enum_items(prop, prop_field_order_items); | RNA_def_property_enum_items(prop, prop_field_order_items); | ||||
| RNA_def_property_ui_text(prop, "Field Order", "Order of video fields (select which lines are displayed first)"); | RNA_def_property_ui_text(prop, "Field Order", "Order of video fields (select which lines are displayed first)"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | ||||
| /* booleans */ | /* booleans */ | ||||
| prop = RNA_def_property(srna, "use_fields", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_fields", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_FIELDS); | RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_FIELDS); | ||||
| RNA_def_property_ui_text(prop, "Fields", "Use fields of the image"); | RNA_def_property_ui_text(prop, "Fields", "Use fields of the image"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_fields_update"); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_fields_update"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| prop = RNA_def_property(srna, "use_view_as_render", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_view_as_render", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_VIEW_AS_RENDER); | RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_VIEW_AS_RENDER); | ||||
| RNA_def_property_ui_text(prop, "View as Render", "Apply render part of display transformation when displaying this image on the screen"); | RNA_def_property_ui_text(prop, "View as Render", "Apply render part of display transformation when displaying this image on the screen"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | ||||
| prop = RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", IMA_IGNORE_ALPHA); | RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", IMA_IGNORE_ALPHA); | ||||
| RNA_def_property_ui_text(prop, "Use Alpha", "Use the alpha channel information from the image or make image fully opaque"); | RNA_def_property_ui_text(prop, "Use Alpha", "Use the alpha channel information from the image or make image fully opaque"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_colormanage_update"); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_colormanage_update"); | ||||
| prop = RNA_def_property(srna, "use_deinterlace", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_deinterlace", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_DEINTERLACE); | RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_DEINTERLACE); | ||||
| RNA_def_property_ui_text(prop, "Deinterlace", "Deinterlace movie file on load"); | RNA_def_property_ui_text(prop, "Deinterlace", "Deinterlace movie file on load"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_reload_update"); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_reload_update"); | ||||
| prop = RNA_def_property(srna, "use_multiview", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_multiview", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_USE_VIEWS); | RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_USE_VIEWS); | ||||
| RNA_def_property_ui_text(prop, "Use Multi-View", "Use Multiple Views (when available)"); | RNA_def_property_ui_text(prop, "Use Multi-View", "Use Multiple Views (when available)"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_views_format_update"); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_views_format_update"); | ||||
| prop = RNA_def_property(srna, "is_stereo_3d", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_stereo_3d", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_boolean_funcs(prop, "rna_Image_is_stereo_3d_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Image_is_stereo_3d_get", NULL); | ||||
| RNA_def_property_ui_text(prop, "Stereo 3D", "Image has left and right views"); | RNA_def_property_ui_text(prop, "Stereo 3D", "Image has left and right views"); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "is_multiview", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_multiview", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_boolean_funcs(prop, "rna_Image_is_multiview_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Image_is_multiview_get", NULL); | ||||
| RNA_def_property_ui_text(prop, "Multiple Views", "Image has more than one view"); | RNA_def_property_ui_text(prop, "Multiple Views", "Image has more than one view"); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "is_dirty", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_dirty", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_boolean_funcs(prop, "rna_Image_dirty_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Image_dirty_get", NULL); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_ui_text(prop, "Dirty", "Image has changed and is not saved"); | RNA_def_property_ui_text(prop, "Dirty", "Image has changed and is not saved"); | ||||
| /* generated image (image_generated_change_cb) */ | /* generated image (image_generated_change_cb) */ | ||||
| prop = RNA_def_property(srna, "generated_type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "generated_type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "gen_type"); | RNA_def_property_enum_sdna(prop, NULL, "gen_type"); | ||||
| RNA_def_property_enum_items(prop, rna_enum_image_generated_type_items); | RNA_def_property_enum_items(prop, rna_enum_image_generated_type_items); | ||||
| Show All 27 Lines | static void rna_def_image(BlenderRNA *brna) | ||||
| RNA_def_property_float_sdna(prop, NULL, "gen_color"); | RNA_def_property_float_sdna(prop, NULL, "gen_color"); | ||||
| RNA_def_property_array(prop, 4); | RNA_def_property_array(prop, 4); | ||||
| RNA_def_property_ui_text(prop, "Color", "Fill color for the generated image"); | RNA_def_property_ui_text(prop, "Color", "Fill color for the generated image"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_generated_update"); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_generated_update"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| /* realtime properties */ | /* realtime properties */ | ||||
| prop = RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); | RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); | ||||
| RNA_def_property_enum_items(prop, prop_mapping_items); | RNA_def_property_enum_items(prop, prop_mapping_items); | ||||
| RNA_def_property_ui_text(prop, "Mapping", "Mapping type to use for this image in the game engine"); | RNA_def_property_ui_text(prop, "Mapping", "Mapping type to use for this image in the game engine"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | ||||
| prop = RNA_def_property(srna, "display_aspect", PROP_FLOAT, PROP_XYZ); | prop = RNA_def_property(srna, "display_aspect", PROP_FLOAT, PROP_XYZ); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "aspx"); | RNA_def_property_float_sdna(prop, NULL, "aspx"); | ||||
| RNA_def_property_array(prop, 2); | RNA_def_property_array(prop, 2); | ||||
| RNA_def_property_range(prop, 0.1f, FLT_MAX); | RNA_def_property_range(prop, 0.1f, FLT_MAX); | ||||
| RNA_def_property_ui_range(prop, 0.1f, 5000.f, 1, 2); | RNA_def_property_ui_range(prop, 0.1f, 5000.f, 1, 2); | ||||
| RNA_def_property_ui_text(prop, "Display Aspect", "Display Aspect for this image, does not affect rendering"); | RNA_def_property_ui_text(prop, "Display Aspect", "Display Aspect for this image, does not affect rendering"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | ||||
| prop = RNA_def_property(srna, "use_animation", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_animation", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_TWINANIM); | RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_TWINANIM); | ||||
| RNA_def_property_ui_text(prop, "Animated", "Use as animated texture in the game engine"); | RNA_def_property_ui_text(prop, "Animated", "Use as animated texture in the game engine"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_animated_update"); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_animated_update"); | ||||
| prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_int_sdna(prop, NULL, "twsta"); | RNA_def_property_int_sdna(prop, NULL, "twsta"); | ||||
| RNA_def_property_range(prop, 0, 255); | RNA_def_property_range(prop, 0, 255); | ||||
| RNA_def_property_ui_text(prop, "Animation Start", "Start frame of an animated texture"); | RNA_def_property_ui_text(prop, "Animation Start", "Start frame of an animated texture"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_animated_update"); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_animated_update"); | ||||
| prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_int_sdna(prop, NULL, "twend"); | RNA_def_property_int_sdna(prop, NULL, "twend"); | ||||
| RNA_def_property_range(prop, 0, 255); | RNA_def_property_range(prop, 0, 255); | ||||
| RNA_def_property_ui_text(prop, "Animation End", "End frame of an animated texture"); | RNA_def_property_ui_text(prop, "Animation End", "End frame of an animated texture"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_animated_update"); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_animated_update"); | ||||
| prop = RNA_def_property(srna, "fps", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "fps", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_int_sdna(prop, NULL, "animspeed"); | RNA_def_property_int_sdna(prop, NULL, "animspeed"); | ||||
| RNA_def_property_range(prop, 1, 100); | RNA_def_property_range(prop, 1, 100); | ||||
| RNA_def_property_ui_text(prop, "Animation Speed", "Speed of the animation in frames per second"); | RNA_def_property_ui_text(prop, "Animation Speed", "Speed of the animation in frames per second"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | ||||
| prop = RNA_def_property(srna, "use_tiles", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_tiles", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_TILES); | RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_TILES); | ||||
| RNA_def_property_ui_text(prop, "Tiles", | RNA_def_property_ui_text(prop, "Tiles", | ||||
| "Use of tilemode for faces (default shift-LMB to pick the tile for selected faces)"); | "Use of tilemode for faces (default shift-LMB to pick the tile for selected faces)"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | ||||
| prop = RNA_def_property(srna, "tiles_x", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "tiles_x", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_int_sdna(prop, NULL, "xrep"); | RNA_def_property_int_sdna(prop, NULL, "xrep"); | ||||
| RNA_def_property_range(prop, 1, 16); | RNA_def_property_range(prop, 1, 16); | ||||
| RNA_def_property_ui_text(prop, "Tiles X", "Degree of repetition in the X direction"); | RNA_def_property_ui_text(prop, "Tiles X", "Degree of repetition in the X direction"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | ||||
| prop = RNA_def_property(srna, "tiles_y", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "tiles_y", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_int_sdna(prop, NULL, "yrep"); | RNA_def_property_int_sdna(prop, NULL, "yrep"); | ||||
| RNA_def_property_range(prop, 1, 16); | RNA_def_property_range(prop, 1, 16); | ||||
| RNA_def_property_ui_text(prop, "Tiles Y", "Degree of repetition in the Y direction"); | RNA_def_property_ui_text(prop, "Tiles Y", "Degree of repetition in the Y direction"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | ||||
| prop = RNA_def_property(srna, "use_clamp_x", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_clamp_x", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_CLAMP_U); | RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_CLAMP_U); | ||||
| RNA_def_property_ui_text(prop, "Clamp X", "Disable texture repeating horizontally"); | RNA_def_property_ui_text(prop, "Clamp X", "Disable texture repeating horizontally"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | ||||
| prop = RNA_def_property(srna, "use_clamp_y", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_clamp_y", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_CLAMP_V); | RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_CLAMP_V); | ||||
| RNA_def_property_ui_text(prop, "Clamp Y", "Disable texture repeating vertically"); | RNA_def_property_ui_text(prop, "Clamp Y", "Disable texture repeating vertically"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL); | ||||
| prop = RNA_def_property(srna, "bindcode", PROP_INT, PROP_UNSIGNED); | prop = RNA_def_property(srna, "bindcode", PROP_INT, PROP_UNSIGNED); | ||||
| RNA_def_property_int_sdna(prop, NULL, "bindcode"); | RNA_def_property_int_sdna(prop, NULL, "bindcode"); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_ui_text(prop, "Bindcode", "OpenGL bindcode"); | RNA_def_property_ui_text(prop, "Bindcode", "OpenGL bindcode"); | ||||
| Show All 22 Lines | static void rna_def_image(BlenderRNA *brna) | ||||
| prop = RNA_def_int_vector(srna, "size", 2, NULL, 0, 0, "Size", | prop = RNA_def_int_vector(srna, "size", 2, NULL, 0, 0, "Size", | ||||
| "Width and height in pixels, zero when image data cant be loaded", 0, 0); | "Width and height in pixels, zero when image data cant be loaded", 0, 0); | ||||
| RNA_def_property_subtype(prop, PROP_PIXEL); | RNA_def_property_subtype(prop, PROP_PIXEL); | ||||
| RNA_def_property_int_funcs(prop, "rna_Image_size_get", NULL, NULL); | RNA_def_property_int_funcs(prop, "rna_Image_size_get", NULL, NULL); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_float_vector(srna, "resolution", 2, NULL, 0, 0, "Resolution", "X/Y pixels per meter", 0, 0); | prop = RNA_def_float_vector(srna, "resolution", 2, NULL, 0, 0, "Resolution", "X/Y pixels per meter", 0, 0); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_float_funcs(prop, "rna_Image_resolution_get", "rna_Image_resolution_set", NULL); | RNA_def_property_float_funcs(prop, "rna_Image_resolution_get", "rna_Image_resolution_set", NULL); | ||||
| prop = RNA_def_property(srna, "frame_duration", PROP_INT, PROP_UNSIGNED); | prop = RNA_def_property(srna, "frame_duration", PROP_INT, PROP_UNSIGNED); | ||||
| RNA_def_property_int_funcs(prop, "rna_Image_frame_duration_get", NULL, NULL); | RNA_def_property_int_funcs(prop, "rna_Image_frame_duration_get", NULL, NULL); | ||||
| RNA_def_property_ui_text(prop, "Duration", "Duration (in frames) of the image (1 when not a video/sequence)"); | RNA_def_property_ui_text(prop, "Duration", "Duration (in frames) of the image (1 when not a video/sequence)"); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| /* NOTE about pixels/channels/is_floa: | /* NOTE about pixels/channels/is_floa: | ||||
| Show All 18 Lines | static void rna_def_image(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Is Float", "True if this image is stored in float buffer"); | RNA_def_property_ui_text(prop, "Is Float", "True if this image is stored in float buffer"); | ||||
| prop = RNA_def_property(srna, "colorspace_settings", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "colorspace_settings", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "colorspace_settings"); | RNA_def_property_pointer_sdna(prop, NULL, "colorspace_settings"); | ||||
| RNA_def_property_struct_type(prop, "ColorManagedInputColorspaceSettings"); | RNA_def_property_struct_type(prop, "ColorManagedInputColorspaceSettings"); | ||||
| RNA_def_property_ui_text(prop, "Color Space Settings", "Input color space settings"); | RNA_def_property_ui_text(prop, "Color Space Settings", "Input color space settings"); | ||||
| prop = RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_enum_items(prop, alpha_mode_items); | RNA_def_property_enum_items(prop, alpha_mode_items); | ||||
| RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels"); | RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_colormanage_update"); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_colormanage_update"); | ||||
| /* multiview */ | /* multiview */ | ||||
| prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_OVERRIDABLE); | |||||
| RNA_def_property_enum_sdna(prop, NULL, "views_format"); | RNA_def_property_enum_sdna(prop, NULL, "views_format"); | ||||
| RNA_def_property_enum_items(prop, rna_enum_views_format_items); | RNA_def_property_enum_items(prop, rna_enum_views_format_items); | ||||
| RNA_def_property_ui_text(prop, "Views Format", "Mode to load image views"); | RNA_def_property_ui_text(prop, "Views Format", "Mode to load image views"); | ||||
| RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_views_format_update"); | RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Image_views_format_update"); | ||||
| prop = RNA_def_property(srna, "stereo_3d_format", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "stereo_3d_format", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "stereo3d_format"); | RNA_def_property_pointer_sdna(prop, NULL, "stereo3d_format"); | ||||
| RNA_def_property_flag(prop, PROP_NEVER_NULL); | RNA_def_property_flag(prop, PROP_NEVER_NULL); | ||||
| Show All 16 Lines | |||||