Forum

Poll

Vote

⭐⭐⭐⭐⭐
1 (50%)
⭐⭐⭐⭐
0 (0%)
⭐⭐⭐
1 (50%)
⭐⭐
0 (0%)
0 (0%)

Total Members Voted: 2

Author Topic: Remove not pinned markers (blue)  (Read 1158 times)

Vladimir Denisov

  • Newbie
  • *
  • Posts: 26
    • View Profile
Remove not pinned markers (blue)
« on: May 08, 2021, 09:44:18 AM »
Add menu for removing not pinned markers (for selected marker) on all project or in selected images.

c-r-o-n-o-s

  • Jr. Member
  • **
  • Posts: 78
    • View Profile
Re: Remove not pinned markers (blue)
« Reply #1 on: May 08, 2021, 04:10:59 PM »
https://www.agisoft.com/forum/index.php?topic=10969.msg49466#msg49466

There is a script to remove all the blue flags.

Vladimir Denisov

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Remove not pinned markers (blue)
« Reply #2 on: May 16, 2021, 09:18:59 PM »
https://www.agisoft.com/forum/index.php?topic=10969.msg49466#msg49466

There is a script to remove all the blue flags.

fixed


import Metashape

Code: [Select]
for chunk in Metashape.app.document.chunks:
    for marker in chunk.markers:
        for camera in list(marker.projections.keys()):
            if not marker.projections[camera].pinned:
                marker.projections[camera] = None
« Last Edit: May 16, 2021, 09:21:12 PM by Vladimir Denisov »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13222
    • View Profile
Re: Remove not pinned markers (blue)
« Reply #3 on: May 16, 2021, 09:22:53 PM »
Hello Vladimir,

In that post the chunk definition has been missing, please check the updated script sample:
Code: [Select]
import Metashape
chunk = Metashape.app.document.chunk
for marker in chunk.markers:
    for camera in list(marker.projections.keys()):
        if not marker.projections[camera].pinned:
            marker.projections[camera] = None
Best regards,
Alexey Pasumansky,
Agisoft LLC