PDA

View Full Version : XRef processor (free)


rui_mac
08-17-2010, 12:00 PM
I coded a little script to process XRefs.
It should be useful for people who use lots of Xrefs that are scattered in different folders and want to join all the XRefs inside a single folder or simply join them all in the main project folder.
The Save Project... command already joins all the XRefs inside one single folder alongside the main scene file but it will create a copy of the referenced file for each XRef object (duplicating files) and you may also want to use a different folder altogether.

The script is named Process XRefs... and I made no icon for it.
When you choose "Process XRefs" from the User Scripts menu, you will get a
dialog. In it you will be able to define the folder to which you want your
referenced files to be copied to. If you just hit OK or if you leave the
path field empty, the referenced files will be copied to the folder where
your main scene is (the scene that is using the XRef objects).
You have two options:

Adjust names: this option will also set the names of the XRef objects to
the name of the referenced file. This is useful because, sometimes, you
can simply duplicate the XRef objects and change their paths. This will
leave the name unchanged. This option fixes that.

Add xref to filename: this option will add a xref_ prefix to the copied
files. It is, sometimes, useful to distinguish main files from files that
are used as XRefs.

This script will also take care of absolute and relative paths. If the referenced files are copied to the same folder as the main file, the XRef references will be made relative. Otherwise, they will be made absolute.
This script does not deal with the bitmap paths of the materials that are used in the referenced files. That is just too much to be made with COFFEE. So, the bitmaps that may be used must be copied by hand.
The script is fully commented so anyone will be able to understand how it works.
I hope you all find it useful.

Rui Batista

semerkhet22
08-18-2010, 11:56 AM
Hi rui_mac,

any chance to get a download link for Process XRefs script please.

thanks.

rui_mac
08-18-2010, 01:00 PM
Strange, I had included the link. Don't know why it didn't appeared. As soon as possible I will put a link here. (I'm typing this from my iPhone while on vacation).

Rui Batista

rui_mac
08-20-2010, 05:41 PM
Ok, here is the script (attached again... I hope it goes through, this time).

Rui Batista

semerkhet22
08-28-2010, 10:47 PM
Thanks a lot, very handy script an well commented.
It is a time savior.

Thanks again.

CGTalk Moderation
08-28-2010, 10:47 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.