Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/examples/gpu.types.GPUOffScreen.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/python_api/examples/gpu.types.GPUOffScreen.py b/doc/python_api/examples/gpu.types.GPUOffScreen.py
index b7f11b94a11..4f601ee7ef1 100644
--- a/doc/python_api/examples/gpu.types.GPUOffScreen.py
+++ b/doc/python_api/examples/gpu.types.GPUOffScreen.py
@@ -241,8 +241,11 @@ class VIEW3D_OT_draw_offscreen(bpy.types.Operator):
def register():
- if hasattr(bpy.types, "VIEW3D_OT_draw_offscreen"):
- del VIEW3D_OT_draw_offscreen.global_shader
+ try:
+ cls = getattr(bpy.types, "VIEW3D_OT_draw_offscreen")
+ del cls.global_shader
+ except:
+ pass
shader = gpu.types.GPUShader(g_imageVertSrc, g_imageFragSrc)
VIEW3D_OT_draw_offscreen.global_shader = shader