dymokomi/luced-3d
Source of release 0.11.5
## A take: a named state of the scene's switches, recorded per node (see
## takes.luc for what is recorded and how a take is switched to).
pub class Take:
pub var name: str
## The nodes recorded, and for each: whether it is visible; whether it is
## enabled (a Light's on or off; other nodes' are not applied); a Render
## node's camera (others': ""); the object paths hidden in its result,
## one a line; how many transform values it has (takes.transform_slots),
## which follow the ones before it in `transforms`.
pub var ids: list[int]
pub var visible: list[bool]
pub var enabled: list[bool]
pub var cameras: list[str]
pub var hidden: list[str]
pub var counts: list[int]
pub var transforms: list[float]
pub func init(self, name: str):
self.name = name
self.ids = []
self.visible = []
self.enabled = []
self.cameras = []
self.hidden = []
self.counts = []
self.transforms = []
pub func copy(self) -> Take:
let result = Take(self.name)
result.ids = self.ids.copy()
result.visible = self.visible.copy()
result.enabled = self.enabled.copy()
result.cameras = self.cameras.copy()
result.hidden = self.hidden.copy()
result.counts = self.counts.copy()
result.transforms = self.transforms.copy()
return result
pub func same(self, other: Take) -> bool:
return self.name == other.name and self.ids == other.ids and self.visible == other.visible and self.enabled == other.enabled and self.cameras == other.cameras and self.hidden == other.hidden and self.counts == other.counts and self.transforms == other.transforms