Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 08-11-2008, 01:55 PM   #1
Buggy
Registered User
 
Join Date: Oct 2008
Location: Sheffield, England
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Script Editor (Image name for each Image)

Hi i'm trying to make a script that renames each image while rendering, im still nooby at this so hoping sombody else knows the answer >.<

neway heres my problem.

the first image should be called 000000
2nd000001
3rd 000002
4th 0000003

however everytime i do it, there all called 000003,

really need this script, when u have to do 50 of these, 600 and odd images each it really becomes a strugle >.<
here is the script:

setAttr -type "string" defaultRenderGlobals.imageFilePrefix "000000";
changeMayaSoftwareFileNamePrefix;
updateMayaSoftwareFileNamePrefixControl;
updateMayaSoftwareTargetFilePreview;
timeControl -e -beginScrub $gPlayBackSlider;
// Result: MayaWindow|mayaMainWindowForm|TimeSliderForm|formL ayout16|formLayout17|formLayout45|frameLayout2|tim eControl1 //
currentTime 10 ;
timeControl -e -endScrub $gPlayBackSlider;
// Result: MayaWindow|mayaMainWindowForm|TimeSliderForm|formL ayout16|formLayout17|formLayout45|frameLayout2|tim eControl1 //
floatField -edit -value `currentTime -query` MayaWindow|mayaMainWindowForm|TimeSliderForm|formL ayout16|formLayout17|formLayout45|floatField1;
// Result: MayaWindow|mayaMainWindowForm|TimeSliderForm|formL ayout16|formLayout17|formLayout45|floatField1 //
ikSelectionChanged("MayaWindow|mainKeysMenu|menuIt em729|ikFKStateItem");
renderWindowRender redoPreviousRender renderView;
playButtonStepForward;
floatField -edit -value `currentTime -query` MayaWindow|mayaMainWindowForm|TimeSliderForm|formL ayout16|formLayout17|formLayout45|floatField1;
// Result: MayaWindow|mayaMainWindowForm|TimeSliderForm|formL ayout16|formLayout17|formLayout45|floatField1 //
ikSelectionChanged("MayaWindow|mainKeysMenu|menuIt em729|ikFKStateItem");
setAttr -type "string" defaultRenderGlobals.imageFilePrefix "000001";
changeMayaSoftwareFileNamePrefix;
updateMayaSoftwareFileNamePrefixControl;
updateMayaSoftwareTargetFilePreview;
renderWindowRender redoPreviousRender renderView;
playButtonStepForward;
floatField -edit -value `currentTime -query` MayaWindow|mayaMainWindowForm|TimeSliderForm|formL ayout16|formLayout17|formLayout45|floatField1;
// Result: MayaWindow|mayaMainWindowForm|TimeSliderForm|formL ayout16|formLayout17|formLayout45|floatField1 //
ikSelectionChanged("MayaWindow|mainKeysMenu|menuIt em729|ikFKStateItem");
setAttr -type "string" defaultRenderGlobals.imageFilePrefix "000002";
changeMayaSoftwareFileNamePrefix;
updateMayaSoftwareFileNamePrefixControl;
updateMayaSoftwareTargetFilePreview;
renderWindowRender redoPreviousRender renderView;
playButtonStepForward;
floatField -edit -value `currentTime -query` MayaWindow|mayaMainWindowForm|TimeSliderForm|formL ayout16|formLayout17|formLayout45|floatField1;
// Result: MayaWindow|mayaMainWindowForm|TimeSliderForm|formL ayout16|formLayout17|formLayout45|floatField1 //
ikSelectionChanged("MayaWindow|mainKeysMenu|menuIt em729|ikFKStateItem");
setAttr -type "string" defaultRenderGlobals.imageFilePrefix "000003";
changeMayaSoftwareFileNamePrefix;
updateMayaSoftwareFileNamePrefixControl;
updateMayaSoftwareTargetFilePreview;
renderWindowRender redoPreviousRender renderView;
Buggy is offline   Reply With Quote
Old 08-11-2008, 02:08 PM   #2
Chirone
Subscriber
 
Chirone's Avatar
 
Join Date: Dec 2007
Location: NZ
Posts: 3,124
Thanks: 11
Thanked 147 Times in 143 Posts
Default

does it have to start at 00000?
why not batch render from 00001 to 99999

you can change the output file names in the render settings
__________________


that's a "Ch" pronounced as a "K"

Computer skills I should have:
Objective C, C#, Java, MEL. Python, C++, XML, JavaScript, XSLT, HTML, SQL, CSS, FXScript, Clips, SOAR, ActionScript, OpenGL, DirectX
Maya, XSI, Photoshop, AfterEffects, Motion, Illustrator, Flash, Swift3D
Chirone is offline   Reply With Quote
Old 08-11-2008, 02:16 PM   #3
Buggy
Registered User
 
Join Date: Oct 2008
Location: Sheffield, England
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

unfortunatly it has to start from 00000 and go up too 000600 :s
Buggy is offline   Reply With Quote
Old 08-11-2008, 02:22 PM   #4
Buggy
Registered User
 
Join Date: Oct 2008
Location: Sheffield, England
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

sorry forgot to mention

