change python scripts so modules which register with blender have a register() function rather then making import automatically run the register functions (generally considered bad practice by python people)

This commit is contained in:
2010-02-14 11:21:21 +00:00
parent b02f78ed02
commit 39c04315e2
76 changed files with 1310 additions and 592 deletions

View File

@@ -267,14 +267,27 @@ class WORLD_PT_gather(WorldButtonsPanel):
col.prop(light, "pixel_cache")
col.prop(light, "correction")
bpy.types.register(WORLD_PT_context_world)
bpy.types.register(WORLD_PT_preview)
bpy.types.register(WORLD_PT_world)
bpy.types.register(WORLD_PT_ambient_occlusion)
bpy.types.register(WORLD_PT_environment_lighting)
bpy.types.register(WORLD_PT_indirect_lighting)
bpy.types.register(WORLD_PT_gather)
bpy.types.register(WORLD_PT_mist)
bpy.types.register(WORLD_PT_stars)
bpy.types.register(WORLD_PT_custom_props)
classes = [
WORLD_PT_context_world,
WORLD_PT_preview,
WORLD_PT_world,
WORLD_PT_ambient_occlusion,
WORLD_PT_environment_lighting,
WORLD_PT_indirect_lighting,
WORLD_PT_gather,
WORLD_PT_mist,
WORLD_PT_stars,
WORLD_PT_custom_props]
def register():
register = bpy.types.register
for cls in classes:
register(cls)
def unregister():
unregister = bpy.types.unregister
for cls in classes:
unregister(cls)