ZBrushCentral

mask by intensity

Hello

Im trying to get this command to work
[IPress,Tool:Masking:Mask By Intensity]

after I load and apply a texture (which works)
any idea why it will not mask by intensity?

As far as I know, there’s no reason why that shouldn’t work. You’ll need to post more of your script so I can see what might be going wrong.



[IButton,Play,"Press to play",
[IReset,,4.0]
[IConfig,4.0]
[FileNameSetNext,"C:	est.obj"][IPress,Tool:Import]
[FileNameSetNext,"C:	est.jpg"][IPress,Texture:Import]
[IPress,Tool:Texture Map:TextureMap]
[IUnPress,PopUp:test]
[IPress,Tool:Masking:Mask By Intensity]
[ISet,Tool:Deformation:Inflat,100]
[FileNameSetNext,"C:	est.obj"][FileNameSetNext,"C:	est.obj"][IPress,Tool:Export]
]/*End of ZScript*/

That worked OK for me. I did change the texture popup line to:

[IPress,PopUp:test]

but as you said that the texture was being applied correctly that obviously wasn’t a problem for you. I used a texture that is just black and white to see clearly the masking and also repeated the deformation>inflat a couple of times so that the difference between the masked area and the deformation showed up well.

ah it works with 4 r2

quick question though, I need to unload ztools from memory, and the IReset command always asks for confirmation. Is there a way to reset without that dialog?

Yes, you can wrap [IKeyPress] round it to simluate pressing enter:

[IKeyPress,13,[IReset,4.0]]

brilliant!

I don’t mean to hijack this thread but I have a question similar to this.

What about a confirmation that the “enter” action is to cancel? If you press “enter” on the Merge Subtool Down confirmation of “This is not an undoable action” it does not continue.

There’s no way to find out what the outcome of pressing Enter will be for an interface item. You’ll need to test and see for whichever buttons you are going to press in zscript.

I am sorry. My question was worded awkwardly.

For dialogs where “Enter” is cancel (like Merge Subtool Down) I can’t seem to find a keystroke that is “Ok.” I did try a bunch. Space, CRTL + Enter, Arrows, all that still Cancels. I was wondering if there is a keystroke (or another way) to chose “Ok” in that situation.

No, I’m afraid there’s no way that I know of. (I’ve not tested every keystroke but I haven’t been able to a way.)