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 06-02-2007, 01:06 AM   #1
danotronXX
Subscriber
 
danotronXX's Avatar
 
Join Date: Jun 2005
Location: cleveland ohio
Posts: 313
Thanks: 0
Thanked 3 Times in 3 Posts
Default automating shutdowns after renders

Ive been doing a lot of overnight renders but most of my shots only take about 3 hours to finish. does anyone know how to set maya to shut down your computer right after the renders are done.

oh and one other thing, do any of you guys happen to have a lamborghini murcielago model or know a link where i can get one? I thought it wouldnt hurt to ask saving myself a couple days on modeling one.

thanks for your replies

cheers,

Last edited by danotronXX : 06-02-2007 at 01:22 AM.
danotronXX is offline   Reply With Quote
Old 06-02-2007, 10:03 AM   #2
enhzflep
Subscriber
 
enhzflep's Avatar
 
Join Date: Oct 2006
Location: Melbourne
Posts: 313
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can't help with the Lambo, I'm affraid. Nor can I tell you how to get maya itself to initiate the shutdown.

When I've got a render going overnight, I usually just go into the poweroptions in the controll panel and set my computer to go into standby mode after X number of hours, X obviously being larger than the time I reckon is needed. The advantage of stand-by as opposed to shut down is that if you cock-up the timing, Maya is still open and running when you turn your pc back on, and will continue from where it was.

The other way you can do it is to schedule a task to be run some time after you think the render would finish. I'd use the method myself, but have been spectacularly unsuccesful at getting a task to run at the scheduled time, always getting back a message that says the task could not be completed.

For the second option, you just need to schedule a task that is capable of shutting down a windowsXP pc. I've attached a file I use for just this purpose(turning the pc off, that is). I'd much prefer to double-click an icon on the desktop, than go through the whole rigmarole of Start->TurnOffComputer->Shutdown & all the mouse movement inbetween.

I've attached the file I use. Recompiled today to add an icon to it.

EDIT: No reason to increase traffic in case anybody wants the source, here it is, with the exception of the icon - just take a snapshop of the windows Shudown image and save as a 32x32 icon. Code created & compiled with OpenWatcom IDE v1.5.

Main.cpp
Code:
/* Simple code to turn off a WindowsXP based computer.

 Wednesday 7 Feb, 2007 - Simon (enhzflep)

 Based on code by Greg Van Loon - author of StartupManager
*/

#include <windows.h>


void EnableShutdownPrivileges()
{
        HANDLE token;
        TOKEN_PRIVILEGES privileges;

        if(!::OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &token))
                ::MessageBox(NULL, "ERROR: Unable to open process token.", "Error", MB_OK | MB_ICONERROR);

        ::LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &privileges.Privileges[0].Luid);

        privileges.PrivilegeCount = 1;
        privileges.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;

        ::AdjustTokenPrivileges(token, FALSE, &privileges, 0, (PTOKEN_PRIVILEGES)NULL, 0);
        if(::GetLastError() != ERROR_SUCCESS)
                ::MessageBox(NULL, "ERROR: Uanble to adjust token privileges.", "Error", MB_OK | MB_ICONERROR);
}

int APIENTRY WinMain(HINSTANCE _1,HINSTANCE _2,LPSTR _3,int _4)
{
 EnableShutdownPrivileges();
 ExitWindowsEx(EWX_SHUTDOWN, 0);
 return 1;
}
PowerOff.rc
Code:
ICON1 ICON "G:\\PowerOff.ico"

1 VERSIONINFO
FILEVERSION 2,0,0,1
PRODUCTVERSION 2,0,0,1
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904E4"
        BEGIN
            VALUE "Comments", "This is a program designed to shut down Windows.\0"
            VALUE "Description", "Enhzflep 2007\0"
            VALUE "FileVersion", "1.0.0.1"
            VALUE "FileDescription", "Shuts down Windows\0"
            VALUE "InternalName", "PowerOff\0"
            VALUE "LegalCopyright", "Copyright \xA9 2007, Enhzflep\0"
            VALUE "OriginalFilename", "PowerOff.EXE\0"
            VALUE "ProductName", "PowerOff 1.1\0"
            VALUE "ProductVersion", "1.0.0.1\0"
            VALUE "License", "None Needed\0"
        END
    END
    
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x0409, 1252
    END
END
Attached Files
File Type: zip poweroff.zip (13.6 KB, 42 views)

Last edited by enhzflep : 06-02-2007 at 12:07 PM.
enhzflep is offline   Reply With Quote
Old 07-02-2007, 01:37 AM   #3
danotronXX
Subscriber
 
danotronXX's Avatar
 
Join Date: Jun 2005
Location: cleveland ohio
Posts: 313
Thanks: 0
Thanked 3 Times in 3 Posts
Default

oh great! thanks for ur reply
danotronXX is offline   Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing Renders to AE Ozgalis Dynamics & Special Effects 1 08-12-2010 09:56 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.