Skip to content

Commit cb79b68

Browse files
committed
Export > Visibility
1 parent 252ca2c commit cb79b68

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

debug_resourcepack/armor_stand.ajmodel

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"meta": {
33
"format_version": "0.0",
4-
"creation_time": 1643569419,
4+
"creation_time": 1643572705,
55
"model_format": "animated_java/ajmodel",
66
"box_uv": false,
77
"settings": {
@@ -531,6 +531,7 @@
531531
],
532532
"autouv": 0,
533533
"color": 4,
534+
"export": false,
534535
"origin": [
535536
0,
536537
-1,
@@ -1185,7 +1186,7 @@
11851186
"nbt": "{}",
11861187
"armAnimationEnabled": false,
11871188
"uuid": "0237edc1-3823-5494-7d32-e881620d58f4",
1188-
"export": true,
1189+
"export": false,
11891190
"isOpen": true,
11901191
"locked": false,
11911192
"visibility": true,

src/animationRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ async function renderAnimation(options) {
273273
const renderedGroups = Group.all.filter(
274274
(group) =>
275275
!isSceneBased(group) &&
276-
group.visibility &&
276+
group.export &&
277277
group.children.find((child) => child instanceof Cube)
278278
)
279279
console.log('All Groups:', Group.all)

src/modelComputation.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ export function computeElements() {
7474
var invalid_rot_elements = []
7575

7676
function computeCube(s) {
77-
// if (s.export == false || s.visibility == false) return
7877
if (s.parent === 'root') {
7978
throw new CustomError('Top Level Cubes Found in model', {
8079
intentional: true,
@@ -272,7 +271,7 @@ async function computeModels(cubeData) {
272271
function recurse(group) {
273272
console.log(group)
274273
const cubeChildren = group.children
275-
.filter((c) => c instanceof Cube && c.visibility)
274+
.filter((c) => c instanceof Cube && c.export)
276275
.map((current) =>
277276
cubeData.clear_elements.find(
278277
(other) => current.uuid === other.uuid
@@ -281,7 +280,6 @@ async function computeModels(cubeData) {
281280

282281
if (
283282
group instanceof Group &&
284-
group.visibility &&
285283
group.name !== 'SCENE' &&
286284
group.export &&
287285
!isSceneBased(group)
@@ -376,7 +374,7 @@ export function computeBones(models, animations) {
376374
// const value = Project.groups[name];
377375
if (value.parent) {
378376
const parentGroup = value.parent.getGroup()
379-
if (!parentGroup.export && parentGroup.visibility) continue
377+
if (!parentGroup.export) continue
380378
const parentName = safeFunctionName(parentGroup.name)
381379
if (
382380
!isSceneBased(parentGroup) &&

src/util/hash.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function boneStructure() {
4949
hash.update(`name;${group.name}`)
5050
hash.update(`pos;(${group.origin.join(',')})`)
5151
hash.update(`rot;(${group.rotation.join(',')})`)
52-
hash.update(`vis;${group.visibility}`)
52+
hash.update(`exp;${group.export}`)
5353
}
5454

5555
function recurse(children) {

0 commit comments

Comments
 (0)