[Bf-extensions-cvs] [24899c4] master: Amaranth Debug Tools
Pablo Vazquez
noreply at git.blender.org
Mon Jun 15 17:44:45 CEST 2015
Commit: 24899c41edbaf40008f037d32893c5edd528eb84
Author: Pablo Vazquez
Date: Mon Jun 15 17:43:35 2015 +0200
Branches: master
https://developer.blender.org/rBAC24899c41edbaf40008f037d32893c5edd528eb84
Amaranth Debug Tools
Fix case when List Users for Datablock can't find an active space (somehow) when checking for background images.
===================================================================
M amaranth/scene/debug.py
===================================================================
diff --git a/amaranth/scene/debug.py b/amaranth/scene/debug.py
index 57b0431..8a8e08a 100755
--- a/amaranth/scene/debug.py
+++ b/amaranth/scene/debug.py
@@ -687,14 +687,17 @@ class AMTH_SCENE_OT_list_users_for_x(bpy.types.Operator):
for scr in d.screens:
for ar in scr.areas:
if ar.type == 'VIEW_3D':
- for bg in ar.spaces.active.background_images:
- image = bg.image
-
- if bg and image and image.name == x:
- name = 'Background for 3D Viewport in Screen "{0}"'\
- .format(scr.name)
- if name not in self.__class__.users['VIEW3D']:
- self.__class__.users['VIEW3D'].append(name)
+ if ar.spaces and \
+ ar.spaces.active and \
+ ar.spaces.active.background_images:
+ for bg in ar.spaces.active.background_images:
+ image = bg.image
+
+ if bg and image and image.name == x:
+ name = 'Background for 3D Viewport in Screen "{0}"'\
+ .format(scr.name)
+ if name not in self.__class__.users['VIEW3D']:
+ self.__class__.users['VIEW3D'].append(name)
# Check the Compositor
for sce in d.scenes:
More information about the Bf-extensions-cvs
mailing list