PDA

View Full Version : Automate 'Active State' for items in Scene Editor?..



MrFurious
08-25-2014, 10:13 PM
Is this possible? To automate in any way via keyframing, render flags, nodes, plugins etc. Not to be confused with 'object dissolve' or 'unseen' flags. I mean totally make it inactive in the Scene Editor (I do have a good reason for wanting to do it this way)

Cheers,
Dino.

Dodgy
08-25-2014, 10:53 PM
ItemActive() in lscript toggles the selected item's active state, with ItemActive(1) turning it on, and ItemActive(0) turning it off. You can open Lscript Commander to see what commands are executed when something is changed in LW.

MrFurious
08-25-2014, 11:33 PM
Thanks Dodgy, I now have some external control over the active state of items in the scene editor but essentially I'm now clicking on an lscript button (or hotkey) where before I was clicking in the scene editor. This is definitely a step in the right direction though. Really what I need is to automate this somehow, so when a specific camera is selected, assigned objects will become inactive. The way I do this now is to setup nodes to control object dissolve. For example if Cam 1 is selected, hide item 2. I use the Camera info node linked to a logic node. Works brilliantly for object dissolve but If I can get this level of automation to make items inactive that would be awesome. Possible there's a node to execute an lscript?

ernpchan
08-25-2014, 11:45 PM
I don't know of a nodal way. But if your scene is setup with a specific naming convention then you could make a script that crawls through your scene and does what you want based on matching names.

MrFurious
08-25-2014, 11:50 PM
Thanks Ernpchan I need a more realtime solution. I often setup scenes with multiple cameras and set rules for certain objects/lights based on which camera I'm using, so I can switch through my cameras and have all items' visibility update on the fly. Switch to camera A and certain lights/items are out of the scene. It all happens realtime (or with a quick frameshift left/right).

ernpchan
08-26-2014, 08:04 AM
I'd have to check but there might be python nodes now. If there are, I'm not even sure if they're fully functional yet. If they are, then I suppose a python script could be a possibility.

jeric_synergy
08-26-2014, 04:41 PM
How about you go at it from the other end?: Make a CAMERA SELECTOR script that you always use to select/switch cameras. This script also controls active/inactive status.

Selling point: then you could have it both ways: if you use your script, active/inactive state selected. If you use the UI directly, nuthin' happens.

Sensei
08-27-2014, 01:32 AM
Yes, I am using it in mine tools.
Read description of videos!
https://www.youtube.com/watch?v=EQYelIvPtio
https://www.youtube.com/watch?v=tRgfbGryUYo



Thanks Dodgy, I now have some external control over the active state of items in the scene editor but essentially I'm now clicking on an lscript button (or hotkey) where before I was clicking in the scene editor. This is definitely a step in the right direction though. Really what I need is to automate this somehow, so when a specific camera is selected, assigned objects will become inactive. The way I do this now is to setup nodes to control object dissolve. For example if Cam 1 is selected, hide item 2. I use the Camera info node linked to a logic node. Works brilliantly for object dissolve but If I can get this level of automation to make items inactive that would be awesome. Possible there's a node to execute an lscript?


That would require making custom camera switcher with such option..

MrFurious
08-27-2014, 03:55 AM
Jeric Interesting way of approaching this.. no idea how to make a camera script though, and would it be flexible enough I could add/remove/rename items, lights and not always be having to rescript?

RebelHill
08-27-2014, 04:08 AM
Its certainly makable... Basic approach, make it store a set of arrays, each containing a list of items, with each array "bound" to a single camera item, then a dropdown selector for cameras, which, picking a camera from, switches to that camera selection, whilst showing all items in the associated array, and hiding others.

MrFurious
08-27-2014, 10:05 AM
Sounds great but outside my area of expertise, made my first script/macro only a couple days ago (thanks ryan & ernpchan) I'm gonna take a look at Sensei's plugins and also play around with LW's scene editor selection sets and filters.

jeric_synergy
08-28-2014, 01:41 AM
MrFurious, just throwing it out as possible approach. Making a script/plugin that has to monitor the state of the app is one thing: having a script/plugin that seizes control is probably simpler.