global setopacity
rollout setopacity "Прозрачность" width:150 height:130
(
local sp1
	spinner spn1 "Opacity:" pos:[10,70] width:130 height:16 type:#integer range:[0,100,50]
	pickbutton line1 "Select" pos:[10,10] width:130 height:20
	button btn9 "OK" pos:[100,100] width:40 height:20
	on line1 picked obj do 
	(
	sp1 = obj
	line1.text = obj.name
	text=obj.name
	)
	on btn9 pressed do 
	(
	  if (findString line1.text "object") != undefined then(
        sp1.material.opacity=spn1.value
        update sp1
	  ) 
      if (findString line1.text "tube") != undefined then(
        sp1.material.opacity=spn1.value
        completeRedraw() 
	  ) 
      if (findString line1.text "phere") != undefined then(
        sp1.material.opacity=spn1.value
        completeRedraw() 
	  ) 	  
      line1.text="Select"
	)
)
CreateDialog setopacity width:150 height:130
