Pure Kitbash


Pure Kitbash is a carefully developed all-in-one asset library solution for Autodesk Maya.

Copy Along Surface

‘Copy Along Surface’ is used to copy a selected mesh along the surface of a base mesh. Select the base mesh and click on the ‘Base’ button. Then select any mesh which will be duplicated and click on ‘Constrain’. (The constrain is based on the pivot.) Then click on duplicate, move the mesh on the first position and click on Duplicate mesh to duplicate it multiple times.

(Please note that the duplication is not 100% accurate!)

Afterwards select all duplicated meshes and click ‘Cleanup meshes’ to remove all existing constrains on them.

Adding Meshes

You can add any mesh to extend the asset library. All added meshes are found inside the ‘Custom’ tab. The selected mesh will be translated to the center of the scene before export and afterwards back to where it was. If you want to create your own tab you can create a new folder inside the PureKitbash/Assets/ folder and name it appropriately.

(Please note: Please do not use whitespaces in your folder names as this will break the script!)

To move the thumbnails of the meshes to the new folder create a hidden .mayaSwatches folder and move the .preview.png thumbnail file from the Custom/.mayaSwatches/ folder inside your new folder. The thumbnail should be shown correctly now.

If you want to add any custom mesh you already created just move your .ma or .mb file into the PureKitbash/Assets/Custom/ folder (Or any new folder as described above).

See the ‘Rendering thumbnails’ topic for adding your own thumbnail.

Example

You have an asset called LaserShark and add it by using the ‘Add mesh’ button.

Before:

|—Assets
|—Custom
| LaserShark.ma
|
|—.mayaSwatches
LaserShark.ma.preview.png

Now move the LaserShark.ma and the hidden .mayaSwatches folder into your newly created Sharks folder.

If you have multiple meshes already inside you Custom folder only move the LaserShark.ma and its thumbnail.

After:

|—Assets
|—Custom
|
|—Sharks
|    LaserShark.ma
|
|—.mayaSwatches
     LaserShark.ma.preview.png

 

Rendering thumbnails

Whenever you click on the ‘Add mesh’ button the mesh will be added to the library and Maya creates a snapshot of your current viewport. If you want your mesh to be isolated on the thumbnail isolate it before adding it.

If you want to add a custom thumbnail you can render it with any renderer you like (100×100 px), save it as .preview.png and move it into the according .mayaSwatches folder where your asset lies.

Example

You have an asset called Sharknado.mb and render out a custom thumbnail.

Before:

|—Assets

|—Custom

Sharknado.mb

Now move you custom thumbnail.png into the hidden .mayaSwatches folder and rename it.

After:

|—Assets
|—Custom
| Sharknado.mb
|
|—.mayaSwatches
     Sharknado.mb.preview.png

Correct directory structure

The PureKitbash directory should be copied into your prefs folder. It should be found in your

user/Documents/maya/2018 folder.

If you can’t find it copy the following lineinto the MEL command line:

internalVar -upd

In the end the path should look like

C:\Users\User\Documents\maya\201x\prefs\scripts\PureKitbash\PureKitbash.mel

with

|—PureKitbash
|   Installation.mel
|   PureKitbash.mel
|   README.txt
|
|—Assets
|—Misc
|   ChangeDefaultValues.mel
|   Documentation.txt
|   PureKitbashUI.mel
|
|—Icons

Loading from within Maya

If you want to make the script a shelf button or assign it to a hotkey start the Installation.mel file which does this automatically for you.

Or if you want to do it manually copy the follwing lines into the according field (inside the Hotkey Editor, Marking Menu Editor, Shelf button or in the MEL command line)

{
  string $command = ("source \"" + `internalVar` -upd + "scripts/PureKitbash/PureKitbash\"");
  eval($command);
}

Favorites

You can add any asset from any tab to your favorites by right clicking it and click on ‘Add to favorites’. After doing so you should find the asset inside the ‘Favorites’ tab. If you want to remove it rightclick on the asset inside the ‘Favorites’ tab and click on ‘Remove from Favorites’.

If you don’t want to have a ‘Favorites’ tab just delete the folder inside the PureKitbash/Assets folder. If you later decide to use it though create an empty folder called ‘Favorites’ again.

Settings

There are multiple settings which you can adjust:

Modeling

Spawn at selection

If activated the imported asset will spawn at the currently selected position. If the selection contains more than one object/vertex/face/edge the interpolated position will be used. (Note that this behaviour can be customized by adjusting the third option.)

Orient to selection

If activated imported asset will spawn on top of the currently selected object/vertex/face/edge usign their orientation.

Spawn multiple meshes

If activated the imported asset will spawn multiple times on each selected object/vertex/face/edge.

Attach onto selected surface

If activated the imported asset will be attached to the selected surface. This behaves as if the ‘Copy Along Surface’ script would be opened on import.

Scaling

Change the scaling of the mesh when spawning

View

Grow columns

Grow the number of columns of the currently open tab

Shrink columns

Shrink the number of columns of the currently open tab

Show SubD Factor

Toggles the visibility of the SubD Factor drop down. The drop down lets you change the Preview Division Level of the selected mesh.

Show search bar

Toggles the visibility of the search bar. The search bar lets you search trough all meshes by name.

Misc

Open help

Opens the help window. (Surprise)

Reload

Reloads the whole script. May be needed whenever you add a new asset folder as these are only loaded once while starting the script.

Refresh UI

If the rare case of moving a mesh inside the currently open tab and you don’t want to go into another tab and back again you can refresh your currently open tab.

Open ‘Copy Along Surface’ on import

If activated the ‘Copy Along Surface’ script opens on import.

Change default values

Opens up a helper script inside the Misc/ folder which lets you change the default values so you don’t have to change one setting everytime you restart Maya. In there you can change every option described above.