Page 1 of 1

If you export your age often...

PostPosted: Sat Jun 12, 2010 1:07 am
by tachzusamm
... there is a little trick to avoid this boring selection of the output folder each time.

Okay, from an IC point of view, writers completely finish their ages before they visit them the first time - but to be honest, I don't. Actually, I see myself exporting it many times a day to check if it looks or works as expected, when new stuff is added.
It made me crazy that Blender does not remember the folder I selected to export the age to - each time I had to browse to the folder again, or select it from the history (which disappears when Blender got closed) and make sure the age name is typed correctly, without all my version number stuff.

Now the trick:
Open the file prp_Export.py (located in <Your Blender Folder>\.blender\scripts\PyPRP) with a text editor (e.g. Notepad, NOT Word!), scroll down to the bottom and find this line:
Code: Select all
    fname = Blender.sys.makename(ext = "." + w[1])

Assume your URU installation is located in:
"C:\Uru - Ages Beyond Myst"
and your age is called:
"MyAge"

then comment the line mentioned above out (add a "#" in front of it) and add a replacement for the line, which directly contains your installation path and the age's name; it should look like this now:
Code: Select all
    #fname = Blender.sys.makename(ext = "." + w[1])
    fname = r"C:\Uru - Ages Beyond Myst\dat\MyAge." + w[1]

(the little r in front of the path string just avoids the necessity to escape the backslashes)

Save the file, restart Blender (or do "Update Menus" under Scripts).

Be sure to enter the text exactly as shown (yes there is a dot after MyAge), don't forget the \dat\ between folder and age name, avoid typos - and to be safe, keep a backup of your original prp_Export.py file.

Enjoy.


Note: Yes, this is a hack, but can be easily reverted - or changed if you start a new age. And you can still browse to other folder or export other ages - it just replaces the *default* export selection. To revert, uncomment the first original line and comment your own line out, or restore your backup.
(Refers to PyPRP 1.6)

Re: If you export your age often...

PostPosted: Sat Jun 12, 2010 8:45 am
by Tweek
I work the same, build new bits, export to test, build new bits, export to test.

I basically just work with 2 folders open, my build folder and the dat folder and just drag the files over each time.

Re: If you export your age often...

PostPosted: Sat Jun 12, 2010 9:09 am
by Aloys
Oh, this is a very useful trick; thanks a lot! That will save quite a bit of clics and frustration during those long test periods..
(I wish I knew that way back when I exported my test Age 15 times a day. :) )

Re: If you export your age often...

PostPosted: Sat Jun 12, 2010 10:27 am
by Paradox
I (ab)use GNU Makefiles to have libHSPlasma recompress my PRPs after export and copy them to the right location.

I'm not particularly a fan of exporting right to Uru's dat directory because of the extra files that PyPRP creates (output log, textures cache, etc.)