Help writing a very simple DAZ Script
mwasielewski1990
Posts: 343
Hello everybody!
I'm in need of making a very simple script for DAZ. I tried to look up for stuff in the API documentation center but... darn the thing is huge and a bit confusing
I need to make something like this:
1) Extract the X and Z coordinates from the active camera
2) Paste them into Ground Origin X and Ground Origin Z respectively (in the Iray Enviroment -> Ground tab)
Is something like this possible?
Post edited by mwasielewski1990 on
Comments
It should be possible, but I don't see what it would achieve - the Ground X & Z coords don't really do anything.
Yes, they do :)
A little help on where to look in the documentation would be awesome ^^
Since the camera is a node, I suspect step 1 could be done with a getWSPos() which returns the node's/camera's world space position in vec3 format. Here's the link to the node stuff:
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/node_dz#a_1a6991a7f4eeb0902cf5a42045ca437e38
Also there's a sample script for aiming the camera here. Might help to get things all set up:
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/core/aim_camera/start
Thanks... at least it's something :)
"Something"?? It should get you to where you want to go, unless you've never written a script before and want someone to do it for you.