Try (destroydialog uvwmaps) catch ()
Rolout uvwmaps "uvw" width: 252 Height: 16
(
Spinner spnuvw "" POS: [] width: 57 Height: 16 range: [, 0]
Button btn500 "500" POS: [] width: 25 Height: 16
Button closed "box" POS: [0, 0] width: 23 Height: 16 Border: false
Button btn1000 "1000" POS: [] width: 30 Height: 16
Button btn1200 "1200" POS: [] width: 30 Height: 16
Button btn1500 "1500" POS: [] width: 30 Height: 16
Button btn800 "800" POS: [] width: 25 Height: 16
Button btn2000 "2000" POS: [222,0] width: 30 Height: 16
On spnuvw changed Val do
(
If selection. Count> 0 then (
Max modify Mode
If (For I in selection [1]. modifiers where classof I = uvwmap collect I). Count = 0 then
Modpanel. addmodtoselection (uvwmap maptype: 4)
Selection [1]. uvw_mapping.realworldmapsize = off
Selection [1]. uvw_mapping.length = spnuvw. Value
Selection [1]. uvw_mapping.width = spnuvw. Value
Selection [1]. uvw_mapping.height = spnuvw. Value
)
)
On btn500 pressed do
(
If selection. Count> 0 then (
Max modify Mode
If (For I in selection [1]. modifiers where classof I = uvwmap collect I). Count = 0 then
Modpanel. addmodtoselection (uvwmap maptype: 4)
Selection [1]. uvw_mapping.realworldmapsize = off
Selection [1]. uvw_mapping.length = 500
Selection [1]. uvw_mapping.width = 500
Selection [1]. uvw_mapping.height = 500
)
)
On closed rightclick do
(
Try (destroydialog materialtools) catch ()
)
On btn1000 pressed do
(
If selection. Count> 0 then (
Max modify Mode
If (For I in selection [1]. modifiers where classof I = uvwmap collect I). Count = 0 then
Modpanel. addmodtoselection (uvwmap maptype: 4)
Selection [1]. uvw_mapping.realworldmapsize = off
Selection [1]. uvw_mapping.length = 1000
Selection [1]. uvw_mapping.width = 1000
Selection [1]. uvw_mapping.height = 1000
)
)
On btn1200 pressed do
(
If selection. Count> 0 then (
Max modify Mode
If (For I in selection [1]. modifiers where classof I = uvwmap collect I). Count = 0 then
Modpanel. addmodtoselection (uvwmap maptype: 4)
Selection [1]. uvw_mapping.realworldmapsize = off
Selection [1]. uvw_mapping.length = 1200
Selection [1]. uvw_mapping.width = 1200
Selection [1]. uvw_mapping.height = 1200
)
)
On btn1500 pressed do
(
If selection. Count> 0 then (
Max modify Mode
If (For I in selection [1]. modifiers where classof I = uvwmap collect I). Count = 0 then
Modpanel. addmodtoselection (uvwmap maptype: 4)
Selection [1]. uvw_mapping.realworldmapsize = off
Selection [1]. uvw_mapping.length = 1500
Selection [1]. uvw_mapping.width = 1500
Selection [1]. uvw_mapping.height = 1500
)
)
On btn800 pressed do
(
If selection. Count> 0 then (
Max modify Mode
If (For I in selection [1]. modifiers where classof I = uvwmap collect I). Count = 0 then
Modpanel. addmodtoselection (uvwmap maptype: 4)
Selection [1]. uvw_mapping.realworldmapsize = off
Selection [1]. uvw_mapping.length = 800
Selection [1]. uvw_mapping.width = 800
Selection [1]. uvw_mapping.height = 800
)
)
On btn2000 pressed do
(
If selection. Count> 0 then (
Max modify Mode
If (For I in selection [1]. modifiers where classof I = uvwmap collect I). Count = 0 then
Modpanel. addmodtoselection (uvwmap maptype: 4)
Selection [1]. uvw_mapping.realworldmapsize = off
Selection [1]. uvw_mapping.length = 2000
Selection [1]. uvw_mapping.width = 2000
Selection [1]. uvw_mapping.height = 2000
)
)
)
Createdialog uvwmaps POS :( mouse. screenpos-Mouse. Pos)