Skip to content

Import a 3D Model and automatically assign and export animations

TypeScript

made naming more consistency for fox

Scott Petrovic8b0f000fec6d
diff --git a/src/lib/RigConfig.ts b/src/lib/RigConfig.ts
index b245770..708f807 100644
--- a/src/lib/RigConfig.ts
+++ b/src/lib/RigConfig.ts
@@ -7,10 +7,8 @@ export interface RigConfigEntry {
skeleton_type: SkeletonType
// Model file path relative to the static root, e.g. 'models/model-human.glb'
model_file: string
- // Display name shown in the model dropdown, e.g. 'Human', 'Fox'
- model_display_name: string
- // Display name shown in the skeleton-type dropdown, e.g. 'Human', '4 Leg Creature'
- skeleton_display_name: string
+ // Display name shown in both the model and skeleton dropdowns
+ rig_display_name: string
// Animation filenames (no base path) loaded for this rig type
animation_files: string[]
// Sub-folder name used when referencing animation preview thumbnails
@@ -35,8 +33,7 @@ export class RigConfig {
key: 'human',
skeleton_type: SkeletonType.Human,
model_file: 'models/model-human.glb',
- model_display_name: 'Human',
- skeleton_display_name: 'Human',
+ rig_display_name: 'Human',
animation_files: ['human-base-animations.glb', 'human-addon-animations.glb'],
animation_preview_folder: 'human',
has_hand_options: true,
@@ -47,10 +44,9 @@ export class RigConfig {
key: 'quadraped',
skeleton_type: SkeletonType.Quadraped,
model_file: 'models/model-fox.glb',
- model_display_name: 'Fox',
- skeleton_display_name: '4 Leg Creature',
- animation_files: ['quad-creature-animations.glb'],
- animation_preview_folder: 'four-legged',
+ rig_display_name: 'Fox',
+ animation_files: ['fox-animations.glb'],
+ animation_preview_folder: 'fox',
has_hand_options: false,
has_head_weight_correction: false,
has_a_pose_correction: false
@@ -59,8 +55,7 @@ export class RigConfig {
key: 'bird',
skeleton_type: SkeletonType.Bird,
model_file: 'models/model-bird.glb',
- model_display_name: 'Bird',
- skeleton_display_name: 'Bird',
+ rig_display_name: 'Bird',
animation_files: ['bird-animations.glb'],
animation_preview_folder: 'bird',
has_hand_options: false,
@@ -71,8 +66,7 @@ export class RigConfig {
key: 'dragon',
skeleton_type: SkeletonType.Dragon,
model_file: 'models/model-dragon.glb',
- model_display_name: 'Dragon',
- skeleton_display_name: 'Dragon',
+ rig_display_name: 'Dragon',
animation_files: ['dragon-animations.glb'],
animation_preview_folder: 'dragon',
has_hand_options: false,
@@ -83,8 +77,7 @@ export class RigConfig {
key: 'kaiju',
skeleton_type: SkeletonType.Kaiju,
model_file: 'models/model-kaiju.glb',
- model_display_name: 'Kaiju',
- skeleton_display_name: 'Kaiju',
+ rig_display_name: 'Kaiju',
animation_files: ['kaiju-animations.glb'],
animation_preview_folder: 'kaiju',
has_hand_options: false,
@@ -112,7 +105,7 @@ export class RigConfig {
for (const rig of this.all) {
const option = document.createElement('option')
option.value = rig.model_file
- option.textContent = rig.model_display_name
+ option.textContent = rig.rig_display_name
select.appendChild(option)
}
}
@@ -133,7 +126,7 @@ export class RigConfig {
for (const rig of this.all) {
const option = document.createElement('option')
option.value = rig.key
- option.textContent = rig.skeleton_display_name
+ option.textContent = rig.rig_display_name
select.appendChild(option)
}
}
diff --git a/src/preview-generator/index.html b/src/preview-generator/index.html
index c870f63..a8564ca 100644
--- a/src/preview-generator/index.html
+++ b/src/preview-generator/index.html
@@ -17,7 +17,7 @@
<option>Pick a 3d animation to generate previews</option>
<option value="../animations/human-base-animations.glb">Human Base Animations</option>
<option value="../animations/human-addon-animations.glb">Human Addon Animations</option>
- <option value="../animations/quad-creature-animations.glb">Quad Creature Animations</option>
+ <option value="../animations/fox-animations.glb">Fox Animations</option>
<option value="../animations/bird-animations.glb">Bird Animations</option>
<option value="../animations/dragon-animations.glb">Dragon Animations</option>
<option value="../animations/kaiju-animations.glb">Kaiju Animations</option>
diff --git a/static/animations/quad-creature-animations.glb b/static/animations/fox-animations.glb
similarity index 100%
rename from static/animations/quad-creature-animations.glb
rename to static/animations/fox-animations.glb
diff --git a/static/animpreviews/four-legged/dark_Bark.webm b/static/animpreviews/fox/dark_Bark.webm
similarity index 100%
rename from static/animpreviews/four-legged/dark_Bark.webm
rename to static/animpreviews/fox/dark_Bark.webm
diff --git a/static/animpreviews/four-legged/dark_Bite.webm b/static/animpreviews/fox/dark_Bite.webm
similarity index 100%
rename from static/animpreviews/four-legged/dark_Bite.webm
rename to static/animpreviews/fox/dark_Bite.webm
diff --git a/static/animpreviews/four-legged/dark_Death.webm b/static/animpreviews/fox/dark_Death.webm
similarity index 100%
rename from static/animpreviews/four-legged/dark_Death.webm
rename to static/animpreviews/fox/dark_Death.webm
diff --git a/static/animpreviews/four-legged/dark_Fall.webm b/static/animpreviews/fox/dark_Fall.webm
similarity index 100%
rename from static/animpreviews/four-legged/dark_Fall.webm
rename to static/animpreviews/fox/dark_Fall.webm
diff --git a/static/animpreviews/four-legged/dark_Fetch.webm b/static/animpreviews/fox/dark_Fetch.webm
similarity index 100%
rename from static/animpreviews/four-legged/dark_Fetch.webm
rename to static/animpreviews/fox/dark_Fetch.webm
diff --git a/static/animpreviews/four-legged/dark_Howl.webm b/static/animpreviews/fox/dark_Howl.webm
similarity index 100%
rename from static/animpreviews/four-legged/dark_Howl.webm
rename to static/animpreviews/fox/dark_Howl.webm
diff --git a/static/animpreviews/four-legged/dark_Idle Alert.webm b/static/animpreviews/fox/dark_Idle Alert.webm
similarity index 100%
rename from static/animpreviews/four-legged/dark_Idle Alert.webm
rename to static/animpreviews/fox/dark_Idle Alert.webm
diff --git a/static/animpreviews/four-legged/dark_Idle.webm b/static/animpreviews/fox/dark_Idle.webm
similarity index 100%
rename from static/animpreviews/four-legged/dark_Idle.webm
rename to static/animpreviews/fox/dark_Idle.webm
diff --git a/static/animpreviews/four-legged/dark_Jump.webm b/static/animpreviews/fox/dark_Jump.webm
similarity index 100%
rename from static/animpreviews/four-legged/dark_Jump.webm
rename to static/animpreviews/fox/dark_Jump.webm
diff --git a/static/animpreviews/four-legged/dark_Run.webm b/static/animpreviews/fox/dark_Run.webm
similarity index 100%
rename from static/animpreviews/four-legged/dark_Run.webm
rename to static/animpreviews/fox/dark_Run.webm
diff --git a/static/animpreviews/four-legged/dark_Sit.webm b/static/animpreviews/fox/dark_Sit.webm
similarity index 100%
rename from static/animpreviews/four-legged/dark_Sit.webm
rename to static/animpreviews/fox/dark_Sit.webm
diff --git a/static/animpreviews/four-legged/dark_Sneak.webm b/static/animpreviews/fox/dark_Sneak.webm
similarity index 100%
rename from static/animpreviews/four-legged/dark_Sneak.webm
rename to static/animpreviews/fox/dark_Sneak.webm
diff --git a/static/animpreviews/four-legged/dark_Walk.webm b/static/animpreviews/fox/dark_Walk.webm
similarity index 100%
rename from static/animpreviews/four-legged/dark_Walk.webm
rename to static/animpreviews/fox/dark_Walk.webm
diff --git a/static/animpreviews/four-legged/light_Bark.webm b/static/animpreviews/fox/light_Bark.webm
similarity index 100%
rename from static/animpreviews/four-legged/light_Bark.webm
rename to static/animpreviews/fox/light_Bark.webm
diff --git a/static/animpreviews/four-legged/light_Bite.webm b/static/animpreviews/fox/light_Bite.webm
similarity index 100%
rename from static/animpreviews/four-legged/light_Bite.webm
rename to static/animpreviews/fox/light_Bite.webm
diff --git a/static/animpreviews/four-legged/light_Death.webm b/static/animpreviews/fox/light_Death.webm
similarity index 100%
rename from static/animpreviews/four-legged/light_Death.webm
rename to static/animpreviews/fox/light_Death.webm
diff --git a/static/animpreviews/four-legged/light_Fall.webm b/static/animpreviews/fox/light_Fall.webm
similarity index 100%
rename from static/animpreviews/four-legged/light_Fall.webm
rename to static/animpreviews/fox/light_Fall.webm
diff --git a/static/animpreviews/four-legged/light_Fetch.webm b/static/animpreviews/fox/light_Fetch.webm
similarity index 100%
rename from static/animpreviews/four-legged/light_Fetch.webm
rename to static/animpreviews/fox/light_Fetch.webm
diff --git a/static/animpreviews/four-legged/light_Howl.webm b/static/animpreviews/fox/light_Howl.webm
similarity index 100%
rename from static/animpreviews/four-legged/light_Howl.webm
rename to static/animpreviews/fox/light_Howl.webm
diff --git a/static/animpreviews/four-legged/light_Idle Alert.webm b/static/animpreviews/fox/light_Idle Alert.webm
similarity index 100%
rename from static/animpreviews/four-legged/light_Idle Alert.webm
rename to static/animpreviews/fox/light_Idle Alert.webm
diff --git a/static/animpreviews/four-legged/light_Idle.webm b/static/animpreviews/fox/light_Idle.webm
similarity index 100%
rename from static/animpreviews/four-legged/light_Idle.webm
rename to static/animpreviews/fox/light_Idle.webm
diff --git a/static/animpreviews/four-legged/light_Jump.webm b/static/animpreviews/fox/light_Jump.webm
similarity index 100%
rename from static/animpreviews/four-legged/light_Jump.webm
rename to static/animpreviews/fox/light_Jump.webm
diff --git a/static/animpreviews/four-legged/light_Run.webm b/static/animpreviews/fox/light_Run.webm
similarity index 100%
rename from static/animpreviews/four-legged/light_Run.webm
rename to static/animpreviews/fox/light_Run.webm
diff --git a/static/animpreviews/four-legged/light_Sit.webm b/static/animpreviews/fox/light_Sit.webm
similarity index 100%
rename from static/animpreviews/four-legged/light_Sit.webm
rename to static/animpreviews/fox/light_Sit.webm
diff --git a/static/animpreviews/four-legged/light_Sneak.webm b/static/animpreviews/fox/light_Sneak.webm
similarity index 100%
rename from static/animpreviews/four-legged/light_Sneak.webm
rename to static/animpreviews/fox/light_Sneak.webm
diff --git a/static/animpreviews/four-legged/light_Walk.webm b/static/animpreviews/fox/light_Walk.webm
similarity index 100%
rename from static/animpreviews/four-legged/light_Walk.webm
rename to static/animpreviews/fox/light_Walk.webm