View Full Version : Selecting item shapes and switching them on/off

05-26-2012, 03:38 AM
Hi everyone,

I'm a scripting newbie and I'm stuck with a simple script that I want to make.

Basically, I want the script to select all objects in the scene, then check if they have an Item Shape ( Custom Object ) applied to them and be able to switch them off/on.

I've read that it's possible to add/remove an Item Shape in Lscript, but I haven't found how you can just switch them on or off, without removing them.

Anyone have any ideas?


06-08-2012, 12:02 PM
I'm pretty new to LScript as well, but from programming in other languages, it seems like turning the Item Shape on or off, or removing or adding it to your objects is the wrong approach.

Since the Item Shape object already has a propety for both Standard and None, switching to one of those via LScript will have the same effect as turning it off or removing it-- no shapes visible.

Turning it back on sounds a bit harder. To restore the original shape type(ring, box and etc) and size after saving the scene or restarting LW, your script will probably have to involve writing this info to a file on the hard drive.

Hope this helps. Hopefully some of the LScript experts will chime in.