RepathOCS script

Forums: RepathOCS script
SketchUp Integrated Plugin (Integrated Plugin maintained by OTOY)

RepathOCS script

Postby TIG » Fri Oct 08, 2010 1:29 pm

TIG Fri Oct 08, 2010 1:29 pm
(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...
repathocs.zip
(2.05 KiB) Downloaded 124 times
Last edited by TIG on Sat Oct 09, 2010 4:50 pm, edited 1 time in total.
TIG
User avatar
TIG
Licensed Customer
Licensed Customer
 
Posts: 536
Joined: Wed May 12, 2010 1:25 pm

Re: RepathOCS

Postby bmneu » Sat Oct 09, 2010 7:44 am

bmneu Sat Oct 09, 2010 7:44 am
Wow, thank you! I will have to work with this and figure it out. I am so ignorant on everything and can't make sense of it.... little sleep, deadline this friday ugh. I've put trying to get this file to work the way it should aside and am doing it the hard way lol for now.
Core i7 X980 3.33GHz
12 GB RAM
GeForce GTX 480
bmneu
Licensed Customer
Licensed Customer
 
Posts: 16
Joined: Fri Jun 04, 2010 7:19 pm

Return to SketchUp


Who is online

Users browsing this forum: No registered users and 3 guests

Sun Sep 27, 2020 11:53 pm [ UTC ]