1. #1
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    7,680

    Default 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.
    Attached Files Attached Files
    Last edited by marcus_civis; 02-05-05 at 06:42 AM. Reason: Added code for switching off Show Actions

  2. #2
    Senior Member User Gallery
    Join Date
    Dec 2003
    Location
    Chicago
    Posts
    5,537

    Default

    cool Marcus.....

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


  3. #3
    Senior Member User Gallery
    Join Date
    Jan 2003
    Location
    NYC
    Posts
    1,625

    Default

    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

  4. #4
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    7,680

    Default

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

    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.

  5. #5
    Senior Member User Gallery
    Join Date
    Jan 2003
    Location
    NYC
    Posts
    1,625

    Default No Go

    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.

    Sven

  6. #6
    Senior Member User Gallery
    Join Date
    Dec 2001
    Location
    clarksville Tennessee
    Age
    49
    Posts
    6,810

    Default

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

    ron

  7. #7
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    7,680

    Default

    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •