Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_image.c
| Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | static void rna_Image_animated_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | ||||
| if (ima->flag & IMA_TWINANIM) { | if (ima->flag & IMA_TWINANIM) { | ||||
| nr = ima->xrep * ima->yrep; | nr = ima->xrep * ima->yrep; | ||||
| if (ima->twsta >= nr) ima->twsta = 1; | if (ima->twsta >= nr) ima->twsta = 1; | ||||
| if (ima->twend >= nr) ima->twend = nr - 1; | if (ima->twend >= nr) ima->twend = nr - 1; | ||||
| if (ima->twsta > ima->twend) ima->twsta = 1; | if (ima->twsta > ima->twend) ima->twsta = 1; | ||||
| } | } | ||||
| } | } | ||||
| static int rna_Image_is_stereo_3d_get(PointerRNA *ptr) | |||||
| { | |||||
| return BKE_image_is_stereo((Image *)ptr->data); | |||||
| } | |||||
| static int rna_Image_is_multiview_get(PointerRNA *ptr) | |||||
| { | |||||
| return BKE_image_is_multiview((Image *)ptr->data); | |||||
| } | |||||
| static int rna_Image_dirty_get(PointerRNA *ptr) | static int rna_Image_dirty_get(PointerRNA *ptr) | ||||
| { | { | ||||
| return BKE_image_is_dirty((Image *)ptr->data); | return BKE_image_is_dirty((Image *)ptr->data); | ||||
| } | } | ||||
| static void rna_Image_source_set(PointerRNA *ptr, int value) | static void rna_Image_source_set(PointerRNA *ptr, int value) | ||||
| { | { | ||||
| Image *ima = ptr->id.data; | Image *ima = ptr->id.data; | ||||
| ▲ Show 20 Lines • Show All 622 Lines • ▼ Show 20 Lines | static void rna_def_image(BlenderRNA *brna) | ||||
| 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_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_boolean_sdna(prop, NULL, "flag", IMA_IS_STEREO); | 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_boolean_sdna(prop, NULL, "flag", IMA_IS_MULTIVIEW); | 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_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"); | ||||
| ▲ Show 20 Lines • Show All 201 Lines • Show Last 20 Lines | |||||