1. #1

    Default creating zplugins

    i was wondering if there was any specific way to make zplugins (not zscripts, as in something like zketchpad or zmapper)

    do you need to program these in C++ or can you use the same language as zscript. either way can someone point me to a tutorial that explains what exactly you need to do if you do it in C++ (yes i can code in C++) or how you can make them using the zscript language

    thx for any help
    ~knightmare

    edit- also can someone tell me how to compile a txt file into a zsc file
    Last edited by dark knightmare; 01-08-06 at 01:33 PM.

  2. #2
    Super Moderator Follow User Gallery
    Join Date
    May 2001
    Posts
    21,530

    Default

    Zketchpad was created with the ZScript language. You'll find plenty of info in the ZScripting Help forum covering what you need to know to convert your script to a plugin.

    ZMapper was created using DLL's, so would have been programmed with a form of C. It is still partially written with the ZScript language, though, which then calls the DLL at the appropriate time.

    As for how to get the .zsc, it's easy -- just load the .txt version into the ZScript palette. ZBrush then automatically creates a .zsc version in the same folder.

  3. #3

    Default

    ahhh ok.

    now i have one last question.

    can you use zscripts (you should consider calling the language Z++) to do basicly anything, just like in C++ .

    i mean, are there conditionals, variables and ways to add an entire pallete and create buttons in palletes and use image files and create entire functions that can do completely new things, or are you limited to making them press buttons, add notes, and configuring the UI?
    Last edited by dark knightmare; 01-08-06 at 03:10 PM.

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

    Default

    check out this thread and the link as well as this whole forum...most of your questions are answered here.

  5. #5

    Default

    that answered just about everything except, can you create your own functions and can you create entire palletes?

  6. #6
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    You can create new subpalettes, even of the interface itself. Check out this thread for some interesting information on that. As to creating your own functions, that is possible to a degree but is restricted by the data available to zscripts. In other words, you can get data by querying interface items or from specific zscript commands but if the information you need is not available that way then that's pretty much it. So, for example, it is not possible to manipulate the individual points of a model in edit mode.

  7. #7

    Default

    well im about to write my own function. i was looking through all the zscript tutorials all last night and its actually extremely easy.

    after examining the zanimator plugin i noticed that sometimes you need refrence library files like in c++ (dll files), so that gave me the idea of writing a dll in C++ that adds the [include] function to Z++ and then ill write a .zll compiler (using the same encryption as a dll just with Z++ scripts in it rather than C++)

    tell me what you think of that idea, if noone wants it i wont release it, but im definately using it for the animation plugin im gonna write.

  8. #8
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    Quote Originally Posted by dark knightmare
    after examining the zanimator plugin i noticed that sometimes you need refrence library files like in c++ (dll files), so that gave me the idea of writing a dll in C++ that adds the [include] function to Z++ and then ill write a .zll compiler (using the same encryption as a dll just with Z++ scripts in it rather than C++)
    If you are referring to the <zscriptinsert> command then what you suggest is not necessary. ZBrush is not using a reference library file. The command simply inserts any zscript .txt file at that point. Some zscripters use it as a way of keeping things organized but the end result is no different from cutting and pasting the code there. Once compiled there is only one .zsc file and you don't need any of the inserted .txt files after compiling.

    Certainly writing dlls for calling from zscripts can increase their functionality, although without an SDK it's not possible to write something like ZMapper.

    I'm sure many people would be interested in seeing what you come up with. Several of the zscripters here have played with ZB animation ideas, including myself.

  9. #9
    Senior Member Follow User Gallery
    Join Date
    Mar 2005
    Location
    Manhattan, New Yotk
    Posts
    4,494

    Default

    Quote Originally Posted by marcus_civis
    without an SDK it's not possible
    I think you should apply for that SDK Job Pixologic has on their Website.



    Lemo

  10. #10
    Senior Member Follow User Gallery
    Join Date
    Sep 2002
    Location
    UK
    Posts
    828

    Default

    I agree with lemonado, marcus has the pixologic esprit.
    Lets poke him and see. jab jab jab

  11. #11
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    Quote Originally Posted by Antimorph
    I agree with lemonado, marcus has the pixologic esprit.
    Lets poke him and see. jab jab jab


    Actually, I did write and ask about it some time ago. I was told the post had been filled (I suspect by the person who wrote the excellent ZMapper manual). I don't think that means there'll be an SDK any time soon as that's not likely to be high priority... I guess the sit vac web page just got forgotten about - I think it's been there about 2 years. Or Pixologic are keeping their options open.

  12. #12
    Senior Member Follow User Gallery
    Join Date
    Sep 2002
    Location
    UK
    Posts
    828

    Default

    Bah, I'm sad now, in the 30 minutes I had to imagine the scenario, I'd given you the job, flown you out to San Fran, Set you up in a nice house like Tom Cruise in "The Firm" and was about to "Show you round the Lab" at Pixol HQ. And that's when cold reality set in. Ah well.

    (Wonders how to set about making an Ofer action figure.)

  13. #13
    Senior Member Follow User Gallery
    Join Date
    Jan 2003
    Location
    NYC
    Posts
    1,626

    Default

    DK,

    One command you might want to look at:


    [CODE][FileExecute, File name including the extension (such as plugin.dll), Routine to Call, Optional text input, Optional number input, Optional memory block input, Optional memory block output ]

    example from theZScript/Cmd listing in ZBrush2

    [FileExecute, PluginTest.dll, ShowMsg, "Hi There" ]

    This would execute the ShowMsg routine of the PluginTest.dll plugin.[/CODE]

    Several people (Not Me) have experimented with creating and executing .dlls from within ZScripts with some success. If any of those scripters read this thread, maybe they'll add their own comments...

    Actually, the information about implementing the FileExecute command is kinda skimpy but you should be able to solve the passing of data through some simple tests. Oh, and please post any info and/or code you discover that you'd be willing to share?

    Sven

  14. #14

    Default

    sure no problem. and im not just going to limit this programs functionality to compileing .zll (thats what i will be naming them) files. It will also be able to write and preview zscripts, but unfortunately not be able to compile them to .zsc files (unless pixolator is ok with me reverse engineering zbrush), and if i can make this work i have proved that zscript functions can be written in C++ and compiled into a dll file that a zscript using the function can rely on, which would then lead me to have the ability to write your own functions with this compiler.

    as for the encryption on zscript library files, i would make it a very similar encryption as a dll file except that it would compile with zscript data.

    this is all an idea as of now so no promises, im only 15 after all (but i still managed to learn C++ over the last 2 and a half years ).

  15. #15

    Default

    after looking into this i discovered that what i am really going to make is an ide for zscripts that wil just be able to check the script for errors. there is no need for zll files or new functions, if you would want to do something outside of zbrushes boundries you would need to write it as a dll file. also the whole preview thing (and the compiling zsc files) wouldnt work unless i got a few of my reverse engineering buddys to help me find out how the zscript files run through zbrush, or just use the sdk which is available to developers only.

    so all you guys will be getting is an ide which can check errors and my animtion plugin that i am making.

Posting Permissions

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