ZBrushCentral

Reset Light:Background:Texture button slot to texture Off

hey guys, i looking for a way to reset the Light:Background:Texture, to texture Off when a texture is already assigned to that button slot.
sadly it might be impossible to do it, because i get stuck :stuck_out_tongue:

[Ipress, “Light:Background:Texture”]
[IPress, “PopUp:Texture Off”]
[IClick,6207]///get ride of popup palette

Also when i want to change the texture by another one, it load the texture into Light:Lightcap:Txtr.
so with that Texture 01 loaded on that button slot:
and the zscript process here :
[Ipress, “Light:Background:Texture”]
[IPress, “PopUp:Texture 02”]
It will not load the texture in Light:Background:texture but in Light:Lightcap:Txtr, which might be a bug.

More about that issue :

Do a
[IgetId, “Light:Background:Texture”] return 2388

when couble checking in Preference:Utilities:View Window Id the value of that item is 4167
When getting Info /title from that Id “4167” the information returned are correct.

check out the winid from preference utilities for the Light:Lightcap:Txtr, the value is 2388.
Seem like there is something wrong in Zbrush code here.

i will get back to you if i found more information to share on that bug.
Nicolas

Hi Nicolas,

Try:

[IButton,OffTxr,“Turn off Background texture”,
[IClick,4167]
[IClick,“PopUp:Texture Off”]
]

This works OK for me.

I’ll look into the ID problem.

hmm yeah it work this way :

[IClick, 4167]// “Light:Background:Texture”]

[IClick,“PopUp:Texture Off”]

this way it doesn’t :

[IPress, “Light:Background:Texture”]

[IClick,“PopUp:Texture Off”]

or even this do not work :

[IPress, “Light:Background:Texture”]

[IPress,“PopUp:Texture Off”]

doesn’t make sense for me ^^

so as i have to use this win Id to reach the proper button item, i cannot doucble check the value locally from the script
because [IgetId ,“light:background:Texture”] give a false ID.

don’t you think this value ( 4167) will work for both R8 p2, 2018 and 2018.1 for both PC and Mac ?

thank you a lot for your assitance Marcus.

Well, a lot of zscript doesn’t work in the way you think it should - it’s often down to trial and error. Anyway, the [IClick,4167] works in 4R8 and I’d expect it to work in all versions of 2018.

Okay let me explain well this time

the bug is happening in a specific context
first try a IgetId, onto light:background:texture, when no texture has been assigned to the button slot.
the ID returned is 4167.

Now just assign a texture to that button and retry to grab the ID
now the returned value is 2388

and to complete the whole test,
do a [IGetId,“Light:Lightcap:Txtr”]
it will return the sameID (2388)

Just tested with R8, and the bug is there too
the only difference with 2018 version is the id 2387 instead of 2388.

shoudl i report the bugs i found to a support ticket ?
none of many ( 3) bugs i found and that was easy to reproduce has never been fixed, or even reported to the dev team.
So what is best if i want to give a chance for those bugs to get fixed in next build ?

Also who is maintaining updated the Zscript command list, because is missing around 6 news commands which were introduced with 2018 and 2018.1 version .

Posted this by mistake. Please ignore.