Page MenuHome

Geometry Nodes: Use a default value in the point scale node
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Jan 14 2021, 10:15 PM.

Details

Summary

This commit adds the ability to provide a default value to attribute_try_get_for_output
and uses it for the Point Scale node, which is important because the point scale node
uses multiplication.

The idea is to keep "name-specific" functionality in nodes rather than in the attribute
API, otherwise the complexity will be hard to keep track of. Note that this fix doesn't
apply to the Attribute Vector Math node, but that's hopefully okay since that's now
a lower level node for this purpose anyway.

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Jan 14 2021, 10:15 PM
Hans Goudey (HooglyBoogly) created this revision.
  • Add default value argument to attribute_try_get_for_output
Hans Goudey (HooglyBoogly) retitled this revision from Geometry Nodes: Add default attribute values for specific names to Geometry Nodes: Use a default value in the point scale node.Jan 15 2021, 2:00 AM
Hans Goudey (HooglyBoogly) edited the summary of this revision. (Show Details)
Jacques Lucke (JacquesLucke) added inline comments.
source/blender/blenkernel/intern/attribute_access.cc
822

Can use cpp_type.fill_initialized.

This revision is now accepted and ready to land.Jan 15 2021, 5:24 PM