From f64efe18c0b4ea4f193a64c139f426f1b6dd94b1 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 20 Apr 2017 12:59:08 -0700 Subject: [PATCH 1/3] add an isBaked column to edit.js --- scripts/system/html/css/edit-style.css | 25 +++++++++++++++++-------- scripts/system/html/entityList.html | 3 +++ scripts/system/html/js/entityList.js | 10 ++++++++-- scripts/system/libraries/entityList.js | 1 + 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/scripts/system/html/css/edit-style.css b/scripts/system/html/css/edit-style.css index 06a60b5405..0a449c111d 100644 --- a/scripts/system/html/css/edit-style.css +++ b/scripts/system/html/css/edit-style.css @@ -289,7 +289,7 @@ input[type=number]::-webkit-inner-spin-button:after { bottom: 4px; } -input[type=number].hover-up::-webkit-inner-spin-button:before, +input[type=number].hover-up::-webkit-inner-spin-button:before, input[type=number].hover-down::-webkit-inner-spin-button:after { color: #ffffff; } @@ -1037,6 +1037,12 @@ th#entity-hasTransparent .sort-order { top: -1px; } +#entity-table td.isBaked.glyph { + font-size: 22px; + position: relative; + top: -1px; +} + #entity-table tfoot { box-sizing: border-box; border: 2px solid #575757; @@ -1062,7 +1068,7 @@ th#entity-hasTransparent .sort-order { #col-locked, #col-visible { width: 9%; } -#col-verticesCount, #col-texturesCount, #col-texturesSize, #col-hasTransparent, #col-drawCalls, #col-hasScript { +#col-verticesCount, #col-texturesCount, #col-texturesSize, #col-hasTransparent, #col-isBaked, #col-drawCalls, #col-hasScript { width: 0; } @@ -1090,6 +1096,9 @@ th#entity-hasTransparent .sort-order { .showExtraInfo #col-hasTransparent { width: 4%; } +.showExtraInfo #col-isBaked { + width: 8%; +} .showExtraInfo #col-drawCalls { width: 8%; } @@ -1097,12 +1106,12 @@ th#entity-hasTransparent .sort-order { width: 6%; } -th#entity-verticesCount, th#entity-texturesCount, th#entity-texturesSize, th#entity-hasTransparent, th#entity-drawCalls, +th#entity-verticesCount, th#entity-texturesCount, th#entity-texturesSize, th#entity-hasTransparent, th#entity-isBaked, th#entity-drawCalls, th#entity-hasScript { display: none; } -.verticesCount, .texturesCount, .texturesSize, .hasTransparent, .drawCalls, .hasScript { +.verticesCount, .texturesCount, .texturesSize, .hasTransparent, .isBaked, .drawCalls, .hasScript { display: none; } @@ -1110,13 +1119,13 @@ th#entity-hasScript { border: none; } -.showExtraInfo #entity-verticesCount, .showExtraInfo #entity-texturesCount, .showExtraInfo #entity-texturesSize, -.showExtraInfo #entity-hasTransparent, .showExtraInfo #entity-drawCalls, .showExtraInfo #entity-hasScript { +.showExtraInfo #entity-verticesCount, .showExtraInfo #entity-texturesCount, .showExtraInfo #entity-texturesSize, +.showExtraInfo #entity-hasTransparent, .showExtraInfo #entity-isBaked, .showExtraInfo #entity-drawCalls, .showExtraInfo #entity-hasScript { display: inline-block; } -.showExtraInfo .verticesCount, .showExtraInfo .texturesCount, .showExtraInfo .texturesSize, .showExtraInfo .hasTransparent, -.showExtraInfo .drawCalls, .showExtraInfo .hasScript { +.showExtraInfo .verticesCount, .showExtraInfo .texturesCount, .showExtraInfo .texturesSize, .showExtraInfo .hasTransparent, +.showExtraInfo .isBaked, .showExtraInfo .drawCalls, .showExtraInfo .hasScript { display: table-cell; } diff --git a/scripts/system/html/entityList.html b/scripts/system/html/entityList.html index 9d774f1861..e6afdcb25d 100644 --- a/scripts/system/html/entityList.html +++ b/scripts/system/html/entityList.html @@ -49,6 +49,7 @@ + @@ -63,6 +64,7 @@ Texts Text MB + Baked Draws k @@ -78,6 +80,7 @@ + diff --git a/scripts/system/html/js/entityList.js b/scripts/system/html/js/entityList.js index c6692fc26e..2fcb740294 100644 --- a/scripts/system/html/js/entityList.js +++ b/scripts/system/html/js/entityList.js @@ -17,6 +17,7 @@ const DESCENDING_STRING = '▾'; const LOCKED_GLYPH = ""; const VISIBLE_GLYPH = ""; const TRANSPARENCY_GLYPH = ""; +const BAKED_GLYPH = "Y"; const SCRIPT_GLYPH = "k"; const DELETE = 46; // Key code for the delete key. const KEY_P = 80; // Key code for letter p used for Parenting hotkey. @@ -77,6 +78,9 @@ function loaded() { document.getElementById("entity-hasTransparent").onclick = function () { setSortColumn('hasTransparent'); }; + document.getElementById("entity-isBaked").onclick = function () { + setSortColumn('isBaked'); + }; document.getElementById("entity-drawCalls").onclick = function () { setSortColumn('drawCalls'); }; @@ -147,7 +151,7 @@ function loaded() { } function addEntity(id, name, type, url, locked, visible, verticesCount, texturesCount, texturesSize, hasTransparent, - drawCalls, hasScript) { + isBaked, drawCalls, hasScript) { var urlParts = url.split('/'); var filename = urlParts[urlParts.length - 1]; @@ -157,7 +161,7 @@ function loaded() { id: id, name: name, type: type, url: filename, locked: locked, visible: visible, verticesCount: displayIfNonZero(verticesCount), texturesCount: displayIfNonZero(texturesCount), texturesSize: decimalMegabytes(texturesSize), hasTransparent: hasTransparent, - drawCalls: displayIfNonZero(drawCalls), hasScript: hasScript + isBaked: isBaked, drawCalls: displayIfNonZero(drawCalls), hasScript: hasScript }], function (items) { var currentElement = items[0].elm; @@ -201,6 +205,7 @@ function loaded() { texturesCount: document.querySelector('#entity-texturesCount .sort-order'), texturesSize: document.querySelector('#entity-texturesSize .sort-order'), hasTransparent: document.querySelector('#entity-hasTransparent .sort-order'), + isBaked: document.querySelector('#entity-isBaked .sort-order'), drawCalls: document.querySelector('#entity-drawCalls .sort-order'), hasScript: document.querySelector('#entity-hasScript .sort-order'), } @@ -350,6 +355,7 @@ function loaded() { newEntities[i].visible ? VISIBLE_GLYPH : null, newEntities[i].verticesCount, newEntities[i].texturesCount, newEntities[i].texturesSize, newEntities[i].hasTransparent ? TRANSPARENCY_GLYPH : null, + newEntities[i].isBaked ? BAKED_GLYPH : null, newEntities[i].drawCalls, newEntities[i].hasScript ? SCRIPT_GLYPH : null); } diff --git a/scripts/system/libraries/entityList.js b/scripts/system/libraries/entityList.js index 3488733289..3b6d32ec1c 100644 --- a/scripts/system/libraries/entityList.js +++ b/scripts/system/libraries/entityList.js @@ -88,6 +88,7 @@ EntityListTool = function(opts) { texturesCount: valueIfDefined(properties.renderInfo.texturesCount), texturesSize: valueIfDefined(properties.renderInfo.texturesSize), hasTransparent: valueIfDefined(properties.renderInfo.hasTransparent), + isBaked: properties.type == "Model" ? properties.modelURL.toLowerCase().endsWith(".baked.fbx") : false, drawCalls: valueIfDefined(properties.renderInfo.drawCalls), hasScript: properties.script !== "" }); From 924624b127f96a5985906cd9ac2637d28f61ea17 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 20 Apr 2017 14:19:24 -0700 Subject: [PATCH 2/3] add new glyphs with check, reference in entityList --- interface/resources/fonts/hifi-glyphs.ttf | Bin 27260 -> 27612 bytes scripts/system/html/js/entityList.js | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/resources/fonts/hifi-glyphs.ttf b/interface/resources/fonts/hifi-glyphs.ttf index 138d7f3ddabaa4d3464b07d36fda995bc96c4f4b..93f6fe6d1329139d0eefec86a05fdaed09e80e5d 100644 GIT binary patch delta 895 zcmZ9KOK4nG7{`C#o%@*S)H~ef&Vx8;J89>JN}6;sj|5D#7$*TA6-{eF`WWxrblPd! zU_wotV(g+sT?q9ObkRlXLa+ge%%U5Sx)DT02*w8l$wFkHwG?R=icq&tKok`VTUX01xm6A)YIj$DcXh7+Zq+4In)_@?@Eh(4oEr>^%5FZ|>lyPag+4 z0vvWHD^ov4hDJeI0cGT5WqRuVeL_%w9|)g3GdJ=5#kH%T-GO5(HLp^QzVz!iz&cQ@ z)x7zN+9w+zHn6)kIWzm9ok)YMfNj>(ACq{gtI!|sDj3eNl=2I2iee~H zRX3C;w8fCEKYluS*-D*AUHU>4U5P64p7y*NvfutWRX=dqN>x%pn1ooQB`-^gFczIq z%4GA!+#HcH*_Z~ zhSd@8wydr(EwUqQY&QpE;=ky2I}UGc#(+wcFSl4D%5Ph&6BWz<(B0)c%U}?d8bKw& zCtIwMU~P+a68z!ccF!9*`sg9=pQ`TNmh0=u_vHHam+)`9d;HIKk$=GHv7j$b_eu+u5FZywDL@^@7l2++eKI%m`A z3#V`XE_GewdS<=T7oRB}YE+f{WjAD6nimH+O}6<+B^@W60V9WI?xOQoHO V8iE1-$ll9&J@)9$|F>v6{{Vl3d3XQ- diff --git a/scripts/system/html/js/entityList.js b/scripts/system/html/js/entityList.js index 2fcb740294..ea79750154 100644 --- a/scripts/system/html/js/entityList.js +++ b/scripts/system/html/js/entityList.js @@ -17,7 +17,7 @@ const DESCENDING_STRING = '▾'; const LOCKED_GLYPH = ""; const VISIBLE_GLYPH = ""; const TRANSPARENCY_GLYPH = ""; -const BAKED_GLYPH = "Y"; +const BAKED_GLYPH = "" const SCRIPT_GLYPH = "k"; const DELETE = 46; // Key code for the delete key. const KEY_P = 80; // Key code for letter p used for Parenting hotkey. From 3452dd025145d4254343b93ec0ab8fc63dce161e Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 20 Apr 2017 15:20:48 -0700 Subject: [PATCH 3/3] increment colspan count in table footer --- scripts/system/html/entityList.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system/html/entityList.html b/scripts/system/html/entityList.html index e6afdcb25d..d608ab63e5 100644 --- a/scripts/system/html/entityList.html +++ b/scripts/system/html/entityList.html @@ -88,7 +88,7 @@ - +