ZBrushCentral

Finished ZScript (with code): ZTimer

Pixolator’s promise of a timing zscript here set me thinking and I came up with this. It’s pretty basic but may be useful.

It works pretty much like a stop watch. Start and stop it at any time during a ZBrush session. It doesn’t need to stay loaded - simply press Start to start the timer and you can then call other zscripts or whatever. Just reload it when you want to Stop it or see how much time has elapsed by pressing the Time? button. Press ‘Clear’ after stopping to reset timer. The time setting is saved between ZBrush sessions (whether ‘Stop’ is pressed or not) as long as the timer is loaded when exiting ZBrush.

The code is included in the zip.

cool Marcus…

now you must take a break from coding cool stuff and work on your AMNC piece!!

Another helpful post! Way to go Marcus! Thank you.

I’m inspired to use this somehow to try adding a timer to the PSnap plugin. Someone suggested it when PSnap was first posted but I didn’t think a timer could be done. You and Pix have shown that it can.

Sven

aminuts: thanks, I’m working on my AMNC entry, really I am! :smiley:

Sven: I do hope you will add in a timer functionality to PSnap; that would be a great addition to an already useful plugin and I’m sure would please a lot of people.

Marcus,

Well, I gave it a go but can’t see how to use SLEEP to interrupt another active script to do an automatic save or even manage a warning “beep”. If it’s possible I’d be pleased if someone could show the way.

Perhaps when Pixologic releases the SDK, it will provide us a way.

Thanks for your other SLEEP command demos which WILL work very well for the Ctrl+button “HELP” operation I talked about. :slight_smile:

Sven

the timer works like a charm…thank you…no problems at all.

ron:+1: :sunglasses: :+1:

Sven,
That’s a pity; I had thought that the Sleep function in a plugin would stay loaded but hadn’t tried it out. I can get the script to ring a bell on exit (using the ZScript shutdown Sleep event) but even that doesn’t always work. It works fine for some scripts like PM but for some plugin buttons it doesn’t. I had thought that maybe Pix’s TimeLapse script used Sleep but if it does then there’s some magic involved too, perhaps with the dll. Writing a dll to do the job is presumably possible but I’ve no idea how to go about that, at the moment.

Ron,
Thanks, I’m glad you like it! :slight_smile:

Placed in zstartup\zplugs but no ztimer in zplugs on startup? What didn’t I do right.

Man, the last update was from 9 years ago !!!

I don’t know why people are digging into the archived ZScripts sections these days…
If it was still useful it would have a post in the main section or an equivalent updated plugin.

Even if you dug it for ZScript learning purpose that’s not a very good idea to look at scripts made for versions dating from ZB’s medieval ages, as ZScript has evolved since.

Look into ZScript main two main sections and you’ll find everything you need.
One very useful thread for learning is the “Useful macros and ZScripts” one.

I’ve already seen quite a few people using ZBrush for archeology, but now we’ve got ZBrush archeologists :lol:

Sometimes there’s treasure :wink:

I saw in some tutorials a timer being used for sculpting and googled it and got the thread Sorry if I caused a problem. I’m not a pro

yogi1945 > No problem at all !!!
Sorry if my answer looks harsh it was not meant to be at all.
It’s just kinda funny because you are the second one in like a week to dig into that section, thus the (bad) joke about ZBrush archeologists. There’s no problem asking anything at all, that’s what those kind of forums are meant for.
What kind of timer are you speaking about ??? Can you give the link to the tutorial ? So we can tell you what that timer is.

Doug Jones > And you should know that well :wink: I mean, after raider of the lost ZScipt, Doug Jones and the ZScript of doom, Doug Jones and the last ZScript, and finally Doug Jones and the kingdom of the cristal ZScript…
(Sorry for the bad jokes, I can’t help it I’ve got overloaded heredity)

:lol: :lol: :lol:

Forget about it. Its not important. Sorry I asked

A timer for sculpting isn’t a bad idea at all, myself I tend to get lost on detailing and do not plan very well the different parts of the process.

But I think there’s no timer feature in ZBrush itself, it must be some separate software. Doing it in ZScript could cause problems because only one ZScript can be active at once, so every time you would use another plugin the timer would stop working. But that’s definitely one useful little feature they could add.

yogi1945 don’t hesitate to ask on this forum, it is as friendly to newbies as it is to pros, there’s a lot of very helping people here. That’s a part I really like about ZBrush, more than a wonderful and very addictive software it is a tight and friendly community.

Sorry you took my first answer for some reprimand, it was not my intent. I’m not a native english speaker so maybe the tone was not appropriate.

Theres already a timer running for the AutoSave “feature” :wink: