diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-02-14 14:21:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-02-14 14:21:21 +0300 |
commit | 39c04315e2815bbd24c9ba5f7e0aa11736fa1c48 (patch) | |
tree | 6c88f9d9dc4562374df40f080147b3a6144834e6 /release/scripts/ui/properties_physics_smoke.py | |
parent | b02f78ed02fd0c6fbb8f67bba1c123552052321c (diff) |
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)
Diffstat (limited to 'release/scripts/ui/properties_physics_smoke.py')
-rw-r--r-- | release/scripts/ui/properties_physics_smoke.py | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/release/scripts/ui/properties_physics_smoke.py b/release/scripts/ui/properties_physics_smoke.py index 2cba19dc8dc..5fcb7f9cc22 100644 --- a/release/scripts/ui/properties_physics_smoke.py +++ b/release/scripts/ui/properties_physics_smoke.py @@ -238,9 +238,22 @@ class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel): domain = context.smoke.domain_settings effector_weights_ui(self, context, domain.effector_weights) -bpy.types.register(PHYSICS_PT_smoke) -bpy.types.register(PHYSICS_PT_smoke_field_weights) -bpy.types.register(PHYSICS_PT_smoke_cache) -bpy.types.register(PHYSICS_PT_smoke_highres) -bpy.types.register(PHYSICS_PT_smoke_groups) -bpy.types.register(PHYSICS_PT_smoke_cache_highres) + +classes = [ + PHYSICS_PT_smoke, + PHYSICS_PT_smoke_field_weights, + PHYSICS_PT_smoke_cache, + PHYSICS_PT_smoke_highres, + PHYSICS_PT_smoke_groups, + PHYSICS_PT_smoke_cache_highres] + + +def register(): + register = bpy.types.register + for cls in classes: + register(cls) + +def unregister(): + unregister = bpy.types.unregister + for cls in classes: + unregister(cls) |