Turn off materials (all at once)

uncle808us

Well-known member
#1
Turn off materials (all at once)

Is there a way to turn off all materials at once instead of clicking each tag and clicking the tag on off in the properties window?
I have my wire frame material and my shaded material on each object and it is very time consuming having to click on each object the click on the tag on or off button.
Thanks.
 

Attachments

Swizl

Active member
#2
Is there a way to turn off all materials at once instead of clicking each tag and clicking the tag on off in the properties window?
I have my wire frame material and my shaded material on each object and it is very time consuming having to click on each object the click on the tag on or off button.
Thanks.
Not that I know of, but it would be helpful to be able to switch to different OpenGL viewport settings. Something like a solid or shaded view setting would be cool. Then we wouldn't have to switch any of the materials on or off (typically). I do like to use the Isoline view setting a lot though.

Maybe someone knows a trick or one of the scripters could rig something up?
 

uncle808us

Well-known member
#5
There are already a scripts for that; one to zap through display modes and one that Zoohead modified to toggle wire/shaded mode on/off.

Cheers
Frank
Is there a way to turn off all materials at once instead of clicking each tag and clicking the tag on off in the properties window?
I have my wire frame material and my shaded material on each object and it is very time consuming having to click on each object the click on the tag on or off button.
Thanks.

What I should have said I only want to turn off one grou[ of materials not all materials.
Look closely at my image, maybe it can explain what I mean.Turn off only the materials boxed in red frame.Not all materials.
 
Last edited:

frank beckmann

Well-known member
#6
Right now it´s not possible (just excluding all image based textures from rendering at once is possible) - but you can configure your base material plus add the wireframe node inside it and just unplug/plug-in when needed. Maybe worth a try or - cut (cmd+X) the wireframe material from the material browser and paste it back immediately. Assigning material to a bunch of meshes simultaneously is already possible.

Cheers
Frank
 

Attachments

uncle808us

Well-known member
#7
Right now it´s not possible (just excluding all image based textures from rendering at once is possible) - but you can configure your base material plus add the wireframe node inside it and just unplug/plug-in when needed. Maybe worth a try or - cut (cmd+X) the wireframe material from the material browser and paste it back immediately. Assigning material to a bunch of meshes simultaneously is already possible.

Cheers
Frank
Thanks Frank I'll give these a try. But I'm afraid it will take just as much clicking as turning off the material tag.
 

uncle808us

Well-known member
#8
There are already a scripts for that; one to zap through display modes and one that Zoohead modified to toggle wire/shaded mode on/off.

Cheers
Frank
I hunted down:
Toggle Shading.js
This is Macro script to toggle 'shading' parameter of selected object at object browser.(Does not toggle materials off and on but only switches shader modes.)
could not find the one that Zoohead modified to toggle wire/shaded mode on/off (sounds like it only toggles wire/shaded mode on/off.)
So I'm guessing there is no way to select all objects and toggle the material tags all at once on and off.
 

Attachments

ZooHead

Well-known member
#9
I don't think a script can work on multiple objects at the same time.

Oops, I take that back, the Toggle wireframe/shade script does work on multiple objects
 
Last edited:

ZooHead

Well-known member
#10
Here's the script I I use to toggle between wireframe and shade.

// Toggle Shaded or Wireframe.js
//
// This is macro script. Place it into ~/Library/Application Support/Cheetah3D/scripts/Macro folder.
//
// To toggle 'shaded’ or ‘wireframe’ display type of selected object.

function main(doc) {

if (typeof version == "function" && parseFloat(version()) >= 7) {

var objs = doc.selectedObjects( true );

for (var i = 0;i < objs.length;i++) {

var obj = objs;

if (obj.family() == NGONFAMILY) {
var shading = obj.getParameter("displayType");
shading = ( shading < 3 )? shading = 3 : 1;
obj.setParameter("displayType", shading);
}

}

} else {

var obj = doc.selectedObject();

if ( obj ) {

var tcount = obj.tagCount();
for (var i = 0;i < tcount;++i) {
var tag = obj.tagAtIndex(i);
info = tag.parameterInfo();
if (tag.type() == 103) {
//
var shading = tag.getParameter("editorShading");
shading = ( shading < 1 )? shading = 1 : 0;
tag.setParameter("editorShading", shading );
}
}

}
}
}

}
 
Last edited:

uq6

New member
#11
Thanks very much, Zoohead. I am probably doing something silly, but when I install this macro script and run it with a simple polygon object selected, I get "obj.family is not a function" in line 17.

I'm running C3d 7.3.3 on Mojave 10.14.5 on 2018 MBP.
As an aside, when I try to search the forums built-in search for '.family()' (with or without quotes) it finds all instances of the English word family, not the function call I'd like.

Thanks!
 
Top