Simulation nodes: UI for simulation state items in sidebar #106919
|
@ -43,9 +43,6 @@ bool NOD_geometry_simulation_output_item_set_unique_name(struct NodeGeometrySimu
|
|||
const char *name,
|
||||
const char *defname);
|
||||
|
||||
/** Find the node owning this simulation output data. */
|
||||
bNode *NOD_geometry_simulation_output_find_node_by_data(
|
||||
struct bNodeTree *ntree, const struct NodeGeometrySimulationOutput *sim);
|
||||
/** Find the node owning this simulation state item. */
|
||||
bNode *NOD_geometry_simulation_output_find_node_by_item(struct bNodeTree *ntree,
|
||||
const struct NodeSimulationItem *item);
|
||||
|
|
|
@ -323,17 +323,6 @@ bool NOD_geometry_simulation_output_item_socket_type_supported(const eNodeSocket
|
|||
return ELEM(socket_type, SOCK_GEOMETRY);
|
||||
}
|
||||
|
||||
|
||||
bNode *NOD_geometry_simulation_output_find_node_by_data(bNodeTree *ntree,
|
||||
const NodeGeometrySimulationOutput *sim)
|
||||
{
|
||||
for (bNode *node : ntree->nodes_by_type("GeometryNodeSimulationOutput")) {
|
||||
if (node->storage == sim) {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bNode *NOD_geometry_simulation_output_find_node_by_item(bNodeTree *ntree,
|
||||
const NodeSimulationItem *item)
|
||||
Hans Goudey
commented
I guess this is slightly different, but usually a method like this is called I guess this is slightly different, but usually a method like this is called `items_for_write()`. Either way is fine with me.
Lukas Tönne
commented
We already have We already have `NodeSimulationItem *items` for the array, so `Span<NodeSimulationItem> items()` is a conflict, otherwise `items` + `items_for_write` would work.
Lukas Tönne
commented
I opted for I opted for `items_span_for_write` now, if that's ok for you.
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
NOD_geometry_simulation_output_find_node_by_data
is unused, and it doesn't seem like we should need this. If we do, I'd keep it local to RNA.Downside of putting this in RNA is that we don't have access to the C++ functions like
ntree->nodes_by_type
there.Removed the unused function though.