<?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: why is my python function not working? in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/why-is-my-python-function-not-working/m-p/8299869#M9643</link>
    <description>&lt;P&gt;Thank you. Yes this works fine. i was quite dumb hahaha. Can i ask if you have&amp;nbsp; some experiences working with python inside 3ds max ? I'm wondering&amp;nbsp; if python is as powerful as maxscript inside 3ds max.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Sep 2018 15:38:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-09-28T15:38:06Z</dc:date>
    <item>
      <title>why is my python function not working?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/why-is-my-python-function-not-working/m-p/8298374#M9641</link>
      <description>&lt;P&gt;i want to create object using python in 3ds max . just to create a simple default size box&amp;nbsp; i need to write this long code each time i create an object.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln"&gt;obj &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt; &lt;SPAN class="typ"&gt;MaxPlus&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Factory&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;CreateGeomObject&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;MaxPlus&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;ClassIds&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;Box&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun"&gt;&lt;SPAN class="pln"&gt;node &lt;/SPAN&gt;= &lt;SPAN class="typ"&gt;MaxPlus&lt;/SPAN&gt;.&lt;SPAN class="typ"&gt;Factory&lt;/SPAN&gt;.&lt;SPAN class="typ"&gt;CreateNode&lt;/SPAN&gt;(&lt;SPAN class="pln"&gt;obj&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun"&gt;ughhh....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun"&gt;so i tried to make a function :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun"&gt;import MaxPlus&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun"&gt;def create(geo):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;obj = MaxPlus.Factory.CreateGeomObject(MaxPlus.ClassIds.geo)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;node = MaxPlus.Factory.CreateNode(obj)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun"&gt;create("Box")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun"&gt;--result&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun"&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;input&amp;gt;", line 2, in &amp;lt;create&amp;gt;&lt;BR /&gt;AttributeError: type object 'ClassIds' has no attribute 'geo'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun"&gt;unfortunately this&amp;nbsp; didn't work.&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="maxPython.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/551393iBB11EC3F434A8341/image-size/large?v=v2&amp;amp;px=999" role="button" title="maxPython.JPG" alt="maxPython.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i dont know why .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun"&gt;Is there any way to create object so i dont need to write these long lines of code each time? Thank in advance.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 02:14:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/why-is-my-python-function-not-working/m-p/8298374#M9641</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-28T02:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: why is my python function not working?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/why-is-my-python-function-not-working/m-p/8298823#M9642</link>
      <description>&lt;P&gt;Try this...&lt;/P&gt;&lt;PRE&gt;import MaxPlus
def create(geo):

    obj = MaxPlus.Factory.CreateGeomObject(eval("MaxPlus.ClassIds.%s" %geo))
    node = MaxPlus.Factory.CreateNode(obj)

create("Box")&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Sep 2018 08:42:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/why-is-my-python-function-not-working/m-p/8298823#M9642</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-28T08:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: why is my python function not working?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/why-is-my-python-function-not-working/m-p/8299869#M9643</link>
      <description>&lt;P&gt;Thank you. Yes this works fine. i was quite dumb hahaha. Can i ask if you have&amp;nbsp; some experiences working with python inside 3ds max ? I'm wondering&amp;nbsp; if python is as powerful as maxscript inside 3ds max.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 15:38:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/why-is-my-python-function-not-working/m-p/8299869#M9643</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-28T15:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: why is my python function not working?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/why-is-my-python-function-not-working/m-p/8299959#M9644</link>
      <description>&lt;P&gt;My experience is very limited. I've just started to work with python in max an the lack of more documentation makes me struggle a lot.&lt;/P&gt;&lt;P&gt;I think maxscript is more straightfoward specially if you don't have access to pymxs library, like me. Because I have to create tools compatible with max 2016.&lt;/P&gt;&lt;P&gt;Anyway, I using it because python is a live powerful language but the thing that make me make this choice in the end is the posibility to use pyside to create UIs.&lt;/P&gt;&lt;P&gt;Anyway my current code is plagued of maxscript&amp;nbsp; snippet trying to overcomethe difficulties I have trying to do some things with python. Some because on my lack of knowledge of the implementation of python in max, some because the implemetation really has some limitations.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 16:13:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/why-is-my-python-function-not-working/m-p/8299959#M9644</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-28T16:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: why is my python function not working?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/why-is-my-python-function-not-working/m-p/8302608#M9645</link>
      <description>&lt;P&gt;Yes i was thinking the same thing. I wish python in max be as flexible as in maya and do some improvement in documentation&lt;/P&gt;</description>
      <pubDate>Sun, 30 Sep 2018 11:24:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/why-is-my-python-function-not-working/m-p/8302608#M9645</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-30T11:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: why is my python function not working?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/why-is-my-python-function-not-working/m-p/8303077#M9646</link>
      <description>&lt;P&gt;I suposse pymxs is close to the idea of the maya implementation of python. But in the end the main issue I think is the main software. It's pretty old and the core is still the very same. At least that's the impression I get navigating for the code exposed in the sdk.&amp;nbsp; That, in my opinion, tax heavily any endeavor of develope for this platform.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Sep 2018 20:36:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/why-is-my-python-function-not-working/m-p/8303077#M9646</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-30T20:36:31Z</dc:date>
    </item>
  </channel>
</rss>

