<?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: Plugin Development: Ways to add custom and external modules in VRED Forum</title>
    <link>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13381639#M51</link>
    <description>&lt;P&gt;Hi and thanks for the exchange here!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;OL&gt;&lt;LI&gt;Put all plugin modules in a directory &lt;U&gt;outside&lt;/U&gt; of ScriptPlugins&lt;/LI&gt;&lt;LI&gt;Remove file extensions from module files and use some python magic to load them anyway&lt;/LI&gt;&lt;LI&gt;Compile python files to .pyc&lt;/LI&gt;&lt;LI&gt;Export everything to a custom module and load it from somewhere else&lt;/LI&gt;&lt;LI&gt;Put all code in one file&lt;/LI&gt;&lt;/OL&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I've used 1., 3, 4 and 5 in the past.&lt;STRONG&gt; I can still recommend the first approach&lt;/STRONG&gt;, but have an improved version (see below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;User environment variable&amp;nbsp;VRED2025_3_SCRIPT_PLUGINS specifies a directory like&amp;nbsp;C:\VRED-Plugins\VREDPro-17.3\ScriptPlugins as an additional search path for ScriptPlugins. This is where the main entry point of the Plugin has to be placed. I'll call it &lt;STRONG&gt;MyScriptPlugin.py&lt;/STRONG&gt;&amp;nbsp;here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C:\VRED-Plugins\VREDPro-17.3\ScriptPlugins\MyScriptPlugin.py&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the&amp;nbsp;&lt;STRONG&gt;MyScriptPlugin.py&lt;/STRONG&gt;, I typically refer to (at least) two other directories: &lt;STRONG&gt;site-packages&lt;/STRONG&gt; &amp;amp; &lt;STRONG&gt;scriptsDirectory&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The folder &lt;STRONG&gt;site-packages&lt;/STRONG&gt;, is for all python packages, similar to what you can find in typical python installation directories, e.g.&amp;nbsp;C:\Program Files\Autodesk\VREDPro-17.3\lib\python\Lib\site-packages&lt;/P&gt;&lt;P&gt;Those packages are shared among all plugins and live in the same global namespace.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second folder &lt;STRONG&gt;scriptsDirectory&lt;/STRONG&gt; is also added to path and refers to the custom modules and packages that are specifically used for this plugin. It is structured in python packages with (more or less) one package per plugin. I consider the &lt;STRONG&gt;top-level-packages as namespaces&lt;/STRONG&gt; and only use &lt;STRONG&gt;relative imports&lt;/STRONG&gt; to prevent cyclic dependencies and issues with python modules with similar names in other plugins.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;...
# assumption: _hidden_ python modules (directories or py-files) are located next to this file
scriptsDirectory = os.path.dirname(__file__)
if not scriptsDirectory in sys.path:
    sys.path.append(scriptsDirectory)

# assumption: _hidden_ directory 'site-packages' is located next to this file
sitePackagesDirectory = os.path.join(os.path.dirname(__file__), "site-packages")
if not sitePackagesDirectory in sys.path:
    sys.path.append(sitePackagesDirectory)
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The best solution for me is to just &lt;STRONG&gt;hide&lt;/STRONG&gt; the top-level folders in the ScriptPlugins search path containing *.py files &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;With Installers like InnoSetup, you can specify certain attributes that directories should have when being installed to target machines.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;.\ScriptPlugins\MyScriptPlugin.py &amp;lt;- entry point &amp;amp; defines plugin name in VRED
.\ScriptPlugins\AnyOtherPlugin.py

.\site-packages\ &amp;lt;- common site-packages, added to sys.path
.\ScriptPlugins\site-packages\ &amp;lt;- could also be here (but needs to be hidden)
.\ScriptPlugins\ScriptsDirectory\ &amp;lt;- scriptsDirectory, hidden, added to sys.path

.\ScriptPlugins\ScriptsDirectory\myscriptplugin\ &amp;lt;- use import myscriptpluginto in 'MyScriptPlugin.py'
.\ScriptPlugins\ScriptsDirectory\anyotherplugin\ &amp;lt;- does no harm

