1
Python and Java API / Re: Get "Apply to" list of chunks in batch process
« on: February 28, 2020, 01:27:37 PM »
Hi again Alexy,
I'm having trouble with the selected attribute, it's always returning false when I run it through the batch process...
EDIT: Wait, sorry, I just re-read your post. The chunk.selected value DOES work when I highlight multiple chunks in the workspace (ctrl+click on each one)
But what I want is the ability to use the "apply to -> selection" option from the batch process window.
I'm having trouble with the selected attribute, it's always returning false when I run it through the batch process...
Code: [Select]
import Metashape
doc = Metashape.app.document
for chunk in doc.chunks:
print(chunk.label + ": " + str(chunk.selected))
Code: [Select]
RunScript: path = d:\metashape\custom-scripts\selectionTest.py
2020-02-28 10:26:46 Landscape Pos1: False
2020-02-28 10:26:46 Landscape Pos2: False
2020-02-28 10:26:46 Landscape Pos3: False
2020-02-28 10:26:46 Portrait Pos3: False
2020-02-28 10:26:46 TextureTest: False
2020-02-28 10:26:46 Alignment Test (not work): False
2020-02-28 10:26:46 Alignemtn Test (should work): False
2020-02-28 10:26:46 Finished processing in 0.018 sec
2020-02-28 10:26:46 Finished batch processing in 0.018 sec (exit code 1)
EDIT: Wait, sorry, I just re-read your post. The chunk.selected value DOES work when I highlight multiple chunks in the workspace (ctrl+click on each one)
But what I want is the ability to use the "apply to -> selection" option from the batch process window.