- Button that creates a cube at a specified size, specifically 160x8x160, moves pivot to the bottom/corner of the mesh, and moves pivot to origin point
- could also make UI with different possible sizes, like 320x8x320
- wall that comes with 4 subdivisions already--or can set subdivisions!
- adding idea #2 in
- also add a button to duplicate the mesh a specified amount of times and space them out--good for making modular adjustments
- Button that creates a sphere with good topology from mesh>smoothing a cube.
- Button that sends pivot to the origin, deletes history, freezes transformation, and exports
- Button that selects all vertices on a mesh and wields them together
- Script that cuts an edge between two selected vertices
- Script that moves pivot point to a specific point on the mesh
- script that sends encouraging messages when maya autosaves
- script that duplicates a mesh a certain amount of times and spaces them out
- script that extracts a selected face a specified distance
- script that deletes all meshes in the scene
This is my current pseudocode:
import maya.cmds as cmds
import logging
Input = value of input bar
def generateToolbarUI():
window_name = "ToolboxUI"
if cmds.window(window_name, q=True, exists = True):
cmds.deleteUI(window_name)
my_window = cmds.window(window_name, title = "Collision Tools")
cmds.columnLayout(adj=True)
cmds.button(label="Basic Wall", c=generateBasicWall)
cmds.button(label="Divided Wall", c=generateDivided)
cmds.button(label="Box", c=generateDoubledWall)
cmds.button(label="Generate Sphere", c=generateDoubledWall)
cmds.showWindow(my_window)
def generateBasicWall(unused=None):
generateWall("basic")
def generateDoubledWall(unused=None):
generateWall("doubled")
def generateSphere(unused=None):
generateSphere("sphere")
def generateDivided(unused=None):
generateWall("divided")
#creates a cube with the exact dimensions of 8x160x160
def generateWall(mode="b"):
#creates a cube with the exact dimensions of 8x160x160
if mode == "basic":
cmds.polyCube(w=8, d=160, h=160)
this line will send pivot to bottom
this line will send pivot & mesh to origin
#doubles measurements of wall
if mode == "doubled":
cmds.polyCube(w=8, d=160*input, h=160*input)
this line will send pivot to bottom
this line will send pivot & mesh to origin
#created a cube with 4 divisions in depth and height
if mode == "divided":
cmds.polyCube(w=8, d=160, h=160, sd=4, sh=4)
this line will send pivot to bottom
this line will send pivot & mesh to origin
def generateSphere(mode="c"):
if mode == "sphere":
#creates a 30x30x30 square
cmds.polyCube(w=30, d=30, h=30)
#smooths cube by 2 subdivisions to create a sphere with good topology
cmds.polySmooth(dv = 2)
def export():
selection = ls(sl=True)
if nothing selected
displayerror saying "Please Select Something!"
this line will center the pivot
this line deletes history
this line freezes transformation
this line opens the exportwindow
this line exports the mesh as an .fbx
No comments:
Post a Comment