Agisoft Metashape

Agisoft Metashape => Feature Requests => Topic started by: Vladimir Denisov on May 08, 2021, 09:44:18 AM

Title: Remove not pinned markers (blue)
Post by: Vladimir Denisov 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.
Title: Re: Remove not pinned markers (blue)
Post by: c-r-o-n-o-s on May 08, 2021, 04:10:59 PM
https://www.agisoft.com/forum/index.php?topic=10969.msg49466#msg49466 (https://www.agisoft.com/forum/index.php?topic=10969.msg49466#msg49466)

There is a script to remove all the blue flags.
Title: Re: Remove not pinned markers (blue)
Post by: Vladimir Denisov on May 16, 2021, 09:18:59 PM
https://www.agisoft.com/forum/index.php?topic=10969.msg49466#msg49466 (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
Title: Re: Remove not pinned markers (blue)
Post by: Alexey Pasumansky 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