黑猫鸣泣时吧 关注:12贴子:129
  • 1回复贴,共1

对其他窗口使用ops

只看楼主收藏回复

import bpy
for area in bpy.context.screen.areas
: if area.type == 'TIMELINE':
for region in area.regions:
if region.type == 'WINDOW':
ctx = bpy.context.copy()
ctx[ 'area'] = area
ctx['region'] = region
bpy.ops.time.view_all(ctx)
break


IP属地:广西1楼2020-01-09 16:40回复
    简化
    ctx = bpy.context.copy()
    ctx['area']=bpy.context.screen.areas[5];ctx['region']=bpy.context.screen.areas[5].regions[3]
    bpy.ops.image.view_all(ctx,fit_view=True)
    将图像窗口的图片 最大化


    IP属地:广西2楼2020-01-09 17:04
    回复