Turn off materials (all at once)

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

  • Turn off materials.jpg
    Turn off materials.jpg
    236.5 KB · Views: 325
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?
 
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

Thanks Frank,

I don't use too many scripts. So I never remember which ones are out there. :icon_thumbup:
 
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:
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

  • Texture+wireframe.png
    Texture+wireframe.png
    56.3 KB · Views: 292
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.
 
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

  • All Materials off1.jpg
    All Materials off1.jpg
    8.9 KB · Views: 212
  • All Materials off.jpg
    All Materials off.jpg
    34.8 KB · Views: 227
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:
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:
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!
 
Thanks uq6, I just reloaded the script. Apparently I copied the original using safari and it changed some characters.
This time it was copied from textedit.

Anyway here is the actual script:
 

Attachments

  • Toggle Shaded-Wireframe.zip
    1.1 KB · Views: 206
Back
Top