def get_energy(self, frame: int = None) -> float: """ Returns the energy of the light. :param frame: The frame number at which the value should be returned. If None is given, the current frame number is used. :return: The energy at the specified frame. """ with KeyFrame(frame): return self.light_obj.data.energy
def get_color(self, frame: int = None) -> Color: """ Returns the RGB color of the light. :param frame: The frame number at which the value should be returned. If None is given, the current frame number is used. :return: The color at the specified frame. """ with KeyFrame(frame): return self.light_obj.data.color
def get_location(self, frame: int = None) -> Vector: """ Returns the location of the light in 3D world coordinates. :param frame: The frame number at which the value should be returned. If None is given, the current frame number is used. :return: The location at the specified frame. """ with KeyFrame(frame): return self.light_obj.location
def get_rotation(self, frame: int = None) -> Euler: """ Returns the rotation of the light in euler angles. :param frame: The frame number at which the value should be returned. If None is given, the current frame number is used. :return: The rotation at the specified frame. """ with KeyFrame(frame): return self.light_obj.rotation_euler
def get_type(self, frame: int = None) -> str: """ Returns the type of the light. :param frame: The frame number at which the value should be returned. If None is given, the current frame number is used. :return: The type at the specified frame. """ with KeyFrame(frame): return self.blender_obj.data.type
def get_distance(self, frame: int = None) -> float: """ Returns the falloff distance of the light (point where light is half the original intensity). :param frame: The frame number at which the value should be returned. If None is given, the current frame number is used. :return: The falloff distance at the specified frame. """ with KeyFrame(frame): return self.light_obj.data.distance
def get_scale(self, frame: int = None) -> np.ndarray: """ Returns the scale of the entity along all three axes. :param frame: The frame number at which the value should be returned. If None is given, the current frame number is used. :return: The scale at the specified frame. """ with KeyFrame(frame): return np.array(self.blender_obj.scale)
def get_rotation(self, frame: int = None) -> np.ndarray: """ Returns the rotation of the entity in euler angles. :param frame: The frame number at which the value should be returned. If None is given, the current frame number is used. :return: The rotation at the specified frame. """ with KeyFrame(frame): return np.array(self.blender_obj.rotation_euler)
def get_location(self, frame: int = None) -> np.ndarray: """ Returns the location of the entity in 3D world coordinates. :param frame: The frame number at which the value should be returned. If None is given, the current frame number is used. :return: The location at the specified frame. """ with KeyFrame(frame): return np.array(self.blender_obj.location)
def get_cp(self, key: str, frame: int = None) -> Any: """ Returns the custom property with the given key. :param key: The key of the custom property. :param frame: The frame number at which the value should be returned. If None is given, the current frame number is used. :return: The value of the custom property. """ with KeyFrame(frame): return self.blender_obj[key]
def get_cp(self, key: str, frame: int = None) -> Any: """ Returns the custom property with the given key. :param key: The key of the custom property. :param frame: The frame number at which the value should be returned. If None is given, the current frame number is used. :return: The value of the custom property. """ with KeyFrame(frame): value = self.blender_obj[key] if isinstance(value, (Vector, Euler, Color, Matrix, Quaternion)): value = np.array(value) return value