output picture from saved results using saveSnapshot
I have saved a list of results by using O.save during the calculation. Now i want to load each result and output a picture. The function i use is saveSnapshot(). The following codes work,
O.load(file)
qtr = qt.Renderer()
qtr.bgColor = [1,1,1]
v = qt.View()
outpath = path+'/plot/'
v.saveSnapsho
But when i put these codes into a for loop, it fails with 'not support a secondary view'. Then i put a v.close() at the end of each loop, but it does not work. The following is my whole codes,
import os
from yade import qt
path = os.getcwd()
os.mkdir(
for file in os.listdir(path):
if os.path.
continue
O.load(file)
qtr = qt.Renderer()
qtr.bgColor = [1,1,1]
v = qt.View()
outpath = path+'/plot/'
v.saveSnaps
v.close()
I open a terminal in the directory consisting of the saved results and copy my codes into it and hit Enter.
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: