<?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: How to 'Reload Scripts Plugin' using python in VRED Forum</title>
    <link>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11387205#M3953</link>
    <description>&lt;P&gt;Hi Sinje,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in which VredVersion the vrNodeService.selectionChanged was added?&lt;/P&gt;&lt;P&gt;With my Vred2022.2 it seems not to work. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there a good way for older VredVersions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;</description>
    <pubDate>Mon, 29 Aug 2022 08:54:30 GMT</pubDate>
    <dc:creator>marc.winter2</dc:creator>
    <dc:date>2022-08-29T08:54:30Z</dc:date>
    <item>
      <title>How to 'Reload Scripts Plugin' using python</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/9648865#M3946</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to &lt;FONT color="#333399"&gt;load different UI-window&lt;/FONT&gt; based on the &lt;FONT color="#333399"&gt;differernt node&lt;/FONT&gt; (with specific name) &lt;FONT color="#333399"&gt;selected&lt;/FONT&gt; in VRED scenegraph.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For this, currently I need to click &lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;Edit&amp;gt;Reload Scripts Plugins&lt;/STRONG&gt;&lt;/FONT&gt; option&lt;STRONG&gt;, &lt;/STRONG&gt;everytime I select a new node, so that a different UI-window gets loaded according to the name of this newly selected node. (My python and ui scripts are present in 'Scripts' menu (plugin) of VRED.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I would like to know, how can I implement this functinality using &lt;FONT color="#0000FF"&gt;Python code&lt;/FONT&gt; itself so that I can avoid clicking &lt;FONT color="#FF9900"&gt;&lt;STRONG&gt;Edit&amp;gt;Reload Scripts Plugins&lt;/STRONG&gt; &lt;/FONT&gt;option&lt;STRONG&gt;,&lt;/STRONG&gt; for every new node selection. &lt;FONT color="#993366"&gt;Please find the attached screenshot.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly feel free to reply if you have any relative solution/explanation/question (or also if you don't understand anything in what I have written).&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 12:03:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/9648865#M3946</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-22T12:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to 'Reload Scripts Plugin' using python</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11374232#M3947</link>
      <description>&lt;P&gt;Bump&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 20:52:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11374232#M3947</guid>
      <dc:creator>christian_aubert</dc:creator>
      <dc:date>2022-08-22T20:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to 'Reload Scripts Plugin' using python</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11375096#M3948</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so essentially you want to react on changed node selection in your script plugin(s)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This can be done by connecting a function to the signal vrNodeService.selectionChanged():&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;def onNodeSelectionChanged():
    nodes = vrNodeService.getSelectedNodes()
    print("selection changed", len(nodes))
    # update GUI
    # ...
    
    
vrNodeService.selectionChanged.connect(onNodeSelectionChanged)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this function you'll need to update your GUI using the new selected nodes.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 08:26:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11375096#M3948</guid>
      <dc:creator>sinje_thiedemann</dc:creator>
      <dc:date>2022-08-23T08:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to 'Reload Scripts Plugin' using python</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11376175#M3949</link>
      <description>&lt;P&gt;I'm actually more interested in the ability to call "&lt;STRONG&gt;Edit&amp;gt;Reload Scripts Plugins" from a script.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 16:23:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11376175#M3949</guid>
      <dc:creator>christian_aubert</dc:creator>
      <dc:date>2022-08-23T16:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to 'Reload Scripts Plugin' using python</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11376208#M3950</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12272325"&gt;@christian_aubert&lt;/a&gt;&amp;nbsp; There's no function to do that, as far as I know. What is your use case, maybe it can be done differently?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 16:37:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11376208#M3950</guid>
      <dc:creator>sinje_thiedemann</dc:creator>
      <dc:date>2022-08-23T16:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to 'Reload Scripts Plugin' using python</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11376223#M3951</link>
      <description>&lt;P&gt;We have our own script distribution system that puts files in their proper place, but those scripts won't work until "reload scripts" takes places. Would like to automate that to avoid support calls of the "have you turned it off and on" type.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 16:41:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11376223#M3951</guid>
      <dc:creator>christian_aubert</dc:creator>
      <dc:date>2022-08-23T16:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to 'Reload Scripts Plugin' using python</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11377436#M3952</link>
      <description>Thanks, I've logged your request.</description>
      <pubDate>Wed, 24 Aug 2022 07:46:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11377436#M3952</guid>
      <dc:creator>sinje_thiedemann</dc:creator>
      <dc:date>2022-08-24T07:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to 'Reload Scripts Plugin' using python</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11387205#M3953</link>
      <description>&lt;P&gt;Hi Sinje,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in which VredVersion the vrNodeService.selectionChanged was added?&lt;/P&gt;&lt;P&gt;With my Vred2022.2 it seems not to work. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there a good way for older VredVersions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 08:54:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11387205#M3953</guid>
      <dc:creator>marc.winter2</dc:creator>
      <dc:date>2022-08-29T08:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to 'Reload Scripts Plugin' using python</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11393336#M3954</link>
      <description>&lt;P&gt;Hi Marc,&lt;/P&gt;
&lt;P&gt;vrNodeService.selectionChanged was added in 2022.3.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An alternative are "old" messages from API v1 (vrController) which can be received via vrMessageService. Please note, when you change selection from nodeA to nodeB, you will get both a selected and deselected message. Maybe reacting on selected only is sufficient for your purpose.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;def receivedMessage(msg, args):
    if msg == vrController.VRED_MSG_SELECTED_NODE:
        print("selected node")
    elif msg == vrController.VRED_MSG_DESELECTED_NODE:
        print("deselected node")

vrMessageService.message.connect(receivedMessage)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 16:06:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11393336#M3954</guid>
      <dc:creator>sinje_thiedemann</dc:creator>
      <dc:date>2022-08-31T16:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to 'Reload Scripts Plugin' using python</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11394646#M3955</link>
      <description>&lt;P&gt;Thank you Sinje&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 07:38:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-to-reload-scripts-plugin-using-python/m-p/11394646#M3955</guid>
      <dc:creator>marc.winter2</dc:creator>
      <dc:date>2022-09-01T07:38:47Z</dc:date>
    </item>
  </channel>
</rss>

