ScriptSpot

Forum topic · General Scripting

Why my button doesn't work?

By ratatouille · 2020-03-08

Description

I'm a noob in maxscript. I know I need lot tutorials to watch to start, but now i need this thing to work. please help!!
when I evaluate all then it shows the result in lstener, but it doesnot work under the button.
Thank You.


rollout rollout1 "Untitled" width:162 height:300
(
button 'btn11' "Button" pos:[38,100] width:88 height:53 align:#left
on btn11 pressed do
viewport.GetFOV
)

Floater10 = newrolloutfloater "10" 200 200

addRollout 'rollout1' Floater10

Comments (2)

.

ratatouille · 2024-01-22

This is also works,


rollout rollout1 "Untitled" width:162 height:300
(
button 'btn11' "Button" pos:[38,100] width:88 height:53 align:#left
on btn11 pressed do
(
a = viewport.GetFOV()
print a
)
)
Floater10 = newrolloutfloater "10" 200 200
addRollout 'rollout1' Floater10

.

miauu · 2020-03-17


(
	rollout rollout1 "Untitled" width:162 height:300
(
	button 'btn11' "Button" pos:[38,100] width:88 height:53 align:#left
	on btn11 pressed do
	(
		vptFOV = viewport.GetFOV()
		format "vptFOV: % \n" vptFOV
	)
)
 
 
 
Floater10 = newrolloutfloater "10" 200 200
 
addRollout 'rollout1' Floater10
)