Complex UV Layout in Maya
Over the last couple of years UV layout in Maya has changed for the better. In this course we're going to be taking a look at some of those changes as we UV map an entire character
# 1 08-03-2006 , 04:35 AM
epatata's Avatar
Registered User
Join Date: Sep 2005
Posts: 9

print system date and hour how?

what code I use to print actual date and hour of system?

using this same thread, I want to ask what is the best way to store large amount of text strings, where do I can store it?

# 2 25-03-2006 , 02:09 PM
Registered User
Join Date: Oct 2004
Posts: 27
You can write you text strings out to a file, look at fwrite, fread etc.

As for the date and time, i don't know.

# 3 27-03-2006 , 12:26 PM
skywola's Avatar
Registered User
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
Judging by what I see in the Maya MEL reference library, (or maybe I should say by what I DON'T see), if you want date and time, you will need to write a plug-in to do it . . .


"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
# 4 27-03-2006 , 04:28 PM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
not sure about windows but on linux you can do this:

system("date");

//Result: Mon Mar 27 17:26:46 BST 2006


and then parse the string. If you can find a windows DOS command that will return the date then do the same thing in windows and it shoud work. No need for a plugin.

user added image
A


Technical Director - Framestore

Currently working on: Your Highness

IMDB
# 5 27-03-2006 , 07:22 PM
skywola's Avatar
Registered User
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
If you run that in windows you get:

system("date");

// Result: The current date is: Mon 03/27/2006
Enter the new date: (mm-dd-yy) //


"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
# 6 27-03-2006 , 07:36 PM
skywola's Avatar
Registered User
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
You *might* be able to get away with this:

system("time/T");

system("date/T");

// Result: 12:22p

// Result: Mon 03/27/2006

but your best bet, if you are looking for just the result to be displayed is do it like this:

string $d = `system("date/T")`;
string $t = `system("time/T")`;

then do the necessary string extraction which I am to lazy to spend the time to write for you . . . . you can find the string manipulation commands in the Maya library, and it is good practice, as you will use them a lot, if you do much coding.


"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off