23 b.use_custom_socket_order();
24 b.allow_any_socket_order();
25 b.add_default_layout();
26 b.add_input<
decl::Geometry>(
"Volume"_ustr).description(
"Volume geometry to add a grid to");
37 .structure_type(StructureType::Grid);
60 node.custom1 = *data_type;
83 const std::string grid_name = params.
extract_input<std::string>(
"Name"_ustr);
85 bke::GVolumeGrid grid = params.
extract_input<bke::GVolumeGrid>(
"Grid"_ustr);
93 grid.get_for_write().set_name(grid_name);
100 GeometrySet geometry_set = params.extract_input<GeometrySet>(
"Volume"_ustr);
101 Volume *volume = geometry_set.get_volume_for_write();
104 geometry_set.replace_volume(volume);
107 try_store_grid(params, *volume);
109 params.set_output(
"Volume"_ustr, geometry_set);
140 ntype.
ui_name =
"Store Named Grid";
141 ntype.
ui_description =
"Store grid data in a volume geometry with the specified name";
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_STORE_NAMED_GRID
#define BLT_I18NCONTEXT_ID_VOLUME
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_inline_enum_accessors(member)
void add_item(std::string socket_name, SocketLinkOperation::LinkSocketFn fn, int weight=0)
const bNodeSocket & other_socket() const
eNodeSocketInOut in_out() const
T extract_input(const UString identifier)
void update_and_connect_available_socket(bNode &new_node, UString socket_name)
bNode & add_node(UString idname)
std::optional< VolumeGridType > socket_type_to_grid_type(eNodeSocketDatatype type)
void node_register_type(bNodeType &ntype)
std::optional< eNodeSocketDatatype > grid_type_to_socket_type(VolumeGridType type)
static void node_rna(StructRNA *srna)
static void node_register()
static void node_geo_exec(GeoNodeExecParams params)
static void node_declare(NodeDeclarationBuilder &b)
static void node_layout(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void search_link_ops(GatherLinkSearchOpParams ¶ms)
static void node_init(bNodeTree *, bNode *node)
PropertyRNA * RNA_def_node_enum(StructRNA *srna, const char *identifier, const char *ui_name, const char *ui_description, const EnumPropertyItem *static_items, const EnumRNAAccessors accessors, std::optional< int > default_value, const EnumPropertyItemFunc item_func, const bool allow_animation)
const EnumPropertyItem * grid_data_type_socket_items_filter_fn(bContext *, PointerRNA *, PropertyRNA *, bool *r_free)
void node_geo_exec_with_missing_openvdb(GeoNodeExecParams ¶ms)
const bke::VolumeGridData * BKE_volume_grid_find(const Volume *volume, StringRef name)
const EnumPropertyItem rna_enum_volume_grid_data_type_items[]
void BKE_volume_grid_add(Volume *volume, const bke::VolumeGridData &grid)
void BKE_volume_grid_remove(Volume *volume, const bke::VolumeGridData *grid)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void * BKE_id_new_nomain(short type, const char *name)
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
void(*) draw_buttons(ui::Layout &, bContext *C, PointerRNA *ptr)
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
void(*) initfunc(bNodeTree *ntree, bNode *node)
const char * enum_name_legacy
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare
void use_property_decorate_set(bool is_decorate)
void use_property_split_set(bool is_sep)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)