ScriptSpot

Forum topic · General Scripting

pickbutton help

By dellor · 2014-11-18

Description

i wrote this test script to test different maxscript commands.
1-i want the "copy" button to be gray until i pick an object.
2-"theobject" will be clear from the memory at the start or end.
3-how can i use "theobject" variable to make action such as
copy or move?

rollout rlt_test "test"
(

pickbutton btnPick "Pick"
button btncopy "copy" enabled:false

on btnPick picked theObject do
(
btnPick.object = theObject
btnPick.caption = theObject.name + "-selected"
)

if theObject != undefined then
(
btnPick enabled:false
)
else
(
btnPick enabled:true
)
)

createDialog rlt_test 150 70

thanx

Comments (2)

dellor · 2014-11-23

Great:)

rollout rlt_test

fajar · 2014-11-19


rollout rlt_test "test"
(

pickbutton btnPick "Pick"
button btncopy "copy" enabled:false

on btnPick picked theObject do
(
	
btnPick.object = theObject

	if (isvalidNode theObject and theObject != undefined) then
	(
			btnPick.enabled=false
			btnPick.tooltip = theObject.name + "-selected"
			btncopy.enabled=true
	)
	else
	(
		btncopy.enabled=true
	)
)


)

createDialog rlt_test 150 70