diff options
author | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-27 02:25:50 +0000 |
---|---|---|
committer | kbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-27 02:25:50 +0000 |
commit | 007a0acb82560269c7921960e2fd8077ed1eb527 (patch) | |
tree | 1bcc39232af14c8a3dfe0b82948a0db9e3a2ffcb /o3d | |
parent | a3d4081a977f58b12d73a9ae225246d5415fc1bc (diff) | |
download | chromium_src-007a0acb82560269c7921960e2fd8077ed1eb527.zip chromium_src-007a0acb82560269c7921960e2fd8077ed1eb527.tar.gz chromium_src-007a0acb82560269c7921960e2fd8077ed1eb527.tar.bz2 |
Changed cg_to_glsl converter script to also look in the script's
directory for the cgc executable, to match the layout of the prebuilt
O3D COLLADA converter binaries which already bundle cgc and its
dependent DLLs.
BUG=none
TEST=verified new searching code manually on Windows and Mac
TBR=amarinichev
Review URL: http://codereview.chromium.org/1804001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45663 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rwxr-xr-x | o3d/cg_to_glsl/convert.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/o3d/cg_to_glsl/convert.py b/o3d/cg_to_glsl/convert.py index 570b502..1982380 100755 --- a/o3d/cg_to_glsl/convert.py +++ b/o3d/cg_to_glsl/convert.py @@ -33,6 +33,13 @@ if not os.path.exists(CGC): CGC = 'c:/Program Files (x86)/NVIDIA Corporation/Cg/bin/cgc.exe' if not os.path.exists(CGC): CGC = 'c:/Program Files (x86)/NVIDIA Corporation/Cg/bin/cgc.exe' + if not os.path.exists(CGC): + script_path = os.path.abspath(sys.path[0]) + # Try again looking in the current working directory to match + # the layout of the prebuilt o3dConverter binaries. + CGC = os.path.join(script_path, 'cgc') + if not os.path.exists(CGC): + CGC = os.path.join(script_path, 'cgc.exe') # cgc complains about TANGENT1 and BINORMAL1 semantics, so we hack it by # replacing standard semantics with ATTR8-ATTR12 and then renaming them back to |