|
| 1 | +{ |
| 2 | + "title": "JSON Exporter Structure", |
| 3 | + "type": "object", |
| 4 | + "required": ["project_settings", "exporter_settings", "rig", "variants", "animations"], |
| 5 | + "properties": { |
| 6 | + "project_settings": { |
| 7 | + "type": "object", |
| 8 | + "description": "The project settings used to export the file." |
| 9 | + }, |
| 10 | + "exporter_settings": { |
| 11 | + "type": "object", |
| 12 | + "description": "The exporter settings used to export the file." |
| 13 | + }, |
| 14 | + "rig": { |
| 15 | + "type": "object", |
| 16 | + "required": ["default_pose", "node_map"], |
| 17 | + "properties": { |
| 18 | + "default_pose": { |
| 19 | + "type": "array", |
| 20 | + "description": "The default pose of the rig.", |
| 21 | + "items": { |
| 22 | + "$ref": "#/definitions/animation_frame" |
| 23 | + } |
| 24 | + }, |
| 25 | + "node_map": { |
| 26 | + "type": "object", |
| 27 | + "description": "A map of nodes by UUID.", |
| 28 | + "patternProperties": { |
| 29 | + ".*": { |
| 30 | + "$ref": "#/definitions/node" |
| 31 | + } |
| 32 | + } |
| 33 | + } |
| 34 | + } |
| 35 | + }, |
| 36 | + "variants": { |
| 37 | + "type": "object", |
| 38 | + "description": "A map of variants by uuid.", |
| 39 | + "patternProperties": { |
| 40 | + ".*": { |
| 41 | + "$ref": "#/definitions/variant" |
| 42 | + } |
| 43 | + } |
| 44 | + }, |
| 45 | + "animations": { |
| 46 | + "type": "object", |
| 47 | + "description": "A map of animations by name.", |
| 48 | + "patternProperties": { |
| 49 | + ".*": { |
| 50 | + "$ref": "#/definitions/animation" |
| 51 | + } |
| 52 | + } |
| 53 | + } |
| 54 | + }, |
| 55 | + "$def": { |
| 56 | + "node_type": { |
| 57 | + "enum": ["bone", "locator", "camera"] |
| 58 | + }, |
| 59 | + "node": { |
| 60 | + "type": "object", |
| 61 | + "required": ["type", "name", "uuid", "custom_model_data", "resource_location"], |
| 62 | + "properties": { |
| 63 | + "type": { |
| 64 | + "$ref": "#/definitions/node_type" |
| 65 | + }, |
| 66 | + "name": { |
| 67 | + "type": "string" |
| 68 | + }, |
| 69 | + "uuid": { |
| 70 | + "type": "string" |
| 71 | + }, |
| 72 | + "custom_model_data": { |
| 73 | + "type": "number" |
| 74 | + }, |
| 75 | + "resource_location": { |
| 76 | + "type": "string" |
| 77 | + } |
| 78 | + } |
| 79 | + }, |
| 80 | + "variant": { |
| 81 | + "type": "object", |
| 82 | + "required": ["name", "uuid", "affected_bones", "affected_bones_is_a_whitelist"], |
| 83 | + "properties": { |
| 84 | + "name": { |
| 85 | + "type": "string" |
| 86 | + }, |
| 87 | + "uuid": { |
| 88 | + "type": "string" |
| 89 | + }, |
| 90 | + "models": { |
| 91 | + "type": "object", |
| 92 | + "description": "A map of modified bones by UUID.", |
| 93 | + "patternProperties": { |
| 94 | + ".*": { |
| 95 | + "type": "object", |
| 96 | + "properties": { |
| 97 | + "custom_model_data": { |
| 98 | + "type": "number", |
| 99 | + "description": "The custom model data to use for this bone." |
| 100 | + }, |
| 101 | + "resource_location": { |
| 102 | + "type": "string", |
| 103 | + "description": "The resource location of the model to use for this bone." |
| 104 | + } |
| 105 | + } |
| 106 | + } |
| 107 | + } |
| 108 | + }, |
| 109 | + "affected_bones": { |
| 110 | + "type": "array", |
| 111 | + "description": "A list of bones (by UUID) affected by this variant.", |
| 112 | + "items": { |
| 113 | + "type": "string" |
| 114 | + } |
| 115 | + }, |
| 116 | + "affected_bones_is_a_whitelist": { |
| 117 | + "type": "boolean", |
| 118 | + "description": "If true, only the bones in the list are affected. If false, all bones except those in the list are affected." |
| 119 | + } |
| 120 | + } |
| 121 | + }, |
| 122 | + "animation": { |
| 123 | + "type": "object", |
| 124 | + "required": [ |
| 125 | + "frames", |
| 126 | + "duration", |
| 127 | + "loop_mode", |
| 128 | + "affected_bones", |
| 129 | + "affected_bones_is_a_whitelist" |
| 130 | + ], |
| 131 | + "properties": { |
| 132 | + "frames": { |
| 133 | + "type": "array", |
| 134 | + "items": { |
| 135 | + "$ref": "#/definitions/animation_frame" |
| 136 | + } |
| 137 | + }, |
| 138 | + "duration": { |
| 139 | + "type": "number" |
| 140 | + }, |
| 141 | + "loop_mode": { |
| 142 | + "$ref": "#/definitions/animation_loop_mode" |
| 143 | + }, |
| 144 | + "affected_bones": { |
| 145 | + "type": "array", |
| 146 | + "description": "A list of bones (by UUID) affected by this animation.", |
| 147 | + "items": { |
| 148 | + "type": "string" |
| 149 | + } |
| 150 | + }, |
| 151 | + "affected_bones_is_a_whitelist": { |
| 152 | + "type": "boolean", |
| 153 | + "description": "If true, only the bones in the list are affected. If false, all bones except those in the list are affected." |
| 154 | + } |
| 155 | + } |
| 156 | + }, |
| 157 | + "loop_mode": { |
| 158 | + "enum": ["once", "hold", "loop"] |
| 159 | + }, |
| 160 | + "animation_frame": { |
| 161 | + "type": "object", |
| 162 | + "required": ["time", "nodes"], |
| 163 | + "properties": { |
| 164 | + "nodes": { |
| 165 | + "type": "array", |
| 166 | + "description": "A list of nodes and their new transforms for this frame.\nNodes that do not change this frame are omitted.", |
| 167 | + "items": { |
| 168 | + "$ref": "#/definitions/node_animation_frame_entry" |
| 169 | + } |
| 170 | + }, |
| 171 | + "commands": { |
| 172 | + "type": "object", |
| 173 | + "properties": { |
| 174 | + "commands": { |
| 175 | + "type": "string", |
| 176 | + "description": "The contents of a function to execute on this frame." |
| 177 | + }, |
| 178 | + "execute_condition": { |
| 179 | + "type": "string", |
| 180 | + "description": "The condition to execute the variant switch." |
| 181 | + } |
| 182 | + } |
| 183 | + }, |
| 184 | + "variant": { |
| 185 | + "type": "object", |
| 186 | + "properties": { |
| 187 | + "variant": { |
| 188 | + "type": "string", |
| 189 | + "description": "The UUID of the variant to switch to." |
| 190 | + }, |
| 191 | + "execute_condition": { |
| 192 | + "type": "string", |
| 193 | + "description": "The condition to execute the variant switch." |
| 194 | + } |
| 195 | + } |
| 196 | + } |
| 197 | + } |
| 198 | + }, |
| 199 | + "node_animation_frame_entry": { |
| 200 | + "type": "object", |
| 201 | + "required": ["type", "uuid", "matrix"], |
| 202 | + "properties": { |
| 203 | + "uuid": { |
| 204 | + "type": "string" |
| 205 | + }, |
| 206 | + "matrix": { |
| 207 | + "type": "array", |
| 208 | + "items": { |
| 209 | + "type": "number" |
| 210 | + } |
| 211 | + }, |
| 212 | + "interpolation": { |
| 213 | + "enum": ["default", "instant"] |
| 214 | + } |
| 215 | + } |
| 216 | + } |
| 217 | + } |
| 218 | +} |
0 commit comments