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:
@@ -387,13 +387,23 @@ class BONE_PT_deform(BoneButtonsPanel):
|
||||
col.label(text="Offset:")
|
||||
col.prop(bone, "cyclic_offset")
|
||||
|
||||
classes = [
|
||||
BONE_PT_context_bone,
|
||||
BONE_PT_transform,
|
||||
BONE_PT_transform_locks,
|
||||
BONE_PT_relations,
|
||||
BONE_PT_display,
|
||||
BONE_PT_inverse_kinematics,
|
||||
BONE_PT_deform,
|
||||
|
||||
bpy.types.register(BONE_PT_context_bone)
|
||||
bpy.types.register(BONE_PT_transform)
|
||||
bpy.types.register(BONE_PT_transform_locks)
|
||||
bpy.types.register(BONE_PT_relations)
|
||||
bpy.types.register(BONE_PT_display)
|
||||
bpy.types.register(BONE_PT_inverse_kinematics)
|
||||
bpy.types.register(BONE_PT_deform)
|
||||
BONE_PT_custom_props]
|
||||
|
||||
bpy.types.register(BONE_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)
|
||||
|
Reference in New Issue
Block a user