Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Unified Diff: samples/samples_gen.py

Issue 1723019: Fixed bug in samples conversion introduced by WebGL-related changes and... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/o3d/
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/samples_gen.py
===================================================================
--- samples/samples_gen.py (revision 45777)
+++ samples/samples_gen.py (working copy)
@@ -97,7 +97,12 @@
if webgl_mode:
name = name + "_webgl"
output = asset['path'].replace('convert_', '')
- output = posixpath.splitext(output)[0] + ".o3dtgz"
+ output_base = posixpath.splitext(output)[0]
+ output_tgz = output_base + ".o3dtgz"
+ output_json = output_base + "/scene.json"
+ output = output_tgz
+ if webgl_mode:
+ output = output_json
output_dir = posixpath.dirname(output)
output_file.write(" {\n")
output_file.write(" 'action_name': '%s',\n" % name)
@@ -125,7 +130,10 @@
output_file.write(" '--convert-dds-to-png',\n")
output_file.write(" '--convert-cg-to-glsl',\n")
output_file.write(" '../o3d_assets/samples/%s',\n" % asset['path'])
- output_file.write(" '<(_outputs)',\n")
+ if webgl_mode:
+ output_file.write(" '%s',\n" % output_tgz)
+ else:
+ output_file.write(" '<(_outputs)',\n")
output_file.write(" ],\n")
output_file.write(" },\n")
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698