本文整理汇总了Python中Blender.BGL.glRectf方法的典型用法代码示例。如果您正苦于以下问题:Python BGL.glRectf方法的具体用法?Python BGL.glRectf怎么用?Python BGL.glRectf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Blender.BGL
的用法示例。
在下文中一共展示了BGL.glRectf方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: draw
# 需要导入模块: from Blender import BGL [as 别名]
# 或者: from Blender.BGL import glRectf [as 别名]
def draw(self):
area = Window.GetAreaSize()
w = area[0]; wPad = int(w*0.03)
h = area[1]; hPad = int(h*0.03)
BGL.glColor3f(0.3, 0.3, 0.3)
BGL.glRectf(wPad-5, h-60, w-wPad+5, h-85)
BGL.glColor3f(1.0,1.0,1.0)
BGL.glRasterPos2i(wPad, h-75)
Draw.Text('Chicken Configuration script', 'large')
BGL.glRasterPos2i(wPad, h-100)
Draw.Text('This script is launched the first time you run Chicken, or when a configuration error has been detected')
BGL.glColor3f(0.5, 0.5, 0.5)
BGL.glRectf(wPad, h-205, w-wPad, h-225)
BGL.glColor3f(1.0,1.0,1.0)
BGL.glRasterPos2i(wPad, h-220)
Draw.Text('Binary Utilities - ')
Draw.Text('if executables such as "pview" are on your PATH, you can leave this on Auto. Otherwise enter the folder manually')
self.bBinPathAuto.update([wPad+5, h-250, w/2-wPad-5, 20])
self.bBinPathManual.update([w/2, h-250, w/2-wPad-5, 20])
if self.bBinPathManual.val:
self.bBinPath.update([wPad+5, h-272, w-2*wPad-90, 20])
self.bBinPathSel.update([w-wPad-85, h-272, 80, 20])
self.bLaunch.update([wPad+5, h-330, 100, 20])
self.bCheck.update([w-wPad-85, h-330, 80, 20])
if self.error is not None:
if self.error is True:
BGL.glColor3f(1.0,0.0,0.0)
BGL.glRasterPos2i(w-wPad-150, h-365)
Draw.Text('Configuration error detected')
else:
BGL.glColor3f(0.0,0.0,0.0)
BGL.glRasterPos2i(w-wPad-200, h-365)
Draw.Text('Configuration checked and saved')