Agisoft Metashape

Agisoft Metashape => General => Topic started by: jmgc on August 20, 2020, 10:48:04 AM

Title: Remove null instances
Post by: jmgc on August 20, 2020, 10:48:04 AM
I'm trying to remove an orthomosaic that is not appearing on the chunk items but no luck so far (it was wrongly created after cancelling a duplication of an orthomosaic).
I'm using v1.6.3

Code: [Select]
chunk.orthomosaics
2020-08-20 08:39:26 [<Orthomosaic 'Orthomosaic: Mosaic Blending, 17915x13107'>, <Orthomosaic 'Copy of Orthomosaic: Mosaic Blending, '>, <Orthomosaic 'Orthomosaic: Average Blending, 17915x13107'>]

chunk.orthomosaics[1]
2020-08-20 08:42:37 <Orthomosaic 'Copy of Orthomosaic: Mosaic Blending, '>

chunk.orthomosaics[0].clear()
# <Orthomosaic 'Orthomosaic: Mosaic Blending, 17915x13107'> is deleted from chunk items, but stills in chunk.orthomosaics

chunk.orthomosaics
2020-08-20 08:45:53 [<Orthomosaic 'Orthomosaic: Mosaic Blending, '>, <Orthomosaic 'Copy of Orthomosaic: Mosaic Blending, '>, <Orthomosaic 'Orthomosaic: Average Blending, 17915x13107'>]

chunk.orthomosaics[1].clear()
Stills in chunk.orthomosaics

Any ideias?
Title: Re: Remove null instances
Post by: jmgc on August 28, 2020, 02:49:05 AM
I can delete the orthomosaic if it appears on the items list, but if not...i can't. That's a problem when using scripts that don't run with null items.
In my particular case I've solve the problem editing the doc.xml inside the chunk.zip file, deleting the reference to the orthomosaic I'd want to remove.
Even so, it would be good to know how to delete these null orthomosaics.