setAttr -type "string" defaultRenderGlobals.imageFilePrefix "000003"; parts are the changeing the name in rendering settings, but for some reason, all the images come out as 000003
Buggy is offline   Reply With Quote
Old 08-11-2008, 02:28 PM   #5
Chirone
Subscriber
 
Chirone's Avatar
 
Join Date: Dec 2007
Location: NZ
Posts: 3,124
Thanks: 11
Thanked 147 Times in 143 Posts
Default

wait, so you're hard-coding it all in?
dude... that's gonna be a bitch.....
I'm not too too confident in MEL scripting but my solution to this problem is to write a program to renamed them all afterwards

or write a batch file to loop through them all.

can i ask why it has to start from 00000?
__________________


that's a "Ch" pronounced as a "K"

Computer skills I should have:
Objective C, C#, Java, MEL. Python, C++, XML, JavaScript, XSLT, HTML, SQL, CSS, FXScript, Clips, SOAR, ActionScript, OpenGL, DirectX
Maya, XSI, Photoshop, AfterEffects, Motion, Illustrator, Flash, Swift3D
Chirone is offline   Reply With Quote
Old 08-11-2008, 02:34 PM   #6
Buggy
Registered User
 
Join Date: Oct 2008
Location: Sheffield, England
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

its for a game, the images start from 00000 and go to up 000003, then it changes direction and misses 4 images and starts again at 000007 and keeps going in different numbers each different animation 'bunch' this part ill have to do on a lot of different images. so it may be better to get it all in a script befor i bothere doing the other 40 of them >.<.

when i did it image by image befor, it took a day, i would prefer to do all 40 in 1 day :p
Buggy is offline   Reply With Quote
Old 08-11-2008, 02:40 PM   #7
Chirone
Subscriber
 
Chirone's Avatar
 
Join Date: Dec 2007
Location: NZ
Posts: 3,124
Thanks: 11
Thanked 147 Times in 143 Posts
Default

if it's just renaming you're after then you can just rename it after its all been rendered

i found a few links to programs that can mass rename stuff (googled "batch file rename", i was actually looking for how to write a batch file to rename stuff but i got these instead)

http://www.freedownloadscenter.com/U...e_Renamer.html

http://www.publicspace.net/windows/B...ame/index.html

i know it's probably a pain having to rename things AFTER the rendering, we're using computers, and this is something computers are for, so you can just automate the task
__________________


that's a "Ch" pronounced as a "K"

Computer skills I should have:
Objective C, C#, Java, MEL. Python, C++, XML, JavaScript, XSLT, HTML, SQL, CSS, FXScript, Clips, SOAR, ActionScript, OpenGL, DirectX
Maya, XSI, Photoshop, AfterEffects, Motion, Illustrator, Flash, Swift3D
Chirone is offline   Reply With Quote
Old 08-11-2008, 02:52 PM   #8
Buggy
Registered User
 
Join Date: Oct 2008
Location: Sheffield, England
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

unfortunatly it wouldnt work with a batch editor.

the animation button for the 4 images in direction 1 would be 000000-3
then with the same animations the but with the direction aim at 25 degree rotation would also be 000000-3

so cant mass render and rename them after :/. is there any other way to rename the images outside of render setting? maybe the code can lead me elsewhere for it to work.

thanx in advance and for the replys allready.

my fault for not explaining my situation well enough.
Buggy is offline   Reply With Quote
Old 08-11-2008, 03:10 PM   #9
Buggy
Registered User
 
Join Date: Oct 2008
Location: Sheffield, England
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

probably easier to redo the timeslide, so im gonna do that rather than strugle with the image names, ty for the replys though, much appreciated.
Buggy is offline   Reply With Quote
Old 09-11-2008, 12:13 AM   #10
gster123
Moderator
 
gster123's Avatar
 
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
Thanks: 1
Thanked 51 Times in 45 Posts
Default

Bit confused with this one, so you want to have say 00000 anmd then render to say 00060 in the order of 00001, 00002, 00003 etc?

Or do you want them to jump about?

if its just liniar coulednt you use frame padding in the render globals to get what you need?
__________________
"No pressure, no diamonds" Thomas Carlyle
gster123 is offline   Reply With Quote
Old 09-11-2008, 01:21 AM   #11
AikoWorld
Subscriber
 
AikoWorld's Avatar
 
Join Date: Dec 2005
Location: London
Posts: 429
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes, the framepadding dose what you are looking for
jus set it to 5

and it will render out 00001 00002 etc...

What your doing by copying the current output of the editor then changing the number is just triple work.
AikoWorld is offline   Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Breakfast - Original SM Gallery Image by Philip Miss_Nova Simply Maya Gallery 4 19-04-2011 07:37 PM
Stratocaster - Original SM Gallery Image by Philip Miss_Nova Simply Maya Gallery 2 31-12-2010 10:30 AM
Rhinoman - Original SM Gallery Image by Septopus David Simply Maya Gallery 0 09-12-2010 02:42 PM
Physical Fitness Center Lounge - Original SM Gallery Image by Philip Miss_Nova Simply Maya Gallery 0 05-12-2010 12:32 PM
Guards - Original SM Gallery Image by Escelce Miss_Nova Simply Maya Gallery 0 05-12-2010 12:01 PM

Thread Tools





A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.