diff options
-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 | } |