For the project I am working I would like to add new data types to the BaseContainer/GeData for a ShaderData and I'm wondering what the best method for storing, displaying, animating and python interop.
The types I want to add are the following vectors:
Int32_2, Int32_3, Int32_4
Float_2 Float_4
Int64_2
I have tried 3 methods so far:
Method 1: CustomDataType from the sdk example:
I implemented this for Int32_3. This one is the most promising so far as it gives me the greatest level of control over the data and GUI.
Drawbacks:
- I am not sure how to set/get this data from python or other plugins?
- Would much prefer to have proper integrated types like maxon::IntVector32
Method 2: maxon::data types (IntVector32)
I tried IntVector32 and Vector4d for Int32_t and Float_4. The data can be set with the SetMaxonData function or SetData on GeData. This method seems to the most integrated, and these types also exist in python?
Drawbacks:
- There seems to be no GUI for these types?
- They are not interpolated between keyframes
- I dont know how to properly add new GUI for these types as they do not have DTYPE_ value?
Method 3: DTYPE_VECTOR4 / DTYPE_COLORA / DTYPE_VECTOR2
These have GUI.
Drawbacks:
- I cannot set or get the data from the BaseContainer. There is no GetVector4. And im not sure how to extract this data from the GeData.
- There are no int32 or int64 versions of these
Hopefully you can help me out on navigating this issue.
I would much prefer to use official data types, but im happy to implement my own custom data types. However I am not sure how these properly interop with python and other plugins.