<?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: dR_symmetrize not available in mayabatch? in Maya Programming Forum</title>
    <link>https://forums.autodesk.com/t5/maya-programming-forum/dr-symmetrize-not-available-in-mayabatch/m-p/9979513#M4897</link>
    <description>&lt;P&gt;No problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers!&lt;/P&gt;
&lt;P&gt;--&lt;/P&gt;
&lt;P&gt;Brent&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jan 2021 15:52:09 GMT</pubDate>
    <dc:creator>brentmc</dc:creator>
    <dc:date>2021-01-05T15:52:09Z</dc:date>
    <item>
      <title>dR_symmetrize not available in mayabatch?</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/dr-symmetrize-not-available-in-mayabatch/m-p/9977108#M4893</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to programmatically symmetrize a mesh. I figured out how to execute that in mel/Python, but it seems it does not work when in mayabatch.&lt;BR /&gt;&lt;BR /&gt;Manually, I would select whatever I need to be symmetrized (vertices), go to the menu 'Edit mesh | Symmetrize', select a mesh edge for symmetry, and that would be it.&amp;nbsp;What I am doing to programmatically automate this is:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from maya import mel
mel_symmetrization_cmd_str = 'activateTopoSymmetry(&amp;lt;0&amp;gt;, &amp;lt;1&amp;gt;, &amp;lt;2&amp;gt;, "vertex", "cmds.dR_symmetrize", 1);'
mel.eval(mel_symmetrization_cmd_str)&lt;/LI-CODE&gt;&lt;P&gt;with &amp;lt;0&amp;gt;, &amp;lt;1&amp;gt; and &amp;lt;2&amp;gt; being the data I need (ie. &amp;lt;0&amp;gt;: mesh edge for symmetry; &amp;lt;1&amp;gt;: vertices that I want to symmetrize; &amp;lt;2&amp;gt;: node name).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works great when executing this inside a scene in script editor, but fails when in mayabatch:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;STDOUT: Error: line 0: Cannot find procedure "dR_symmetrize".
WARNING: Error: line 0: RuntimeError: file python_module.py line 72: Error occurred during execution of MEL script&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried adding source to drInit.mel, and also made sure the modelingToolkit was loaded, but it didn't help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there something specific to do/call/add? Where does the function 'dR_symmetrize' come from? Can it be used in mayabatch?&amp;nbsp;If not, is there another way to automate a mesh symmetrization?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PS: I am using Maya2020.3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 18:03:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/dr-symmetrize-not-available-in-mayabatch/m-p/9977108#M4893</guid>
      <dc:creator>sribetZJ8ZK</dc:creator>
      <dc:date>2021-01-04T18:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: dR_symmetrize not available in mayabatch?</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/dr-symmetrize-not-available-in-mayabatch/m-p/9978941#M4894</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dR_symmetrize is part of the modeling toolkit and it is not available in batch mode so I'll log an issue for that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think your only option is to use regular maya with the -script option instead of maya batch.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: There is no way to replicate symmetrize in the API or scripting and the only way to query symmetry is using the filterExpand command (-symPositive/Negative/Seam) which can classify components into three buckets but will not give you the symmetry correspondence between components.&lt;/P&gt;
&lt;P&gt;--&lt;/P&gt;
&lt;P&gt;Brent&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 12:35:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/dr-symmetrize-not-available-in-mayabatch/m-p/9978941#M4894</guid>
      <dc:creator>brentmc</dc:creator>
      <dc:date>2021-01-05T12:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: dR_symmetrize not available in mayabatch?</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/dr-symmetrize-not-available-in-mayabatch/m-p/9979490#M4895</link>
      <description>&lt;P&gt;Edit:&lt;BR /&gt;I meant 'dR_symmetrize'&amp;nbsp; in the code snippet, not 'cmds.dR_symmetrize'&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_halo:"&gt;😇&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 15:42:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/dr-symmetrize-not-available-in-mayabatch/m-p/9979490#M4895</guid>
      <dc:creator>sribetZJ8ZK</dc:creator>
      <dc:date>2021-01-05T15:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: dR_symmetrize not available in mayabatch?</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/dr-symmetrize-not-available-in-mayabatch/m-p/9979510#M4896</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for your answer.&lt;BR /&gt;&lt;BR /&gt;All right. I will look into what you said.&lt;BR /&gt;Thank you for logging this issue!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 15:50:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/dr-symmetrize-not-available-in-mayabatch/m-p/9979510#M4896</guid>
      <dc:creator>sribetZJ8ZK</dc:creator>
      <dc:date>2021-01-05T15:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: dR_symmetrize not available in mayabatch?</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/dr-symmetrize-not-available-in-mayabatch/m-p/9979513#M4897</link>
      <description>&lt;P&gt;No problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers!&lt;/P&gt;
&lt;P&gt;--&lt;/P&gt;
&lt;P&gt;Brent&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 15:52:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/dr-symmetrize-not-available-in-mayabatch/m-p/9979513#M4897</guid>
      <dc:creator>brentmc</dc:creator>
      <dc:date>2021-01-05T15:52:09Z</dc:date>
    </item>
  </channel>
</rss>

