<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Maya Prefs: enable backface cull with python/mel in Maya Forum</title>
    <link>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11711659#M5314</link>
    <description>&lt;P&gt;Appreciate the effort. It does what you said plus erased everything from a scene.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I don't understand how does it solve anything though.&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2023 23:53:50 GMT</pubDate>
    <dc:creator>The-Digital-Shaman</dc:creator>
    <dc:date>2023-01-27T23:53:50Z</dc:date>
    <item>
      <title>Maya Prefs: enable backface cull with python/mel</title>
      <link>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11711124#M5309</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have been trying to enable and disable backface cull in the maya prefs, but unfortunately it is not working for me. I am pretty sure i am missing out something really silly.&lt;/P&gt;&lt;P&gt;Please check the attached image&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mel command&lt;/P&gt;&lt;P&gt;optionVar -list; // gives me the list of string names&lt;/P&gt;&lt;P&gt;optionVar -q newPolyBackFaceCull; // queried and confirmed this string is getting modified if i update manually in //prefs&lt;BR /&gt;optionVar -intValue newPolyBackFaceCull 1; // when i try to modify it does not work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And additional query if this string is wrong, what would be the best way to find the list of strings?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 19:26:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11711124#M5309</guid>
      <dc:creator>16497643852</dc:creator>
      <dc:date>2023-01-27T19:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Maya Prefs: enable backface cull with python/mel</title>
      <link>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11711290#M5310</link>
      <description>&lt;P&gt;//Display back of faces&lt;/P&gt;&lt;P&gt;ToggleBackfaceGeometry;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Backface Cull off&lt;/P&gt;&lt;P&gt;setAttr "pCubeShape5.backfaceCulling" 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Backface Cull Full&lt;/P&gt;&lt;P&gt;setAttr "pCubeShape5.backfaceCulling" 3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is messed up tho, as it works only on what one manually changed in the Attribute Editor, prior to using the script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know how to make it apply globally or at least work on selection.&lt;/P&gt;&lt;P&gt;Anyone?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 20:36:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11711290#M5310</guid>
      <dc:creator>The-Digital-Shaman</dc:creator>
      <dc:date>2023-01-27T20:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Maya Prefs: enable backface cull with python/mel</title>
      <link>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11711318#M5311</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe you will have better success if you use the following commands to change backface culling in the Script Editor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;polyOptions -newPolymesh -backCulling; &amp;nbsp; &amp;nbsp; // Off&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;polyOptions -newPolymesh -fullBack;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // On&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;polyOptions -newPolymesh -wireBackCulling; // Keep wire&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;polyOptions -newPolymesh -hardBack;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Keep hard edges&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are the commands that are executed when you change the value with Preferences &amp;gt; Display &amp;gt; Polygons &amp;gt; Backface culling.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When Maya prefs are saved we sync this value up with the &lt;FONT face="courier new,courier"&gt;newPolyBackFaceCull&lt;/FONT&gt; optionVar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 20:43:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11711318#M5311</guid>
      <dc:creator>brian.kramer</dc:creator>
      <dc:date>2023-01-27T20:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Maya Prefs: enable backface cull with python/mel</title>
      <link>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11711439#M5312</link>
      <description>&lt;P&gt;Good try Brian!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For me these commands work from the Display options, but not when using code directly.&lt;/P&gt;&lt;P&gt;There must be something more to activate them.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 21:37:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11711439#M5312</guid>
      <dc:creator>The-Digital-Shaman</dc:creator>
      <dc:date>2023-01-27T21:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Maya Prefs: enable backface cull with python/mel</title>
      <link>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11711510#M5313</link>
      <description>&lt;P&gt;After calling the various &lt;FONT face="courier new,courier"&gt;polyOptions&lt;/FONT&gt; commands create a new poly object. That new object should have the culling option you specified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this script. It sets each culling option, creates a poly sphere, and queries the culling option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;file -new -force;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;global proc printCulling()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int $backCulling[] = `polyOptions -query -backCulling`;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int $fullBack[] = `polyOptions -query -fullBack`;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int $wireBackCulling[] = `polyOptions -query -wireBackCulling`;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int $hardBack[] = `polyOptions -query -hardBack`;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("backCulling&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = " + $backCulling[0] + "\n");&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("fullBack&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = " + $fullBack[0] + "\n");&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("wireBackCulling = " + $wireBackCulling[0] + "\n");&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("hardBack&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = " + $hardBack[0] + "\n");&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("\n");&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;polyOptions -newPolymesh -backCulling;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;polySphere -name sphere1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;printCulling();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;polyOptions -newPolymesh -fullBack;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;polySphere -name sphere2;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;printCulling();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;polyOptions -newPolymesh -wireBackCulling;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;polySphere -name sphere3;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;printCulling();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;polyOptions -newPolymesh -hardBack;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;polySphere -name sphere3;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;printCulling();&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 22:18:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11711510#M5313</guid>
      <dc:creator>brian.kramer</dc:creator>
      <dc:date>2023-01-27T22:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Maya Prefs: enable backface cull with python/mel</title>
      <link>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11711659#M5314</link>
      <description>&lt;P&gt;Appreciate the effort. It does what you said plus erased everything from a scene.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I don't understand how does it solve anything though.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 23:53:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11711659#M5314</guid>
      <dc:creator>The-Digital-Shaman</dc:creator>
      <dc:date>2023-01-27T23:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Maya Prefs: enable backface cull with python/mel</title>
      <link>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11712551#M5315</link>
      <description>&lt;P&gt;Thank You all for the amazing replies,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what i want exactly is to mention the command in `userSetup.mel`&lt;/P&gt;&lt;P&gt;This resolves 2 problems,&lt;/P&gt;&lt;P&gt;1) it will always be enabled for the whole scene and not just per object(geo)&lt;/P&gt;&lt;P&gt;2) even if anyone resets the prefs i'll have those settings enabled automatically once again with the help of userSetup.mel/.py&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;polyOptions work mostly with selection list(ls) as far as i know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am still trying on my end, let me know in case you guys find anything related to prefs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot guys&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jan 2023 16:06:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11712551#M5315</guid>
      <dc:creator>16497643852</dc:creator>
      <dc:date>2023-01-28T16:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Maya Prefs: enable backface cull with python/mel</title>
      <link>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11712767#M5316</link>
      <description>&lt;P&gt;To my surprise&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10239521"&gt;@brian.kramer&lt;/a&gt; , your option works. Thanks alot&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;`Prefs&amp;gt;display&amp;gt;polygons&amp;gt;backface culling&amp;gt;On`&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;%MAYA_APP_DIR%/&amp;lt;version&amp;gt;/script/userSetup.py&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;import maya.cmds as cmds
