Page MenuHome

Adjust the decision making for result attribute types
Closed, ResolvedPublicTO DO

Description

Nodes like the Attribute Color Ramp node would usually output a color. However, if the result attribute exists already and is e.g. of type Float, we want that the attribute remains of type float.
Currently the attribute is first removed and then recreated with a new type.

This makes the type of an attribute more consistent, because nodes usually do not change the type of attributes, unless they are explicitly asked to do so. Furthermore, this allows us to use the same attribute as input and output in a node more often. (e.g. in the Attribute Color Ramp node, the input and output attribute could be the same)

Event Timeline

Perhaps integer, float and bool should all be floats internally?

I don't think this is a good idea... Also, what would it solve?

Proposal from me and @Hans Goudey (HooglyBoogly).

If an input and an output attribute have the same name but different type, first compute the new attribute, before deleting the old one.

  • Attribute Math: Always output float.
  • Attribute Compare: Always output boolean.
  • Attribute Mix: Have a output type dropdown (including Auto option).
  • Attribute Color Ramp: Same as Attribute Mix.
  • Attribute Vector Math: Output type depends on the operation.

We decided to use the Auto option implicitly for Attribute Mix, Attribute Color Ramp and only add an enum later if there is a need for it.
The other points mentioned in the proposal are good.

Hans Goudey (HooglyBoogly) renamed this task from Do not change data type of result attribute if it exists already to Adjust the decision making for result attribute types.Jan 12 2021, 8:55 PM

I've update the wiki and manual a bit.

Dalai Felinto (dfelinto) closed this task as Resolved.Feb 22 2021, 3:02 PM
Dalai Felinto (dfelinto) claimed this task.