It looks like it's using the .py file that just imports everything from the module to encourage maya to properly load the plugin.
So, the one line Plugin file is needed so you can loadPlugin on it, which sets maya up properly to register the plugin. Thus navigating around the need to loadPlugin on a .py file while wanting to distribute .pyc files. If you're unsure of what to put into the __init__.pyc file, don't worry too much, try with an empty file, or check out pymel's for some hints on what is possible. The init file allows Python to recoginse the containing folder as a module (almost like looking at all the files within it's folder as being part of one big text file broken up into understandable parts.) On Wed, Apr 1, 2009 at 10:58 AM, Simon <[email protected]> wrote: > > hi John , > > thanx for your answer . i already tried to "import" my plugin within the > scripteditor , and maya created the .pyc-file but i remember maya > reported me some errors , that he "cant import" the *.py-file ( i think > , that is because you cannot "import" scripted-plugins) > > so , as you described , the pyc did not load proper in the plugin-manager . > > on highend3d.com i found one python plugin ( stretchIK ) , that uses pyc > .... but inside the zip from highend , there is next to the pyc also a > __init__.pyc , and i dont know , how to create this __init__pyc in order > to initialize the plugin proper , or if there is a better way , of > compiling scripted-plugins , as i did not find any information on the > net , yet , about - compiling python-plugins . > > here is a link to the file i mentioned , that uses a pyc-file > http://highend3d.com/maya/downloads/plugins/animation/Stretchy-ik-4863.html > > so maybe anyone can explain , that would be very nice > > have a nice day > Sim.On > > > > > John Creson schrieb: > > compiling it is not an issue, just load the plugin and Python makes > > the .pyc in the file next to the plugin. > > Getting Maya to load in the .pyc file is another question. > > > > On Wed, Apr 1, 2009 at 3:56 AM, sim.On <[email protected] > > <mailto:[email protected]>> wrote: > > > > > > hi , > > > > i am just curious , how to compile a scripted-plugin as pyc ? > > > > i know , python-pycs can be easily reverse-compiled and i read about > > incompatibility-issues , that mkight come along , when using > different > > versions of python , but i still want to know "HOW TO" create a pyc- > > plugin. > > > > thank you for you help and have a nice day > > Sim.On > > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/python_inside_maya -~----------~----~----~----~------~----~------~--~---
