File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 164164 "type" : {
165165 "type" : " string"
166166 },
167+ "parent" : {
168+ "type" : " string" ,
169+ "pattern" : " ^[a-z0-9_]+$"
170+ },
167171 "default_transformation" : {
168172 "$ref" : " #/definitions/node_transformation"
169173 }
Original file line number Diff line number Diff line change @@ -120,12 +120,14 @@ type NodeType =
120120type PluginNode =
121121 | {
122122 type : 'bone'
123+ parent ?: string
123124 default_transformation ?: NodeTransformation
124125 display_properties ?: Record < string , unknown >
125126 elements : BoneElement [ ]
126127 }
127128 | {
128129 type : Exclude < NodeType , 'bone' >
130+ parent ?: string
129131 default_transformation ?: NodeTransformation
130132 display_properties ?: Record < string , unknown >
131133 }
@@ -339,12 +341,14 @@ function serializeBoneElements(
339341function serializeNode (
340342 node : AnyRenderedNode ,
341343 options : {
344+ parent ?: string
342345 defaultVariantModels : Record < string , { model : IRenderedModel | null } >
343346 textureIdToKey : Map < string , string >
344347 textureKeyToPaletteId : Map < string , string >
345348 }
346349) : PluginNode {
347350 const base = {
351+ parent : options . parent ,
348352 default_transformation : serializeNodeTransformation ( node . default_transform ) ,
349353 } as const
350354
@@ -684,6 +688,7 @@ export function exportPluginBlueprint(options: {
684688 const nodeId = nodeUuidToId . get ( uuid )
685689 if ( ! nodeId ) continue
686690 nodes [ nodeId ] = serializeNode ( node , {
691+ parent : node . parent ? nodeUuidToId . get ( node . parent ) : undefined ,
687692 defaultVariantModels,
688693 textureIdToKey,
689694 textureKeyToPaletteId,
You can’t perform that action at this time.
0 commit comments