def dosomething():
    cmds.polyOptions(newPolymesh=True, fullBack=True)
    print("this is a test")
cmds.evalDeferred('dosomething()')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;reference material&lt;/P&gt;&lt;P&gt;"D:\c_drive_installs\autodesk\Maya2023\scripts\startup\createPrefWndUI.mel" - the options &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10239521"&gt;@brian.kramer&lt;/a&gt; suggested, one can also refer it here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unwanted stuff&lt;/P&gt;&lt;P&gt;I had checked polyOptions in the scene it did not work for me properly(or i did not use it properly&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;), did not result me backface culling in the scene, but while going through all the options once again i noticed the option in `Prefs do update`&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was too adamant to solve it in this manner - because the docs say so&lt;/P&gt;&lt;P&gt;&lt;EM&gt;optionVar - This command allows you to set and query variables which are persistent between different invocations of Maya.&lt;/EM&gt; &lt;EM&gt;These variables are stored as part of the preferences.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;optionVar -list; // gives me the list of string names&lt;/P&gt;&lt;P&gt;optionVar -q newPolyBackFaceCull; // queried and confirmed this string is getting modified if i update manually in //prefs&lt;BR /&gt;optionVar -intValue newPolyBackFaceCull 1; // when i try to modify it does not work&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 18:52:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-forum/maya-prefs-enable-backface-cull-with-python-mel/m-p/11712767#M5316</guid>
      <dc:creator>16497643852</dc:creator>
      <dc:date>2023-01-31T18:52:21Z</dc:date>
    </item>
  </channel>
</rss>

