Re: [Nuke-users] A few python questions

2012-03-30 Thread Jon Wesström
...@support.thefoundry.co.uk] *Im Auftrag von *Jon Wesström *Gesendet:* Donnerstag, 29. März 2012 17:51 *An:* Nuke user discussion *Betreff:* Re: [Nuke-users] A few python questions ** ** Thank you so much, managed to solve the scriptname. I no longer get the TypeError, but (int

[Nuke-users] A few python questions

2012-03-29 Thread Jon Wesström
I'm still very new to python/nuke scripting, so these questions might be dumb, but I'm getting tired of not being able to solve them. I'm working on a tool that makes it easy to make breakdowns of a script, you basically select a node, press a button, and nuke renders out a frame. That part of

Re: [Nuke-users] A few python questions

2012-03-29 Thread Diogo Girondi
To get just the filename you can do something like: Import os print os.path.basename( nuke.Root().name() ) Or nuke.Root().name().split('/')[-1] You can replace the / for os.sep() For the TypeError you can simply do int(version)+1 assuming the version variable is assigned to a numerical

Re: [Nuke-users] A few python questions

2012-03-29 Thread Jon Wesström
Thank you so much, managed to solve the scriptname. I no longer get the TypeError, but (int)version+1 doesn't really seem to do anything. If i write: int(version) + 1 print version The result will always be 1 But if I write version = version + 1 print version It does what I want (adding one

AW: [Nuke-users] A few python questions

2012-03-29 Thread Thorsten Kaufmann
...@support.thefoundry.co.uk [mailto:nuke-users-boun...@support.thefoundry.co.uk] Im Auftrag von Jon Wesström Gesendet: Donnerstag, 29. März 2012 17:51 An: Nuke user discussion Betreff: Re: [Nuke-users] A few python questions Thank you so much, managed to solve the scriptname. I no longer get the TypeError, but (int

Re: [Nuke-users] A few python questions

2012-03-29 Thread Diogo Girondi
] A few python questions ** ** Thank you so much, managed to solve the scriptname. I no longer get the TypeError, but (int)version+1 doesn't really seem to do anything. If i write: int(version) + 1 print version ** ** The result will always be 1