A module containing generic loader actions that will display in the Loader.
SetFrameRangeLoader
Bases: LoaderPlugin
Set frame range excluding pre- and post-handles
Source code in client/ayon_silhouette/plugins/load/actions.py
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63 | class SetFrameRangeLoader(load.LoaderPlugin):
"""Set frame range excluding pre- and post-handles"""
product_types = {
"animation",
"camera",
"pointcache",
"vdbcache",
"usd",
"render",
"plate",
"mayaScene",
"review"
}
representations = {"*"}
label = "Set frame range"
order = 11
icon = "clock-o"
color = "white"
def load(self, context, name=None, namespace=None, options=None):
version_attributes = context["version"]["attrib"]
frame_start = version_attributes.get("frameStart")
frame_end = version_attributes.get("frameEnd")
if frame_start is None or frame_end is None:
print(
"Skipping setting frame range because start or "
"end frame data is missing.."
)
return
fps = version_attributes["fps"]
_set_frame_range(frame_start, frame_end, fps)
|
SetFrameRangeWithHandlesLoader
Bases: LoaderPlugin
Set frame range including pre- and post-handles
Source code in client/ayon_silhouette/plugins/load/actions.py
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105 | class SetFrameRangeWithHandlesLoader(load.LoaderPlugin):
"""Set frame range including pre- and post-handles"""
product_types = {
"animation",
"camera",
"pointcache",
"vdbcache",
"usd",
"render",
"plate",
"mayaScene",
"review"
}
representations = {"*"}
label = "Set frame range (with handles)"
order = 12
icon = "clock-o"
color = "white"
def load(self, context, name=None, namespace=None, options=None):
version_attributes = context["version"]["attrib"]
frame_start = version_attributes.get("frameStart")
frame_end = version_attributes.get("frameEnd")
if frame_start is None or frame_end is None:
print(
"Skipping setting frame range because start or "
"end frame data is missing.."
)
return
# Include handles
frame_start -= version_attributes.get("handleStart", 0)
frame_end += version_attributes.get("handleEnd", 0)
fps = version_attributes["fps"]
_set_frame_range(frame_start, frame_end, fps)
|