From a71c08aaaa6f0201d8f10b4a3719c2b0512d92cc Mon Sep 17 00:00:00 2001 From: joeyskeys Date: Wed, 17 May 2023 22:58:17 +0800 Subject: [PATCH] change UI class naming to avoid blender warning --- config.py | 2 +- ui/accelerator.py | 4 ++-- ui/camera.py | 23 ++--------------------- ui/film.py | 4 ++-- ui/integrator.py | 4 ++-- ui/light.py | 4 ++-- ui/material.py | 4 ++-- ui/sampler.py | 4 ++-- ui/world.py | 4 ++-- 9 files changed, 17 insertions(+), 36 deletions(-) diff --git a/config.py b/config.py index 3fb8172..8e96320 100644 --- a/config.py +++ b/config.py @@ -1,6 +1,6 @@ engine_name = "EXAMPLE_RENDER" -engine_label = "Example" +engine_label = "Bitto_Example" film_props = ( { diff --git a/ui/accelerator.py b/ui/accelerator.py index bba982e..a040ebf 100644 --- a/ui/accelerator.py +++ b/ui/accelerator.py @@ -11,7 +11,7 @@ class BittoAcceleratorProperties(BittoProperties): BittoAcceleratorProperties.init_annotations(config.accelerator_props) -class Bitto_PT_accelerator(bpy.types.Panel): +class BITTO_PT_accelerator(bpy.types.Panel): bl_label = "Accelerator" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -31,5 +31,5 @@ def draw(self, context): def setup(): - regular_registry.add_new_class(Bitto_PT_accelerator) + regular_registry.add_new_class(BITTO_PT_accelerator) property_group_registry.add_new_property_class(BittoAcceleratorProperties, bpy.types.Scene, "bitto_accelerator_props") \ No newline at end of file diff --git a/ui/camera.py b/ui/camera.py index fc06281..f1a1bce 100644 --- a/ui/camera.py +++ b/ui/camera.py @@ -11,7 +11,7 @@ class BittoCameraProperties(BittoProperties): BittoCameraProperties.init_annotations(config.camera_props) -class Bitto_PT_camera(bpy.types.Panel): +class BITTO_PT_camera(bpy.types.Panel): bl_label = "Camera" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -31,25 +31,6 @@ def draw(self, context): setup_ui(layout, config.camera_props, camera_props) -''' -def register(): - # Register property group - bpy.utils.register_class(BittoCameraProperties) - bpy.types.Scene.bitto_camera_props = bpy.props.PointerProperty(type=BittoCameraProperties) - - # Register UIs - bpy.utils.register_class(Bitto_PT_camera) - - -def unregister(): - # Unregister property group - del bpy.types.Scene.bitto_camera_props - bpy.utils.unregister_class(BittoCameraProperties) - - # Unregister UIs - bpy.utils.unregister_class(Bitto_PT_camera) -''' - def setup(): - regular_registry.add_new_class(Bitto_PT_camera) + regular_registry.add_new_class(BITTO_PT_camera) property_group_registry.add_new_property_class(BittoCameraProperties, bpy.types.Camera, "bitto_camera_props") \ No newline at end of file diff --git a/ui/film.py b/ui/film.py index 7c9831a..f72e57b 100644 --- a/ui/film.py +++ b/ui/film.py @@ -12,7 +12,7 @@ class BittoFilmProperties(BittoProperties): BittoFilmProperties.init_annotations(config.film_props) -class Bitto_PT_film(bpy.types.Panel): +class BITTO_PT_film(bpy.types.Panel): bl_label = "Film" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -37,5 +37,5 @@ def draw(self, context): def setup(): - regular_registry.add_new_class(Bitto_PT_film) + regular_registry.add_new_class(BITTO_PT_film) property_group_registry.add_new_property_class(BittoFilmProperties, bpy.types.Scene, "bitto_film_props") \ No newline at end of file diff --git a/ui/integrator.py b/ui/integrator.py index 3829b83..702d34b 100644 --- a/ui/integrator.py +++ b/ui/integrator.py @@ -11,7 +11,7 @@ class BittoIntegratorProperties(BittoProperties): BittoIntegratorProperties.init_annotations(config.integrator_props) -class Bitto_PT_integrator(bpy.types.Panel): +class BITTO_PT_integrator(bpy.types.Panel): bl_label = "Integrator" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -29,5 +29,5 @@ def draw(self, context): def setup(): - regular_registry.add_new_class(Bitto_PT_integrator) + regular_registry.add_new_class(BITTO_PT_integrator) property_group_registry.add_new_property_class(BittoIntegratorProperties, bpy.types.Scene, "bitto_integrator_props") \ No newline at end of file diff --git a/ui/light.py b/ui/light.py index 0ade0dd..43951bc 100644 --- a/ui/light.py +++ b/ui/light.py @@ -11,7 +11,7 @@ class BittoLightProperty(BittoProperties): BittoLightProperty.init_annotations(config.light_props) -class Bitto_PT_light(bpy.types.Panel): +class BITTO_PT_light(bpy.types.Panel): bl_label = "Light" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -31,5 +31,5 @@ def draw(self, context): def setup(): - regular_registry.add_new_class(Bitto_PT_light) + regular_registry.add_new_class(BITTO_PT_light) property_group_registry.add_new_property_class(BittoLightProperty, bpy.types.Light, "bitto_light_props") \ No newline at end of file diff --git a/ui/material.py b/ui/material.py index ecb680d..b9c3b67 100644 --- a/ui/material.py +++ b/ui/material.py @@ -5,7 +5,7 @@ from ..utils.registry import regular_registry, property_group_registry -class Bitto_PT_materialslots(bpy.types.Panel): +class BITTO_PT_materialslots(bpy.types.Panel): bl_label = "Material" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -25,4 +25,4 @@ def draw(self, context): def setup(): - regular_registry.add_new_class(Bitto_PT_materialslots) + regular_registry.add_new_class(BITTO_PT_materialslots) diff --git a/ui/sampler.py b/ui/sampler.py index a9caffc..343c5b9 100644 --- a/ui/sampler.py +++ b/ui/sampler.py @@ -11,7 +11,7 @@ class BittoSamplerProperties(BittoProperties): BittoSamplerProperties.init_annotations(config.sampler_props) -class Bitto_PT_sampler(bpy.types.Panel): +class BITTO_PT_sampler(bpy.types.Panel): bl_label = "Sampler" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -32,5 +32,5 @@ def draw(self, context): def setup(): - regular_registry.add_new_class(Bitto_PT_sampler) + regular_registry.add_new_class(BITTO_PT_sampler) property_group_registry.add_new_property_class(BittoSamplerProperties, bpy.types.Scene, "bitto_sampler_props") \ No newline at end of file diff --git a/ui/world.py b/ui/world.py index afb7f16..79349f5 100644 --- a/ui/world.py +++ b/ui/world.py @@ -11,7 +11,7 @@ class BittoWorldProperties(BittoProperties): BittoWorldProperties.init_annotations(config.world_props) -class Bitto_PT_world(bpy.types.Panel): +class BITTO_PT_world(bpy.types.Panel): bl_label = "World" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -32,5 +32,5 @@ def draw(self, context): def setup(): - regular_registry.add_new_class(Bitto_PT_world) + regular_registry.add_new_class(BITTO_PT_world) property_group_registry.add_new_property_class(BittoWorldProperties, bpy.types.Scene, "bitto_world_props") \ No newline at end of file