ZBrushCentral

Canvas Click

Is there a function in zscripts where i can query pixol or face at the position of my canvas-click?
means…I click in the canvas at 205,400 and i like to check is under this position a pixol or face.

thx
christian

The [PixolPick] command will give you information about the pixol at a given point on the canvas. So, for example:

[Note,[PixolPick,1,[IGet,Document:Width]/2,[IGet,Document:Height]/2]]

will return the Z depth at the center of the canvas.

Note however that there are some oddities that need to be taken account of. If the canvas is clear then PixolPick can return a variety of values, depending on document size, that don’t make a lot of sense. So if you are testing for a model you may need to combine a test for Z depth with perhaps also testing the normals.

Thx Marcus,

I’ll try it out.