def __set_indexed(self, value): # Sometimes blender animations only reference a subset of components of a data target. Keyframe should always # contain a complete Vector/ Quaternion result = [0.0] * self.__get_target_len() for i, v in zip(self.__indices, value): result[i] = v result = gltf2_blender_math.list_to_mathutils(result, self.__target) return result
def out_tangent( self ) -> typing.Union[mathutils.Vector, mathutils.Euler, mathutils.Quaternion, typing.List[float]]: if self.__out_tangent is None: return None if self.target == "value": return self.__out_tangent return gltf2_blender_math.list_to_mathutils(self.__out_tangent, self.target)
def __set_indexed(self, value): # 'value' targets don't use keyframe.array_index if self.__target == "value": return value # Sometimes blender animations only reference a subset of components of a data target. Keyframe should always # contain a complete Vector/ Quaternion --> use the array_index value of the keyframe to set components in such # structures result = [0.0] * self.__get_target_len() for i, v in zip(self.__indices, value): result[i] = v result = gltf2_blender_math.list_to_mathutils(result, self.__target) return result
def __set_indexed(self, value): # 'value' targets don't use keyframe.array_index if self.target == "value": return value # Sometimes blender animations only reference a subset of components of a data target. Keyframe should always # contain a complete Vector/ Quaternion --> use the array_index value of the keyframe to set components in such # structures result = [0.0] * self.__get_target_len() for i, v in zip(self.__indices, value): result[i] = v result = gltf2_blender_math.list_to_mathutils(result, self.target) return result
def value(self) -> typing.Union[mathutils.Vector, mathutils.Euler, mathutils.Quaternion, typing.List[float]]: if self.target == "value": return self.__value return gltf2_blender_math.list_to_mathutils(self.__value, self.target)