diff --git a/ActiveTodoList.txt b/ActiveTodoList.txt
index 421f0e591..9ad418d1b 100644
--- a/ActiveTodoList.txt
+++ b/ActiveTodoList.txt
@@ -1,32 +1,20 @@
Feature list:
Kitbash editor:
Tools:
- [DONE]Convert face selection to vertex
- [DONE]Duplicate selected faces
- [DONE]Extract selected faces to new object
+
[DONE]Generate lods
Ui ratio setting values
- [DONE]Remapping skeleton does not update the skeleton getting names from, causing crashes in some cases
- [DONE]Change animation skeleton
- Undo for animation mapping
-
- [DONE]Handle large models with n lods
Validate logic before save
Validate tool
- [DONE]Change animation vertex type (downgrade, make sure it works in validation)
- Combining all items in a group should remove the group
- [DONE]Rename group ui
+ Combining all items in a group should remove the group
Pivot:
Edit
Display
General:
- [DONE]Open from file
- [DONE]Small popup when undoing stuff
set all not ediable to readonly ui
- [DONE]Lock for edit
Waiting mouse when doing command
Profile grow selection
Remove animation invert by fixing veiw matrix
@@ -34,33 +22,17 @@ Feature list:
Select vertex with mouse click
Make sure textures actually work
Skelton with good descriptive names
- [DONE]Make sure texture stuff works
Save packfile cleanup edited
Save packfile handle refs to open editors and memory streams?
All uis should spawn at the center
- [DONE]Test with empty settings
- [DONE]Create "developer" settings
-
- [DONE]Default to warhammer 2 for game
- [DONE]How to handle assets for single publiush
- [DONE]New packfile -> Set as main editable file
- [DONE]Option->OPen log folder
- [DONE]Pack file extention on save
- Closing packfile need to close all open windoes
Open material files
Directory copy name
Bounding box calculations
Changing animation for duplicate goes boom. Undo for mapping needed
- UI:
- Fix attachement points buttons
- Fix skeleton buttons
General:
TreeView:
- [DONE]Dont always rebuild treeview! Save, new file
- [DONE]save as dialog (create folder)
- [DONE]duplicate file
Create new file => VMD, XML, TXT
Right click rmv2 model files => Edit
@@ -71,10 +43,6 @@ Feature list:
3d Preview tool:
Make one...
-
- Text editor:
-
-Axis size
Known bugs:
[DONE]Select face, then swap to vertex mode, need to call update before draw error
@@ -134,7 +102,6 @@ Known bugs:
Ensure all components is removed when exiting
* When looking for files, search ca last -> textures, meshes
- * Undo for mapping
* Loading advance vmds
* Bondingbox display
* boundingbox recalc
@@ -148,11 +115,9 @@ Ensure all components is removed when exiting
* Sometimes undo for vertex movement does not work
* splitting repanse removes parts
* Quality of life changes for skeleton remapping tool
- - Undo
- Save thingy actually working
- Duplicate mesh teaking stuff from, so skeleton names does not change for duplicated meshes
* Unsaved changes, do you want to exit?
- * Bounding box recalc
* When playing, attach items to props
* Saving mapping does not work when loading it back in
* Converte to weighted 4 vertex type
@@ -161,11 +126,8 @@ Ensure all components is removed when exiting
Quality of life:
Flip mesh
- Remove slots and slot folders
- Hotkey names
Skeleton information view
Snap mesh to skeleteon when mapping
- Undo mapping
Improved ws model generation (Facncy mode)
about box - Dont break eula
Save taxturepaths with slash other way
@@ -201,26 +163,27 @@ Animation tool:
// ---------------------
-BmiToolCommand
Attach to vertex
-
-
Extract new mesh from selection
-
Enter works on prompts
Dropdown for search
Mouse focus on search for browser
Skeletonbone highligerr
-Hotkey descriptions
-
-
Remapping vmd tool?
Generic viewer
+bone mapper:
+ Show bones?
+ Fit skeleton auto scale?
+ Always show breath first
+// ----------------------------------------------
+
WsModel auto generate when possible
Wsmodel make editable context menu
+auto merge meshes that can be merged
+
[DONE]Key to only view selected
[DONE]Shift to add to selection
[DONE]Extract mesh from group context menu
@@ -228,11 +191,20 @@ Wsmodel make editable context menu
[DONE]Wsmodel view toggle not working
[DONE]Escape to close open file browser
[DONE]Allow undo of mapping
+[Done]Hotkey descriptions
[Done-ish]Fatness slider
[Done-ish]Fit skeleton on remapping
+ try names with _0 at when -1
+ [Done]increase size of view
+ Confirme text with mappings with -1
+ [Done]Make auto move more visible and actiate the checkbox
+ -> Mapping from self to self warning -> error at the bottow
+
+add a way to multiselect items on model/vmd import
+ => rigkt click context menu import
-
+Fit to skeleton -> allows for -1 in mapping better
diff --git a/AssetEditor/AssetEditor.csproj b/AssetEditor/AssetEditor.csproj
index 5da1517f7..4ca4ffaec 100644
--- a/AssetEditor/AssetEditor.csproj
+++ b/AssetEditor/AssetEditor.csproj
@@ -5,7 +5,7 @@
netcoreapp3.1
true
hnet.com-image (1).ico
- AssetEditor v0.6
+ AssetEditor v0.7
diff --git a/AssetEditor/ViewModels/MainViewModel.cs b/AssetEditor/ViewModels/MainViewModel.cs
index fe65d18a7..729baf3c9 100644
--- a/AssetEditor/ViewModels/MainViewModel.cs
+++ b/AssetEditor/ViewModels/MainViewModel.cs
@@ -89,8 +89,8 @@ public MainViewModel(MenuBarViewModel menuViewModel, IServiceProvider servicePro
//var packFile = packfileService.FindFile(@"variantmeshes\wh_variantmodels\hu17\skv\skv_clan_rats\head\skv_clan_rats_head_04.rigid_model_v2");
- //MountAnimationCreatorViewModel_Debug.CreateLionAndHu01b(this, toolFactory, packfileService);
- KitbashEditor_Debug.CreateSlayerHead(this, toolFactory, packfileService);
+ MountAnimationCreatorViewModel_Debug.CreateLionAndHu01b(this, toolFactory, packfileService);
+ //KitbashEditor_Debug.CreateSlayerHead(this, toolFactory, packfileService);
//var editorView = toolFactory.CreateEditorViewModel();
diff --git a/KitbasherEditor/Views/EditorViews/AnimatedBlendIndexRemappingWindow.xaml b/KitbasherEditor/Views/EditorViews/AnimatedBlendIndexRemappingWindow.xaml
index 5c099f740..b92c61005 100644
--- a/KitbasherEditor/Views/EditorViews/AnimatedBlendIndexRemappingWindow.xaml
+++ b/KitbasherEditor/Views/EditorViews/AnimatedBlendIndexRemappingWindow.xaml
@@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:KitbasherEditor.Views.EditorViews"
mc:Ignorable="d"
- Title="AnimatedBlendIndexRemappingWindow" Height="450" Width="800">
+ Title="AnimatedBlendIndexRemappingWindow" Height="600" Width="1200">
diff --git a/KitbasherEditor/Views/EditorViews/AnimatedBlendIndexRemappingWindow.xaml.cs b/KitbasherEditor/Views/EditorViews/AnimatedBlendIndexRemappingWindow.xaml.cs
index f971b9087..2d7294629 100644
--- a/KitbasherEditor/Views/EditorViews/AnimatedBlendIndexRemappingWindow.xaml.cs
+++ b/KitbasherEditor/Views/EditorViews/AnimatedBlendIndexRemappingWindow.xaml.cs
@@ -25,6 +25,9 @@ public AnimatedBlendIndexRemappingWindow()
private void OkButton_Click(object sender, RoutedEventArgs e)
{
DialogResult = true;
+
+
+
Close();
}
diff --git a/KitbasherEditor/Views/EditorViews/BmiWindow.xaml.cs b/KitbasherEditor/Views/EditorViews/BmiWindow.xaml.cs
index 60c681a8a..21c291873 100644
--- a/KitbasherEditor/Views/EditorViews/BmiWindow.xaml.cs
+++ b/KitbasherEditor/Views/EditorViews/BmiWindow.xaml.cs
@@ -20,6 +20,13 @@ public partial class BmiWindow : Window
public BmiWindow()
{
InitializeComponent();
+ this.Deactivated += Window_Deactivated;
+ }
+
+ private void Window_Deactivated(object sender, EventArgs e)
+ {
+ Window window = (Window)sender;
+ window.Topmost = true;
}
}
}
diff --git a/View3D/Commands/Object/RemapBoneIndexesCommand.cs b/View3D/Commands/Object/RemapBoneIndexesCommand.cs
index 6123baa86..5969a547d 100644
--- a/View3D/Commands/Object/RemapBoneIndexesCommand.cs
+++ b/View3D/Commands/Object/RemapBoneIndexesCommand.cs
@@ -64,86 +64,64 @@ protected override void ExecuteCommand()
_originalGeometry = _meshOwner.Geometry.Clone();
_originalSkeletonName = _meshOwner.MeshModel.ParentSkeletonName;
+ if (_moveMeshToFit)
+ FitMeshToSkeleton();
+ _meshOwner.Geometry.UpdateAnimationIndecies(_mapping);
+ _meshOwner.MeshModel.ParentSkeletonName = _newSkeletonName;
+ }
- AnimationClip c = new AnimationClip();
- c.DynamicFrames.Add(new AnimationClip.KeyFrame());
+
+ void FitMeshToSkeleton()
+ {
+ AnimationClip animationClip = new AnimationClip();
+ animationClip.DynamicFrames.Add(new AnimationClip.KeyFrame());
for (int i = 0; i < _currentSkeleton.BoneCount; i++)
{
- c.DynamicFrames[0].Rotation.Add(Quaternion.Identity);
- c.DynamicFrames[0].Position.Add(Vector3.Zero);
+ //animationClip.DynamicFrames[0].Rotation.Add(Quaternion.Identity);
+ //animationClip.DynamicFrames[0].Position.Add(Vector3.Zero);
- c.RotationMappings.Add(new Filetypes.RigidModel.AnimationFile.AnimationBoneMapping(i));
- c.TranslationMappings.Add(new Filetypes.RigidModel.AnimationFile.AnimationBoneMapping(i));
- }
-
- // for (int i = 0; i < _currentSkeleton.BoneCount; i++)
- // _currentSkeleton.SetBoneTransform(i, Quaternion.Identity, Vector3.Zero, false);
-
-
- for (int i = 0; i < _currentSkeleton.BoneCount; i++)
- {
-
+ animationClip.DynamicFrames[0].Rotation.Add(_currentSkeleton.Rotation[i]);
+ animationClip.DynamicFrames[0].Position.Add(_currentSkeleton.Translation[i]);
+ animationClip.RotationMappings.Add(new Filetypes.RigidModel.AnimationFile.AnimationBoneMapping(i));
+ animationClip.TranslationMappings.Add(new Filetypes.RigidModel.AnimationFile.AnimationBoneMapping(i));
+ }
+ for (int i = 0; i < _currentSkeleton.BoneCount; i++)
+ {
var mappedIndex = _mapping.FirstOrDefault(x => x.OriginalValue == i);
- if (mappedIndex != null)
- {
- var parentBoneId = _currentSkeleton.GetParentBone(i);
- var parentBoneMapping = _mapping.FirstOrDefault(x => x.OriginalValue == parentBoneId);
- if (parentBoneMapping == null && false)
- {
- var targetBoneWorldMatrix = _targetSkeleton.GetWorldTransform(mappedIndex.NewValue);
- targetBoneWorldMatrix.Decompose(out var _, out var rot, out var trans);
- //_currentSkeleton.SetBoneTransform(i, rot, trans, false);
-
- c.DynamicFrames[0].Position[i] = trans;
- c.DynamicFrames[0].Rotation[i] = rot;
- }
- else
- {
- c.DynamicFrames[0].Position[i] = _targetSkeleton.Translation[mappedIndex.NewValue];
- c.DynamicFrames[0].Rotation[i] = _targetSkeleton.Rotation[mappedIndex.NewValue];
-
- //_currentSkeleton.SetBoneTransform(i, _targetSkeleton.Rotation[mappedIndex.NewValue], _targetSkeleton.Translation[mappedIndex.NewValue], false);
- //_currentSkeleton.SetBoneTransform(i, Quaternion.Identity, _targetSkeleton.Translation[mappedIndex.NewValue], false);
- }
- }
- }
-
- _currentSkeleton.RebuildSkeletonMatrix();
-
-
-
+ if (mappedIndex != null)
+ {
+ var parentBoneId = _currentSkeleton.GetParentBone(i);
+ var parentBoneMapping = _mapping.FirstOrDefault(x => x.OriginalValue == parentBoneId);
+ animationClip.DynamicFrames[0].Position[i] = _targetSkeleton.Translation[mappedIndex.NewValue];
+ animationClip.DynamicFrames[0].Rotation[i] = _targetSkeleton.Rotation[mappedIndex.NewValue];
+ }
+ }
- MeshAnimationHelper meshAnimationHelper = new MeshAnimationHelper(_meshOwner, Matrix.Identity);
- var animationFrame = _currentSkeleton.CreateAnimationFrame();
- animationFrame = AnimationSampler.Sample(0, 0, _currentSkeleton, c);
+ _currentSkeleton.RebuildSkeletonMatrix();
+ MeshAnimationHelper meshAnimationHelper = new MeshAnimationHelper(_meshOwner, Matrix.Identity);
+ var animationFrame = AnimationSampler.Sample(0, 0, _currentSkeleton, animationClip);
_currentSkeleton.SetAnimationFrame(animationFrame);
- //_scene.RootNode.AddObject(new SkeletonNode(_rl.Content, new TempSkelProv() { Skeleton = _currentSkeleton }, "NewSkelly"));
int vertexCount = _meshOwner.Geometry.VertexCount();
for (int i = 0; i < vertexCount; i++)
{
-
+
var vertTransform = meshAnimationHelper.GetVertexTransform(animationFrame, i);
_meshOwner.Geometry.TransformVertex(i, (vertTransform));
}
_meshOwner.Geometry.RebuildVertexBuffer();
- _meshOwner.Geometry.UpdateAnimationIndecies(_mapping);
- _meshOwner.MeshModel.ParentSkeletonName = _newSkeletonName;
-
}
-
-
protected override void UndoCommand()
{
_meshOwner.Geometry = _originalGeometry;
_meshOwner.MeshModel.ParentSkeletonName = _originalSkeletonName;
}
- }
+ }
}