var Gtlym = {};var bodymovinWindow = this; (function(){ /****** INIT JSON PARSER ******/ if (typeof JSON !== 'object') { JSON = {}; } (function () { 'use strict'; function f(n) { return n < 10 ? '0' + n : n; } if (typeof Date.prototype.toJSON !== 'function') { Date.prototype.toJSON = function () { return isFinite(this.valueOf()) ? this.getUTCFullYear() + '-' + f(this.getUTCMonth() + 1) + '-' + f(this.getUTCDate()) + 'T' + f(this.getUTCHours()) + ':' + f(this.getUTCMinutes()) + ':' + f(this.getUTCSeconds()) + 'Z' : null; }; String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function () { return this.valueOf(); }; } var cx, escapable, gap, indent, meta, rep; function quote(string) { escapable.lastIndex = 0; return escapable.test(string) ? '"' + string.replace(escapable, function (a) { var c = meta[a]; return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); }) + '"' : '"' + string + '"'; } function str(key, holder) { var i, k, v, length, mind = gap, partial, value = holder[key]; if (value && typeof value === 'object' && typeof value.toJSON === 'function') { value = value.toJSON(key); } if (typeof rep === 'function') { value = rep.call(holder, key, value); } switch (typeof value) { case 'string': return quote(value); case 'number': return isFinite(value) ? String(value) : 'null'; case 'boolean': case 'null': return String(value); case 'object': if (!value) { return 'null'; } gap += indent; partial = []; if (Object.prototype.toString.apply(value) === '[object Array]') { length = value.length; for (i = 0; i < length; i += 1) { partial[i] = str(i, value) || 'null'; } v = partial.length === 0 ? '[]' : gap ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : '[' + partial.join(',') + ']'; gap = mind; return v; } if (rep && typeof rep === 'object') { length = rep.length; for (i = 0; i < length; i += 1) { if (typeof rep[i] === 'string') { k = rep[i]; v = str(k, value); if (v) { partial.push(quote(k) + (gap ? ': ' : ':') + v); } } } } else { for (k in value) { if (Object.prototype.hasOwnProperty.call(value, k)) { v = str(k, value); if (v) { partial.push(quote(k) + (gap ? ': ' : ':') + v); } } } } v = partial.length === 0 ? '{}' : gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : '{' + partial.join(',') + '}'; gap = mind; return v; } } if (typeof JSON.stringify !== 'function') { escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; meta = { '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"' : '\\"', '\\': '\\\\' }; JSON.stringify = function (value, replacer, space) { var i; gap = ''; indent = ''; if (typeof space === 'number') { for (i = 0; i < space; i += 1) { indent += ' '; } } else if (typeof space === 'string') { indent = space; } rep = replacer; if (replacer && typeof replacer !== 'function' && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) { throw new Error('JSON.stringify'); } return str('', {'': value}); }; } if (typeof JSON.parse !== 'function') { cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; JSON.parse = function (text, reviver) { var j; function walk(holder, key) { var k, v, value = holder[key]; if (value && typeof value === 'object') { for (k in value) { if (Object.prototype.hasOwnProperty.call(value, k)) { v = walk(value, k); if (v !== undefined) { value[k] = v; } else { delete value[k]; } } } } return reviver.call(holder, key, value); } text = String(text); cx.lastIndex = 0; if (cx.test(text)) { text = text.replace(cx, function (a) { return '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); }); } if (/^[\],:{}\s]*$/ .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@') .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']') .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { j = eval('(' + text + ')'); return typeof reviver === 'function' ? walk({'': j}, '') : j; } throw new SyntaxError('JSON.parse'); }; } }()); /****** END JSON PARSER ******/ /****** INIT ARRAY POLYFILLS ******/ if (!Array.prototype.forEach) { Array.prototype.forEach = function(callback, thisArg) { var T, k; if (this == null) { throw new TypeError(' this is null or not defined'); } var O = Object(this); var len = O.length >>> 0; if (typeof callback !== "function") { throw new TypeError(callback + ' is not a function'); } if (arguments.length > 1) { T = thisArg; } k = 0; while (k < len) { var kValue; if (k in O) { kValue = O[k]; callback.call(T, kValue, k, O); } k++; } }; } if (!Array.prototype.map) { Array.prototype.map = function(callback, thisArg) { var T, A, k; if (this == null) { throw new TypeError(' this is null or not defined'); } var O = Object(this); var len = O.length >>> 0; if (typeof callback !== 'function') { throw new TypeError(callback + ' is not a function'); } if (arguments.length > 1) { T = thisArg; } A = new Array(len); k = 0; while (k < len) { var kValue, mappedValue; if (k in O) { kValue = O[k]; mappedValue = callback.call(T, kValue, k, O); A[k] = mappedValue; } k++; } return A; }; } /****** END ARRAY POLYFILLS ******/ var console = { log : function(){ $.writeln.call($,arguments); } }; /****** INIT Var Declarations ******/ var helperSolidComp; var helperFootage; //Solid for anchor point fix on shape layers var helperSolid; //Destination export folder var exportFolder; //Interval objects container //var Gtlym = {}; Gtlym.CALL = {}; //Render cancelled flag var renderCancelled = false; //modules var LayerConverter; var rqManager; var extrasInstance; var AsyncManager; var DOMAnimationManager; var CompConverter; var ShapesParser; var EffectsParser; var UI; /****** INIT Assets Manager ******/ (function(){ var ob = {}; var sourceAssets = []; var sourceExportData = []; function reset(){ sourceAssets = []; sourceExportData = []; } function associateLayerToSource(layer, source){ var i=0, len = sourceAssets.length; while(i0){ setMasks(layerInfo.mask,layerOb); layerOb.hasMask = true; } layerOb.type = lType; if(lType == 'ShapeLayer'){ ShapesParser.createShapes(layerInfo,layerOb, frameRate); layerOb.rectData = {l:0,t:0,b:0,r:0,w:0,h:0}; } if(layerInfo.parent != null){ layerOb.parent = layerInfo.parent.index - 1; } layerOb.layerName = layerInfo.name; layerOb.threeD = layerInfo.threeDLayer; layerOb.an = {}; if(lType=='PreCompLayer'){ layerOb.width = layerInfo.source.width; layerOb.height = layerInfo.source.height; }else if(lType == 'StillLayer'){ addStillAsset(layerOb,layerInfo); layerOb.width = layerInfo.source.width; layerOb.height = layerInfo.source.height; }else if(lType == 'SolidLayer'){ layerOb.width = layerInfo.source.width; layerOb.height = layerInfo.source.height; layerOb.color = extrasInstance.arrayRgbToHex(layerInfo.source.mainSource.color); }else if(lType == 'ShapeLayer'){ layerOb.width = layerInfo.width; layerOb.height = layerInfo.height; } layerOb.inPoint = layerInfo.inPoint*frameRate; layerOb.outPoint = layerInfo.outPoint*frameRate; layerOb.startTime = layerInfo.startTime*frameRate; layerOb.lastData = {}; layerOb.ks = {}; if(layerInfo.transform.opacity.numKeys>1){ extrasInstance.convertToBezierValues(layerInfo.transform.opacity, frameRate, layerOb.ks,'o'); }else{ layerOb.ks.o = extrasInstance.roundNumber(layerInfo.transform.opacity.valueAtTime(0,false),3); } if(layerInfo.transform.rotation.numKeys>1){ extrasInstance.convertToBezierValues(layerInfo.transform.rotation, frameRate, layerOb.ks,'r'); }else{ layerOb.ks.r = extrasInstance.roundNumber(layerInfo.transform.rotation.valueAtTime(0,false),3); } if(layerInfo.transform.position.dimensionsSeparated){ layerOb.ks.p = {s:true}; extrasInstance.convertToBezierValues(layerInfo.transform['X Position'], frameRate, layerOb.ks.p,'x'); extrasInstance.convertToBezierValues(layerInfo.transform['Y Position'], frameRate, layerOb.ks.p,'y'); }else{ if(layerInfo.transform.position.numKeys>1){ extrasInstance.convertToBezierValues(layerInfo.transform.position, frameRate, layerOb.ks,'p'); }else{ layerOb.ks.p = extrasInstance.roundNumber(layerInfo.transform.position.valueAtTime(0,false),3); } } if(layerInfo.transform['Anchor Point'].numKeys>1){ if(lType == 'ShapeLayer'){ prepareHelperSolid(layerInfo.transform['Anchor Point'],frameRate,layerOb.ks,'a'); }else{ extrasInstance.convertToBezierValues(layerInfo.transform['Anchor Point'], frameRate, layerOb.ks,'a'); } }else{ layerOb.ks.a = extrasInstance.roundNumber(layerInfo.transform['Anchor Point'].valueAtTime(0,false),3); } if(layerInfo.transform['Scale'].numKeys>1){ extrasInstance.convertToBezierValues(layerInfo.transform['Scale'], frameRate, layerOb.ks,'s'); }else{ layerOb.ks.s = extrasInstance.roundNumber(layerInfo.transform['Scale'].valueAtTime(0,false),3); } if(layerInfo.canSetTimeRemapEnabled && layerInfo.timeRemapEnabled){ extrasInstance.convertToBezierValues(layerInfo['Time Remap'], frameRate, layerOb,'tm'); } checkLayerReady(); } } function checkLayerReady(){ if(renderCancelled){ callback.apply(); }else{ extrasInstance.setTimeout(analyzeNextLayer,100); } } function prepareHelperSolid(property,frameRate,ob,param){ var currentKeyframe = 1; var helperPosition = helperSolid.transform["Anchor Point"]; var jLen = helperPosition.numKeys; while(jLen > 0){ helperPosition.removeKey(1); jLen -= 1; } helperSolidComp.frameRate = frameRate; jLen = property.numKeys; var keyIn, keyOut; var keyInHelper, keyOutHelper; var propertyValueDelta, helperValueDelta; function adjustNextHelperSpeed(){ var j; for(j = 0; j Math.abs(propertyValueDelta[0]) || Math.abs(helperValueDelta[1]) > Math.abs(propertyValueDelta[1])){ dir = 1; }else{ dir = -1; } while(flag){ helpValue = helperPosition.valueAtTime(helperPosition.keyTime(currentKeyframe),false); helpValue2 = helperPosition.valueAtTime(helperPosition.keyTime(currentKeyframe - 1),false); helperValueDelta = helperPosition.valueAtTime(helperPosition.keyTime(currentKeyframe)-0.01,false); if(Math.abs(helperValueDelta[0]-propertyValueDelta[0]) < 0.001 && Math.abs(helperValueDelta[1]-propertyValueDelta[1]) < 0.001){ flag = false; }else{ if(Math.abs(helperValueDelta[0]) > Math.abs(propertyValueDelta[0]) || Math.abs(helperValueDelta[1]) > Math.abs(propertyValueDelta[1])){ if(dir == 1){ deltaSpeed /= 2; } dir = -1; currentSpeed += deltaSpeed; keyInHelper[0].speed = currentSpeed; helperPosition.setTemporalEaseAtKey(currentKeyframe, keyInHelper, keyOutHelper); }else{ if(dir == -1){ deltaSpeed /= 2; } dir = 1; currentSpeed -= deltaSpeed; keyInHelper[0].speed = currentSpeed; helperPosition.setTemporalEaseAtKey(currentKeyframe, keyInHelper, keyOutHelper); } } i += 1; if(i == len){ keyInHelper[0].speed = keyIn.speed; helperPosition.setTemporalEaseAtKey(currentKeyframe, keyInHelper, keyOutHelper); flag = false; } } } if(currentKeyframe != jLen){ i = 0; flag = true; propertyValueDelta = property.valueAtTime(property.keyTime(currentKeyframe)+0.01,false); helperValueDelta = helperPosition.valueAtTime(helperPosition.keyTime(currentKeyframe)+0.01,false); helpValue = helperPosition.valueAtTime(helperPosition.keyTime(currentKeyframe),false); currentSpeed = keyOutHelper[0].speed; deltaSpeed = Math.abs(keyOutHelper[0].speed); if(Math.abs(helperValueDelta[0]) > Math.abs(propertyValueDelta[0]) || Math.abs(helperValueDelta[1]) > Math.abs(propertyValueDelta[1])){ dir = -1; }else{ dir = 1; } while(flag){ helpValue = helperPosition.valueAtTime(helperPosition.keyTime(currentKeyframe),false); helperValueDelta = helperPosition.valueAtTime(helperPosition.keyTime(currentKeyframe)+0.01,false); if(Math.abs(helperValueDelta[0]-propertyValueDelta[0]) < 0.001 && Math.abs(helperValueDelta[1]-propertyValueDelta[1]) < 0.001){ flag = false; }else{ if(Math.abs(helperValueDelta[0]) > Math.abs(propertyValueDelta[0]) || Math.abs(helperValueDelta[1]) > Math.abs(propertyValueDelta[1]) ){ if(dir == -1){ deltaSpeed /= 2; } dir = 1; currentSpeed -= deltaSpeed; keyOutHelper[0].speed = currentSpeed; helperPosition.setTemporalEaseAtKey(currentKeyframe, keyInHelper, keyOutHelper); }else{ if(dir == 1){ deltaSpeed /= 2; } dir = -1; currentSpeed += deltaSpeed; keyOutHelper[0].speed = currentSpeed; helperPosition.setTemporalEaseAtKey(currentKeyframe, keyInHelper, keyOutHelper); } } i += 1; if(i == len){ keyOutHelper[0].speed = keyOut.speed; helperPosition.setTemporalEaseAtKey(currentKeyframe, keyInHelper, keyOutHelper); flag = false; } } } currentKeyframe += 1; correctNextKey(); }else{ extrasInstance.convertToBezierValues(helperPosition, frameRate, ob,param); } } adjustNextHelperSpeed(); } function createLayers(compo, layersData, frameRate){ var i, len = compo.layers.length; var pendingType; for(i = 0;i0){ layerOb.eff = []; var i, len = layerInfo.effect.numProperties, name; for(i=0;i= len){ if(f.remove()){ callback.apply(); }else{ } }else{ removeFileFromDisk(files[currentFileIndex],removeNextItem); } }; if (f instanceof File){ if(f.remove()){ callback.apply(); }else{ } }else{ var files = f.getFiles(); var len = files.length; if(len==0){ removeNextItem(); }else{ removeFileFromDisk(files[currentFileIndex],removeNextItem); } } } function getRandomName(length){ var sequence = 'abcdefghijklmnoqrstuvwxyz1234567890'; var returnString =''; for(var i=0;i '+property(i+1).name +" | "+property(i+1).matchName ); iterateProperty(property(i+1), space+1); i++; } }else{ if(property.propertyValueType != PropertyValueType.NO_VALUE && property.value != undefined){ $.writeln(spaceString+'--- Value:'+property.value.toString()+' ---'); }else{ $.writeln(spaceString+'--- No Value:'+' ---'); } } } function rgbToHex(r, g, b) { return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1); } function arrayRgbToHex(values) { return rgbToHex(Math.round(values[0]*255),Math.round(values[1]*255),Math.round(values[2]*255)); } function layerType(layerOb){ function avLayerType(lObj){ var lSource = lObj.source; if(lSource instanceof CompItem){ return "PreCompLayer"; } var lMainSource = lSource.mainSource; var lFile = lMainSource.file; if(!lObj.hasVideo){ return "AudioLayer"; }else if(lSource instanceof CompItem){ return "PreCompLayer"; }else if(lSource.frameDuration < 1){ if(lMainSource instanceof PlaceholderSource){ return "PlaceholderVideoLayer"; }else if(lSource.name.toString().indexOf("].") != -1){ return "ImageSequenceLayer"; }else{ return "VideoLayer"; } }else if(lSource.frameDuration == 1){ if(lMainSource instanceof PlaceholderSource){ return "PlaceholderStillLayer"; }else if(lMainSource.color){ return "SolidLayer"; }else{ return "StillLayer"; } } } try{ var curLayer,instanceOfArray,instanceOfArrayLength,result; curLayer = layerOb; instanceOfArray = [AVLayer, CameraLayer, LightLayer, ShapeLayer, TextLayer]; instanceOfArrayLength = instanceOfArray.length; if(curLayer.guideLayer){ return "GuideLayer"; }else if(curLayer.adjustmentLayer){ return "AdjustmentLayer"; }else if (curLayer.nullLayer) { return "NullLayer"; } for(var i = 0;i0){ if(shapeOb.an.path){ parsePaths(paths,shapeOb.an.path, shapeOb.lastData, time); } } if(shapeContents.property('ADBE Vector Shape - Rect')){ parseRect(shapeContents.property('ADBE Vector Shape - Rect'),shapeOb.an.rect, shapeOb.lastData, time); } if(shapeContents.property('ADBE Vector Shape - Ellipse')){ parseEllipse(shapeContents.property('ADBE Vector Shape - Ellipse'),shapeOb.an.ell, shapeOb.lastData, time); } if(shapeContents.property('ADBE Vector Filter - Trim')){ parseTrim(shapeContents.property('ADBE Vector Filter - Trim'),shapeOb.trim, shapeOb.lastData, time); } parseTransform(shapeInfo.property('Transform'),shapeOb.an.tr, shapeOb.lastData, time); } function addFrameData(layerInfo,layerOb, frameNum, time){ currentFrame = frameNum; var contents = layerInfo.property('Contents'); /** Todo Use for expressions if(contents.property('ADBE Vector Filter - Trim')){ var trim = layerOb.trim; var trimS = extrasInstance.roundNumber(contents.property('ADBE Vector Filter - Trim').property('Start').valueAtTime(time,false),3); var trimE = extrasInstance.roundNumber(contents.property('ADBE Vector Filter - Trim').property('End').valueAtTime(time,false),3); var trimO = extrasInstance.roundNumber(contents.property('ADBE Vector Filter - Trim').property('Offset').valueAtTime(time,false),3); if(layerOb.lastData.trimS == null || extrasInstance.compareObjects(trimS,layerOb.lastData.trimS)==false){ trim.s[currentFrame] = trimS; layerOb.lastData.trimS = trimS; } if(layerOb.lastData.trimE == null || extrasInstance.compareObjects(trimE,layerOb.lastData.trimE)==false){ trim.e[currentFrame] = trimE; layerOb.lastData.trimE = trimE; } if(layerOb.lastData.trimO == null || extrasInstance.compareObjects(trimO ,layerOb.lastData.trimO )==false){ trim.o[currentFrame] = trimO ; layerOb.lastData.trimO = trimO ; } } **/ var shapes = layerOb.shapes; var i,len = shapes.length; for(i=0;i 0 || (prop.property('Dashes').property(j+1).name == 'Offset' && changed)) { changed = true; var dashData = {}; var name = ''; if(prop.property('Dashes').property(j+1).name == 'Dash'){ name = 'd'; }else if(prop.property('Dashes').property(j+1).name == 'Gap'){ name = 'g'; }else if(prop.property('Dashes').property(j+1).name == 'Offset'){ name = 'o'; } dashData.n = name; extrasInstance.convertToBezierValues(prop.property('Dashes').property(j+1), frameRate, dashData,'v'); dashesData.push(dashData) } /*$.writeln('matchName: ',prop.property('Dashes').property(j+1).matchName); $.writeln('value: ',prop.property('Dashes').property(j+1).value); $.writeln('enabled: ',prop.property('Dashes').property(j+1).enabled);*/ } if(changed){ ob.d = dashesData; } //extrasInstance.iterateProperty(prop); array.push(ob); }else if(itemType == 'mm'){ ob = {}; ob.ty = itemType; ob.mm = prop.property('ADBE Vector Merge Type').value; array.push(ob); }else if(itemType == 'tm'){ ob = {}; ob.ty = itemType; extrasInstance.convertToBezierValues(prop.property('Start'), frameRate, ob,'s'); extrasInstance.convertToBezierValues(prop.property('End'), frameRate, ob,'e'); extrasInstance.convertToBezierValues(prop.property('Offset'), frameRate, ob,'o'); ob.m = prop.property('Trim Multiple Shapes').value; //extrasInstance.iterateProperty(prop); array.push(ob); }else if(itemType == 'gr'){ ob = { ty : itemType, it: [] }; iterateProperties(prop.property('Contents'),ob.it,frameRate); var trOb = {}; var transformProperty = prop.property('Transform'); trOb.ty = 'tr'; extrasInstance.convertToBezierValues(transformProperty.property('Position'), frameRate, trOb,'p'); extrasInstance.convertToBezierValues(transformProperty.property('Anchor Point'), frameRate, trOb,'a'); extrasInstance.convertToBezierValues(transformProperty.property('Scale'), frameRate, trOb,'s'); extrasInstance.convertToBezierValues(transformProperty.property('Rotation'), frameRate, trOb,'r'); extrasInstance.convertToBezierValues(transformProperty.property('Opacity'), frameRate, trOb,'o'); ob.it.push(trOb); array.push(ob); } } } function createShapes(layerInfo,layerOb, frameRate){ var shapes = []; layerOb.shapes = shapes; var contents = layerInfo.property('Contents'); iterateProperties(contents,shapes,frameRate); } function getItemType(matchName){ //$.writeln('matchName: ',matchName); switch(matchName){ case 'ADBE Vector Shape - Group': return 'sh'; case 'ADBE Vector Shape - Rect': return 'rc'; case 'ADBE Vector Shape - Ellipse': return 'el'; case 'ADBE Vector Graphic - Fill': return 'fl'; case 'ADBE Vector Graphic - Stroke': return 'st'; case 'ADBE Vector Graphic - Merge': return 'mm'; case 'ADBE Vector Graphic - Trim': case 'ADBE Vector Filter - Trim': return 'tm'; case 'ADBE Vector Group': return 'gr'; default: //$.writeln('unsupported: ',matchName); return ''; } } var ob = {}; ob.createShapes = createShapes; ob.addFrameData = addFrameData; ShapesParser = ob; }()); /****** END shapesParser ******/ /****** INIT CompConverter ******/ (function(){ var isExportDirectoryCreated = false; var directoryCreationFailed = false; var compositionsList; var currentCompositionData; var filesDirectory; var mainProject = app.project; var scriptPath = ((File($.fileName)).path); var mainComp; var endCallback; var compositionData = {}; function saveData(){ if(!renderCancelled){ var dataFile = new File(exportFolder.fullName+'/data.json'); dataFile.open('w','TEXT','????'); var string = JSON.stringify(compositionData); string = string.replace(/\n/g,'') ; dataFile.write(string); //DO NOT ERASE, JSON UNFORMATTED //dataFile.write(JSON.stringify(compositionData, null, ' ')); //DO NOT ERASE, JSON FORMATTED dataFile.close(); } currentCompositionData.rendered = true; searchNextComposition(); } function layersConverted(duplicateMainComp){ DOMAnimationManager.setCallback(saveData); //FOR DOM DOMAnimationManager.getCompositionAnimationData(duplicateMainComp,compositionData,filesDirectory); } function animationSaved(){ saveData(); } function directoryRemoved(){ filesDirectory = new Folder(exportFolder.fullName+'/files'); if(filesDirectory.create()){ isExportDirectoryCreated = true; } } function createExportDirectory(){ exportFolder = new Folder(currentCompositionData.destination+'/'+currentCompositionData.comp.name+'/'); filesDirectory = new Folder(exportFolder.fullName+'/files'); if(filesDirectory.exists){ isExportDirectoryCreated = true; }else{ if(filesDirectory.create()){ isExportDirectoryCreated = true; }else{ directoryCreationFailed = true; } } } function waitForDirectoryCreated(){ if(isExportDirectoryCreated){ start(); }else if(directoryCreationFailed){ alert(UITextsData.alertMessages.directoryCreationFailed); }else{ $.sleep(100); waitForDirectoryCreated(); } } function searchHelperRenderer(helperComp){ var i=0,len = app.project.renderQueue.items.length; var item; while(i