2026-01-01
This commit is contained in:
@@ -24,7 +24,7 @@ This file contains the inspection user interface.
|
||||
|
||||
import bpy
|
||||
from bpy.utils import register_class
|
||||
from bpy.utils import unregister_class
|
||||
from ..utils import compat
|
||||
from ..stats import users
|
||||
from .utils import ui_layouts
|
||||
|
||||
@@ -700,14 +700,138 @@ class ATOMIC_OT_inspect_worlds(bpy.types.Operator):
|
||||
return wm.invoke_props_dialog(self)
|
||||
|
||||
|
||||
# Atomic Data Manager Inspect Objects UI Operator
|
||||
class ATOMIC_OT_inspect_objects(bpy.types.Operator):
|
||||
"""Inspect Objects"""
|
||||
bl_idname = "atomic.inspect_objects"
|
||||
bl_label = "Inspect Objects"
|
||||
|
||||
# user lists
|
||||
users_scenes = []
|
||||
|
||||
def draw(self, context):
|
||||
global inspection_update_trigger
|
||||
atom = bpy.context.scene.atomic
|
||||
|
||||
layout = self.layout
|
||||
|
||||
# inspect objects header
|
||||
ui_layouts.inspect_header(
|
||||
layout=layout,
|
||||
atom_prop="objects_field",
|
||||
data="objects"
|
||||
)
|
||||
|
||||
# inspection update code
|
||||
if inspection_update_trigger:
|
||||
# if key is valid, update the user lists
|
||||
if atom.objects_field in bpy.data.objects.keys():
|
||||
self.users_scenes = users.object_all(atom.objects_field)
|
||||
|
||||
# if key is invalid, empty the user lists
|
||||
else:
|
||||
self.users_scenes = []
|
||||
|
||||
inspection_update_trigger = False
|
||||
|
||||
# scenes box list
|
||||
ui_layouts.box_list(
|
||||
layout=layout,
|
||||
title="Scenes",
|
||||
items=self.users_scenes,
|
||||
icon="SCENE_DATA"
|
||||
)
|
||||
|
||||
row = layout.row() # extra row for spacing
|
||||
|
||||
def execute(self, context):
|
||||
return {'FINISHED'}
|
||||
|
||||
def invoke(self, context, event):
|
||||
# update inspection context
|
||||
atom = bpy.context.scene.atomic
|
||||
atom.active_inspection = "OBJECTS"
|
||||
|
||||
# trigger update on invoke
|
||||
global inspection_update_trigger
|
||||
inspection_update_trigger = True
|
||||
|
||||
# invoke inspect dialog
|
||||
wm = context.window_manager
|
||||
return wm.invoke_props_dialog(self)
|
||||
|
||||
|
||||
# Atomic Data Manager Inspect Armatures UI Operator
|
||||
class ATOMIC_OT_inspect_armatures(bpy.types.Operator):
|
||||
"""Inspect Armatures"""
|
||||
bl_idname = "atomic.inspect_armatures"
|
||||
bl_label = "Inspect Armatures"
|
||||
|
||||
# user lists
|
||||
users_objects = []
|
||||
|
||||
def draw(self, context):
|
||||
global inspection_update_trigger
|
||||
atom = bpy.context.scene.atomic
|
||||
|
||||
layout = self.layout
|
||||
|
||||
# inspect armatures header
|
||||
ui_layouts.inspect_header(
|
||||
layout=layout,
|
||||
atom_prop="armatures_field",
|
||||
data="armatures"
|
||||
)
|
||||
|
||||
# inspection update code
|
||||
if inspection_update_trigger:
|
||||
# if key is valid, update the user lists
|
||||
if atom.armatures_field in bpy.data.armatures.keys():
|
||||
self.users_objects = users.armature_all(atom.armatures_field)
|
||||
|
||||
# if key is invalid, empty the user lists
|
||||
else:
|
||||
self.users_objects = []
|
||||
|
||||
inspection_update_trigger = False
|
||||
|
||||
# objects box list
|
||||
ui_layouts.box_list(
|
||||
layout=layout,
|
||||
title="Objects",
|
||||
items=self.users_objects,
|
||||
icon="OBJECT_DATA"
|
||||
)
|
||||
|
||||
row = layout.row() # extra row for spacing
|
||||
|
||||
def execute(self, context):
|
||||
return {'FINISHED'}
|
||||
|
||||
def invoke(self, context, event):
|
||||
# update inspection context
|
||||
atom = bpy.context.scene.atomic
|
||||
atom.active_inspection = "ARMATURES"
|
||||
|
||||
# trigger update on invoke
|
||||
global inspection_update_trigger
|
||||
inspection_update_trigger = True
|
||||
|
||||
# invoke inspect dialog
|
||||
wm = context.window_manager
|
||||
return wm.invoke_props_dialog(self)
|
||||
|
||||
|
||||
reg_list = [
|
||||
ATOMIC_OT_inspect_collections,
|
||||
ATOMIC_OT_inspect_images,
|
||||
ATOMIC_OT_inspect_lights,
|
||||
ATOMIC_OT_inspect_materials,
|
||||
ATOMIC_OT_inspect_node_groups,
|
||||
ATOMIC_OT_inspect_objects,
|
||||
ATOMIC_OT_inspect_particles,
|
||||
ATOMIC_OT_inspect_textures,
|
||||
ATOMIC_OT_inspect_armatures,
|
||||
ATOMIC_OT_inspect_worlds
|
||||
]
|
||||
|
||||
@@ -719,4 +843,4 @@ def register():
|
||||
|
||||
def unregister():
|
||||
for cls in reg_list:
|
||||
unregister_class(cls)
|
||||
compat.safe_unregister_class(cls)
|
||||
|
||||
@@ -28,7 +28,7 @@ category toggles and the category selection tools.
|
||||
|
||||
import bpy
|
||||
from bpy.utils import register_class
|
||||
from bpy.utils import unregister_class
|
||||
from ..utils import compat
|
||||
from ..stats import count
|
||||
from .utils import ui_layouts
|
||||
|
||||
@@ -50,8 +50,10 @@ class ATOMIC_PT_main_panel(bpy.types.Panel):
|
||||
atom.lights,
|
||||
atom.materials,
|
||||
atom.node_groups,
|
||||
atom.objects,
|
||||
atom.particles,
|
||||
atom.textures,
|
||||
atom.armatures,
|
||||
atom.worlds
|
||||
]
|
||||
|
||||
@@ -87,6 +89,23 @@ class ATOMIC_PT_main_panel(bpy.types.Panel):
|
||||
text=""
|
||||
)
|
||||
|
||||
# objects buttons
|
||||
splitcol = col.split(factor=0.8, align=True)
|
||||
|
||||
splitcol.prop(
|
||||
atom,
|
||||
"objects",
|
||||
text="Objects",
|
||||
icon='OBJECT_DATA',
|
||||
toggle=True
|
||||
)
|
||||
|
||||
splitcol.operator(
|
||||
"atomic.inspect_objects",
|
||||
icon='VIEWZOOM',
|
||||
text=""
|
||||
)
|
||||
|
||||
# lights buttons
|
||||
splitcol = col.split(factor=0.8, align=True)
|
||||
|
||||
@@ -175,6 +194,23 @@ class ATOMIC_PT_main_panel(bpy.types.Panel):
|
||||
text=""
|
||||
)
|
||||
|
||||
# armatures buttons
|
||||
splitcol = col.split(factor=0.8, align=True)
|
||||
|
||||
splitcol.prop(
|
||||
atom,
|
||||
"armatures",
|
||||
text="Armatures",
|
||||
icon='ARMATURE_DATA',
|
||||
toggle=True
|
||||
)
|
||||
|
||||
splitcol.operator(
|
||||
"atomic.inspect_armatures",
|
||||
icon='VIEWZOOM',
|
||||
text=""
|
||||
)
|
||||
|
||||
# particles buttons
|
||||
splitcol = col.split(factor=0.8, align=True)
|
||||
|
||||
@@ -242,4 +278,4 @@ def register():
|
||||
|
||||
def unregister():
|
||||
for cls in reg_list:
|
||||
unregister_class(cls)
|
||||
compat.safe_unregister_class(cls)
|
||||
|
||||
@@ -25,7 +25,7 @@ pops up when missing files are detected on file load.
|
||||
|
||||
import bpy
|
||||
from bpy.utils import register_class
|
||||
from bpy.utils import unregister_class
|
||||
from ..utils import compat
|
||||
from bpy.app.handlers import persistent
|
||||
from .. import config
|
||||
from ..stats import missing
|
||||
@@ -189,7 +189,7 @@ def register():
|
||||
|
||||
def unregister():
|
||||
for item in reg_list:
|
||||
unregister_class(item)
|
||||
compat.safe_unregister_class(item)
|
||||
|
||||
# stop running missing file auto-detection after loading a Blender file
|
||||
bpy.app.handlers.load_post.remove(autodetect_missing_files)
|
||||
|
||||
@@ -25,7 +25,7 @@ registration.
|
||||
|
||||
import bpy
|
||||
from bpy.utils import register_class
|
||||
from bpy.utils import unregister_class
|
||||
from ..utils import compat
|
||||
|
||||
|
||||
# Atomic Data Manager Main Pie Menu
|
||||
@@ -197,4 +197,4 @@ def register():
|
||||
|
||||
def unregister():
|
||||
for cls in reg_list:
|
||||
unregister_class(cls)
|
||||
compat.safe_unregister_class(cls)
|
||||
|
||||
@@ -25,7 +25,7 @@ some functions for syncing the preference properties with external factors.
|
||||
|
||||
import bpy
|
||||
from bpy.utils import register_class
|
||||
from bpy.utils import unregister_class
|
||||
from ..utils import compat
|
||||
from .. import config
|
||||
# updater removed in Blender 4.5 extension format
|
||||
|
||||
@@ -328,6 +328,6 @@ def register():
|
||||
|
||||
def unregister():
|
||||
for cls in reg_list:
|
||||
unregister_class(cls)
|
||||
compat.safe_unregister_class(cls)
|
||||
|
||||
remove_pie_menu_hotkeys()
|
||||
|
||||
@@ -28,7 +28,7 @@ it.
|
||||
|
||||
import bpy
|
||||
from bpy.utils import register_class
|
||||
from bpy.utils import unregister_class
|
||||
from ..utils import compat
|
||||
from ..stats import count
|
||||
from ..stats import misc
|
||||
from .utils import ui_layouts
|
||||
@@ -373,4 +373,4 @@ def register():
|
||||
|
||||
def unregister():
|
||||
for cls in reg_list:
|
||||
unregister_class(cls)
|
||||
compat.safe_unregister_class(cls)
|
||||
|
||||
@@ -26,7 +26,7 @@ support Remington Creative popup.
|
||||
import bpy
|
||||
import time
|
||||
from bpy.utils import register_class
|
||||
from bpy.utils import unregister_class
|
||||
from ..utils import compat
|
||||
from bpy.app.handlers import persistent
|
||||
from .. import config
|
||||
from . import preferences_ui
|
||||
@@ -123,6 +123,6 @@ def register():
|
||||
|
||||
def unregister():
|
||||
for cls in reg_list:
|
||||
unregister_class(cls)
|
||||
compat.safe_unregister_class(cls)
|
||||
|
||||
bpy.app.handlers.load_post.remove(show_support_me_popup)
|
||||
|
||||
Reference in New Issue
Block a user