Simulation nodes: UI for simulation state items in sidebar #106919
|
@ -4104,7 +4104,8 @@ static void rna_SimulationStateItem_name_set(PointerRNA *ptr, const char *value)
|
|||
bNode *node = node_geo_simulation_output_find_node_by_item(ntree, item);
|
||||
NodeGeometrySimulationOutput *sim = (NodeGeometrySimulationOutput *)node->storage;
|
||||
|
||||
node_geo_simulation_output_item_set_unique_name(sim, item, value);
|
||||
const char *defname = nodeStaticSocketLabel(item->socket_type, 0);
|
||||
node_geo_simulation_output_item_set_unique_name(sim, item, value, defname);
|
||||
}
|
||||
|
||||
static PointerRNA rna_NodeGeometrySimulationInput_paired_output_get(PointerRNA *ptr)
|
||||
|
|
|
@ -38,7 +38,7 @@ bool node_geo_simulation_input_pair_with_output(const struct bNodeTree *node_tre
|
|||
*/
|
||||
bool node_geo_simulation_output_item_set_unique_name(struct NodeGeometrySimulationOutput *sim,
|
||||
|
||||
struct NodeSimulationItem *item,
|
||||
const char *name);
|
||||
const char *name, const char *defname);
|
||||
|
||||
/** Find the node owning this simulation output data. */
|
||||
bNode *node_geo_simulation_output_find_node_by_data(
|
||||
|
|
|
@ -337,10 +337,9 @@ bNode *node_geo_simulation_output_find_node_by_item(bNodeTree *ntree,
|
|||
|
||||
bool node_geo_simulation_output_item_set_unique_name(NodeGeometrySimulationOutput *sim,
|
||||
NodeSimulationItem *item,
|
||||
Hans Goudey
commented
These functions should call These functions should call `ensure_topology_cache()` before they use it.
|
||||
const char *name)
|
||||
const char *name,
|
||||
const char *defname)
|
||||
{
|
||||
const char *defname = nodeStaticSocketLabel(item->socket_type, 0);
|
||||
|
||||
char unique_name[MAX_NAME + 4];
|
||||
BLI_strncpy(unique_name, name, sizeof(unique_name));
|
||||
|
||||
|
@ -413,8 +412,9 @@ NodeSimulationItem *node_geo_simulation_output_insert_item(NodeGeometrySimulatio
|
|||
sim->items[i + 1].socket_type = old_items[i].socket_type;
|
||||
}
|
||||
|
||||
const char *defname = nodeStaticSocketLabel(socket_type, 0);
|
||||
NodeSimulationItem &added_item = sim->items[index];
|
||||
node_geo_simulation_output_item_set_unique_name(sim, &added_item, name);
|
||||
node_geo_simulation_output_item_set_unique_name(sim, &added_item, name, defname);
|
||||
Hans Goudey
commented
`IndexRange(0, index)` -> `IndexRange(index)`
|
||||
added_item.socket_type = socket_type;
|
||||
|
||||
sim->items_num++;
|
||||
|
|
Loading…
Reference in New Issue
Blender uses syntax like
\return
rather than@return
. Also for multi-line function docstring comments, the/**
should be on its own line at the start.