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:
@@ -174,7 +174,10 @@ class VertexPaintDirt(bpy.types.Operator):
|
||||
|
||||
return('FINISHED',)
|
||||
|
||||
bpy.types.register(VertexPaintDirt)
|
||||
|
||||
if __name__ == "__main__":
|
||||
bpy.ops.mesh.vertex_paint_dirt()
|
||||
def register():
|
||||
bpy.types.register(VertexPaintDirt)
|
||||
|
||||
def unregister():
|
||||
bpy.types.unregister(VertexPaintDirt)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user