Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c72
1 files changed, 64 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index f0508ee5317..6a36ef07dee 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -2056,7 +2056,8 @@ static bool switch_type_supported(const EnumPropertyItem *item)
SOCK_OBJECT,
SOCK_COLLECTION,
SOCK_TEXTURE,
- SOCK_MATERIAL);
+ SOCK_MATERIAL,
+ SOCK_IMAGE);
}
static const EnumPropertyItem *rna_GeometryNodeSwitch_type_itemf(bContext *UNUSED(C),
@@ -5022,10 +5023,8 @@ static void def_fn_input_bool(StructRNA *srna)
prop = RNA_def_property(srna, "boolean", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "boolean", 1);
- RNA_def_property_ui_text(
- prop, "Boolean", "Input value used for unconnected socket");
+ RNA_def_property_ui_text(prop, "Boolean", "Input value used for unconnected socket");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-
}
static void def_fn_input_int(StructRNA *srna)
@@ -5037,8 +5036,7 @@ static void def_fn_input_int(StructRNA *srna)
prop = RNA_def_property(srna, "integer", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "integer");
RNA_def_property_int_default(prop, 1);
- RNA_def_property_ui_text(
- prop, "Integer", "Input value used for unconnected socket");
+ RNA_def_property_ui_text(prop, "Integer", "Input value used for unconnected socket");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
}
@@ -5416,6 +5414,50 @@ static void def_sh_tex_image(StructRNA *srna)
RNA_def_property_update(prop, 0, "rna_Node_update");
}
+static void def_geo_image_texture(StructRNA *srna)
+{
+ static const EnumPropertyItem fn_tex_prop_interpolation_items[] = {
+ {SHD_INTERP_LINEAR, "Linear", 0, "Linear", "Linear interpolation"},
+ {SHD_INTERP_CLOSEST, "Closest", 0, "Closest", "No interpolation (sample closest texel)"},
+ {SHD_INTERP_CUBIC, "Cubic", 0, "Cubic", "Cubic interpolation"},
+ {0, NULL, 0, NULL, NULL},
+ };
+
+ static const 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;
+
+ RNA_def_struct_sdna_from(srna, "NodeGeometryImageTexture", "storage");
+
+ prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
+ 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_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");
+}
+
static void def_sh_tex_gradient(StructRNA *srna)
{
static const EnumPropertyItem prop_gradient_type[] = {
@@ -10300,12 +10342,12 @@ static void def_geo_volume_to_mesh(StructRNA *srna)
{VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_AMOUNT,
"VOXEL_AMOUNT",
0,
- "Voxel Amount",
+ "Amount",
"Desired number of voxels along one axis"},
{VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_SIZE,
"VOXEL_SIZE",
0,
- "Voxel Size",
+ "Size",
"Desired voxel side length"},
{0, NULL, 0, NULL, NULL},
};
@@ -11035,6 +11077,20 @@ static void def_geo_separate_geometry(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
}
+static void def_geo_viewer(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ RNA_def_struct_sdna_from(srna, "NodeGeometryViewer", "storage");
+
+ prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, rna_enum_attribute_type_items);
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_GeometryNodeAttributeFill_type_itemf");
+ RNA_def_property_enum_default(prop, CD_PROP_FLOAT);
+ RNA_def_property_ui_text(prop, "Data Type", "");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_GeometryNode_socket_update");
+}
+
/* -------------------------------------------------------------------------- */
static void rna_def_shader_node(BlenderRNA *brna)