ScriptSpot

Forum topic · General Scripting

get properties to display in a UI??

By jdigital · 2008-12-07

Description

I've been trying to figure this out and can't find this information anywhere in the help to point me in the right direction.

Basically I want to be able to create a Floating Dialog that could read the selected object properties.

So example, lets say i have a box. I want to read the "Height" value and display it in this floating UI.

I can certaily easily selection objects and chagne their values in mass but getting their current settings to be input into a dialog box seems hard to find the right info.

The main idea is to have a script that I could run when I select a bunch of objects and it would build a floating dialog box with spinners for each objects values. Of course I'd control which properties of the objects I'd want to read.

I hope this makes sense to someone.

Thanks

Comments (1)

dimwalker · 2008-12-20

For one box it can look somehow like this:

mybox = box()
mybox.name = "TestBox"
select mybox
curr_h = mybox.height

rollout boxh "box height"
(
spinner box_h "Height :" range:[0,1000,curr_h] type:#integer
on box_h changed val do $.height = val
)
CreateDialog boxh