hello
I'm looking for a script to activate object selected layer.
I mean : I have loads of layers, I want to create an object in the same layer that the selected object , clic a button and voilà, the good layer is active !
Thanks
Forum topic · General Scripting
activate object selected layer
By titane357 · 2009-10-01
Comments (4)
Comment policy
thank you from me aswell :)
it will help me alot.!
Thank you very much Christopher !
One line code which will save me a lot of time !!!
Here you go. You can either run the code below directly or you can install the macroscript I've attached. You will find it in the "CG_Tools" category named "Current Layer From Selection".
It's a really simple script actually - it just checks the layer property of the currently selected object (if there is a selection) and sets the property "current" to True.
Attachments
pleazzz