modulate command data plugin
-
On 15/10/2014 at 10:52, xxxxxxxx wrote:
I've been working on a plugin for about a month but it's getting pretty big. How do I go about splitting it up into modular chunks? I've looked up several tutorials haven't really found a clear answer. Just to give you na idea of what I tired I...
- created a folder in the root of my plugin folder called "files"
- Inside that I created a helloworld.py file
- Used "from files import helloworld"
but my plugin ceased to function once I included the import statement at the top of my document. Can anyone give me an working example that I could build off of?
-
On 15/10/2014 at 11:30, xxxxxxxx wrote:
You have to add the path where the "files" directory is to sys.path. But be careful! Don't just
add it and import and be done. That can give you and your users a hard time when other
plugins also use third party libraries.Check out the section "The correct way to load libraries that are distributed with your plugin"
on my py4d-tips repository: -
On 16/10/2014 at 12:07, xxxxxxxx wrote:
There's really no other way to split up my code into MVC type components without doing it this way?
-
On 16/10/2014 at 14:58, xxxxxxxx wrote:
Hi,
this might be a working example of what you need.
But I would follow niklas suggestion of the correct way to load libraries.http://www.smart-page.net/blog/2012/06/24/smart-polychart-cinema-4d-plugin-fun-with-the-userarea/
I´m not really sure if that helps.
Best wishes
Martin