@@ -66,7 +66,7 @@ export interface IRenderedNode {
66
66
name : string
67
67
safe_name : string
68
68
uuid : string
69
- parent : string
69
+ parent ? : string
70
70
/**
71
71
* The default transformation of the node
72
72
*/
@@ -320,7 +320,7 @@ function renderGroup(
320
320
defaultVariant : IRenderedVariant
321
321
) : INodeStructure | undefined {
322
322
if ( ! group . export ) return
323
- const parentId = ( group . parent instanceof Group ? group . parent . uuid : group . parent ) !
323
+ const parentId = group . parent instanceof Group ? group . parent . uuid : undefined
324
324
325
325
const path = PathModule . join ( rig . model_export_folder , 'default' , group . name + `.json` )
326
326
const parsed = parseResourcePackPath ( path )
@@ -427,7 +427,7 @@ function renderGroup(
427
427
428
428
function renderItemDisplay ( display : VanillaItemDisplay , rig : IRenderedRig ) {
429
429
if ( ! display . export ) return
430
- const parentId = ( display . parent instanceof Group ? display . parent . uuid : display . parent ) !
430
+ const parentId = display . parent instanceof Group ? display . parent . uuid : undefined
431
431
432
432
const path = PathModule . join ( rig . model_export_folder , display . name + `.json` )
433
433
const parsed = parseResourcePackPath ( path )
@@ -455,7 +455,7 @@ function renderItemDisplay(display: VanillaItemDisplay, rig: IRenderedRig) {
455
455
456
456
function renderBlockDisplay ( display : VanillaBlockDisplay , rig : IRenderedRig ) {
457
457
if ( ! display . export ) return
458
- const parentId = ( display . parent instanceof Group ? display . parent . uuid : display . parent ) !
458
+ const parentId = display . parent instanceof Group ? display . parent . uuid : undefined
459
459
460
460
const path = PathModule . join ( rig . model_export_folder , display . name + `.json` )
461
461
const parsed = parseResourcePackPath ( path )
@@ -482,7 +482,7 @@ function renderBlockDisplay(display: VanillaBlockDisplay, rig: IRenderedRig) {
482
482
483
483
function renderTextDisplay ( display : TextDisplay , rig : IRenderedRig ) : INodeStructure | undefined {
484
484
if ( ! display . export ) return
485
- const parentId = ( display . parent instanceof Group ? display . parent . uuid : display . parent ) !
485
+ const parentId = display . parent instanceof Group ? display . parent . uuid : undefined
486
486
487
487
const path = PathModule . join ( rig . model_export_folder , display . name + `.json` )
488
488
const parsed = parseResourcePackPath ( path )
0 commit comments