Jump to content

Use VectorScript function / procedure in python


Paolo

Recommended Posts

  • 3 weeks later...

There is a work around. 

 

Rather than writing the script within the Plug in script itself write it in a YourScriptName.py file located in the same directory as the .vsm file within you're plug in folder.

 

Then, within the Plug In Script, you just need to import the other script:

 

import YourScriptName

 The .py File is still easily read so the next step, when you're ready to encrypt and distribute said plugin, is to swap the .py for the compiled python file( .pyc), which is located within the "__pycache__" folder of whatever directory the .py file is stored in. (for more info on .pyc files check out this)

 

As long as you put the .pyc in the exact same location as where the .py was, it should function exactly the same.

 

This still isn't perfect. Compiled files can still be de compiled but this requires a much higher level of knowledge than simply opening in a text editor!

 

For more general info on encrypting python plug ins check out this thread

  • Like 2
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...