Notifications
Clear all

[Closed] Inserting the "lock" button

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

5 Replies

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!

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!

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.

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?

 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