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