File tree Expand file tree Collapse file tree 2 files changed +33
-4
lines changed
src/py-opentimelineio/opentimelineio/console Expand file tree Collapse file tree 2 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -510,11 +510,13 @@ def _f(item):
510
510
511
511
512
512
def filter_effects (timelines ):
513
- """Return a copy of the input timelines with all effects removed.
514
- The overall duration of the timelines should not be affected, with
515
- the possible exception of time warp effects, which are also removed."""
513
+ """Remove all effects from the input timelines. The inputs are modified
514
+ in place, and also returned."""
516
515
for timeline in timelines :
517
- for item in timeline .find_children ():
516
+ # Items have an effects attribute, but other Composables do not.
517
+ # (e.g. Transitions) so we need to find only Items.
518
+ for item in timeline .find_children (descended_from_type = otio .core .Item ):
519
+ # Clear the effects list contents
518
520
item .effects [:] = []
519
521
return timelines
520
522
Original file line number Diff line number Diff line change 362
362
},
363
363
"active_media_reference_key": "DEFAULT_MEDIA"
364
364
},
365
+ {
366
+ "OTIO_SCHEMA": "Transition.1",
367
+ "metadata": {
368
+ "Resolve_OTIO": {
369
+ "Effects": {
370
+ "Effect Name": "Cross Fade 0 dB",
371
+ "Enabled": true,
372
+ "Name": "Cross Fade",
373
+ "Parameters": [],
374
+ "Type": 40
375
+ },
376
+ "Transition Type": "Cross Fade 0DB"
377
+ }
378
+ },
379
+ "name": "Cross Fade 0 dB",
380
+ "in_offset": {
381
+ "OTIO_SCHEMA": "RationalTime.1",
382
+ "rate": 24.0,
383
+ "value": 30.0
384
+ },
385
+ "out_offset": {
386
+ "OTIO_SCHEMA": "RationalTime.1",
387
+ "rate": 24.0,
388
+ "value": 30.0
389
+ },
390
+ "transition_type": "SMPTE_Dissolve"
391
+ },
365
392
{
366
393
"OTIO_SCHEMA": "Clip.2",
367
394
"metadata": {
You can’t perform that action at this time.
0 commit comments