File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -117,9 +117,9 @@ def setup(self):
117
117
mob = item .mob
118
118
if mob :
119
119
self .extend ([mob ])
120
- slot = item .slot
121
- if slot :
122
- self .extend ([slot ])
120
+ for slot in item .slots ():
121
+ if slot :
122
+ self .extend ([slot ])
123
123
124
124
125
125
self .properties ['Name' ] = self .name ()
Original file line number Diff line number Diff line change @@ -171,6 +171,28 @@ def slot(self):
171
171
def slot (self , value ):
172
172
self .slot_id = value .slot_id
173
173
174
+ def slots (self ):
175
+ """
176
+ A SourceReference can have multiple MobSlot references
177
+ if it contains the 'MonoSourceSlotIDs' property.
178
+ Returns a list of the MobSlot objects referenced
179
+ by either SourceMobSlotID or MonoSourceSlotIDs properties.
180
+ MobSlots that cannot be resolved will have a value of None.
181
+ """
182
+
183
+ if 'MonoSourceSlotIDs' in self :
184
+ slot_ids = self ['MonoSourceSlotIDs' ].value
185
+ else :
186
+ slot_id = self .slot_id
187
+ if slot_id is None :
188
+ return [None ]
189
+ slot_ids = [slot_id ]
190
+
191
+ mob = self .mob
192
+ if mob is None :
193
+ return [None for _ in slot_ids ]
194
+
195
+ return [mob .slot_at (slot_id , None ) for slot_id in slot_ids ]
174
196
175
197
@register_class
176
198
class SourceClip (SourceReference ):
You can’t perform that action at this time.
0 commit comments