Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_nodetree.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 3,422 Lines • ▼ Show 20 Lines | static void def_sh_tex_image(StructRNA *srna) | ||||
| static const EnumPropertyItem prop_projection_items[] = { | static const EnumPropertyItem prop_projection_items[] = { | ||||
| {SHD_PROJ_FLAT, "FLAT", 0, "Flat", | {SHD_PROJ_FLAT, "FLAT", 0, "Flat", | ||||
| "Image is projected flat using the X and Y coordinates of the texture vector"}, | "Image is projected flat using the X and Y coordinates of the texture vector"}, | ||||
| {SHD_PROJ_BOX, "BOX", 0, "Box", | {SHD_PROJ_BOX, "BOX", 0, "Box", | ||||
| "Image is projected using different components for each side of the object space bounding box"}, | "Image is projected using different components for each side of the object space bounding box"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| static const EnumPropertyItem prop_interpolation_items[] = { | |||||
| {SHD_INTER_LINEAR, "Linear", 0, "Linear", | |||||
| "Linear interpolation"}, | |||||
| {SHD_INTER_CLOSEST, "Closest", 0, "Closest", | |||||
| "No interpolation (sample closest texel"}, | |||||
| {SHD_INTER_CUBIC, "Cubic", 0, "Cubic", | |||||
| "Cubic interpolation (OSL only)"}, | |||||
| {SHD_INTER_SMART, "Smart", 0, "Smart", | |||||
| "Bicubic when maxifying, else bilinear (OSL only)"}, | |||||
| {0, NULL, 0, NULL, NULL} | |||||
| }; | |||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "id"); | RNA_def_property_pointer_sdna(prop, NULL, "id"); | ||||
| RNA_def_property_struct_type(prop, "Image"); | RNA_def_property_struct_type(prop, "Image"); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | RNA_def_property_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_ui_text(prop, "Image", ""); | RNA_def_property_ui_text(prop, "Image", ""); | ||||
| RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_tex_image_update"); | RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_tex_image_update"); | ||||
| RNA_def_struct_sdna_from(srna, "NodeTexImage", "storage"); | RNA_def_struct_sdna_from(srna, "NodeTexImage", "storage"); | ||||
| def_sh_tex(srna); | def_sh_tex(srna); | ||||
| prop = RNA_def_property(srna, "color_space", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "color_space", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, prop_color_space_items); | RNA_def_property_enum_items(prop, prop_color_space_items); | ||||
| RNA_def_property_ui_text(prop, "Color Space", "Image file color space"); | RNA_def_property_ui_text(prop, "Color Space", "Image file color space"); | ||||
| RNA_def_property_update(prop, 0, "rna_Node_update"); | RNA_def_property_update(prop, 0, "rna_Node_update"); | ||||
| prop = RNA_def_property(srna, "projection", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "projection", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, prop_projection_items); | RNA_def_property_enum_items(prop, prop_projection_items); | ||||
| RNA_def_property_ui_text(prop, "Projection", "Method to project 2D image on object with a 3D texture vector"); | RNA_def_property_ui_text(prop, "Projection", "Method to project 2D image on object with a 3D texture vector"); | ||||
| RNA_def_property_update(prop, 0, "rna_Node_update"); | RNA_def_property_update(prop, 0, "rna_Node_update"); | ||||
| prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, prop_interpolation_items); | |||||
| RNA_def_property_ui_text(prop, "Interpolation", "Texture interpolation"); | |||||
| RNA_def_property_update(prop, 0, "rna_Node_update"); | |||||
| prop = RNA_def_property(srna, "projection_blend", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "projection_blend", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_ui_text(prop, "Projection Blend", "For box projection, amount of blend to use between sides"); | RNA_def_property_ui_text(prop, "Projection Blend", "For box projection, amount of blend to use between sides"); | ||||
| RNA_def_property_update(prop, 0, "rna_Node_update"); | RNA_def_property_update(prop, 0, "rna_Node_update"); | ||||
| prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_NEVER_NULL); | RNA_def_property_flag(prop, PROP_NEVER_NULL); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "iuser"); | RNA_def_property_pointer_sdna(prop, NULL, "iuser"); | ||||
| RNA_def_property_ui_text(prop, "Image User", | RNA_def_property_ui_text(prop, "Image User", | ||||
| ▲ Show 20 Lines • Show All 4,304 Lines • Show Last 20 Lines | |||||