View Full Version : extracting info from the swatches


Mikademius
04 April 2006, 11:53 AM
Hi there. I wonder if anyone knows a way to rip the images of shaders from the swatches file and use it in a UI later. Say The user adds a checker to a lambert. I want that lambert to show up in my UI like it does in the hypershade in my custom UI... Any takers? ANd are these images possible to scale?

Mikademius
04 April 2006, 02:37 PM
Aha! How could I miss the control "swatchDisplayPort"... ?
Now all I have to do is to figure out how to skale the image and still beeing able to see the whole shader... Now it cuts the image.

goleafsgo
04 April 2006, 03:17 PM
Are you setting the -widthHeight and the -renderSize flags on your swatchDisplayPort? Try setting the -renderSize to 1 less than the -widthHeight and see if that solves the display problem.

Mikademius
04 April 2006, 03:30 PM
Yes, figured out that renderSize was the key to success here, but the rendersize is clamped from 32-512. So I figured I just have to customize my UI to match 32. No biggie really :)

CGTalk Moderation
04 April 2006, 03:30 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.


1