Script to delete all objects in 3D window:
import bpy
bpy.ops.object.select_all(action='TOGGLE')
bpy.ops.object.delete(use_global=False)
Script to delete all objects in 3D window:
import bpy
bpy.ops.object.select_all(action='TOGGLE')
bpy.ops.object.delete(use_global=False)
The following script can be used to add a cube and a material to it:
import bpy
bpy.ops.mesh.primitive_cube_add(location=(0,0,0))
obj_matl=bpy.data.materials.new("obj_clr")
obj_matl.diffuse_color=(1,0,0)
mesh=bpy.context.object.data
mesh.materials.append(obj_matl)
Blender version 3.6 To make any edge to be rounded smoothly, we can use the bevel tool in Edit Mode. Look at the cube in Image 1 where all t...