PDA

View Full Version : Inserting the "lock" button


Monopoli
03-15-2007, 04:05 PM
Hi!

I'd like to insert into a material rollout the little "lock" button, that one with the lock drawed on it.

Do you know how to do this?

Bye!
Alex

Jsnyder
03-15-2007, 04:13 PM
What excatly are you trying to do?
Like you have a max script and you want to use the Lock icon in the script? You just have to find the lock ID then to use it? You could use SnapControls, 1
Sorry just a little confused by your post!

Monopoli
03-15-2007, 04:52 PM
I want to use the button like the one you can find near the "Ambient" and "Diffuse" in the standard material :)
Is there a way to use it?

Bye!

Jsnyder
03-15-2007, 04:54 PM
Well yeah there's a way for sure, btu what do you want to use it for? Like for the Icon of your script? that's very simple, but first we need to know where your want to use it.

Monopoli
03-15-2007, 06:51 PM
I'd like to insert the button with the lock in a custom material I'm making :)
Is there a way to insert it into a custom material?

shibumenon
03-16-2007, 11:07 AM
rollout testRollout "Material Lock" width:156 height:79

(
local imagePath = (getDir #ui) + "\\icons\\"

colorPicker cp_diff "Diffuse :" pos:[9,20] width:100 height:19 --fieldWidth:100
colorPicker cp_amb "Ambient :" pos:[9,45] width:100 height:19 --fieldWidth:50
checkButton ckb_lock "" pos:[120,31] width:24 height:24 images:#(imagePath + "MeditImages_i.bmp", undefined, 37, 37, 37, 37, 37)
--checkButton ckb_lock "" pos:[120,31] width:24 height:24 images:#(imagePath + "MeditImages_i.bmp", imagePath + "MeditImages_a.bmp", 37, 37, 37, 37, 37)

on cp_diff changed col do
(
if ckb_lock.state then cp_amb.color = col
)


on cp_amb changed col do
(
if ckb_lock.state then cp_diff.color = col
)



)

createdialog testRollout




also search for image buttons in the maxscript reference to get an explanation

CGTalk Moderation
03-16-2007, 11:07 AM
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.