I agree with Jake that this smells like a mixed-indentation issue. If you're
using any kind of code editor, there should be a command to unify all
indentation in the current file, or explicitly convert it to either tabs or
spaces.
As far as package development goes, I don't even bother with rvpkg anymore, as
I find that workflow needlessly complicated for a permanent or semi-permanent
site configuration. Instead, I just just edit the rvload2 file manually as
needed, and otherwise place various source and support files where they need to
go.
-Nathan
On 3/28/2017 7:43 AM, Bruno-Pierre Jobin wrote:
It looks like I'm still missing something.
I make a "zip mystuff-1.0.rvpkg PACKAGE mystuff.py" in the terminal. Add the
package to RV, load it, restart and then still getting this error. I also can't
get either 'test1234' nor 'activestate' to be printed in the console.
Traceback (most recent call last):
File "/home/bpjobin/.rv/Python/mystuff.py", line 5, in
class PyMyStuffMode(MinorMode):
File "/home/bpjobin/.rv/Python/mystuff.py", line 11, in PyMyStuffMode
self.init("py-mystuff-mode",
NameError: name 'self' is not defined
ERROR: python module mystuff could not be imported
from rv.rvtypes import *
from rv.commands import *
from rv.extra_commands import *
class PyMyStuffMode(MinorMode):
def __init__(self):
MinorMode.__init__(self)
print 'test1234'
self.tl = MuSymbol("rvui.toggleLookLUT")
self.init("py-mystuff-mode",
[('key-down--d', self.lookLut, 'Custom LookLUT key override')],
None,
[('Color', [('Look LUT', self.lookLut, 'd', None)])]
)
def lookLut(self):
self.tl()
activestate = rv.commands.getIntProperty("#RVLookLUT.lut.active")
print activestate
def createMode():
return PyMyStuffMode()
_______________________________________________
Nuke-python mailing list
[email protected]<mailto:[email protected]>,
http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python