.\ScriptPlugins\ScriptsDirectory\myscriptplugin\__init__.py &amp;lt;- will be executed once (on first import)
.\ScriptPlugins\ScriptsDirectory\myscriptplugin\package\module.py &amp;lt;- custom modules with relative imports&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this layout, only the &lt;STRONG&gt;ScriptsDirectory&lt;/STRONG&gt; itself (and possibly &lt;STRONG&gt;site-packages&lt;/STRONG&gt;) needs to be hidden, VRED won't walk through the folders to locate *.py files.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Mar 2025 14:46:28 GMT</pubDate>
    <dc:creator>clemens_schlicker_audi</dc:creator>
    <dc:date>2025-03-20T14:46:28Z</dc:date>
    <item>
      <title>Plugin Development: Ways to add custom and external modules</title>
      <link>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13381075#M48</link>
      <description>&lt;P&gt;Hey!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I develop Scripts and Plugins for several years now and used several different approaches to include external python modules for plugins. All with their own advantages and drawbacks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The general problem is, that every python file (.py) in the ScriptPlugins directory is automatically interpreted as a script plugin. A naive approach to adding external modules or splitting up you code in different files as plain scripts does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are several different ways I tried to work around that over the years:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Put all plugin modules in a directory &lt;U&gt;outside&lt;/U&gt; of ScriptPlugins&lt;UL&gt;&lt;LI&gt;Pro: Easy to do with a custom build pipeline&lt;/LI&gt;&lt;LI&gt;Con: Not very elegant, may break when users load plugins from a directory specified by environment variables&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Remove file extensions from module files and use some python magic to load them anyway&lt;UL&gt;&lt;LI&gt;Pro: Files can be places inside the plugin directory&lt;/LI&gt;&lt;LI&gt;Con: Complex build pipeline necessary, testing is slower because files have to be processed and loaded differently when running in VRED (you want the files to be .py in your dev environment but without .py in VRED)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Compile python files to .pyc&lt;UL&gt;&lt;LI&gt;Pro: Works with custom modules&lt;/LI&gt;&lt;LI&gt;Con: Does not work (out-of-the-box) when you want to ship other python packages&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Export everything to a custom module and load it from somewhere else&lt;UL&gt;&lt;LI&gt;Really depends on the customer infrastructure&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Put all code in one file&lt;UL&gt;&lt;LI&gt;Good look maintaining your 10000 lines of code plugin&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I havent found the holy grail yet. What approaches do you prefer? Is there a "best practice" that we can agree on?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Suggestions for improvement:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Use an "ignore" file where developers can define glob patterns to exclude .py files from being interpreted as Script Plugins.&lt;/LI&gt;&lt;LI&gt;Suggest a default Plugin directory structure where custom and externa libraries have fixed folders&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;Best,&lt;/P&gt;&lt;P&gt;Christopher&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 13:58:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13381075#M48</guid>
      <dc:creator>chr33z</dc:creator>
      <dc:date>2025-03-20T13:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Plugin Development: Ways to add custom and external modules</title>
      <link>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13381463#M49</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6074732"&gt;@chr33z&lt;/a&gt;&amp;nbsp;, good analysis, i completely agree with you!&lt;/P&gt;
&lt;P&gt;Right now i manage "complex" script plugins&amp;nbsp; with an "outside" folder and for me is the best way i found.&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 13:17:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13381463#M49</guid>
      <dc:creator>Christian_Garimberti</dc:creator>
      <dc:date>2025-03-20T13:17:16Z</dc:date>
    </item>
    <item>
      <title>Betreff: Plugin Development: Ways to add custom and external modules</title>
      <link>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13381558#M50</link>
      <description>&lt;P&gt;I added "Compiling python script to .pyc". This works for custom modules, but is harder when you want to ship additional python packages.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 13:59:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13381558#M50</guid>
      <dc:creator>chr33z</dc:creator>
      <dc:date>2025-03-20T13:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Plugin Development: Ways to add custom and external modules</title>
      <link>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13381639#M51</link>
      <description>&lt;P&gt;Hi and thanks for the exchange here!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;OL&gt;&lt;LI&gt;Put all plugin modules in a directory &lt;U&gt;outside&lt;/U&gt; of ScriptPlugins&lt;/LI&gt;&lt;LI&gt;Remove file extensions from module files and use some python magic to load them anyway&lt;/LI&gt;&lt;LI&gt;Compile python files to .pyc&lt;/LI&gt;&lt;LI&gt;Export everything to a custom module and load it from somewhere else&lt;/LI&gt;&lt;LI&gt;Put all code in one file&lt;/LI&gt;&lt;/OL&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I've used 1., 3, 4 and 5 in the past.&lt;STRONG&gt; I can still recommend the first approach&lt;/STRONG&gt;, but have an improved version (see below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;User environment variable&amp;nbsp;VRED2025_3_SCRIPT_PLUGINS specifies a directory like&amp;nbsp;C:\VRED-Plugins\VREDPro-17.3\ScriptPlugins as an additional search path for ScriptPlugins. This is where the main entry point of the Plugin has to be placed. I'll call it &lt;STRONG&gt;MyScriptPlugin.py&lt;/STRONG&gt;&amp;nbsp;here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C:\VRED-Plugins\VREDPro-17.3\ScriptPlugins\MyScriptPlugin.py&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the&amp;nbsp;&lt;STRONG&gt;MyScriptPlugin.py&lt;/STRONG&gt;, I typically refer to (at least) two other directories: &lt;STRONG&gt;site-packages&lt;/STRONG&gt; &amp;amp; &lt;STRONG&gt;scriptsDirectory&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The folder &lt;STRONG&gt;site-packages&lt;/STRONG&gt;, is for all python packages, similar to what you can find in typical python installation directories, e.g.&amp;nbsp;C:\Program Files\Autodesk\VREDPro-17.3\lib\python\Lib\site-packages&lt;/P&gt;&lt;P&gt;Those packages are shared among all plugins and live in the same global namespace.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second folder &lt;STRONG&gt;scriptsDirectory&lt;/STRONG&gt; is also added to path and refers to the custom modules and packages that are specifically used for this plugin. It is structured in python packages with (more or less) one package per plugin. I consider the &lt;STRONG&gt;top-level-packages as namespaces&lt;/STRONG&gt; and only use &lt;STRONG&gt;relative imports&lt;/STRONG&gt; to prevent cyclic dependencies and issues with python modules with similar names in other plugins.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;...
