ZBrushCentral

ZScript Question - reading stored info

When I want the ID number of the currently selected TOOL, I can use this line:

[VarSet,ToolNumber,TOOL:ItemInfo]

Is there a way for me to find out what file is currently selected for something like:

MATERIAL:MODIFIERS:Surface Bump

In otherwords, can I get the name or id number of the image being used in the Surface Bump slot for the selected material?

Also, while I certainly can get the ID number for a TOOL, MATERIAL or TEXTURE, is there a way to get the actual name of that item?

I need this for a series of operations in a ZScript I’m currently working on.

Thanks anyone for any help or ideas you might be able to throw out :slight_smile: .

Sven

Hi Sven,
i don’t understand well your question :)…but, if you press the Ctrl key and move the mouse over the item you want, then you can see the path of that item in the last line of the popup help-dialog. Use that path with iteminfo clause.

ex. [VarSet,inf,Material:Modifiers:Material Texture:iteminfo]

I hope this helps.

cameyo

Please Sven,
write open source script…

cameyo

Hello Cameyo,

Sorry my question was not clear.

What I am trying to do is capture the identity of images being used to modify different things in ZBrush.

In the example above I am attempting to identify, within my ZScript, what images might be in use to modify a material.

So far, it seems I cannot capture this information with a script.

Another interesting issue: I know about the Control Key being used to identify the path of an item. And I always assumed that each item had ITS OWN, UNIQUE PATH… but I find the SAME path identified for all the buttons under these CURVES:

RENDER:ADJUSTMENTS:RGB Level
RENDER:ADJUSTMENTS:Red Level
RENDER:ADJUSTMENTS:Green Level
RENDER:ADJUSTMENTS:Blue Level

Not quite sure what gets saved or loaded when called inside a ZScript???

Very confusing :confused:

Sven

[edit]
PS All those buttons(for example all the Save buttons) share the same Window IDs?

To show which texture is associate with Surface Bump slot use this:

[VarSet,inf,Material:Modifiers:Surface bump:iteminfo]

I hope this is right.

[EDIT]
I am very wrong…this don’t work :confused:

Sorry Sven :slight_smile:

cameyo

Use [IgetTitle , Path] to get the name of the texture/alpha used in a material texture slot. You can compare that name to the Item Info slider. Again use [IgetTitle , Path] for that. This also works for Tool, Material, Texture and Alpha.

But be aware that materials loaded might have a texture or alpha embedded in the .zmt. The name for those images is always Image, regardless of what it might have been called before.

I’m not sure about the render adjustment curves. Perhaps the Curve buttons act upon the currently active curve? In that case issue a [Ipress, Render : Adjustments : Close] to close any active curve. Then [Ipress, Render : Adjustments : Blue Level] to perform load/save/copy/paste etc operations for that curve.

Edit: I just realised using [IgetTitle,…] requires that every alpha/texture has a unique filename. Not a problem with the default alphas and textures but could be with imported images.

Cameyo: Thanks amigo, I also tried that and discovered it didn’t work. I’m still looking. :slight_smile:

TVeyes: :+1: Well, I guess this gives me something to work with - thank you. Will post anything I discover in my experiments today.

Sven