Cute developer function to spit out a debug object to help when coding.

This commit is contained in:
Dion Moult
2022-10-18 23:11:37 +11:00
parent d6be887bde
commit b70bf5ed33
+8
View File
@@ -40,3 +40,11 @@ class Debug(blenderbim.core.tool.Debug):
filelist = [f for f in os.listdir(cache_dir) if f.endswith(".h5")]
for f in filelist:
os.remove(os.path.join(cache_dir, f))
@classmethod
def debug_geometry(cls, verts=[], edges=[], name="Debug"):
mesh = bpy.data.meshes.new("Debug")
mesh.from_pydata(verts, edges, [])
obj = bpy.data.objects.new(name, mesh)
bpy.context.scene.collection.objects.link(obj)
return obj