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...

  1. created a folder in the root of my plugin folder called "files"
  2. Inside that I created a file
  3. 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:


this might be a working example of what you need.
But I would follow niklas suggestion of the correct way to load libraries.

I´m not really sure if that helps.
Best wishes