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 1,095 Lines • ▼ Show 20 Lines | if (node->type == SH_NODE_TEX_ENVIRONMENT) { | ||||
| if (&data->iuser != ptr->data) | if (&data->iuser != ptr->data) | ||||
| continue; | continue; | ||||
| } | } | ||||
| else if (node->type == SH_NODE_TEX_IMAGE) { | else if (node->type == SH_NODE_TEX_IMAGE) { | ||||
| NodeTexImage *data = node->storage; | NodeTexImage *data = node->storage; | ||||
| if (&data->iuser != ptr->data) | if (&data->iuser != ptr->data) | ||||
| continue; | continue; | ||||
| } | } | ||||
| else if (node->type == SH_NODE_TEX_UDIM) { | |||||
| NodeTexUDIM *data = node->storage; | |||||
| if (&data->iuser != ptr->data) | |||||
| continue; | |||||
| } | |||||
| else | else | ||||
| continue; | continue; | ||||
| BLI_strescape(name_esc, node->name, sizeof(name_esc)); | BLI_strescape(name_esc, node->name, sizeof(name_esc)); | ||||
| return BLI_sprintfN("nodes[\"%s\"].image_user", name_esc); | return BLI_sprintfN("nodes[\"%s\"].image_user", name_esc); | ||||
| } | } | ||||
| return NULL; | return NULL; | ||||
| ▲ Show 20 Lines • Show All 2,678 Lines • ▼ Show 20 Lines | static void def_sh_tex_image(StructRNA *srna) | ||||
| 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", | ||||
| "Parameters defining which layer, pass and frame of the image is displayed"); | "Parameters defining which layer, pass and frame of the image is displayed"); | ||||
| RNA_def_property_update(prop, 0, "rna_Node_update"); | RNA_def_property_update(prop, 0, "rna_Node_update"); | ||||
| } | } | ||||
| static void def_sh_tex_udim(StructRNA *srna) | |||||
| { | |||||
| static EnumPropertyItem prop_image_extension[] = { | |||||
| {SHD_IMAGE_EXTENSION_REPEAT, "REPEAT", 0, "Repeat", "Cause the image to repeat horizontally and vertically"}, | |||||
| {SHD_IMAGE_EXTENSION_EXTEND, "EXTEND", 0, "Extend", "Extend by repeating edge pixels of the image"}, | |||||
| {SHD_IMAGE_EXTENSION_CLIP, "CLIP", 0, "Clip", "Clip to image size and set exterior pixels as transparent"}, | |||||
| {0, NULL, 0, NULL, NULL} | |||||
| }; | |||||
| PropertyRNA *prop; | |||||
| prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "id"); | |||||
| RNA_def_property_struct_type(prop, "Image"); | |||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | |||||
| RNA_def_property_ui_text(prop, "Image", ""); | |||||
| RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_tex_image_update"); | |||||
| RNA_def_struct_sdna_from(srna, "NodeTexUDIM", "storage"); | |||||
| def_sh_tex(srna); | |||||
| prop = RNA_def_property(srna, "color_space", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, sh_tex_prop_color_space_items); | |||||
| RNA_def_property_enum_default(prop, SHD_COLORSPACE_COLOR); | |||||
| RNA_def_property_ui_text(prop, "Color Space", "Image file color space"); | |||||
| 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, sh_tex_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, "extension", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, prop_image_extension); | |||||
| RNA_def_property_ui_text(prop, "Extension", "How the image is extrapolated past its original bounds"); | |||||
| RNA_def_property_update(prop, 0, "rna_Node_update"); | |||||
| prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_flag(prop, PROP_NEVER_NULL); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "iuser"); | |||||
| RNA_def_property_ui_text(prop, "Image User", | |||||
| "Parameters defining which layer, pass and frame of the image is displayed"); | |||||
| RNA_def_property_update(prop, 0, "rna_Node_update"); | |||||
| prop = RNA_def_property(srna, "start_tile", PROP_INT, PROP_NONE); | |||||
| RNA_def_property_int_sdna(prop, NULL, "start_tile"); | |||||
| RNA_def_property_int_default(prop, 1001); | |||||
| RNA_def_property_range(prop, 1000, 9999); | |||||
| RNA_def_property_ui_text(prop, "Start Tile", "Tile ID of the tile in the lower-left corner"); | |||||
| RNA_def_property_update(prop, 0, "rna_Node_update"); | |||||
| prop = RNA_def_property(srna, "tiles_per_row", PROP_INT, PROP_NONE); | |||||
| RNA_def_property_int_sdna(prop, NULL, "tiles_per_row"); | |||||
| RNA_def_property_int_default(prop, 10); | |||||
| RNA_def_property_range(prop, 1, 1000); | |||||
| RNA_def_property_ui_text(prop, "Tiles per Row", "Amount of tiles in a row before the next row starts"); | |||||
| RNA_def_property_update(prop, 0, "rna_Node_update"); | |||||
| prop = RNA_def_property(srna, "uv_map", PROP_STRING, PROP_NONE); | |||||
| RNA_def_property_ui_text(prop, "UV Map", "UV coordinates to be used for mapping"); | |||||
| RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); | |||||
| } | |||||
| static void def_sh_tex_gradient(StructRNA *srna) | static void def_sh_tex_gradient(StructRNA *srna) | ||||
| { | { | ||||
| static EnumPropertyItem prop_gradient_type[] = { | static EnumPropertyItem prop_gradient_type[] = { | ||||
| {SHD_BLEND_LINEAR, "LINEAR", 0, "Linear", "Create a linear progression"}, | {SHD_BLEND_LINEAR, "LINEAR", 0, "Linear", "Create a linear progression"}, | ||||
| {SHD_BLEND_QUADRATIC, "QUADRATIC", 0, "Quadratic", "Create a quadratic progression"}, | {SHD_BLEND_QUADRATIC, "QUADRATIC", 0, "Quadratic", "Create a quadratic progression"}, | ||||
| {SHD_BLEND_EASING, "EASING", 0, "Easing", "Create a progression easing from one step to the next"}, | {SHD_BLEND_EASING, "EASING", 0, "Easing", "Create a progression easing from one step to the next"}, | ||||
| {SHD_BLEND_DIAGONAL, "DIAGONAL", 0, "Diagonal", "Create a diagonal progression"}, | {SHD_BLEND_DIAGONAL, "DIAGONAL", 0, "Diagonal", "Create a diagonal progression"}, | ||||
| {SHD_BLEND_SPHERICAL, "SPHERICAL", 0, "Spherical", "Create a spherical progression"}, | {SHD_BLEND_SPHERICAL, "SPHERICAL", 0, "Spherical", "Create a spherical progression"}, | ||||
| ▲ Show 20 Lines • Show All 4,588 Lines • Show Last 20 Lines | |||||