If ATTR_SURFACE_TRIANGLE_INDEX does not already exist,
fill it with -1 on getting for write.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
- Branch
- T97138-initialize-curve-attributes (branched from master)
- Build Status
Buildable 21512 Build 21512: arc lint + arc unit
Event Timeline
Comment Actions
Thanks for the patch. I think this should be generalized a bit, i.e. the expected default value should be passed to get_mutable_attribute.
Comment Actions
Shall I overload get_mutable_attribute with a new function that takes a default value, or shall I change the existing implementation and change all it's call sites?
Comment Actions
- Overload get_mutable_attribute to accept default value
Thought I'd go with overloading for now, can convert all function calls to use the default value accepting function if needed
Comment Actions
Think it would be better to always pass a default value to get_mutable_attribute. get_mutable_attribute could be smart enough to not initialize new attribute layers twice in case the default value is zero. That can also be handled separately though.