# assumption: _hidden_ python modules (directories or py-files) are located next to this file
scriptsDirectory = os.path.dirname(__file__)
if not scriptsDirectory in sys.path:
    sys.path.append(scriptsDirectory)

# assumption: _hidden_ directory 'site-packages' is located next to this file
sitePackagesDirectory = os.path.join(os.path.dirname(__file__), "site-packages")
if not sitePackagesDirectory in sys.path:
    sys.path.append(sitePackagesDirectory)
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The best solution for me is to just &lt;STRONG&gt;hide&lt;/STRONG&gt; the top-level folders in the ScriptPlugins search path containing *.py files &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;With Installers like InnoSetup, you can specify certain attributes that directories should have when being installed to target machines.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;.\ScriptPlugins\MyScriptPlugin.py &amp;lt;- entry point &amp;amp; defines plugin name in VRED
.\ScriptPlugins\AnyOtherPlugin.py

.\site-packages\ &amp;lt;- common site-packages, added to sys.path
.\ScriptPlugins\site-packages\ &amp;lt;- could also be here (but needs to be hidden)
.\ScriptPlugins\ScriptsDirectory\ &amp;lt;- scriptsDirectory, hidden, added to sys.path

.\ScriptPlugins\ScriptsDirectory\myscriptplugin\ &amp;lt;- use import myscriptpluginto in 'MyScriptPlugin.py'
.\ScriptPlugins\ScriptsDirectory\anyotherplugin\ &amp;lt;- does no harm

.\ScriptPlugins\ScriptsDirectory\myscriptplugin\__init__.py &amp;lt;- will be executed once (on first import)
.\ScriptPlugins\ScriptsDirectory\myscriptplugin\package\module.py &amp;lt;- custom modules with relative imports&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this layout, only the &lt;STRONG&gt;ScriptsDirectory&lt;/STRONG&gt; itself (and possibly &lt;STRONG&gt;site-packages&lt;/STRONG&gt;) needs to be hidden, VRED won't walk through the folders to locate *.py files.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 14:46:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13381639#M51</guid>
      <dc:creator>clemens_schlicker_audi</dc:creator>
      <dc:date>2025-03-20T14:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Plugin Development: Ways to add custom and external modules</title>
      <link>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13381658#M52</link>
      <description>&lt;P&gt;In this other thread&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/vred-forum/scriptplugin-questions-1-shared-namespace-2-plugin-icon/m-p/13340572/highlight/true#M12139" target="_blank" rel="noopener"&gt;ScriptPlugin Questions, &lt;/A&gt;&amp;nbsp;I mentioned how I typically refer to those scrips.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;quote&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To access variables that are defined in the scope of your script plugin, you've got to inject some variables/attributes to modules.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the script plugin:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import sys
import os

pluginPath = os.path.dirname(__file__)
if not pluginPath in sys.path:
    sys.path.append(pluginPath)

# assumption: your module is called 'mymodulename' 
# prerequisite: 'mymodulename' is located next to the script plugin python file
# prerequisite: 'mymodulename' is a hidden directory or a hidden python file
import mymodulename

class MyPluginClass():
    pass

myPluginClass = MyPluginClass()

mymodulename.myPluginClass = myPluginClass&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Vred (e.g. terminal or variant set scripts)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import mymodulename

