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 5,475 Lines • ▼ Show 20 Lines | static void def_sh_tex_sky(StructRNA *srna) | ||||
| prop = RNA_def_property(srna, "ozone_density", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "ozone_density", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_ui_text(prop, "Ozone", "Density of ozone layer"); | RNA_def_property_ui_text(prop, "Ozone", "Density of ozone layer"); | ||||
| RNA_def_property_range(prop, 0.0f, 10.0f); | RNA_def_property_range(prop, 0.0f, 10.0f); | ||||
| RNA_def_property_float_default(prop, 1.0f); | RNA_def_property_float_default(prop, 1.0f); | ||||
| RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); | RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); | ||||
| } | } | ||||
| static const EnumPropertyItem sh_tex_prop_interpolation_items[] = { | static const EnumPropertyItem sh_tex_prop_interpolation_items[] = { | ||||
| {SHD_INTERP_LINEAR, "Linear", 0, "Linear", "Linear interpolation"}, | {IMAGE_TEX_INTERP_LINEAR, "Linear", 0, "Linear", "Linear interpolation"}, | ||||
| {SHD_INTERP_CLOSEST, "Closest", 0, "Closest", "No interpolation (sample closest texel)"}, | {IMAGE_TEX_INTERP_CLOSEST, "Closest", 0, "Closest", "No interpolation (sample closest texel)"}, | ||||
| {SHD_INTERP_CUBIC, "Cubic", 0, "Cubic", "Cubic interpolation"}, | {IMAGE_TEX_INTERP_CUBIC, "Cubic", 0, "Cubic", "Cubic interpolation"}, | ||||
| {SHD_INTERP_SMART, "Smart", 0, "Smart", "Bicubic when magnifying, else bilinear (OSL only)"}, | {IMAGE_TEX_INTERP_SMART, | ||||
| "Smart", | |||||
| 0, | |||||
| "Smart", | |||||
| "Cubic when magnifying, else linear (OSL only). Otherwise, fallback to cubic interpolation"}, | |||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| static void def_sh_tex_environment(StructRNA *srna) | static void def_sh_tex_environment(StructRNA *srna) | ||||
| { | { | ||||
| static const EnumPropertyItem prop_projection_items[] = { | static const EnumPropertyItem prop_projection_items[] = { | ||||
| {SHD_PROJ_EQUIRECTANGULAR, | {SHD_PROJ_EQUIRECTANGULAR, | ||||
| "EQUIRECTANGULAR", | "EQUIRECTANGULAR", | ||||
| ▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | static const EnumPropertyItem prop_projection_items[] = { | ||||
| "TUBE", | "TUBE", | ||||
| 0, | 0, | ||||
| "Tube", | "Tube", | ||||
| "Image is projected from the tube using the Z axis as central"}, | "Image is projected from the tube using the Z axis as central"}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| static const EnumPropertyItem prop_image_extension[] = { | static const EnumPropertyItem prop_image_extension[] = { | ||||
| {SHD_IMAGE_EXTENSION_REPEAT, | {IMAGE_TEX_EXT_REPEAT, | ||||
| "REPEAT", | "REPEAT", | ||||
| 0, | 0, | ||||
| "Repeat", | "Repeat", | ||||
| "Cause the image to repeat horizontally and vertically"}, | "Extend the image by repeating the entire image"}, | ||||
| {SHD_IMAGE_EXTENSION_EXTEND, | {IMAGE_TEX_EXT_EXTEND, | ||||
| "EXTEND", | "EXTEND", | ||||
| 0, | 0, | ||||
| "Extend", | "Extend", | ||||
| "Extend by repeating edge pixels of the image"}, | "Extend the image by only repeating the edge pixels of the image"}, | ||||
| {SHD_IMAGE_EXTENSION_CLIP, | {IMAGE_TEX_EXT_CLIP, | ||||
| "CLIP", | "CLIP", | ||||
| 0, | 0, | ||||
| "Clip", | "Clip", | ||||
| "Clip to image size and set exterior pixels as transparent"}, | "Extend the image by setting all exterior pixels to transparent black"}, | ||||
| {0, NULL, 0, NULL, NULL}, | {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"); | ||||
| Show All 19 Lines | static void def_sh_tex_image(StructRNA *srna) | ||||
| 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( | RNA_def_property_ui_text( | ||||
| prop, "Projection Blend", "For box projection, amount of blend to use between sides"); | 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, "extension", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, prop_image_extension); | RNA_def_property_enum_items(prop, prop_image_extension); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Extension", "How the image is extrapolated past its original bounds"); | prop, "Extension", "Choose how the image should appear when sampled outside of the range 0 to 1"); | ||||
| 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( | RNA_def_property_ui_text( | ||||
| prop, | prop, | ||||
| "Image User", | "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_geo_image_texture(StructRNA *srna) | static void def_geo_image_texture(StructRNA *srna) | ||||
| { | { | ||||
| static const EnumPropertyItem fn_tex_prop_interpolation_items[] = { | static const EnumPropertyItem fn_tex_prop_interpolation_items[] = { | ||||
| {SHD_INTERP_LINEAR, "Linear", 0, "Linear", "Linear interpolation"}, | {IMAGE_TEX_INTERP_LINEAR, "Linear", 0, "Linear", "Linear interpolation"}, | ||||
| {SHD_INTERP_CLOSEST, "Closest", 0, "Closest", "No interpolation (sample closest texel)"}, | {IMAGE_TEX_INTERP_CLOSEST, | ||||
| {SHD_INTERP_CUBIC, "Cubic", 0, "Cubic", "Cubic interpolation"}, | "Closest", | ||||
| 0, | |||||
| "Closest", | |||||
| "No interpolation (sample closest texel)"}, | |||||
| {IMAGE_TEX_INTERP_CUBIC, "Cubic", 0, "Cubic", "Cubic interpolation"}, | |||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| static const EnumPropertyItem prop_image_extension[] = { | static const EnumPropertyItem prop_image_extension[] = { | ||||
| {SHD_IMAGE_EXTENSION_REPEAT, | {IMAGE_TEX_EXT_REPEAT, | ||||
| "REPEAT", | "REPEAT", | ||||
| 0, | 0, | ||||
| "Repeat", | "Repeat", | ||||
| "Cause the image to repeat horizontally and vertically"}, | "Extend the image by repeating the entire image"}, | ||||
| {SHD_IMAGE_EXTENSION_EXTEND, | {IMAGE_TEX_EXT_EXTEND, | ||||
| "EXTEND", | "EXTEND", | ||||
| 0, | 0, | ||||
| "Extend", | "Extend", | ||||
| "Extend by repeating edge pixels of the image"}, | "Extend the image by only repeating the edge pixels of the image"}, | ||||
| {SHD_IMAGE_EXTENSION_CLIP, | {IMAGE_TEX_EXT_CLIP, | ||||
| "CLIP", | "CLIP", | ||||
| 0, | 0, | ||||
| "Clip", | "Clip", | ||||
| "Clip to image size and set exterior pixels as transparent"}, | "Extend the image by setting all exterior pixels to transparent black"}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| RNA_def_struct_sdna_from(srna, "NodeGeometryImageTexture", "storage"); | RNA_def_struct_sdna_from(srna, "NodeGeometryImageTexture", "storage"); | ||||
| prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, fn_tex_prop_interpolation_items); | RNA_def_property_enum_items(prop, fn_tex_prop_interpolation_items); | ||||
| RNA_def_property_ui_text(prop, "Interpolation", "Method for smoothing values between pixels"); | RNA_def_property_ui_text(prop, "Interpolation", "Method for smoothing values between pixels"); | ||||
| RNA_def_property_update(prop, 0, "rna_Node_update"); | RNA_def_property_update(prop, 0, "rna_Node_update"); | ||||
| prop = RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, prop_image_extension); | RNA_def_property_enum_items(prop, prop_image_extension); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Extension", "How the image is extrapolated past its original bounds"); | prop, "Extension", "Choose how the image should appear when sampled outside of the range 0 to 1"); | ||||
| RNA_def_property_update(prop, 0, "rna_Node_update"); | RNA_def_property_update(prop, 0, "rna_Node_update"); | ||||
| } | } | ||||
| static void def_sh_tex_gradient(StructRNA *srna) | static void def_sh_tex_gradient(StructRNA *srna) | ||||
| { | { | ||||
| static const EnumPropertyItem prop_gradient_type[] = { | static const 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"}, | ||||
| ▲ Show 20 Lines • Show All 350 Lines • ▼ Show 20 Lines | static const EnumPropertyItem point_source_items[] = { | ||||
| "OBJECT", | "OBJECT", | ||||
| 0, | 0, | ||||
| "Object Vertices", | "Object Vertices", | ||||
| "Generate point density from an object's vertices"}, | "Generate point density from an object's vertices"}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| static const EnumPropertyItem prop_interpolation_items[] = { | static const EnumPropertyItem prop_interpolation_items[] = { | ||||
| {SHD_INTERP_CLOSEST, "Closest", 0, "Closest", "No interpolation (sample closest texel)"}, | {IMAGE_TEX_INTERP_CLOSEST, | ||||
| {SHD_INTERP_LINEAR, "Linear", 0, "Linear", "Linear interpolation"}, | "Closest", | ||||
| {SHD_INTERP_CUBIC, "Cubic", 0, "Cubic", "Cubic interpolation"}, | 0, | ||||
| "Closest", | |||||
| "No interpolation (sample closest texel)"}, | |||||
| {IMAGE_TEX_INTERP_LINEAR, "Linear", 0, "Linear", "Linear interpolation"}, | |||||
| {IMAGE_TEX_INTERP_CUBIC, "Cubic", 0, "Cubic", "Cubic interpolation"}, | |||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| static const EnumPropertyItem space_items[] = { | static const EnumPropertyItem space_items[] = { | ||||
| {SHD_POINTDENSITY_SPACE_OBJECT, "OBJECT", 0, "Object Space", ""}, | {SHD_POINTDENSITY_SPACE_OBJECT, "OBJECT", 0, "Object Space", ""}, | ||||
| {SHD_POINTDENSITY_SPACE_WORLD, "WORLD", 0, "World Space", ""}, | {SHD_POINTDENSITY_SPACE_WORLD, "WORLD", 0, "World Space", ""}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| ▲ Show 20 Lines • Show All 7,593 Lines • Show Last 20 Lines | |||||