ZBrushCentral

Plugin: PowerOf2

cool

At last

Maybe a link button between width & heigth in futur version coud be nice and offer more possibilities

Thank you Master Z:D

Very practical. Thanks.

Thanks Aurick.

:+1:

Thankyou Aurick,

Another great utility, Aurick by any chance are you a super computer
locked away in some waterside factory turning out these plugins for
some evil software developer.

PS give me the nod I,ll spring ya.

Cheers MrMoe.

Nope. Not a super computer. In fact, I’m an indifferent programmer at best. But that’s what’s great about ZScripts – you don’t need to be a whiz kid to be able to make use of the scripting language. Anyone could turn out a utility like this one with a minimum of learning or effort.

Thanks Aurick!! :smiley: :smiley: :smiley: :smiley: :+1:

sorry to revive an old thread, but can you post the source code, im trying to learn how to do plugins where you can add butons to a pallete

there are some recent posts on this plus a gazillion posts that give great tips on creating plugins…read anything by tveyes, svengali, marcus_civus, and any old ones by Davy or pixolator…chock full of how to’s and info.

don’t forget to check out the thread with the link to all the commands which has examples of use as well…it’s a sticky thread I believe.

good luck.

well thanks for the tips on zscripts, i managed to find zscripts 101 which is very helpful.

also i dled the plugin and it works very well.

I’m happy to supply the source code for this one. It’s really simple, actually, and shows just how easy it is to place buttons within the interface. Combined with the Commands List from www.ZBrush.com you’ll be able to quickly make sense of what’s going on.

Active ZScript: \Cffa000PowerOf2\Ce0e0e0 revA

[IConfig,2]
[ISubPalette,“Texture:PowerOf2”,1]
[IButton,“Texture:PowerOf2:128”,“Creates a blank 128x128 texture.”,
[IShowActions,0]
[ISet,Texture:Width,128]
[ISet,Texture:Height,128]
[IPress,Texture:New],0,.33,.13
]
[IButton,“Texture:PowerOf2:256”,“Creates a blank 256x256 texture.”,
[IShowActions,0]
[ISet,Texture:Width,256]
[ISet,Texture:Height,256]
[IPress,Texture:New],0,.34,.13
]
[IButton,“Texture:PowerOf2:512”,“Creates a blank 512x512 texture.”,
[IShowActions,0]
[ISet,Texture:Width,512]
[ISet,Texture:Height,512]
[IPress,Texture:New],0,.33,.13
]
[IButton,“Texture:PowerOf2:1024”,“Creates a blank 1024x1024 texture.”,
[IShowActions,0]
[ISet,Texture:Width,1024]
[ISet,Texture:Height,1024]
[IPress,Texture:New],0,.33,.13
]
[IButton,“Texture:PowerOf2:2048”,“Creates a blank 2048x2048 texture.”,
[IShowActions,0]
[ISet,Texture:Width,2048]
[ISet,Texture:Height,2048]
[IPress,Texture:New],0,.34,.13
]
[IButton,“Texture:PowerOf2:4096”,“Creates a blank 4096x4096 texture.”,
[IShowActions,0]
[ISet,Texture:Width,4096]
[ISet,Texture:Height,4096]
[IPress,Texture:New],0,.33,.13
]

Well, you learn something every day. I didn’t know you could use proportional width/height for buttons. Thanks. :slight_smile:

i learned some thing new too, {Ishowactions,0] . perfect for a big plugin im making that will eventually lead to some huge things in zbrush (or atleast within this plugin)

just one question, what is this line doing?

Active ZScript: \Cffa000PowerOf2\Ce0e0e0 revA

edit- also, why did you put [iconfig,2]. isnt it that by default?

Aurick/Marcus_civis:

Proportional buttons? Proportional to what? the width of the ZPlugin palette? Hmm - Useful, I’m guessing, to guarantee button order and placement when adding buttons to existing subpalettes, or your own, new subpalettes.

dark knightmare:

\Cffaa00 is just a “color switch” you use to change text color. Be sure the C is capitalized and you provide hexidecimal pairs for R,G and B.

Obviously the IConfig command lets you designate which release of ZBrush your ZScript was designed for. Early versions of certain ZScript commands have had parameters added in successive releases of ZBrush… of course each new release requires that new commands be added.

When ZBrush 2.5 comes out IConfig will let it know - when running Aurick’s PowerOf2 and any other recent plugin - that commands from version 2.0 had been used.

Going by past releases, we will likely have a number of new ZScript commands that take advantage of the new capabilities in ZBrush version 2.5.

Including an IConfig command is just good practice.

Sven

Sven,
Yes, proportional to the subpalette. At least, in my quick test, a width of .99 came out full width. Presumably there’s a default subpalette height too, of which .13 gives the standard button height, though I’ve not experimented. Perhaps Aurick will shed some more light?

Hello, And thank you

I just new to Zbrush very much so am rom around to this Center and found a lot of good plugin .

I might come in handly .

Thank you

Relocating the PowerOf2 buttons to the TOOL Palette…

Most every time I want to generate a new texture I pull up PowerOf2 from the Texture Palette and choose a size. However, most every time I do this, the Tool Palette is already open. So I said to myself, “Self, why not bump thePowerO2 buttons to load within the Tool Palette?” To which I answered “Why not?”

Here’s what I changed in the script(Original lines in Blue, new lines in Yellow):

[ISubPalette,“Texture:PowerOf2”,1]
[ISubPalette,TOOl:PowerOf2,0,0,6,0,0]
// the extra values create a subheading which is initially closed - saving a line or three in the TOOL interface

[IButton,“Texture:PowerOf2:128”,“Creates a blank 128x128 texture.”,
[IButton,“TOOL:PowerOf2:128”,“Creates a blank 128x128 texture.”,

[IButton,“Texture:PowerOf2:256”,“Creates a blank 256x256 texture.”,
[IButton,“TOOL:PowerOf2:256”,“Creates a blank 256x256 texture.”,

[IButton,“Texture:PowerOf2:512”,“Creates a blank 512x512 texture.”,
[IButton,“TOOL:PowerOf2:512”,“Creates a blank 512x512 texture.”,

[IButton,“Texture:PowerOf2:1024”,“Creates a blank 1024x1024 texture.”,
[IButton,“TOOL:PowerOf2:1024”,“Creates a blank 1024x1024 texture.”,

[IButton,“Texture:PowerOf2:2048”,“Creates a blank 2048x2048 texture.”,
[IButton,“TOOL:PowerOf2:2048”,“Creates a blank 2048x2048 texture.”,

[IButton,“Texture:PowerOf2:4096”,“Creates a blank 4096x4096 texture.”,
[IButton,“TOOL:PowerOf2:4096”,“Creates a blank 4096x4096 texture.”,

Finally, you need to save the modified file as PowerOf2.txt in the ZPlugs directory. With ZBrush running, use the ZScript>Load command to run the PowerOf2.txt file. This will generate a new version of the PowerOf2.zsc plugin and when you restart ZBrush you’ll find the PowerOf2 buttons in the Tool Palette.

Thank you to Matthew for sharing your original ZScript…

Sven

Sven,
A useful enhancement, thank you. Incidentally, installing the text file in the ZPlugs folder and restarting ZBrush is enough. ZBrush always updates the zsc if there is a txt file present of the same name (in the ZPlugs folder).

Cheers,

Well ! I can’t say anything more than a ThankYou !!! THANK YOU VERY^infinity MUCH_:slight_smile: :lol: :slight_smile:

Great Plug!