View Full Version : Globally set the Opposite flag

09 September 2005, 02:15 PM
How would I go about setting the opposite flag under Renderstats double sided to always be off? Even after something that has been negatively scaled and transforms have been frozen? It would be awesome to have this as a start up script or at least have a button that performs this per selected objects. Any suggestions would be greatly appreciated. I mainly use mel for ui and must admit i am real rusty when it comes to this. Thank you in advance.

09 September 2005, 08:53 PM
Put this in your userSetup.mel then load your scene directly...
You can also make this a button that you can click if you want to open maya then open your scene...or a scriptJob to run on a scene load...

select -all;
string $polys[] = `filterExpand -ex true -sm 12`;
for ($poly in $polys)
string $shape[] = `listRelatives -shapes $poly`;
setAttr ($shape[0] + ".doubleSided") 0;
select -clear;

09 September 2005, 06:20 AM
is there an option in prefs for new poly objects to keep double sided off? (not infront of maya). from memory there is backface culling..but its not the same thing.

maybe you can get the scriptJob to turn off double sided everytime a new poly object is created?

yeh i think everytime a DAG node is created, query to see if its a polygonal object and then turn off double sided for it.
seems like a hassle to do that, when you can merely make it a shelf button though, but if your one to forget that would solve your problems...if that method works (i'm new to MEL)

09 September 2005, 04:19 PM
Thank you very much stallion151 and harmless, I will give both your suggestions a shot. I am trying to get better with mel in my very limited spare time. A slow go indeed. Cheers!

CGTalk Moderation
09 September 2005, 04:19 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.