<?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: Working with vrMenu in VRED Forum</title>
    <link>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6880083#M9075</link>
    <description>&lt;P&gt;Have you looked at the menu_2D.py file in the examples folder? I'm on 2017.2 on OSX and this is working for me:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;def hello():
    print "Hello World!"

menu1 = vrMenu(2, 1, 1)
menu1.setPosition2D(10,10)
menu1.addLabel("&amp;lt;font color=red&amp;gt;Menu&amp;lt;/font&amp;gt;")
menu1.addCheckBox("Show statistics", "showStatistic(item_state)")
menu1.addPushButton("Hello World", "hello()")
menu1.setAlpha(1)
menu1.show()&lt;/PRE&gt;&lt;P&gt;It for a simple 2D overlay menu that should give you the basic idea.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Feb 2017 16:50:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-02-15T16:50:07Z</dc:date>
    <item>
      <title>Working with vrMenu</title>
      <link>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6876862#M9074</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried for hours now to create a menu for my vred-scene using vrMenu. I failed &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; The online help for this modul is not really helpful and even the example doesn't work in Vred 2017 SP1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there any better examples or working scripts, that I could us as basis?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards, Clemens&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 14:42:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6876862#M9074</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-14T14:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Working with vrMenu</title>
      <link>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6880083#M9075</link>
      <description>&lt;P&gt;Have you looked at the menu_2D.py file in the examples folder? I'm on 2017.2 on OSX and this is working for me:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;def hello():
    print "Hello World!"

menu1 = vrMenu(2, 1, 1)
menu1.setPosition2D(10,10)
menu1.addLabel("&amp;lt;font color=red&amp;gt;Menu&amp;lt;/font&amp;gt;")
menu1.addCheckBox("Show statistics", "showStatistic(item_state)")
menu1.addPushButton("Hello World", "hello()")
menu1.setAlpha(1)
menu1.show()&lt;/PRE&gt;&lt;P&gt;It for a simple 2D overlay menu that should give you the basic idea.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 16:50:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6880083#M9075</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-15T16:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Working with vrMenu</title>
      <link>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6889895#M9076</link>
      <description>&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;great, this gives me a good idea - thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've got a further question: I tried to activate a variantset with a push-button, but I received a syntax error (invalid syntax). Here is the line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;menu1.addPushButton("Vset01", "getVariantSet(Vset01)")&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Does anyone have an idea, what could be wrong with that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks! kind regards, Clemens&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 09:58:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6889895#M9076</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-20T09:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Working with vrMenu</title>
      <link>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6889991#M9077</link>
      <description>&lt;P&gt;Hi Clemens,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the error you get is a name error, that means that python does not recognize VSet01. No Variable in your code is named like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The function you are calling expects the name of the variant set as a string variable. That means you'll have to wrap it in quotes. Since the command itself is already wrapped in quotes you can either &lt;A title="some info on escaping" href="https://learnpythonthehardway.org/book/ex10.html" target="_blank"&gt;escape&lt;/A&gt; them or just use single quotes. the command you are using however will only return a variantset, not activate it. try&amp;nbsp;activateCapturedVariantSet() .. see the code and the screenshot below for reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;menu1 = vrMenu(2, 1, 1)
menu1.setPosition2D(10,10)
menu1.addLabel("&amp;lt;font color=red&amp;gt;Menu&amp;lt;/font&amp;gt;")
menu1.addPushButton("Variant 1", "activateCapturedVariantSet('variant1')")
menu1.addPushButton("Variant 2", "activateCapturedVariantSet('variant2')")
menu1.setAlpha(1)
menu1.show()&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VariantSet Activation" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/324628iADDD86100CBA658E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2017-02-20 um 11.52.35.png" alt="Bildschirmfoto 2017-02-20 um 11.52.35.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 10:53:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6889991#M9077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-20T10:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Working with vrMenu</title>
      <link>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6890097#M9078</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;great, that worked very well!Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only problem is, if I switch the car via the menu, it take minutes to see the variants. If i switch the car within the variant set window, it changes immediately.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems Vred is checking the variantsets everytime again? Did you ever ran into this behaviour, too?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 11:52:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6890097#M9078</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-20T11:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Working with vrMenu</title>
      <link>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6890171#M9079</link>
      <description>&lt;P&gt;And another question &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Is it somehow possible to replace the push buttons with images?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 12:42:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6890171#M9079</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-20T12:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Working with vrMenu</title>
      <link>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6890842#M9080</link>
      <description>&lt;P&gt;You can try this one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;menu1 = vrMenu(2, 1, 1)
menu1.setPosition2D(10,10)
menu1.addLabel("&amp;lt;font color=red&amp;gt;Menu&amp;lt;/font&amp;gt;")
menu1.addPushButton("Variant 1", "selectVariantSet('v1',True)")
menu1.addPushButton("Variant 2", "selectVariantSet('v2',True)")
menu1.setAlpha(1)
menu1.show()&lt;/PRE&gt;&lt;P&gt;The reference says the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;selectVariantSet(name, excludeViewpoint)&lt;BR /&gt;&lt;BR /&gt;Activates a variant set. The variant set will activate all states of its defined node and material variants.&lt;BR /&gt;Parameters:&lt;BR /&gt;name - The name of the variant set.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (type=string)&lt;BR /&gt;excludeViewpoint - exclude viewpoint from this variant set.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (type=bool)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;feels a little faster ... i have no idea if you can use images in the button ..&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2017 16:55:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6890842#M9080</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-20T16:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Working with vrMenu</title>
      <link>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6892077#M9081</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;great! This works perfect now - thank you! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 08:07:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/working-with-vrmenu/m-p/6892077#M9081</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-21T08:07:11Z</dc:date>
    </item>
  </channel>
</rss>

