ImageAsset.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2013 GarageGames, LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to
  6. // deal in the Software without restriction, including without limitation the
  7. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. // sell copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. // IN THE SOFTWARE.
  21. //-----------------------------------------------------------------------------
  22. #ifndef IMAGE_ASSET_H
  23. #include "ImageAsset.h"
  24. #endif
  25. #ifndef _ASSET_MANAGER_H_
  26. #include "assets/assetManager.h"
  27. #endif
  28. #ifndef _CONSOLETYPES_H_
  29. #include "console/consoleTypes.h"
  30. #endif
  31. #ifndef _TAML_
  32. #include "persistence/taml/taml.h"
  33. #endif
  34. #ifndef _ASSET_PTR_H_
  35. #include "assets/assetPtr.h"
  36. #endif
  37. #include "gfx/gfxStringEnumTranslate.h"
  38. #include "ImageAssetInspectors.h"
  39. // Debug Profiling.
  40. #include "platform/profiler.h"
  41. #include "T3D/assets/assetImporter.h"
  42. #include "gfx/gfxDrawUtil.h"
  43. //-----------------------------------------------------------------------------
  44. StringTableEntry ImageAsset::smNoImageAssetFallback = NULL;
  45. //-----------------------------------------------------------------------------
  46. IMPLEMENT_CONOBJECT(ImageAsset);
  47. ConsoleType(ImageAssetPtr, TypeImageAssetPtr, const char*, "")
  48. //-----------------------------------------------------------------------------
  49. ConsoleGetType(TypeImageAssetPtr)
  50. {
  51. // Fetch asset Id.
  52. return *((const char**)(dptr));
  53. }
  54. //-----------------------------------------------------------------------------
  55. ConsoleSetType(TypeImageAssetPtr)
  56. {
  57. // Was a single argument specified?
  58. if (argc == 1)
  59. {
  60. // Yes, so fetch field value.
  61. *((const char**)dptr) = StringTable->insert(argv[0]);
  62. return;
  63. }
  64. // Warn.
  65. Con::warnf("(TypeImageAssetPtr) - Cannot set multiple args to a single asset.");
  66. }
  67. ConsoleType(assetIdString, TypeImageAssetId, const char*, "")
  68. ConsoleGetType(TypeImageAssetId)
  69. {
  70. // Fetch asset Id.
  71. return *((const char**)(dptr));
  72. }
  73. ConsoleSetType(TypeImageAssetId)
  74. {
  75. // Was a single argument specified?
  76. if (argc == 1)
  77. {
  78. *((const char**)dptr) = StringTable->insert(argv[0]);
  79. return;
  80. }
  81. // Warn.
  82. Con::warnf("(TypeAssetId) - Cannot set multiple args to a single asset.");
  83. }
  84. //-----------------------------------------------------------------------------
  85. ImplementEnumType(ImageAssetType,
  86. "Type of mesh data available in a shape.\n"
  87. "@ingroup gameObjects")
  88. { ImageAsset::Albedo, "Albedo", "" },
  89. { ImageAsset::Normal, "Normal", "" },
  90. { ImageAsset::ORMConfig, "ORMConfig", "" },
  91. { ImageAsset::GUI, "GUI", "" },
  92. { ImageAsset::Roughness, "Roughness", "" },
  93. { ImageAsset::AO, "AO", "" },
  94. { ImageAsset::Metalness, "Metalness", "" },
  95. { ImageAsset::Glow, "Glow", "" },
  96. { ImageAsset::Particle, "Particle", "" },
  97. { ImageAsset::Decal, "Decal", "" },
  98. { ImageAsset::Cubemap, "Cubemap", "" },
  99. EndImplementEnumType;
  100. //-----------------------------------------------------------------------------
  101. ImageAsset::ImageAsset() : AssetBase(), mUseMips(true), mIsHDRImage(false), mIsValidImage(false), mImageType(Albedo)
  102. {
  103. mImageFileName = StringTable->EmptyString();
  104. mImagePath = StringTable->EmptyString();
  105. mLoadedState = AssetErrCode::NotLoaded;
  106. }
  107. //-----------------------------------------------------------------------------
  108. ImageAsset::~ImageAsset()
  109. {
  110. }
  111. void ImageAsset::consoleInit()
  112. {
  113. Parent::consoleInit();
  114. Con::addVariable("$Core::NoImageAssetFallback", TypeString, &smNoImageAssetFallback,
  115. "The assetId of the texture to display when the requested image asset is missing.\n"
  116. "@ingroup GFX\n");
  117. smNoImageAssetFallback = StringTable->insert(Con::getVariable("$Core::NoImageAssetFallback"));
  118. }
  119. //-----------------------------------------------------------------------------
  120. void ImageAsset::initPersistFields()
  121. {
  122. // Call parent.
  123. Parent::initPersistFields();
  124. addProtectedField("imageFile", TypeAssetLooseFilePath, Offset(mImageFileName, ImageAsset),
  125. &setImageFileName, &getImageFileName, "Path to the image file.");
  126. addField("useMips", TypeBool, Offset(mUseMips, ImageAsset), "Should the image use mips? (Currently unused).");
  127. addField("isHDRImage", TypeBool, Offset(mIsHDRImage, ImageAsset), "Is the image in an HDR format? (Currently unused)");
  128. addField("imageType", TypeImageAssetType, Offset(mImageType, ImageAsset), "What the main use-case for the image is for.");
  129. }
  130. //------------------------------------------------------------------------------
  131. //Utility function to 'fill out' bindings and resources with a matching asset if one exists
  132. U32 ImageAsset::getAssetByFilename(StringTableEntry fileName, AssetPtr<ImageAsset>* imageAsset)
  133. {
  134. AssetQuery query;
  135. S32 foundAssetcount = AssetDatabase.findAssetLooseFile(&query, fileName);
  136. if (foundAssetcount == 0)
  137. {
  138. //Didn't work, so have us fall back to a placeholder asset
  139. imageAsset->setAssetId(ImageAsset::smNoImageAssetFallback);
  140. if (imageAsset->isNull())
  141. {
  142. //Well that's bad, loading the fallback failed.
  143. Con::warnf("ImageAsset::getAssetByFilename - Finding of asset associated with file %s failed with no fallback asset", fileName);
  144. return AssetErrCode::Failed;
  145. }
  146. //handle noshape not being loaded itself
  147. if ((*imageAsset)->mLoadedState == BadFileReference)
  148. {
  149. Con::warnf("ImageAsset::getAssetByFilename - Finding of associated with file %s failed, and fallback asset reported error of Bad File Reference.", fileName);
  150. return AssetErrCode::BadFileReference;
  151. }
  152. Con::warnf("ImageAsset::getAssetByFilename - Finding of associated with file %s failed, utilizing fallback asset", fileName);
  153. (*imageAsset)->mLoadedState = AssetErrCode::UsingFallback;
  154. return AssetErrCode::UsingFallback;
  155. }
  156. else
  157. {
  158. //acquire and bind the asset, and return it out
  159. imageAsset->setAssetId(query.mAssetList[0]);
  160. return (*imageAsset)->mLoadedState;
  161. }
  162. }
  163. StringTableEntry ImageAsset::getAssetIdByFilename(StringTableEntry fileName)
  164. {
  165. if (fileName == StringTable->EmptyString())
  166. return StringTable->EmptyString();
  167. StringTableEntry imageAssetId = ImageAsset::smNoImageAssetFallback;
  168. AssetQuery query;
  169. S32 foundAssetcount = AssetDatabase.findAssetLooseFile(&query, fileName);
  170. if (foundAssetcount != 0)
  171. {
  172. //acquire and bind the asset, and return it out
  173. imageAssetId = query.mAssetList[0];
  174. }
  175. else
  176. {
  177. AssetPtr<ImageAsset> imageAsset = imageAssetId; //ensures the fallback is loaded
  178. }
  179. return imageAssetId;
  180. }
  181. U32 ImageAsset::getAssetById(StringTableEntry assetId, AssetPtr<ImageAsset>* imageAsset)
  182. {
  183. (*imageAsset) = assetId;
  184. if (imageAsset->notNull())
  185. {
  186. return (*imageAsset)->mLoadedState;
  187. }
  188. else
  189. {
  190. if (imageAsset->isNull())
  191. {
  192. //Well that's bad, loading the fallback failed.
  193. Con::warnf("ImageAsset::getAssetById - Finding of asset with id %s failed with no fallback asset", assetId);
  194. return AssetErrCode::Failed;
  195. }
  196. //handle noshape not being loaded itself
  197. if ((*imageAsset)->mLoadedState == BadFileReference)
  198. {
  199. Con::warnf("ImageAsset::getAssetById - Finding of asset with id %s failed, and fallback asset reported error of Bad File Reference.", assetId);
  200. return AssetErrCode::BadFileReference;
  201. }
  202. Con::warnf("ImageAsset::getAssetById - Finding of asset with id %s failed, utilizing fallback asset", assetId);
  203. (*imageAsset)->mLoadedState = AssetErrCode::UsingFallback;
  204. return AssetErrCode::UsingFallback;
  205. }
  206. }
  207. //------------------------------------------------------------------------------
  208. void ImageAsset::copyTo(SimObject* object)
  209. {
  210. // Call to parent.
  211. Parent::copyTo(object);
  212. }
  213. void ImageAsset::loadImage()
  214. {
  215. if (mImagePath)
  216. {
  217. if (!Torque::FS::IsFile(mImagePath))
  218. {
  219. Con::errorf("ImageAsset::initializeAsset: Attempted to load file %s but it was not valid!", mImageFileName);
  220. mLoadedState = BadFileReference;
  221. return;
  222. }
  223. mLoadedState = Ok;
  224. mIsValidImage = true;
  225. mChangeSignal.trigger();
  226. return;
  227. }
  228. mLoadedState = BadFileReference;
  229. mIsValidImage = false;
  230. }
  231. void ImageAsset::initializeAsset()
  232. {
  233. ResourceManager::get().getChangedSignal().notify(this, &ImageAsset::_onResourceChanged);
  234. mImagePath = getOwned() ? expandAssetFilePath(mImageFileName) : mImagePath;
  235. loadImage();
  236. }
  237. void ImageAsset::onAssetRefresh()
  238. {
  239. mImagePath = getOwned() ? expandAssetFilePath(mImageFileName) : mImagePath;
  240. loadImage();
  241. }
  242. void ImageAsset::_onResourceChanged(const Torque::Path& path)
  243. {
  244. if (path != Torque::Path(mImagePath))
  245. return;
  246. refreshAsset();
  247. //loadImage();
  248. }
  249. void ImageAsset::setImageFileName(const char* pScriptFile)
  250. {
  251. // Sanity!
  252. AssertFatal(pScriptFile != NULL, "Cannot use a NULL image file.");
  253. // Update.
  254. mImageFileName = StringTable->insert(pScriptFile, true);
  255. // Refresh the asset.
  256. refreshAsset();
  257. }
  258. const GBitmap& ImageAsset::getImage()
  259. {
  260. return GBitmap(); //TODO fix this
  261. }
  262. GFXTexHandle ImageAsset::getTexture(GFXTextureProfile* requestedProfile)
  263. {
  264. if (mResourceMap.contains(requestedProfile))
  265. {
  266. mLoadedState = Ok;
  267. return mResourceMap.find(requestedProfile)->value;
  268. }
  269. else
  270. {
  271. //If we don't have an existing map case to the requested format, we'll just create it and insert it in
  272. GFXTexHandle newTex = TEXMGR->createTexture(mImagePath, requestedProfile);
  273. if (newTex)
  274. {
  275. mResourceMap.insert(requestedProfile, newTex);
  276. mLoadedState = Ok;
  277. return newTex;
  278. }
  279. else
  280. mLoadedState = BadFileReference;
  281. }
  282. //if (mTexture.isValid())
  283. // return mTexture;
  284. return nullptr;
  285. }
  286. const char* ImageAsset::getImageInfo()
  287. {
  288. if (mIsValidImage)
  289. {
  290. static const U32 bufSize = 2048;
  291. char* returnBuffer = Con::getReturnBuffer(bufSize);
  292. GFXTexHandle newTex = TEXMGR->createTexture(mImagePath, &GFXStaticTextureSRGBProfile);
  293. if (newTex)
  294. {
  295. dSprintf(returnBuffer, bufSize, "%s %d %d %d", GFXStringTextureFormat[newTex->getFormat()], newTex->getHeight(), newTex->getWidth(), newTex->getDepth());
  296. newTex = nullptr;
  297. }
  298. else
  299. {
  300. dSprintf(returnBuffer, bufSize, "ImageAsset::getImageInfo() - Failed to get image info for %s", getAssetId());
  301. }
  302. return returnBuffer;
  303. }
  304. return "";
  305. }
  306. const char* ImageAsset::getImageTypeNameFromType(ImageAsset::ImageTypes type)
  307. {
  308. // must match ImageTypes order
  309. static const char* _names[] = {
  310. "Albedo",
  311. "Normal",
  312. "ORMConfig",
  313. "GUI",
  314. "Roughness",
  315. "AO",
  316. "Metalness",
  317. "Glow",
  318. "Particle",
  319. "Decal",
  320. "Cubemap"
  321. };
  322. if (type < 0 || type >= ImageTypeCount)
  323. {
  324. Con::errorf("ImageAsset::getAdapterNameFromType - Invalid ImageType, defaulting to Albedo");
  325. return _names[Albedo];
  326. }
  327. return _names[type];
  328. }
  329. ImageAsset::ImageTypes ImageAsset::getImageTypeFromName(const char* name)
  330. {
  331. if (dStrIsEmpty(name))
  332. {
  333. return (ImageTypes)Albedo;
  334. }
  335. S32 ret = -1;
  336. for (S32 i = 0; i < ImageTypeCount; i++)
  337. {
  338. if (!dStricmp(getImageTypeNameFromType((ImageTypes)i), name))
  339. ret = i;
  340. }
  341. if (ret == -1)
  342. {
  343. Con::errorf("ImageAsset::getImageTypeFromName - Invalid ImageType name, defaulting to Albedo");
  344. ret = Albedo;
  345. }
  346. return (ImageTypes)ret;
  347. }
  348. DefineEngineMethod(ImageAsset, getImagePath, const char*, (), ,
  349. "Gets the image filepath of this asset.\n"
  350. "@return File path of the image file.")
  351. {
  352. return object->getImagePath();
  353. }
  354. DefineEngineMethod(ImageAsset, getImageInfo, const char*, (), ,
  355. "Gets the info and properties of the image.\n"
  356. "@return The info/properties of the image.")
  357. {
  358. return object->getImageInfo();
  359. }
  360. #ifdef TORQUE_TOOLS
  361. DefineEngineStaticMethod(ImageAsset, getAssetIdByFilename, const char*, (const char* filePath), (""),
  362. "Queries the Asset Database to see if any asset exists that is associated with the provided file path.\n"
  363. "@return The AssetId of the associated asset, if any.")
  364. {
  365. return ImageAsset::getAssetIdByFilename(StringTable->insert(filePath));
  366. }
  367. //-----------------------------------------------------------------------------
  368. // GuiInspectorTypeAssetId
  369. //-----------------------------------------------------------------------------
  370. IMPLEMENT_CONOBJECT(GuiInspectorTypeImageAssetPtr);
  371. ConsoleDocClass(GuiInspectorTypeImageAssetPtr,
  372. "@brief Inspector field type for Shapes\n\n"
  373. "Editor use only.\n\n"
  374. "@internal"
  375. );
  376. void GuiInspectorTypeImageAssetPtr::consoleInit()
  377. {
  378. Parent::consoleInit();
  379. ConsoleBaseType::getType(TypeImageAssetPtr)->setInspectorFieldType("GuiInspectorTypeImageAssetPtr");
  380. }
  381. GuiControl* GuiInspectorTypeImageAssetPtr::constructEditControl()
  382. {
  383. if (mInspector->getInspectObject() == nullptr)
  384. return nullptr;
  385. // Create base filename edit controls
  386. GuiControl* retCtrl = Parent::constructEditControl();
  387. if (retCtrl == NULL)
  388. return retCtrl;
  389. retCtrl->getRenderTooltipDelegate().bind(this, &GuiInspectorTypeImageAssetPtr::renderTooltip);
  390. // Change filespec
  391. char szBuffer[512];
  392. dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ImageAsset\", \"AssetBrowser.changeAsset\", %s, %s);",
  393. mInspector->getIdString(), mCaption);
  394. mBrowseButton->setField("Command", szBuffer);
  395. setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString());
  396. // Create "Open in ShapeEditor" button
  397. mImageEdButton = new GuiBitmapButtonCtrl();
  398. char bitmapName[512] = "ToolsModule:GameTSCtrl_image";
  399. mImageEdButton->setBitmap(StringTable->insert(bitmapName));
  400. mImageEdButton->setHidden(true);
  401. mImageEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile");
  402. mImageEdButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile");
  403. mImageEdButton->setDataField(StringTable->insert("hovertime"), NULL, "1000");
  404. mImageEdButton->setDataField(StringTable->insert("tooltip"), NULL, "Open this file in the Shape Editor");
  405. mImageEdButton->registerObject();
  406. addObject(mImageEdButton);
  407. return retCtrl;
  408. }
  409. bool GuiInspectorTypeImageAssetPtr::updateRects()
  410. {
  411. S32 dividerPos, dividerMargin;
  412. mInspector->getDivider(dividerPos, dividerMargin);
  413. Point2I fieldExtent = getExtent();
  414. Point2I fieldPos = getPosition();
  415. mCaptionRect.set(0, 0, fieldExtent.x - dividerPos - dividerMargin, fieldExtent.y);
  416. mEditCtrlRect.set(fieldExtent.x - dividerPos + dividerMargin, 1, dividerPos - dividerMargin - 34, fieldExtent.y);
  417. bool resized = mEdit->resize(mEditCtrlRect.point, mEditCtrlRect.extent);
  418. if (mBrowseButton != NULL)
  419. {
  420. mBrowseRect.set(fieldExtent.x - 32, 2, 14, fieldExtent.y - 4);
  421. resized |= mBrowseButton->resize(mBrowseRect.point, mBrowseRect.extent);
  422. }
  423. if (mImageEdButton != NULL)
  424. {
  425. RectI shapeEdRect(fieldExtent.x - 16, 2, 14, fieldExtent.y - 4);
  426. resized |= mImageEdButton->resize(shapeEdRect.point, shapeEdRect.extent);
  427. }
  428. return resized;
  429. }
  430. bool GuiInspectorTypeImageAssetPtr::renderTooltip(const Point2I& hoverPos, const Point2I& cursorPos, const char* tipText)
  431. {
  432. if (!mAwake)
  433. return false;
  434. GuiCanvas* root = getRoot();
  435. if (!root)
  436. return false;
  437. AssetPtr<ImageAsset> imgAsset;
  438. U32 assetState = ImageAsset::getAssetById(getData(), &imgAsset);
  439. if (imgAsset == NULL || assetState == ImageAsset::Failed)
  440. return false;
  441. StringTableEntry filename = imgAsset->getImagePath();
  442. if (!filename || !filename[0])
  443. return false;
  444. StringTableEntry previewFilename = filename;
  445. if (Con::isFunction("getAssetPreviewImage"))
  446. {
  447. ConsoleValue consoleRet = Con::executef("getAssetPreviewImage", filename);
  448. previewFilename = StringTable->insert(consoleRet.getString());
  449. if (AssetDatabase.isDeclaredAsset(previewFilename))
  450. {
  451. ImageAsset* previewAsset = AssetDatabase.acquireAsset<ImageAsset>(previewFilename);
  452. previewFilename = previewAsset->getImagePath();
  453. }
  454. }
  455. GFXTexHandle texture(previewFilename, &GFXStaticTextureSRGBProfile, avar("%s() - tooltip texture (line %d)", __FUNCTION__, __LINE__));
  456. if (texture.isNull())
  457. return false;
  458. // Render image at a reasonable screen size while
  459. // keeping its aspect ratio...
  460. Point2I screensize = getRoot()->getWindowSize();
  461. Point2I offset = hoverPos;
  462. Point2I tipBounds;
  463. U32 texWidth = texture.getWidth();
  464. U32 texHeight = texture.getHeight();
  465. F32 aspect = (F32)texHeight / (F32)texWidth;
  466. const F32 newWidth = 150.0f;
  467. F32 newHeight = aspect * newWidth;
  468. // Offset below cursor image
  469. offset.y += 20; // TODO: Attempt to fix?: root->getCursorExtent().y;
  470. tipBounds.x = newWidth;
  471. tipBounds.y = newHeight;
  472. // Make sure all of the tooltip will be rendered width the app window,
  473. // 5 is given as a buffer against the edge
  474. if (screensize.x < offset.x + tipBounds.x + 5)
  475. offset.x = screensize.x - tipBounds.x - 5;
  476. if (screensize.y < offset.y + tipBounds.y + 5)
  477. offset.y = hoverPos.y - tipBounds.y - 5;
  478. RectI oldClip = GFX->getClipRect();
  479. RectI rect(offset, tipBounds);
  480. GFX->setClipRect(rect);
  481. GFXDrawUtil* drawer = GFX->getDrawUtil();
  482. drawer->clearBitmapModulation();
  483. GFX->getDrawUtil()->drawBitmapStretch(texture, rect);
  484. GFX->setClipRect(oldClip);
  485. return true;
  486. }
  487. IMPLEMENT_CONOBJECT(GuiInspectorTypeImageAssetId);
  488. ConsoleDocClass(GuiInspectorTypeImageAssetId,
  489. "@brief Inspector field type for Shapes\n\n"
  490. "Editor use only.\n\n"
  491. "@internal"
  492. );
  493. void GuiInspectorTypeImageAssetId::consoleInit()
  494. {
  495. Parent::consoleInit();
  496. ConsoleBaseType::getType(TypeImageAssetId)->setInspectorFieldType("GuiInspectorTypeImageAssetId");
  497. }
  498. #endif