Layer Manager Prototype for Blender 2.5

Yay! I love it!

Thanks.

I knew that clicking on the “layer widget” in the 3D window caused a redraw to fire for custom add on scripts but I didn’t know that setting the scene layer options using Python fired it too. Took some time before I found that out but once I did was an easy enough fix. Under the right circumstances the script was chewing up all my CPUs. So, that was a weird one.

Here is where the UI stands. The menu on the left will be used for selecting/de-selecting objects. Having an issue generating the menu as an “operator” (generates fine as a “prop”). Will try a different build and see if that helps.

Great work FourMadMan! I hope this will be in trunk soon.

Menu generation issue fixed. I also gronked my way through how operators work and how to get a cascaded menu going. I have a new found respect for how the 2.5 Python API designers. What I first saw as limitations/restrictions in how you could do things I now see as advantages. Details aside… Kudos to the devs!!!

Sadly my revelation did not come last night when I was struggling with the API as I may not have the time today that I did yesterday. However once I get the menus dropped in the next steps should go quickly for getting the menus functional (but will need to dig in the API again to see how to do some of the things I want to do. Specifically starting with inventorying the current built in operators to see if I can leverage them like I’m sure I’ll be able to.

http://www.fourmadmen.com/blender/b25/lm_b25_proto_3.jpg

http://www.fourmadmen.com/blender/b25/lm_b25_proto_4.jpg

Got a look I like for the menus (have also added select by materials in addition to all the old ones). I’m digging the icons.

Main menu plus draw types menu
http://www.fourmadmen.com/blender/b25/lm_b25_proto_7.jpg

Main menu plus select property menu
http://www.fourmadmen.com/blender/b25/lm_b25_proto_8.jpg

Today’s progress:

Menus are now generated using only object existing in that layer. And operators work on just the objects in each layer.

Select All – complete
Clear All – complete
Select by object type – complete
Set drawtype for “layer” – complete for all drawtypes

Left to do (for initial release):
Select by Material
Select by Texture
Layer locking (on/off)
Layer rendering (on/off)

Four objects on Layer 1 (menu text is set to number of objects), the rest of the layers are empty.

Main layer options for layer 1

Nothing new for users of the Blender 2.49 platform and quite a bit missing but it’s a good start an main layer management functions.

Completed:

Menus generated by layer context
Select All – complete
Clear All – complete
Select by object type – complete
Set drawtype for “layer” – complete for all drawtypes
Select by Material
Select by Texture

Left to do (for initial release – but technically could be release now I suppose):

Layer locking (on/off)
Layer rendering (on/off)

The visibility, selection and render icons down the right side seem further apart than the ones in the outliner. If they were closer it would be more consistent and also make the name field a little longer.

I wonder about having the layer options to the right of the layer name just ahead of the visibility button.

Dunno… you’re doing very well… hope to see this in 2.5 soon.
Thanks for your work :slight_smile:

I agree about the spacing. However if someone want to figure out and document with a certainty how the split function interacts with the column function I’d be glad to give it another go. As it stands with is the closest I have come with my trial and error.

I understand conceptually how they all work together but not to the point where I can get 100% what I’m looking for in terms of spacing between the icons.

*** EDIT ***

And despite my above rant… I gave it one more try. And think I got it.

Yes I think thats better.:yes: :cool:

Until layer groups are implemented the “layer render” settings don’t really have much meaning so I think I will code up layer locking and then start taking the prototype code and refactoring it into something I’d actually want the world to see. Followed after that by the first release. That would however mean it would be the first release of Layer Manager WITHOUT layer groups. We’ll see.

So, continuing with what Big Fan suggested…

Here is a version with the layer menus to the right of the name. Which way looks better?

Well I am a little biased but I think the right one :wink:
Frequently though my ideas are out of step with the rest of the community so I’m happy to go along with the majority view.
I just thought it seemed better to set the layer name and then to have the options for it adjacent to one another working L to R as it were. Perhaps its a little easier on the eye too, arranged that way. :confused:
Thanks for trying it out :smiley:

I like the one on the right better…

Btw, awesome work updating this to 2.5 :slight_smile:

Well we’ll see how things go with the left/right issue.

Right now I’m thinking of how the other features will go in and I have a few thoughts.

  1. The Layer Groups - I think these should go in a separate panel. This way you can collapse it if you don’t necessarily want to see that part of the UI (or the other way around).

  2. Before one or more layers could be hidden in the UI by selecting that layer and choosing “Hide selected layers”. So far in this new UI there is not “select this layer checkbox”. I am trying to avoid having that so my thought for hiding layers is to add that to the individual “Layer Options” menus. The main thing lost in that is you have to hide them one at a time instead of being able to hide multiple layers at once. But I don’t see this as a major loss.

I also don’t want to lose sight of the ultimate goal and that is to have a Layer Manager where you can have as few or as many (i.e. above 20) layers as you need. But I’m new enough on this API that I decided, as you can probably tell, to delay that and just get the functions for 2.49 ported to 2.50.

Wire frame colours per layer (per society/association/group or subgroup - as ‘layers’ seems to imply a dimensional stacking system as in Photoshop et al) anywhere in your plans? Looks great! A much needed addition to Blender.

Blender does not allow for that at this time as far as I know. Certainly it does not in 2.49, and I have seen nothing in 2.50 that suggest this has changed. But if it did I would certainly incorporate it.

This is all fine and dandy, but still, wouldn’t it be better to have Folders on the outliner instead?
This would do the exact same thing, only in more logical manner.
That’s how many other apps do it, and these layers might be really confusing…

Few wins:

  1. The outliner gets cleaned up and gets well organised.
  2. Less stuff in in the object tab and the header
  3. Less confusing for new users.

Other improvements the outliner is begging for:

  1. Select ‘rename’ on the right mouse menu
  2. Easy rearranging (Alphabetical, size, reverse, stuff like that)

As I have always said one day maybe there will be a true layer object type (or object folder, or other nomenclature) in Blender. Then it could be added to the outliner. Also, the layer manager goes beyond just giving layers names and the three visibility, selectability, renderability icons. But, yes, having a true layer object and showing them in the outliner would be a welcome addtion to Blender.

As for really confusing I have to disagree. The layer manager script has been around (since what 2006?) for a good while now. Has been downloaded thousands of times. And it’s user’s have e-mailed and PM’d suggestions for new features, found bugs (yeah I’ve let one or two slip by me). Several have donated their hard earned money too. So I don’t really thing the features go unused. But, hey, if is really is confusing for someone then the have to option of not using the script.

wouldn’t it be better to have Folders on the outliner instead?

I Definitely agree, I like how Cinema4D makes use of their outliner in conjunction with the layer browser, they go hand in hand and its really well thought of.

I have good hopes of this implementation, looking forward to it.