print(mymodulename.myPluginClass)
# terminal output: &amp;lt;VREDModule56.MyPluginClass object at 0x00000175B2455E50&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Keep in mind that the life-cycle of these attributes have to be considered since they might live longer than the VRED scene contents that they refer to. You can connect to vrMessageService or vrFileIOService signals to tidy up, reset or recreate your objects.&lt;/P&gt;&lt;P&gt;Also, any modules that you import are only imported &lt;STRONG&gt;&lt;EM&gt;once&lt;/EM&gt;&lt;/STRONG&gt;during the lifespan of a VRED runtime. Consequently, don't rely on just an import statement and global statements in the modules, but instead implement start and cleanup functions for your modules and call them from VRED (hotkeys, Qt GUI, singals, VarSets, ...).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;/quote&amp;gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 14:41:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13381658#M52</guid>
      <dc:creator>clemens_schlicker_audi</dc:creator>
      <dc:date>2025-03-20T14:41:24Z</dc:date>
    </item>
    <item>
      <title>Betreff: Plugin Development: Ways to add custom and external modules</title>
      <link>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13381826#M53</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6992544"&gt;@clemens_schlicker_audi&lt;/a&gt;&amp;nbsp;Nice!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll have to try if a hidden directory actually is ignored. I like the idea! It's like an "ignore" pattern to ignore python files from loading. In theory it should be possible to hide a folder inside your plugin folder:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ScriptPlugins&lt;UL&gt;&lt;LI&gt;MyAwesomePlugin&lt;UL&gt;&lt;LI&gt;modules [hidden]&lt;/LI&gt;&lt;LI&gt;MyAwesomePlugin.py&lt;/LI&gt;&lt;LI&gt;...&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the moment I use a directory located outside of ScriptPlugins for additional plugin modules. But it don't like the fact that the files are spread over different folders and file hiearchies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: But imo a more cleaner approach would actually be a ignore-file because hidden folders are - well - hidden and obscured which makes it harder to understand the structure of a plugin&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 16:01:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13381826#M53</guid>
      <dc:creator>chr33z</dc:creator>
      <dc:date>2025-03-20T16:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Plugin Development: Ways to add custom and external modules</title>
      <link>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13382866#M54</link>
      <description>&lt;P&gt;If you main focus is to have just one plugin folder ".\ScriptPlugins\&lt;U&gt;MyAwesomePlugin&lt;/U&gt;", here's another example folder structure as bullet list:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;.\ScriptPlugins&lt;UL&gt;&lt;LI&gt;.\&lt;U&gt;MyAwesomePlugin&lt;/U&gt;&lt;UL&gt;&lt;LI&gt;.\data&lt;UL&gt;&lt;LI&gt;... [documentation, assets and stuff]&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;.\scripts&lt;UL&gt;&lt;LI&gt;.\myawesomeplugin [hidden]&lt;UL&gt;&lt;LI&gt;.\mypackageA&lt;UL&gt;&lt;LI&gt;module1.py&lt;/LI&gt;&lt;LI&gt;module2.py&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;__init__.py&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;.\site-packages [hidden]&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;MyAwesomePlugin.p&lt;/STRONG&gt;y &amp;lt;- Entry point with&amp;nbsp;VREDPluginWidget access&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;.\uninstaller&lt;UL&gt;&lt;LI&gt;unins000.exe&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;app-version.txt&lt;/LI&gt;&lt;LI&gt;release-notes.md&lt;/LI&gt;&lt;LI&gt;...&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;.\OtherAwesomePlugin&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;OtherAwesomePlugin.p&lt;/STRONG&gt;y&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;MonolithicPlugin.py&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;...&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In VRED:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import myawesomeplugin
myawesomeplugin.initialize() # from myawesomeplugin/__init__.py

from myawesomeplugin.mypackageA.module1 import MyClass
myInstance = MyClass()
myInstance.doSomething()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hidden folders do work (at least since 2023.2) and continue to work in VRED 2025.3 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 06:57:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13382866#M54</guid>
      <dc:creator>clemens_schlicker_audi</dc:creator>
      <dc:date>2025-03-21T06:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Plugin Development: Ways to add custom and external modules</title>
      <link>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13382913#M55</link>
      <description>&lt;P&gt;Hidden folders make it instantly more fun to develop plugins &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 07:15:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/plugin-development-ways-to-add-custom-and-external-modules/m-p/13382913#M55</guid>
      <dc:creator>chr33z</dc:creator>
      <dc:date>2025-03-21T07:15:46Z</dc:date>
    </item>
  </channel>
</rss>

