@@ -486,10 +486,7 @@ def contextMenuEvent(self, event):
486
486
if (clip_path == clip_instance_path ):
487
487
# Generate the clip icon to show in the selection menu
488
488
clip_instance_icon = clip_index .data (Qt .DecorationRole )
489
- effect_choices = [{"name" : "None" ,
490
- "value" : "None" ,
491
- "selected" : False ,
492
- "icon" : QIcon ()}]
489
+ effect_choices = []
493
490
# Iterate through clip's effects
494
491
for effect_data in clip_instance_data ["effects" ]:
495
492
# Make sure the user can only set a parent effect of the same type as this effect
@@ -528,12 +525,12 @@ def contextMenuEvent(self, event):
528
525
529
526
# Handle property to set the Tracked Object's child clip
530
527
if property_key == "child_clip_id" and not self .choices :
531
- clip_choices = [ {
528
+ self . choices . append ( {
532
529
"name" : "None" ,
533
530
"value" : "None" ,
534
531
"selected" : False ,
535
532
"icon" : QIcon ()
536
- }]
533
+ })
537
534
# Instantiate the timeline
538
535
timeline_instance = get_app ().window .timeline_sync .timeline
539
536
current_effect = timeline_instance .GetClipEffect (clip_id )
@@ -565,18 +562,8 @@ def contextMenuEvent(self, event):
565
562
# Handle clip attach options
566
563
if property_key == "parentObjectId" and not self .choices :
567
564
# Add all Clips as choices - initialize with None
568
- tracked_choices = [{
569
- "name" : "None" ,
570
- "value" : "None" ,
571
- "selected" : False ,
572
- "icon" : QIcon ()
573
- }]
574
- clip_choices = [{
575
- "name" : "None" ,
576
- "value" : "None" ,
577
- "selected" : False ,
578
- "icon" : QIcon ()
579
- }]
565
+ tracked_choices = []
566
+ clip_choices = []
580
567
# Instantiate the timeline
581
568
timeline_instance = get_app ().window .timeline_sync .timeline
582
569
# Loop through timeline's clips
@@ -630,6 +617,7 @@ def contextMenuEvent(self, event):
630
617
"value" : tracked_objects ,
631
618
"selected" : False ,
632
619
"icon" : clip_instance_icon })
620
+ self .choices .append ({"name" : _ ("None" ), "value" : "None" , "selected" : False , "icon" : None })
633
621
self .choices .append ({"name" : _ ("Tracked Objects" ), "value" : tracked_choices , "selected" : False , "icon" : None })
634
622
self .choices .append ({"name" : _ ("Clips" ), "value" : clip_choices , "selected" : False , "icon" : None })
635
623
0 commit comments