Selection constraint to object types

Hi,

I made this tiny add-on in order to prevent the selection of certain types of objects in the 3D viewport. It exists in maya and it’s useful when you are posing a character, for instance and you don’t want to accidentally grab a light or a mesh.


The link : https://github.com/Nikos-Prinios/Selection-Restrictor

Note : it does not interfere with the outliner’s “restrict viewport selection” tool.

Nice should be in by default

Very useful!

Nice one, thanks :). I would like to know if it would be posssible that button backgrounds match the other ones (orange like in the screenshot) ?

There seems to be addon with same functionality already made:

Daaaamn ! haha, I was sure someone already did such thing ! :smiley: It’s something you can’t live without when working on Maya.

Although, not to sound picky but… this one don’t mess with the outliner’s restriction selection.

Example : If you are working on a scene and already defined a set of objects you don’t want to grab unwillingly (like the ground, for instance). Then you turn ON the addon to pose a character, making sure you can only grab bones. When finished, addon OFF, everything is back the way it was previously. The ground is still untouchable. … yea I know… not a big difference :o

Hi there,

I’ve simplified the code and fixed a small issue. Now it works exactly the way I need.
Also, I followed the very relevant suggestion of Manolo76.

Yes, it’s better, thanks :).

May I suggest this to save space (sans vouloir abuser :D) ? :


Thanks for the usefull addon.

Sure, Manolo76 ! You’re right. I’ve updated the code. Thanks!


urkokul : it’s just a little shortcut, really ! but thanks !

Perfect, thanks ! Really useful in complex scenes :).

dude, didn’t you see this? https://lollypopman.com/2016/02/24/add-on-selection-restrictor/

Yeah, Looch I saw it too late, JoseConseco pointed it out. Sorry for that. Anyway, neither the author of ‘selection restrictor’ or I have anything to sell, so it’s all good. And the two scripts have their differences. I think all of us who touched maya can’t live without selection constraint.

Yeah tell me about it, i was waiting for it for years, in any case what i meant is to instead of having two people do the same addon join forces and do just one that is more debugged, better featured or that just needs less time from both of you to maintain =)