ZBrushCentral

how to implement .dll's?

hello,
it is done, i created a little interface class for the spacemice
(3dconnexion.com) in c/c++. it creates an instance g_I3DMouse wich can be used to initialize the spacemouse and get its properties.

(g_I3DMouse.Initialize(), g_I3DMouse.GetTx(),…, gI3DMouse.GetRotationVector()…etc)

now i could pack this interface into a dll…but what’s next?

how can i use my dll with zbrush (3.1) ?

can anyone help me out here please?

i want to use this properties for the navigation in zbrush, what else. so first: how can i use the dll with zbrush. second: how can i access the navigational properties of zbrush and what are they called? i think, if this works, i can figure out the rest. :wink:

i am not an artist, i am a programmer but there are alot of artists here in my “school” and i want to help them out…and of course all of you, guys…

greetings,
ben0bi

To call a dll from ZBrush you need to use a zscript and the FileExecute command.

There is information on zscripting here:

http://www.zbrush.info/docs/index.php/ZScripting

And this is a useful thread on FileExecute:

http://www.zbrushcentral.com/zbc/showthread.php?t=24066

i have no clue what i have to do now.
i have copy/pasted the first sample zscript from the forum (makes a button and fills then canvas with texture.)

now i click on load zscript, select my file and … what now? nothing happens. could you please explain this to me?

[edit, 3secs later] ok i pressed now the hide zscript button. but now my question is:

to update my mouse i need a loop. should i make a loop in zscript (if possible) and then call fileexecute everytime or should i make a function in my dll with a loop inside, where update will be called? and how can i get the properties of the mouse to zbrush…i mean, this also has to be updated, i cannot get the props by pressing a zButton :wink:

i am really stuck here, could you please help?

[another edit, 5secs later]
ok there is a loop command. but its like a “for x=1 to y”-loop, but i need an infinite loop…

another thing is: does zbrush stop “execution” while in a scripted loop?
you can imagine, i need a loop wich does not affect the working while it is running…

so in this FileExecute thread in the last reply stands, how to create a memblock and access it.

could you please explain this to me?

i think about making a thread wich updates the mouse (in c/c++). it then writes all values to this memblock, wich then will be read in zscript. is this possible?

but here i also need an infinite loop…

another solution would be, i send the interface to you and you implement it in zbrush 3.2 :wink:

I think that you need to take a good look at what’s possible with zscripting and what isn’t. For example, it’s not possible to take control of ZBrush entirely with a zscript that runs continually in the background; only one zscript can be active at a time which means that if a user presses another plugin button yours will cease.

so there is no way to implement this 3dmouse thing?

i saw there 2 menu items: zPlugins and zScripts…can i make a plugin without using zscript?

anyone has to help me here, i NEED to run it in the background, in an infinite loop. how else should i get the input from the mouse?

There’s currently no SDK available for making ZBrush plugins apart from using zscripting. All the available information on zscripting is at the link I gave you above and in the sticky and other threads in this forum. ZScripting is very powerful but I think that the limitations would put what you are trying to do beyond reach.

sorry, i do not understand “beyond reach”, there are several translations in german. (like not in reach and like its in reach and more…)

you think it’s possible or not?

Apologies. I meant I think it is not possible.

frak frak frak !! (battlestar galacticas representation of “f*ck” :wink: )

is there an sdk in work? does anyone know when it comes out?

i promised to our artists to make this…now i am a betrayer of trust. (not really but i feel like. ;))

or otherwise i could try to make an oracle wich works on the other side.
(oracles are cracks wich look into the RAM for some password while the program, wich will be breaked, is running) - i could try to make it otherwise, so the oracle writes to the mem where the navigation-variables are saved instead of reading it…but i think this is too much work, i prefer waiting for an sdk.

I think you’d best wait for an SDK. I’ve no idea when that would be released.