sidebar features
sidebar content

Go Back   Blender Artists Forums > General Forums > Python & Plugins

Reply
 
Thread Tools
FourMadMen FourMadMen is offline
Member
 
Join Date: Jan 2004
Posts: 506
*** Update ***

FourMadMen Layer Manager script Version 1.3.1 Build 2 (Selection by Material patch) is now available.

For more details or to get this script please visit the Layer Manager script home page.

New in Version 1.3.1
  • Selection of objects in layer by Material
  • Quick rendering of layer groups (does not have to be the active group). Any layer group name that starts with "Render" will be added to the main menu. Great for rendering internal scenes (with walls and floors) without cluttering the 3D view during modeling. Go here for details.
  • Added cache mechanism for more efficient handling of objects by layer
  • It would appear that there are custom Blender builds that use Python versions earlier than 2.5. So for maximum compatibility (going back as far as Blender 2.43 the Python 2.5 ternary syntax has been replaced with a normal if/else block.
*** Original Post ***

FourMadMen Layer Manager script Version 1.3 is now available.

First let me say Thanks! to all the testers. Some of the last minute improvements came from talking to them. And special mention goes out to Meta-Androcto for getting me back to finishing this re-write.

To get this script please visit the Layer Manager script download page.

Read on for more info...

What's new in Version 1.3
  • Complete code re-write.
  • Now runs from the "System" scripts menu (Don't forget to delete the old version)
  • Settings now stored within the .blend file
  • Multiple user interface layout options. Vertical (Fig 1). Horizontal (Fig 2,). Classic (Fig 3,).
  • Auto reisize of interface to fit display window. Animated Gif (Fig 4), Video 2,432KB Xvid (Fig 5)
  • Layer locking now fully functional
  • Can be run as a popup in 3D View (Fig 6). Video 2,432KB Xvid (Fig 7)
  • Selection of objects in layer by object type (Fig 8)
  • Selected object information (Fig 9)
  • Simplified user interface
  • Expanded keyboard shortcuts
  • Expanded tooltip information
  • Embedded spacehandler code

Features
  • Layer Names
  • Layer Groups
  • Layer locking
  • Moving objects
  • Selecting objects in layer by object type
  • Object Info
  • Hide/Reveal Layers
  • Autoload/autoconvert old layer file settings
  • Import/Export settings using new file format
  • And more... (full documentation pages coming soon)
Keyboard Shortcuts
  • Q: Exit
  • +: Add new layer group (and make active)
  • X: Delete active layer group
  • H: Hide selected layers
  • R: Reveal hidden layers
  • M: Move selected objects to selected layers
  • Shift+M: Merge selected layers
  • F: Flatten selected layers
  • O: Object info popup (very crude right now, will make better and am open to suggestions)
  • V: Invert visible layer selection
  • S: Invert selected layers selection
  • `: View All Layers
  • A: Select/Deselect All Layers
  • 0-9, Shift 0-9: Toggle Layer Visibility
Button Modifier shortcuts
  • <Layer Visible Button> Click to toggle, CTRL+Click to view only that layer
  • <Layer Selected Button> Click to toggle, CTRL+Click to select only that layer, SHIFT+Click to Lock/Unlock
  • <Layer Name> Click to change name
  • <Layer Info> Click to select objects in layer by type, SHIFT+Click to select object in layer not of type, CTRL+Click to select ONLY objects in layer
Notes
  • If you run the script from a Script window and only need 99% functionality of Layer Locking (see last note) then you won't need the space handlers at all
  • Spacehandlers are loaded via "Menu > Load Spacehandlers"
  • When run as a popup the sciprt MUST NOT be running in a script window
  • The EVENT Handler is required for use as a popup in the 3D view
  • The DRAW Handler is required for full Layer Locking
  • The one limitation of layer locking when not using the DRAW handler is that you will have to refresh the lock if you add an object to a locked layer

Last edited by FourMadMen; 01-Jan-10 at 03:22.
#1   Old 13-Sep-08, 17:33   
Reply With Quote


Meta-Androcto's Avatar
Meta-Androcto Meta-Androcto is offline
Member
 
Join Date: Aug 2006
Location: australia
Posts: 2,356
Thank You FourMadMen.

This script is a fine example of Python scripting in Blender.
Congratulations!

The feature set is Brilliant.
Layer Names!
No more: "now where did I put that?"
Locking Layers = Gold
No more selecting lights or ground planes by accident.
Just Lock their layer, the objects are still visible but unmovable!
Object selection tools.
A fine set of tools for organizing, analyzing, selecting & viewing your scene content....
so many great practical features.

I cannot speak highly enough of this script.

As far as I'm concerned it is one of the Must Have scripts!

Thanks again FourMadMen.
It has been a pleasure testing for you.

I will do the Wiki Updates tonight.

meta_androcto
#2   Old 14-Sep-08, 01:18   
Reply With Quote
FourMadMen FourMadMen is offline
Member
 
Join Date: Jan 2004
Posts: 506
Thank you, sir! I'm glad you find the script useful. And layer locking is something I've wanted myself for ages. And speaking of locking...

I do however post here tonight a little embarrassed. I got a report of an issue with locking. Nothing major but needed to be dealt with. So I have updated the download. I'm keeping the same version number (breaking a rule of mine but there you go).

To get the update just download the script again and re-load (and activate) the space handlers. My apologies for the inconvenience.

Anyone who has already download the script prior to this post, please do so again. You can confirm you have the updated script by going to "Menu -> About" to confirm you see "Version 1.3 Build 2". Like so:

#3   Old 14-Sep-08, 02:37   
Reply With Quote
FourMadMen FourMadMen is offline
Member
 
Join Date: Jan 2004
Posts: 506
100 downloads so far. And half of those in the past 24 hours. I hope people find the new features and simplified usage as handy as I do. If not, don't hesitate to speak up.

FYI: I have an animation project coming up and am investigating some interface ideas for creating animated layers (i.e. layers turning on and off as the frame changes). I'm good on the back-end work just need to come up with something easy to manage for the front-end.
#4   Old 18-Sep-08, 01:54   
Reply With Quote
paulhart2's Avatar
paulhart2 paulhart2 is offline
Member
 
Join Date: Feb 2008
Location: San Diego
Posts: 169
Just got to say Thank You! very much for the fine work. I have loaded the 1.3 version and can't imagine working without it. It should be part of the main trunk! It is appreciated, even if their hasn't been a flood of appreciation yet....
Paul
............................................
An eye for an eye, and the whole world goes blind... Gandhi/MLKing
Greater consciousness is worth the effort. Be aware....
so sayest the Animated Fool. HARTWORKS http://www.hartworks.net
#5   Old 18-Sep-08, 05:13   
Reply With Quote
3pointEdit 3pointEdit is offline
Member
 
Join Date: Oct 2005
Posts: 1,338
Do I have to run the script with any .blend made with it in a previous session? In other words will the script break the .blend?
And can I have Blender auto execute a script so that it allways runs at startup, it just seems so cool, I wouldn't want to forget to run it.

How long before this gets to be C?
............................................
Cheers,
David

ABC TV Australia
#6   Old 18-Sep-08, 08:24   
Reply With Quote
studioa studioa is offline
Member
 
Join Date: Nov 2005
Location: Columbus, OH
Posts: 208
FourMadMen - great work! we owe you!
one suggestion: can this feature be implemented?
layer to be locked but be snap-able at the same time.
this is good feature when importing a .dxf layout from CAD and then build on top of that.
that way you can put the CAD into one layer, lock it but make it snap-able, so I can use the layout, but I can't alter it by mistake.
very nice work! - for sure this must be in Blender by default, without calling a script.
best _a_
#7   Old 18-Sep-08, 18:49   
Reply With Quote
Duhast's Avatar
Duhast Duhast is offline
Member
 
Join Date: Feb 2005
Location: Santiago, Chile
Posts: 363
Impressive work. Thank you very much.
............................................
My Head Modeling Tutorial ---> HERE
My Ear Modeling Tutorial ---> HERE
#8   Old 18-Sep-08, 19:57   
Reply With Quote
FourMadMen FourMadMen is offline
Member
 
Join Date: Jan 2004
Posts: 506
Quote:
Originally Posted by paulhart2 View Post
Just got to say Thank You! very much for the fine work. I have loaded the 1.3 version and can't imagine working without it. It should be part of the main trunk! It is appreciated, even if their hasn't been a flood of appreciation yet....
Paul
Thanks. Over the lifetime of the different versions there have been many hundreds of downloads, but I guess I don't expect any floods. It is nice to know that there are a few people out there using it.


Quote:
Originally Posted by David Mcsween View Post
Do I have to run the script with any .blend made with it in a previous session? In other words will the script break the .blend?
And can I have Blender auto execute a script so that it allways runs at startup, it just seems so cool, I wouldn't want to forget to run it.

How long before this gets to be C?
Yeah, I'd like to see this built into Blender too. Maybe one day.

No, the script won't break it. If you have an old layer file from previous versions it will auto-load and auto-convert the old settings file and store them in the blend. After that you can safely delete the old layers settings file as it is no longer needed. You can also manually import any old layer settings file using this new version.

Once you setup your workspace with the script running just go to "File > Save Default Settings" to have it running when you run a new Blender instance.

Something else to try out...

Make a few changes to the layer setup (names, visible, hidden, reveal, whatever). Then mouse over a non-script window and press Ctrl+Z (undo) a few times. And Ctrl+Y (redo) for that matter too. Neat huh? It's something I wanted the script to be able to do. Turns out that Blender handles all that automatically. Massive Kudos to the Blender Devs on that one.

Quote:
Originally Posted by studioa View Post
FourMadMen - great work! we owe you!
one suggestion: can this feature be implemented?
layer to be locked but be snap-able at the same time.
this is good feature when importing a .dxf layout from CAD and then build on top of that.
that way you can put the CAD into one layer, lock it but make it snap-able, so I can use the layout, but I can't alter it by mistake.
very nice work! - for sure this must be in Blender by default, without calling a script.
best _a_
Thanks and your welcome. All I ask in return is that if you like the idea but don't end up using the script let me know why and perhaps it can be made better.

Please forgive my ignorance on your request, but I'm not sure what you mean by "snappable". Can you elaborate? I Goggled it in the context of layer locking and saw several pages that mentioned this, but no real definition on the term itself.

Quote:
Originally Posted by Duhast View Post
Impressive work. Thank you very much.
My pleasure. I had fun updating it. I don't get to program in my job anymore (instead I get to "manage" projects and go to meetings) so it was a nice change to code something again.
#9   Old 19-Sep-08, 03:54   
Reply With Quote
studioa studioa is offline
Member
 
Join Date: Nov 2005
Location: Columbus, OH
Posts: 208
1. Snap-able = will be the ability to "snap" to objects in that layer. for example I import a floor plan that I created in a CAD program (in my architectural company we use SolidEdge, then import that in Blender). Now once the floor plans and elevations, sections are in Blender, I want to build "on top" of them the real walls, slabs, etc. So it would be great if my floor plans/elevations/sections would be there, I can snap to every single entity, but I can't select it and move it, alter the entities that are residents of that layer.
So entities are there, I can snap to them but they are locked at the same time.
2. This somehow relates to one of your previous questions: what else can be done to animate layers? each layer (or group) could have these "meta-properties" applied to them that overwrites/or mix w/ other properties. Let's say you want to have a group/layer where all objects looks like ghosts. You prepare a "filter", than apply that to your layer/group. It is somehow similar to "render layers" tab, but allows for an easier layer manipulations.
3. Very useful tool "selection" inside of layers. That is really great. If you could extend that and offer other "filters" to select the objects inside of that layer, would be even better. Let's say I want to select by "material" (name of the material), or by other property of objects, or could be by name of the object, etc. This way you can narrow down your selection and make a very, very powerful tool.
In any case , even as IT IS right now your selection is VERY USEFUL!!!
GREAT WORK! THANKS! _a_
#10   Old 19-Sep-08, 13:31   
Reply With Quote
stanmarsh stanmarsh is offline
Member
 
Join Date: Jul 2008
Posts: 121
thanks for this great tool!!
#11   Old 19-Sep-08, 13:59   
Reply With Quote
studioa studioa is offline
Member
 
Join Date: Nov 2005
Location: Columbus, OH
Posts: 208
One other feature that could be a plus, would be to have the color changed of layers where "selected objects" reside. So for ex. I have selected three objects, each one belong to a different layer (1,5,8). Then the second tab to change to red (or other color) so it signals me that the objects selected belong to those layers. Once I deselect the objects, the color of those layers would move back to gray. That way the work flow of project is better. _a_



#12   Old 19-Sep-08, 19:22   
Reply With Quote
FourMadMen FourMadMen is offline
Member
 
Join Date: Jan 2004
Posts: 506
stanmarsh: You are very welcome sir.

studioa:

Snappable - Ah yes, I see now. Well if Blender allows for snapping to an object when it's not selected then I'd say it would work as is (but at present I doubt that it does).

Object selection - Selection by material was originally on the plate for object selections. However there is a problem with the "Tree Menu" control that stopped me from using it. There seems to be an issue with the top level menu not computing it's width (based on the text it contains) properly. Maybe I'll add it back in as an optional setting and if people can live with the menu issue (or it gets fixed) then great.

In fact I have a short list of things I found during this update that I believe to be bugs in Blender. I intend to report them as such but just have not made the time to write up the list.

Color changing of buttons based on selected objects - I don't think the button colors are changable at this level (for a theme yes but that applies to all buttons). But it is a good idea and I'll see what I can come up with when I add the Layer Visible "IPO"s. The line of layer controls will be changing a bit for this anyway so we'll see.

Your object "filter" idea is also something to think about. Most of the useable filters I can think about have to do with object material, loc and size settings. To do this properly would likely require an additional script where the filters can be created and named. Then link those to the layer (or just to an object for that matter). In this way you can have a proper separation of concerns between scripts while still have them "interact" with each other. I don't think this one will happen anytime soon especially not really knowing what people would find the most useful, but I'll keep a few brain cells on the lookout for ideas in this regard.

Last edited by FourMadMen; 20-Sep-08 at 01:39.
#13   Old 20-Sep-08, 01:35   
Reply With Quote
FourMadMen FourMadMen is offline
Member
 
Join Date: Jan 2004
Posts: 506
I'm in the process now of implementing an object "clipboard" class for the select objects by layer functions. Effectively it will require only one iteration of all objects in the scene (to create the menu). After that the select operations will read the needed area of the clipboard to get either (at best) the exact list of objects needed and (at worst) only those objects presently in the layer.

The interface of the Layer class already abstracts knowledge of this away from the caller but internally can be made more efficient using the "clipboard" (or cache if you prefer).

Last edited by FourMadMen; 20-Sep-08 at 04:12.
#14   Old 20-Sep-08, 04:03   
Reply With Quote
FourMadMen FourMadMen is offline
Member
 
Join Date: Jan 2004
Posts: 506
I've been working on an architectural project and a couple of things have come up.

1) Apparently Blender will let you snap to the vertex of an unselected object. Yay!

2) While working I needed a couple of different render setups (different layers on, different objects locked, etc.). So...

I added some context sensitive Render menu items to the main menu. For any layer group that starts with "Render" it adds that item to the menu. When you select that item the script starts a render with the settings of that render layer group.

As an example: I'm in the "Model" layer group. I select the "Render All" menu item ("Render All" is a name of a layer group that turns on the floor, walls, camera, lamps and shows all objects in the room). Those layer settings are set up. The render kicks off. When done I'm still sitting on whatever layer group was selected before the render selection. No fussing with changing the group, hit render, change the group back. Also in my case I have a "Render Cabinets" layer group. This layer group just has the cabinet objects, the walls, floor, camera, and lamps. Selecting that one will render the room with just the cabinets in it. But, again, when done It's still back to showing the layer group that was selected before the render.
#15   Old 21-Sep-08, 06:15   
Reply With Quote
blenderificus's Avatar
blenderificus blenderificus is offline
Member
 
Join Date: Jun 2008
Posts: 539
!! this looks like quite a fine script, thank you for your work and for sharing with the blender community!!!!
#16   Old 21-Sep-08, 09:55   
Reply With Quote
blenderificus's Avatar
blenderificus blenderificus is offline
Member
 
Join Date: Jun 2008
Posts: 539
i keep getting a console error on OSX PPC 10.5.5 :

SyntaxError
: invalid syntax
File "<string>", line 1757

if anyone can help it would be much appreciated, i'm eager to test this one out. Thanks :-)
#17   Old 21-Sep-08, 10:20   
Reply With Quote
blenderificus's Avatar
blenderificus blenderificus is offline
Member
 
Join Date: Jun 2008
Posts: 539
I installed 2.47 with Python 2.5, and not it works on PPC OSX.

it kept giving the error i mention above with the Python 2.3 2.47 available on the blender.org site. Thanks again FourMadMen!!!
#18   Old 21-Sep-08, 10:27   
Reply With Quote
FourMadMen FourMadMen is offline
Member
 
Join Date: Jan 2004
Posts: 506
Yes I never should have used that ternay construction, especially if there are custom builds that don't yet use Python 2.5. Only used it once, I will release a patch that removes that syntax. Stay tuned...

Last edited by FourMadMen; 21-Sep-08 at 17:06.
#19   Old 21-Sep-08, 14:32   
Reply With Quote
FourMadMen FourMadMen is offline
Member
 
Join Date: Jan 2004
Posts: 506
Version 1.3 Build 3 is now available for download. You won't need it if you are running Blender with Python 2.5.
#20   Old 21-Sep-08, 17:08   
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 18:53.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Logo and website design copyright © 2006 by froodee design bureau. All rights reserved.
Other Blender Sites
new icon Blender Homepage »
The official Blender homepage
new icon BlenderNation »
Fresh Blender News, Every Day
new icon Blenderart Magazine »
Blender articles, tutorials and images.
Blender Headlines
Featured Artwork
Short animation: Barrel by Phlopper
Woolly mammoth by sebastian_k
Photorealistic classic furniture by eMirage
Social BlenderArtists