diff options
author | Pablo Vazquez <pablo@blender.org> | 2022-07-24 05:35:54 +0300 |
---|---|---|
committer | Pablo Vazquez <pablo@blender.org> | 2022-07-24 05:35:54 +0300 |
commit | 8d609fc7e68def4f9c43bada22d930d4b257c7e6 (patch) | |
tree | 16b1b884807efe4d67c587620d9f1b5702bf7bc7 | |
parent | 4a522d353a585e6986ac7c98c1d0decadc7db916 (diff) |
Amaranth: support listing images used by Empty objects in Debug tool
Related to T98252
-rw-r--r-- | amaranth/__init__.py | 2 | ||||
-rwxr-xr-x | amaranth/scene/debug.py | 15 |
2 files changed, 15 insertions, 2 deletions
diff --git a/amaranth/__init__.py b/amaranth/__init__.py index e63f0cb9..70606999 100644 --- a/amaranth/__init__.py +++ b/amaranth/__init__.py @@ -74,7 +74,7 @@ from amaranth.misc import ( bl_info = { "name": "Amaranth Toolset", "author": "Pablo Vazquez, Bassam Kurdali, Sergey Sharybin, Lukas Tönne, Cesar Saez, CansecoGPC", - "version": (1, 0, 11), + "version": (1, 0, 12, "blender": (3, 2, 0), "location": "Everywhere!", "description": "A collection of tools and settings to improve productivity", diff --git a/amaranth/scene/debug.py b/amaranth/scene/debug.py index a73d688e..4f702d08 100755 --- a/amaranth/scene/debug.py +++ b/amaranth/scene/debug.py @@ -65,7 +65,8 @@ class AMTH_store_data(): 'TEXTURE': [], # Textures (Psys, Brushes) 'MODIFIER': [], # Modifiers 'MESH_DATA': [], # Vertex Colors - 'OUTLINER_OB_CAMERA': [], # Background Images + 'OUTLINER_OB_CAMERA': [], # Background Images in Cameras + 'OUTLINER_OB_EMPTY': [], # Empty type Image 'NODETREE': [], # Compositor } libraries = [] # Libraries x type @@ -689,6 +690,18 @@ class AMTH_SCENE_OT_list_users_for_x(Operator): if name not in AMTH_store_data.users['OUTLINER_OB_CAMERA']: AMTH_store_data.users['OUTLINER_OB_CAMERA'].append(name) + # Check Empties type Image + for ob in d.objects: + if ob and ob.type == 'EMPTY' and ob.image_user: + if ob.image_user.id_data.data: + image = ob.image_user.id_data.data + + if image and image.name == x: + name = 'Used in Empty "{0}"'\ + .format(ob.name) + if name not in AMTH_store_data.users['OUTLINER_OB_EMPTY']: + AMTH_store_data.users['OUTLINER_OB_EMPTY'].append(name) + # Check the Compositor for sce in d.scenes: if sce.node_tree and sce.node_tree.nodes: |