def _AiNodeSetArray(node, param, value): t, a = value _len = len(a) if t == arnold.AI_TYPE_VECTOR: _len //= 3 elif t == arnold.AI_TYPE_UINT: pass _a = arnold.AiArrayConvert(_len, 1, t, ctypes.c_void_p(a.ctypes.data)) arnold.AiNodeSetArray(node, param, _a)
def convert_from_buffer(self, length, keys, type_string, data): self.data = arnold.AiArrayConvert(length, keys, BTOA_TYPE_CONSTANTS[type_string], data)