Ridley5 opened this issue on Jul 26, 2010 ยท 1724 posts
Dizzi posted Fri, 27 August 2010 at 6:08 AM
I knew I forgot something... This code should work for OpenGL or Sreed... At least I hope that it does ;-)
import poser
if poser.Version()=='8.0':
import wx.aui
def GetOpenGLCanvas():
l=[]
for child in poser.WxAuiManager().GetManagedWindow().Children:
GetOpenGLCanvasRec(child, l)
return l
def GetOpenGLCanvasRec(win, l):
for child in win.Children:
if child.Name in ['PoserGLCanvas', 'PoserPBCanvas']:
l.append(child)
else:
GetOpenGLCanvasRec(child, l)
def GetOutputRes():
s=poser.Scene()
if poser.Version()=='8.0' and s.RenderDimAutoscale()==2:
for win in GetOpenGLCanvas():
if win.IsShown(): return win.GetSize()
return s.OutputRes()
print GetOutputRes()