[Bf-blender-cvs] [f49a4991293] geometry-nodes-curve-support: Geometry Nodes Curves: Expose attributes in the spreadsheet
Hans Goudey
noreply at git.blender.org
Sun Apr 4 16:30:43 CEST 2021
Commit: f49a49912932f55a7876c61ee8fd520364b8f528
Author: Hans Goudey
Date: Sat Apr 3 09:40:11 2021 -0500
Branches: geometry-nodes-curve-support
https://developer.blender.org/rBf49a49912932f55a7876c61ee8fd520364b8f528
Geometry Nodes Curves: Expose attributes in the spreadsheet
===================================================================
M source/blender/makesrna/intern/rna_space.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index f9b1816e1ba..785a6c76301 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -3047,6 +3047,10 @@ static void rna_SpaceSpreadsheet_geometry_component_type_update(Main *UNUSED(bma
if (sspreadsheet->geometry_component_type == GEO_COMPONENT_TYPE_POINT_CLOUD) {
sspreadsheet->attribute_domain = ATTR_DOMAIN_POINT;
}
+ if (sspreadsheet->geometry_component_type == GEO_COMPONENT_TYPE_CURVE &&
+ !ELEM(sspreadsheet->attribute_domain, ATTR_DOMAIN_POINT, ATTR_DOMAIN_CURVE)) {
+ sspreadsheet->attribute_domain = ATTR_DOMAIN_POINT;
+ }
}
const EnumPropertyItem *rna_SpaceSpreadsheet_attribute_domain_itemf(bContext *C,
@@ -3089,6 +3093,11 @@ const EnumPropertyItem *rna_SpaceSpreadsheet_attribute_domain_itemf(bContext *C,
continue;
}
}
+ if (component_type == GEO_COMPONENT_TYPE_CURVE) {
+ if (!ELEM(item->value, ATTR_DOMAIN_POINT, ATTR_DOMAIN_CURVE)) {
+ continue;
+ }
+ }
RNA_enum_item_add(&item_array, &items_len, item);
}
RNA_enum_item_end(&item_array, &items_len);
@@ -7325,6 +7334,11 @@ static void rna_def_space_spreadsheet(BlenderRNA *brna)
ICON_POINTCLOUD_DATA,
"Point Cloud",
"Point cloud component containing only point data"},
+ {GEO_COMPONENT_TYPE_CURVE,
+ "CURVE",
+ ICON_CURVE_DATA,
+ "Curve",
+ "Curve component containing spline and control point data"},
{GEO_COMPONENT_TYPE_INSTANCES,
"INSTANCES",
ICON_EMPTY_AXIS,
More information about the Bf-blender-cvs
mailing list