For example:
I want to be able to just click a button and able to have the same size cube or sphere every time. I'm gonna be making hundreds of cubes and spheres all the same size but I don't want to keep having re-size them every time I create them.
I want the spheres to always be 10m and the Cubes to be 15 x15x20mm Is this possible?
Thank so you for time in advance weather you can help or not
import bpy
class HelloWorldPanel(bpy.types.Panel):
"""Creates a Panel in the Object properties window"""
bl_label = "WIRES & PIPES"
bl_idname = "OBJECT_PT_hello"
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
#bl_category = "Shortcuts"
def draw(self, context):
layout = self.layout
row = layout.row()
op = row.operator("mesh.primitive_cube_add", text="Plug", icon="MESH_CUBE")
op.size = 0.5
op.scale = (1, 2, 3)
op = row.operator("mesh.primitive_uv_sphere_add", text="Ground", icon="MESH_UVSPHERE")
op.radius = 0.1
def register():
bpy.utils.register_class(HelloWorldPanel)
def unregister():
bpy.utils.unregister_class(HelloWorldPanel)
if __name__ == "__main__":
register()