We are re-building Nukepedia!

Please bear with us for a little while longer

and keep an eye out for an

official announcement very soon...

 

Script Collector for Windows v1.2


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Mathieu Vallet
Useful python script that lets you quickly save your scene in a single folder.
Requirements:
8.0, 7.0, 6.0 or later
Windows
23 Sep 2015
519

Useful python script that lets you quickly save your scene in a single folder.

This script will retrieve all the sources in your Nuke scene, save them in a single folder and then save a new script with relative path. From there, you can put this folder on a USB device and re-open it anywhere you want without re-linking all sources files.


To use it just copy/paste the code in the script editor.

 

 

Mathieu Vallet
Please login in order to download these files.

Comments   

 
0 # Pavel Vicik 2015-02-25 19:56
Amazing! I need to try! Few days ago I was thinking about how can I collect files into one folder. Thank you!
 
 
+1 # Mathieu Vallet 2015-02-26 09:30
Thank you !
Do not hesitate to tell me if anything went wrong.
 
 
0 # Pavel Vicik 2015-02-28 23:14
Hi Mathieu, I have problem to load script directly in Nuke. Error message pops up "name collectScript is not defined". In meny.py i wrote this m.addCommand("c ollectScript", "collectScript. collectScript() ")
Thanks for helping me.
 
 
+1 # Mathieu Vallet 2015-03-01 00:44
Hi,
Actually you have two things to do to add it in a Nuke menu.

First of all the main function that run the script is call mainFunction so you've to replace the line in your menu.py with that one :
m.addCommand("collectScript", "collectScript.mainFunction()")

Secondly you've to open the collectScript.p y with a text editor and delete the last line that is :
mainFunction()

Because if you don't do that the script will automatically run at the nuke start and you don't want that ;-)

I hope it's helping you.
 
 
+1 # Pavel Vicik 2015-03-02 15:38
Thank you very much! :)
 
 
+1 # Arno Boudon 2015-03-06 13:26
Nice one Mat ! Thanks
 
 
0 # Mathieu Vallet 2015-03-06 13:28
Merci Arno !
 
 
0 # Randy Little 2015-09-12 20:57
error :-( was working then stopped. :-(

mainFunction()
# Result: Traceback (most recent call last):
File "", line 409, in
File "", line 58, in mainFunction
File "", line 109, in countElements
ValueError: invalid literal for int() with base 10: ''
 
 
0 # Jason Huang 2015-09-23 19:12
Got the same error as Randy.....

Quoting Randy Little:
error :-( was working then stopped. :-(

mainFunction()
# Result: Traceback (most recent call last):
File "", line 409, in
File "", line 58, in mainFunction
File "", line 109, in countElements
ValueError: invalid literal for int() with base 10: ''
 
 
0 # Mathieu Vallet 2015-09-24 03:15
Hi guys,

I tried a lot of situation and never get this error.

I think it's because of a weird file name. Could you find the file that gives you this error and write the full file path here please ?

Thanks
 
 
0 # Jason Huang 2015-09-24 03:45
Mathieu,

Here is the message I got:
# Result: Traceback (most recent call last):
File "", line 409, in
File "", line 74, in mainFunction
File "", line 109, in countElements
ValueError: invalid literal for int() with base 10: 'et%02'

Quoting Mathieu Vallet:
Hi guys,

I tried a lot of situation and never get this error.

I think it's because of a weird file name. Could you find the file that gives you this error and write the full file path here please ?

Thanks
 
 
0 # Mathieu Vallet 2015-09-24 05:16
All right

I just did a version 1.2 that should fix the problem.
Let me know if it works or not.

Thanks
 
 
0 # Jason Huang 2015-09-24 06:25
Still throws error as below....

# Result: loc06_pano_v01_hdr
Set%02d
Traceback (most recent call last):
File "", line 413, in
File "", line 75, in mainFunction
File "", line 112, in countElements
ValueError: invalid literal for int() with base 10: 'et%02'
 
 
0 # Mathieu Vallet 2015-09-24 14:04
Its probably because your name file is like
loc06_pano_v01_hdrSet%02d.hdr
try to rename it like that
loc06_pano_v01_hdrSet_%02d.hdr

You always have to separate the padding from the rest with an underscore or a dot.
 
 
0 # Thomas Vu 2016-05-19 15:03
hello Mathieu there is something wrong with script
errors: A python Object is not attached to a node

ps:/ im using nuke 10
ps2: i just give it another try, its work but idk why some time that errors show up
 
 
+1 # Mathieu Vallet 2016-05-19 15:59
Hello Thinh vu

Sadly, I don't have Nuke 10 at home, so I cannot investigate.

Glad that the second try works.
 
 
0 # Thomas Vu 2016-05-20 14:03
hi! today i tried it again still errors , can you fix it
here the logs:

Traceback :
File "", line 1, in
File "C:\Program file\Nuke\pytho ngextionsions\s ite-packages\co llectScript.py" , line 59, in mainFunction
countElements

C:\Program file\Nuke\pytho ngextionsions\s ite-packages\co llectScript.py" , line 112, in mainFunction
countElements
padd = in

ValueError: invalid literal for int with base 10: ' '

--------------------------------
this trouble look like the other people, but can you fix it ?
then i tried with other shot correct name


Traceback :
File "", line 1, in
File "C:\Program file\Nuke\pytho ngextionsions\s ite-packages\co llectScript.py" , line 59, in mainFunction
countElements

C:\Program file\Nuke\pytho ngextionsions\s ite-packages\co llectScript.py" , line 92, in countElements
absPath = read.knob.getValue
ValueError: A PythonObject is not attched to a node
 

You have no rights to post comments

We have 4655 guests and 48 members online