Feel free to modify for your best usability or make improvement.
And just in case, I’m not a coder, but only a person who proposed an idea. =)
=====================================================
Ver 1.0.4
With toggling Wire and Bounds. If one is active, other is shaded (Thanks to @ckohl_art) Inactive_Shading_v_1_0_4.py (5.5 KB)
I just realized that if we’re temporarily disabling the addon or completely uninstalling the addon it should probably clean up after itself and revert the objects back to textured. Otherwise everything that isn’t selected will stay wireframe unless the user manually changes them back.
Something like this should go somehwere in the unregister() def:
for obj in bpy.context.visible_objects:
obj.display_type = 'TEXTURED'
Although there’s no way to know if the user intentionally wants some objects to be ‘WIRE’… or what to do with objects that aren’t visible? Impossible to know what the user wants. We could just set EVERY object back to textured instead of only the visible_objects.
And is it just me or does the inactive_shading prop still exist after uninstalling the addon?
Feel free to experiment with script.
About GPL block we can use standard
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# or see <http://www.gnu.org/licenses/>.
#
# ##### END GPL LICENSE BLOCK #####
or file LICENSE (34.3 KB)
I think this is the correct text and file.
About inactive_shading prop after uninstalling the addon
I got this
no “inactive_shading” or even “inact” in search result…
even more, I have no this even if addon is installed (sorry for “even” pun)
Or where it should be?
And I agree that after uninstalling it should turn all objects back to TEXTURED.
Is there anyway, say ive toggled the addon on, now im viewing my active object in solid mode, non active in wireframe, can i have the nonactive in colored in random mode so i can distinguish the various objects via there colors in the viewport while im working on my solid shaded object? hope that makes sense.
I Made a slight update.
When disabling addon, all objects become TEXTURED instead of WIRE inactive. Inactive_Shading_v_1_0_3.py (4.0 KB)
First post updated.
You can either set the viewport shading mode to wire, in which case you get access to random wire color or manual object wire color, or you get shaded mode. It’s either/or due to a Blender design choice. There’s a rejected patch for per-object wire colors. https://developer.blender.org/T33817
It might be doable if someone gets the mesh data, hides the object, and draws the wire object themselves directly with opengl but that would be… hacky… and would probably have undesired side effects (like not showing up in renders) because the objects would actually be in the hidden state (not to mention possible performance issues with drawing all the objects yourself instead of letting the viewport renderer handle it).
if you need it as soon as possible, you can just change WIRE to BOUNDS in a text editor, there are only 3 of them in the code.
For adding additional button I think it need to rewrite a lot of code, cos it need to make choose option between Wire, Bounds and default Textured, two checkboxes not the option.
Maybe if some python guru could help, my skills allow only to write simple code =)
in fact, the checkbox is the right choice because you need to completely disable this feature to prevent confusing if some objects need to be in different styles.
I also add MACHIN3 to the authors and update first post.
Hi, great addon But It has a major drawback too which can be OR Else has to be Fixed which is Inactive Shading Addon should not consider manupulating the shading of Boolean Objects. SO if I am using this addon, the Bool OBjects { the cutters} which are auto set to wireframe by blender default addon Bool Tool which is of course a necessity is killed by this addon , So I request a feature update. I hope I was able to explain nicely
Hello.
It’s a bit old and simple script not designed for complex scenes.
It need to be completely rewrite to take into account objects.display_type, list all mesh objects in the scene and store display type if it different from ‘TEXTURED’ and restore them after unchecking checkbox.
Maybe here can be more elegant solution.
UPD:
starting point.
solid_objects = []
wire_objects = []
bounds_objects = []
for ob in bpy.data.objects:
if ob.type == 'MESH' and ob.display_type == 'SOLID':
solid_objects.append(ob)
if ob.type == 'MESH' and ob.display_type == 'WIRE':
wire_objects.append(ob)
if ob.type == 'MESH' and ob.display_type == 'BOUNDS':
bounds_objects.append(ob)
print(solid_objects)
print(wire_objects)
print(bounds_objects)
Is it just me or is there an extreme performance hit when changing the Viewport Display mode of any object that has a boolean modifier with the “Exact” solver?
Edit: Apparently the performance hit is only when all 3 of these conditions are true:
boolean modifier is using a Collection as its cutter source