Page MenuHome

Fix T87597: Point scale node does not work after recent refactor
AbandonedPublic

Authored by Hans Goudey (HooglyBoogly) on Apr 19 2021, 8:05 PM.

Details

Summary

The problem seems to be an oversight in rB5cf6f570c65d, where the
default value is not considered when a new attribute is created for
an OutputAttribute. The fix is quite simple, just fill the virtual
array when we aren't ignoring the old values and a default is provided.

Another possible solution would be adding a default value argument to
attribute_try_create. That would be totally valid, and I would be
happy to do that if @Jacques Lucke (JacquesLucke) prefers that solution.

Diff Detail

Repository
rB Blender
Branch
fix-output-attribute-create-default-value (branched from master)
Build Status
Buildable 14109
Build 14109: arc lint + arc unit

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Apr 19 2021, 8:05 PM
Hans Goudey (HooglyBoogly) created this revision.

Adding some kind of initializer to attribute_try_create is indeed something we can do soonish, but this fix is fine for now.

One thing I'm not entirely sure about is whether this should use type.default_value() when default_value == nullptr, I think I'm doing that in a few cased (because it is more convenient than passing in a point to a zero-value in many places). We might have to double check that.

This revision is now accepted and ready to land.Apr 19 2021, 8:42 PM
Hans Goudey (HooglyBoogly) planned changes to this revision.Apr 21 2021, 5:10 PM