PDA

View Full Version : ZScript Question



WingedOne
06-17-02, 06:55 AM
Is there a way to write a ZScript that would work thusly:

I place an object on one part of the canvas and the ZScript would automatically place the same object and a corresponding marker on another location of the canvas?

Or if not, a ZScript that could scan for markers on the canvas and then place additional corresponding markers?

banez
06-17-02, 07:15 AM
[Ibutton,"ZBrush","START",
[IPress,TOOL:Sphere3D]
[CanvasStroke,(ZObjStrokeV02n3=H2V4H6V8H6V8)]
[TransformSet,320,300,0,50,50,50,180,0,360]
[IPress,TRANSFORM:MARK]
[CanvasStroke,(ZObjStrokeV02n3=H2V4H6V8H6V8)]
[TransformSet,220,200,0,50,50,50,180,0,360]
[IPress,TRANSFORM:MARK]]

WingedOne
06-17-02, 07:41 AM
Thanks EZ, but that's not quite what I was looking for.

Say I manually draw an object at location <64,12,0> and place a marker there. I would want the ZScript to understand that I placed an object and marker there and place a corresponding marker at <-64,12,0>. I'm not sure if this could be done on the fly or if I would have to write a ZScript that could scan what markers are placed on the canvas and place corresponding markers at <-1*x,y,z> for example.

I'm not certain this is currently possible.

banez
06-17-02, 08:03 AM
ZBR can store marker postion.
if you edit and alter a 3D object you must save it as a Z tool
try this half way down the page look for (MmZBR Data Saver) http://www.pixolator.com/zbc-bin/ultimatebb.cgi?ubb=get_topic&f=1&t=006192

BluePage
06-17-02, 08:37 AM
One way to do it would be to create a button and corresponding zscript when pressed would:

1. Get the current object's location using TransformGet
2. Use math to calculate the new position of the object
3. Snapshot the current object and place marker
4. Move the object to the new location using TransformSet
5. Create marker at new postion

Currently there is no way to read marker information from the canvas with a zscript thou that would be a nice new feature.

Hope this helps

banez
06-17-02, 08:51 AM
use this tool but make sure the marker is on in the zscript it auto mark the same object http://www.pixolator.com/zbc-bin/ultimatebb.cgi?ubb=get_topic&f=1&t=003500

if you want to get the location use this tool http://www.pixolator.com/zbc-bin/ultimatebb.cgi?ubb=get_topic&f=1&t=006127
:tu:

WingedOne
06-17-02, 08:56 AM
Thanks BluePage and EZ, this info should get me off to a good start. I forgot about TransformGet.