(c) TIG 2010
Permission to use, copy, modify, and distribute this software for
any purpose and without fee is hereby granted, provided that the above
copyright notice appear in all copies.
THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
___________________________________________________________________________
repathocs.rb >>> ../Plugins/ folder
___________________________________________________________________________
Description:
This repaths the textures within an Octane OCS file to match the current
OCS's folder.
It is to use in conjunction with Sketchup Octane Exporter if you have copied
an ocs.
For example you have a folder ../projectA/ containing 'project.ocs' with its
texture files in ../projectA/project_Textures/.
You make adjustments to the materials etc in the OCS.
Later you decide to do some parallel options...
You make a copy of the whole 'projectA' folder and its contents as
../projectB/
Because the paths to the textures are 'hardwired' into an OCS file the
'projectB' version of the OCS continues to look at the textures in
../projectA/project_Textures/
To separate the two OCSs completely you need to change the textures'
paths in the new OCS - you can re-map them manually but if there are several
files it's a pain.
The .obj can also be wrongly linked.
This tool does it automatically for you.
Copy the files and then run this tool prior to exporting the skp to the ocs...
___________________________________________________________________________
Usage:
Open the Ruby Console and type
repathocs
+ <enter>
It runs and opens a browser to find the OCS to repath.
Select the OCS.
It is then edited to repath every texture to the
OCs's folder + /project_Textures/ folder.
So for example if the original points to
C:\Users\TIG\Desktop\Tester\Tester_Textures\image.png
but the OCS is now in
'C:\Users\TIG\Documents\TesterB\'
the texture path will change to
C:\Users\TIG\Documents\TesterB\Tester_Textures\image.png
The .obj file's is also renamed and its path corrected if necessary.
On completion it reports what's changed.
___________________________________________________________________________
Note: If "_Textures" is different in your locale edit it below***.
___________________________________________________________________________
Donations:
by PayPal to info @ revitrev.org
___________________________________________________________________________
Version:
1.0 20101008 First Issue.
___________________________________________________________________________
Unzip the .rb file and put it into your ../Plugins/ folder...