diff options
author | hwc487 | 2012-06-01 14:09:05 -0700 |
---|---|---|
committer | hwc487 | 2012-06-01 14:09:05 -0700 |
commit | 7afe0ddcae8f2f0899bffd16ba171c927b3fca96 (patch) | |
tree | 3c4bad5f2acbad78172d2f0970bb8dd29d18561d /js | |
parent | 1c445cf5d905f79937998cf2f1115594ea8c1074 (diff) | |
download | ninja-7afe0ddcae8f2f0899bffd16ba171c927b3fca96.tar.gz |
Correction for texture paths.
Diffstat (limited to 'js')
-rw-r--r-- | js/lib/rdge/texture.js | 7 | ||||
-rwxr-xr-x | js/panels/Materials/materials-popup.reel/materials-popup.js | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/js/lib/rdge/texture.js b/js/lib/rdge/texture.js index 498dcf3b..bd8e6198 100644 --- a/js/lib/rdge/texture.js +++ b/js/lib/rdge/texture.js | |||
@@ -68,9 +68,12 @@ function Texture( dstWorld, texMapName, wrap, mips ) | |||
68 | { | 68 | { |
69 | // determine if the source is a canvas or an image file | 69 | // determine if the source is a canvas or an image file |
70 | var viewUtils = require("js/helper-classes/3D/view-utils").ViewUtils; | 70 | var viewUtils = require("js/helper-classes/3D/view-utils").ViewUtils; |
71 | var root = viewUtils.application.ninja.currentDocument.documentRoot; | 71 | //var root = viewUtils.application.ninja.currentDocument.documentRoot; |
72 | var root; | ||
73 | if (viewUtils.application.ninja.currentDocument) | ||
74 | root = viewUtils.application.ninja.currentDocument.model.documentRoot; | ||
72 | var srcCanvas = this._srcCanvas; | 75 | var srcCanvas = this._srcCanvas; |
73 | if (!srcCanvas) | 76 | if (!srcCanvas && root) |
74 | srcCanvas = this.findCanvas( this._texMapName, root ); | 77 | srcCanvas = this.findCanvas( this._texMapName, root ); |
75 | if (srcCanvas) | 78 | if (srcCanvas) |
76 | { | 79 | { |
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index db3f7652..3ef2e4ef 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js | |||
@@ -178,7 +178,7 @@ exports.MaterialsPopup = Montage.create(Component, { | |||
178 | if (index >= 0) | 178 | if (index >= 0) |
179 | { | 179 | { |
180 | value = value.substr( index+1 ); | 180 | value = value.substr( index+1 ); |
181 | value = "assets\\images\\" + value; | 181 | value = "assets/images/" + value; |
182 | } | 182 | } |
183 | rtnValue = value.slice(0); | 183 | rtnValue = value.slice(0); |
184 | } | 184 | } |