@@ -441,7 +441,13 @@ def contextMenuEvent(self, event):
441
441
# Handle clip attach options
442
442
if property_key == "attached_id" and not self .choices :
443
443
# Add all Clips as choices - initialize with None
444
- clips_choices = [{
444
+ tracked_choices = [{
445
+ "name" : "None" ,
446
+ "value" : "None" ,
447
+ "selected" : False ,
448
+ "icon" : QIcon ()
449
+ }]
450
+ clip_choices = [{
445
451
"name" : "None" ,
446
452
"value" : "None" ,
447
453
"selected" : False ,
@@ -467,13 +473,16 @@ def contextMenuEvent(self, event):
467
473
if (clip_path == clip_instance_path ):
468
474
# Generate the clip icon to show in the selection menu
469
475
clip_instance_icon = clip_index .data (Qt .DecorationRole )
476
+ clip_choices .append ({"name" : clip_instance_data ["title" ],
477
+ "value" : clip_instance_id ,
478
+ "selected" : False ,
479
+ "icon" : clip_instance_icon })
470
480
# Get the pixmap of the clip icon
471
481
icon_size = 72
472
482
icon_pixmap = clip_instance_icon .pixmap (icon_size , icon_size )
473
483
# Add tracked objects to the selection menu
474
484
tracked_objects = []
475
485
for effect in clip_instance_data ["effects" ]:
476
-
477
486
# Check if effect has a tracked object
478
487
if effect ["has_tracked_object" ]:
479
488
# Instantiate the effect
@@ -493,11 +502,12 @@ def contextMenuEvent(self, event):
493
502
"value" : str (object_id ),
494
503
"selected" : False ,
495
504
"icon" : QIcon (tracked_object_icon )})
496
- clips_choices .append ({"name" : clip_instance_data ["title" ],
505
+ tracked_choices .append ({"name" : clip_instance_data ["title" ],
497
506
"value" : tracked_objects ,
498
507
"selected" : False ,
499
508
"icon" : clip_instance_icon })
500
- self .choices .append ({"name" : _ ("Clips" ), "value" : clips_choices , "selected" : False , "icon" : None })
509
+ self .choices .append ({"name" : _ ("Tracked Objects" ), "value" : tracked_choices , "selected" : False , "icon" : None })
510
+ self .choices .append ({"name" : _ ("Clips" ), "value" : clip_choices , "selected" : False , "icon" : None })
501
511
502
512
# Handle reader type values
503
513
if self .property_type == "reader" and not self .choices :
0 commit comments