[Addon] - Selection Restrictor

Hi, guys!

I’m sorry, but for now I do not know how to make the addon included in the trunk.

Also the addon needs a little reworking, because some of the comments in it are now in Russian and need to rewrite something else.

I also would like to someone more experienced read code. This is my first addon, I feel that its code would be more elegant.

And I thought that the necessary to add a buttons to enable and disable Restrict Viewer Selection for the selected objects. I do not know are they necessary? Buttons already too much.

And sorry for my English :slight_smile:

I see your point, but this could generate problems. If the script would simply look for a an emissive material applied to the mesh (or one with an emissive texture), than it may freeze object you may not want it to freeze.

Consider the case where you have a character with some sci-fi suit with LEDs and neon streaks (like in TRON, for example), or a creature with a fiery belly, or made of lava. If you disable meshes with light-emitting materials, these would become unselectable as well. Sure, you could re-enable them in the outliner, but that would be just like disabling the lamp-meshes through the outliner. And once you hit refresh, they’d become frozen again.

A more effeicent way would e to name your lamp-meshes using a naming convention and then use a small script to freeze only the meshes named using the convention. Or by using custom properties.
Maybe there is a more complex way to determine which meshes are “lamps” and which are just objects with emissive channels (like, for example, objects with more than just an emissive material get excluded, but that only works for cycles), but I think that would just generate more confusion.

I’m not trying to be negative, I’m just thinking of scenarios where the added functionality would actually hinder productivity, instead of helping it.

Yeah, I was thinking that when I wrote my Idea. That’s why I said that it would be used for the meshes that has ONLY emitter material node (nothing else).

This is very cool!
+1 for the trunk

Hey man, could you add something like, “alt+click” on the restrict selectors, so it would “solo” a type, so when i hit let’s say an armature, it would restrict all the other object types but that one?, fantastic job on the addon, i was about to start learning coding to code it myself… this looks great!

Nice idea !

This is realy good idea! And why didn’t I guess of it earlier?

Not bad idea.
I’ll think over it.

Guys, I’m sorry for slow responses. My posts must be moderated and I can’t respone in live time.

Yeah, I think you need two more posts, then you’ll be free of the moderation thing :slight_smile:

Already your addon is in my must have :slight_smile:

I missed something like this thanks man!

Btw: alt+click = inverse is great.

Btw2: Do you think that it is possible to do selection restrictor but without set paramater of selection? So It will be not modified and every viewport have another restriction? It is in Softimage and Maya and I like it. Also Hide by type but only for viewport not hide parameter in outliner.

That’s what I wanted to do, but for now it is too difficult for me, at the moment I am a big noob in coding =)

At the beginning I had the idea to call this addon “Filter selection”, as in 3ds Max. But this is not a real filter, it’s just a switcher of options for the collections of objects. To make name clearer to blender-users and made it more in line with reality I called it “Selection Restrictor”.

I suspect that to realize this idea, I may have to delve in blender’s code and modify it instead of writing an addon.

I’m making a post in my blog about your add-on, will be up tomorrow.

www.lollypopman.com

Great addon! you can throw the label “noob on coding” away I think.

I agree, it works great, and looks great!

so have you had any chance to add the alt functionality?

Excellent add-on, thanks!

Idea: Add a text box where the user could filter just about anything based on naming conventions. Using a delimiter would allow for multiple filters.

I have added ctlr+click to invert selection restrictor action. You can greab it here