Week 7 - Activities


1. Maya Cubes!

This code creates a cuboid that is 20 units in height, has 15 subdivisions along X, 10 along Y and 15 along Z. It then moves the cube to position [1, 1.70, 4]:

2. Adding Functionalities!

Here using the notes about how the different commands worked in my week 5 blog I added more functionality:

3. Modularising Scripts!

Here I created a script that has the following:

· a function called my_create, to create a rectangular box of a user specified height, and subdivisions along X, Y and Z;

· a function called my_move, to move a cube to a user specified position XYZ;

· a function called my_rotate, to rotate a cube around X, Y and Z axes by a user specified amount of RX, RY and RZ degrees,;

· a function called my_freeze, to freeze the translation and rotation;

· a function called my_modify, to modify the name of the asset to be a user specified name and finally

· a function called my_select, to select the cube and delete it.


4. User Interfaces (UIs)!

Here I spent some time learning about Windows within maya and how User interfaces can be very useful:


Windows are an easy way to convey information to a user as they do not need any knowledge of programming to be able to input data into the correct places to be able to use it in the script. For example:


This script displays a window that allows the user to change a value through a slider. This data is then taken and used in a function called cube_pyramid that changes the size of the pyramid depending on the inputted value.

Leave a comment

Log in with itch.io to leave a comment.