ZBrushCentral

keep the popup quick picker panel stay open while i move the mouse cursor

hey dudes, thx for helping me, last, time, i come back to you with a new request :slight_smile:

I looking for some help to resolve a very kind of simple problem in my script, unfortunately i haven’t found a fix for that, now let me explain the problem.

i develop a plugin that create a texture from the bpr render, while the script execute his process, there is an step the need to be done by picking the imported texture from the texture quick picker.
But whne i use
[IPress,Tool:Texture Map:TextureMap][IClick,6207]
[IPress,PopUp:my_texture]
the picker display randomly at different place on the UI, depending of the the layout and what/where menus are in the tray

The problem is that when i start to move the mouse cursor , it closes the quick picker instantly
i am looking for a way to keep this panel open , because if i don’t pick the texture, the script will continue to proceed and the effect i am looking for will been applied, and i will have to finish manually the process.

can you shed your light on this, i want to keep the texture to be a unique one into plugin data, so i don’t spam this directory, and i don’t have to remove the unused file. so popup the quick picker during the process is the best choice for me, just that little issue that stop me from publishing the plugin :slight_smile:

Thank you for reading me :slight_smile:
Nicolas

ahah, finally after like 10 hours of investigations, i finally understood that i had a bad use of the [Ifreeze] :wink:

//asks for file name
//ZBRUSH MACRO - Recorded in ZBrush version 4.7
[IButton,???,“BPR then export passes”,
[IShowActions,0]
[IConfig,4.7]
[IPress,Render:BPR RenderPass:Render Best Preview]
[IShowActions,0]
//select a save location - file name will be used as the suffix
[VarSet,fpath,[FileNameAsk,“Photoshop(.psd)|.psd||”,RenderPass.psd ,“Please Save File…”]]
//exit if dialog cancelled
[If,[StrLength,fpath]==0,[Exit]]
//extract the path and name only
[VarSet,fpath,[FileNameExtract,fpath,3]]
//set the file name for the shaded pass export
[FileNameSetNext,[StrMerge,#fpath,"_shaded.psd"]]
[If,([StrFind,“Width=”,[IGetInfo,2219]]>-1),[IPress,2219]]//shaded
//depth export
[FileNameSetNext,[StrMerge,#fpath,"_depth.psd"]]
[If,([StrFind,“Width=”,[IGetInfo,2220]]>-1),[IPress,2220]]//depth
//shadow export
[FileNameSetNext,[StrMerge,#fpath,"_shadow.psd"]]
[If,([StrFind,“Width=”,[IGetInfo,2221]]>-1),[IPress,2221]]//shadow
//AO export
[FileNameSetNext,[StrMerge,#fpath,"_ao.psd"]]
[If,([StrFind,“Width=”,[IGetInfo,2222]]>-1),[IPress,2222]]//AO
//mask export
[FileNameSetNext,[StrMerge,#fpath,"_alpha.psd"]]
[If,([StrFind,“Width=”,[IGetInfo,2223]]>-1),[IPress,2223]]//mask
//Sss export
[FileNameSetNext,[StrMerge,#fpath,"_sss.psd"]]
[If,([StrFind,“Width=”,[IGetInfo,2301]]>-1),[IPress,2301]]//Sss
//Floor export
[FileNameSetNext,[StrMerge,#fpath,"_floor.psd"]]
[If,([StrFind,“Width=”,[IGetInfo,2302]]>-1),[IPress,2302]]//Floor
]//end of macro

Hello Doug,
thx you for posting, that useful, but i already done all such of code, the problem was a little bit different :slight_smile:
I run into another issue, i will post if i can’t to figure out myself how to fix it.
Nicolas

I do prefer to post the code structure so you understand better what i am trying to acheive.
i use the comment in the script to explain and illustrate the problem i encounter.

[Ibutton, zplugin:myplugin:myfunction, “the tooltip”,
//some code
[Ifreeze,
//some code
// i get the texture and import it
[FileNameSetNext,“mytexture.psd”][IPress,Texture:Import]
// create a new texture
[IPress,Tool:Texture Map:New Txtr]

]//end freeze [IPress,Tool:Texture Map:TextureMap] [Note, "Select a texture from the picker"] /* At this moment i want to enter in sleep mode, until i click to select the right texture in the quick texture picker * currently, out from the [ifreeze], the [note, "blabla"] keep the quick texture panel opens when i move the mouve cursor in direction of the panel * with the first mouse click, it removes the note from the UI, and i can reach the panel without it to disappear, but * At the same time it triggers the execution of the next lines of codes in the button code and the script finish before I the texture is selected */ [IPress:Tool:Polypaint:Polypaint From Texture]

,152,“icon_button01.psd”, 0
] //end Button def

I am sure i need to use the event handling using the [sleep] function, but it doesn’t work has expected :confused:

I don’t understand why you need the user to select the texture. If you know which texture is to be applied you can just do it in zscript.

For example, see here:
http://www.zbrushcentral.com/showthread.php?94752-Useful-small-ZScripts-and-Macros-for-ZBrush-4-amp-4R3&p=960631&viewfull=1#post960631

Hi Marcus

let me explain you why i do that.
i am rendering a bpr render of the canvas, then depending of the document size, it will create plane3D like quicksketch, but it will apply the texture onto the plane3d and than convert it into polypaint data.

I want my texture file to be a unique name, which mean than when i import again the file into ZB and the texture palette, all previous file imported still has the exact same name, but got a new ItemID.
i would like to not have to make a function that generate to much temp texture, as i would have to create some function to clean up the plugin data directory.
As you surely now, there is no way to flush the texture from the palette, the only way it to restart ZB, which is not an option for me at all.

how can i get the number of texture id loaded into the texture palette ? so i select automatically the last one loaded without to struggle with the quick picker.

I might have understood how to work with the sleep function, just what i can say is that the sleep has never startup, has i never suggest it to do it .

Did you look at the script I linked to?

Yes thank a lot Marcus, it make more sense today reading the script than it was yesterday :slight_smile:

I felt on psd interop, and syncrotrotexture /MFST, i must to say that when i first attempted to make that bpr render to quicksketch i was really surprised to think that no one has thought about this possibilities before me.
i was wrong as i was convinced myself that i had reviewed must of all the zbrush plugin available on the web, but finally that’s wrong as i discover some more plugins every week that i don’t know about.
more i experiment things , and more I found some really interesting application to paint tiled texture, generate bump and normal map, the connexion with photoshop wasn’t something i wanted to create, but anyway a clean render with all pass within a layered psd file, was the next stage of my development.
Create some custom brushes that help to use painted and project textures like it does in synchrotrontexturing, was also a concept/idea i wanted to dig, the replay last stroke is perfect to apply several pass on the same stroke, so you apply the bump and then the diffuse. welle there is no limit for imagination :slight_smile:
Anyway now, I am not sure what i want to do because of all this new information. should i redo some tool that already exists, motivation drops down a bit ^^!