This adds CD_PROP_FLOAT2 and CD_PROP_FLOAT3.
"Float2" and "Float3" don't necessarily have to be used in the UI.
Have a look at T71384 to see how data types are called in different programs.
Details
Diff Detail
- Repository
- rB Blender
Event Timeline
| source/blender/blenkernel/intern/customdata.c | ||
|---|---|---|
| 1900 | The N_("Float3") name should not be used. I just have to provide a default name to tell the system that multiple layers of this type can exist. | |
Hi @Jacques Lucke (JacquesLucke) , I was also working on CD_PROP_VECTOR (I only looked at 3d, but 2d should be there as well, right), but including appropriate LayerTypeInfo functions (interp, equal, add, ...).
Think it would be good to have these included right away [to provide something for modeling tools to treat CD_PROP layers properly]?
Will post what I have later today.
@Philipp Oeser (lichtwerk) Feel free to post/commit what you have. I don't need all the interpolation stuff yet, so I did not add it.
I prefer the internal name CD_PROP_FLOAT3 over CD_PROP_VECTOR. It is more explicit and matches the C++ type name defined in BLI_float3.hh.
Unfortunately I didnt get to finish it before my holidays [which have started now], so from my side, go ahead, we can always add relevant functions later.
I think interpolation and similar functions should be added along with this, would rather not commit this half-finished.
I added some of the callbacks. I noticed that CD_PROP_FLOAT
and CD_PROP_INT32 don't have most of the callbacks either.
Unfortunately, I don't really know how to test these callbacks
in a good way. They compile for me, but I've never called them...
Adding similar functions for CD_PROP_FLOAT would be good as well.
These generic attributes are quite hidden not used much, but when they start getting exposed in the UI this will become a problem.