Skip to content

Commit

Permalink
change UI class naming to avoid blender warning
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyskeys committed May 17, 2023
1 parent 49827bf commit a71c08a
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 36 deletions.
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

engine_name = "EXAMPLE_RENDER"
engine_label = "Example"
engine_label = "Bitto_Example"

film_props = (
{
Expand Down
4 changes: 2 additions & 2 deletions ui/accelerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")
23 changes: 2 additions & 21 deletions ui/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")
4 changes: 2 additions & 2 deletions ui/film.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")
4 changes: 2 additions & 2 deletions ui/integrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")
4 changes: 2 additions & 2 deletions ui/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")
4 changes: 2 additions & 2 deletions ui/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
4 changes: 2 additions & 2 deletions ui/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")
4 changes: 2 additions & 2 deletions ui/world.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")

0 comments on commit a71c08a

Please sign in to comment.