Skip to content

Commit

Permalink
v1.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
JannisX11 authored Nov 19, 2017
1 parent 8cd2181 commit 0a4f865
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 24 deletions.
18 changes: 2 additions & 16 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,8 @@
<script src="js/plugin_loader.js"></script>
<script>if (window.module) module = window.module;</script>

<div id="post_model" class="web_only post_data" hidden><?php
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
$model = $_POST['model'];
if ($model != "text") {
echo $model;
}
}
?></div>
<div id="post_textures" class="web_only post_data" hidden><?php
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
$textures = $_POST['textures'];
if ($textures != "text") {
echo $textures;
}
}
?></div>
<div id="post_model" class="web_only post_data" hidden></div>
<div id="post_textures" class="web_only post_data" hidden></div>
<!---->
<div id="blackout" onclick="$('.dialog#'+open_dialog).find('.cancel_btn:not([disabled])').click()"></div>

Expand Down
7 changes: 4 additions & 3 deletions js/blockbench.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var appVersion = '1.10.1'
var appVersion = '1.10.2'
var osfs = '/'
var File, i;
var browser_name = 'electron'
Expand Down Expand Up @@ -177,8 +177,7 @@ function initializeApp() {
showSplashScreen = tryLoadPOSTModel()
}
if (showSplashScreen) {
//$('#welcome_content').load('http://www.blockbench.net/api/welcome/index.html', function() {
$('#welcome_content').load('C:\\xampp\\htdocs\\blockbench\\api\\welcome\\index.html', function() {
$('#welcome_content').load('http://www.blockbench.net/api/welcome/index.html', function() {
$('#welcome_screen #welcome_content').css('max-height', ($(window).height() - 460)+'px')
showDialog('welcome_screen')
localStorage.setItem('welcomed_version', appVersion)
Expand Down Expand Up @@ -837,6 +836,7 @@ function moveCubesRelative(difference, index) { //Multiple

//Selections
function addToSelection(id, event, isOutlinerClick) {
if (elements[id] === undefined) return false;
//Shift
if (event.shiftKey === true && elements[id].getParentArray().includes(elements[selected[selected.length-1]]) && isOutlinerClick) {
var starting_point;
Expand Down Expand Up @@ -890,6 +890,7 @@ function addToSelection(id, event, isOutlinerClick) {
s.display.isselected = false;
})
updateSelection()
return elements[id];
}
function updateSelection() {
//Clear
Expand Down
9 changes: 7 additions & 2 deletions js/elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -1033,8 +1033,14 @@ function dropOutlinerObjects(item, target, event) {

function addCube() {
var base_cube = new Cube().addTo()
var create_bone = (settings.entity_mode.value && !selected_group && selected.length === 0)
if (selected_group) {
base_cube.addTo(selected_group)
} else if (selected[0] !== undefined &&
elements[selected[0]] &&
elements[selected[0]].display.parent !== 'root'
) {
base_cube.addTo(elements[selected[0]].display.parent)
}

if (textures.length && settings.entity_mode.value) {
Expand All @@ -1057,8 +1063,7 @@ function addCube() {
renameCubes()
}
})
if (settings.entity_mode.value) {
var new_group =
if (create_bone) {
base_cube.addTo(new Group().addTo('root').openUp())
}
Blockbench.dispatchEvent( 'add_cube', {object: base_cube} )
Expand Down
14 changes: 12 additions & 2 deletions js/io.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,23 @@ function buildBlockModel(options) { //Export Blockmodel
blockmodel.elements = clear_elements
}
if (checkExport('groups', (settings.export_groups.value && getAllOutlinerGroups().length))) {
blockmodel.groups = compileGroups(undefined, element_index_lut)
groups = compileGroups(undefined, element_index_lut)
var i = 0;
while (i < groups.length) {
if (typeof groups[i] === 'object') {
i = Infinity
}
i++
}
if (i === Infinity) {
blockmodel.groups = groups
}
}
if (checkExport('display', Object.keys(display).length >= 1)) {
var new_display = {}
for (var key in display) {
if (display.hasOwnProperty(key)) {
if (display[key].scale.join('_') !== '1_1_1' ||
if ((display[key].scale && display[key].scale.join('_') !== '1_1_1') ||
display[key].rotation ||
display[key].translation
) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Blockbench",
"description": "Minecraft Block Model Editor",
"version": "1.10.1",
"version": "1.10.2",
"author": {
"name": "JannisX11",
"email": "[email protected]"
Expand Down

0 comments on commit 0a4f865

Please sign in to comment.