Incrementing names of my Normal Bakes MEL

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  03 March 2018
Incrementing names of my Normal Bakes MEL


I've been trying to figure out how to save out my .tga files of my normal maps in an incrementing fashion but I can't seem to affect anything inside of the " ".

This is what I have so far:

for( $i=0; $i<50; ++$i ) {

currentTime (`currentTime -q`+1);

surfaceSampler -target Base_MeshShape -uvSet map1 -searchOffset 0.1002758625 -maxSearchDistance 0 -searchCage "Base_MeshShapeEnvelopeShape" -source pSphereShape10 -source pSphereShape9 -source pSphereShape8 -source pSphereShape7 -source pSphereShape6 -source pSphereShape3 -source pSphereShape11 -source pSphereShape12 -source pSphereShape13 -source pSphereShape14 -source pSphereShape15 -source pSphereShape5 -source pSphereShape16 -source pSphereShape2 -source pSphereShape17 -source pSphereShape18 -source pSphereShape4 -source pSphereShape1 -source normalGeoShape -mapOutput normal -mapWidth 2048 -mapHeight 2048 -max 1 -mapSpace tangent -mapMaterials 1 -shadows 1 -filename "C:/Users/Matt/Documents/maya/projects/Innovations/images/Ball Maps/Ball bake repeat test/BallBakeNormal($i)" -fileFormat "tga" -superSampling 2 -filterType 0 -filterSize 3 -overscan 1 -searchMethod 0 -useGeometryNormals 0 -ignoreMirroredFaces 0 -flipU 0 -flipV 0;


This lets me set a time frame of how many frames of bake I want to do but I can't save them in ascending order!

Sorry I'm a bit of a noob when it comes to MEL.
  03 March 2018
You can try this:

string $base = "C:/Users/Matt/Documents/maya/projects/Innovations/images/Ball Maps/Ball bake repeat test/BallBakeNormal";
-filename ($base + $i )
__________________ -
reply share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 05:43 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.