## UI Toggle for enabling user parameters

Requests or suggestions for new features
bknight-i3drobotics
Posts: 4
Joined: 12 Dec 2019, 17:06

### UI Toggle for enabling user parameters

Hi,

Currently to enable/disable the user parameter tool for an object is done using the following function in the Lua command console:

Code: Select all

sim.setUserParameter(objectHandle,'@enable','')
The feature request is to have this ability with a tick box in the object properties dialogue. Or some other UI way of setting this property.

fferri
Posts: 456
Joined: 09 Sep 2013, 19:28

### Re: UI Toggle for enabling user parameters

shouldn't the parameter be set from the embedded child script? e.g.:

Code: Select all

function sysCall_init()
sim.setUserParameter(sim.handle_self,'@enable','')
end
although this has the drawback that the icon will appear only after running the scene the first time, but for me works quite well.

Otherwise, if you want to see the icon right away, you can use a customization script to set that param, e.g. similarily during initialization.

But if a UI element must be added, I'd say it should be a menu item, similar to Add -> Child Script, e.g. Edit -> Script parameters... that would show the parameters window also when empty, whereas if some parameter is set the icon is normally visible.