Skip to content

Commit 8ca0cfe

Browse files
Added rudimentary support for BRK loading.
1 parent 66fad37 commit 8ca0cfe

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

J3DModelViewer/ViewModel/MainWindowViewModel.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ private void OnUserRequestLoadAsset(bool unloadExisting)
142142
ofd.ShowPlacesList = true;
143143

144144
// If they haven't loaded any models, they can't load any of the associated animation data.
145-
string allSupportedExtensions = "*.bmd,*.bdl,*.bck, *.btk, *.bmt";
145+
string allSupportedExtensions = "*.bmd,*.bdl,*.bck, *.btk, *.brk, *.bmt";
146146
string onlyModelExtensions = "*.bmd, *.bdl";
147147

148148
string extensions = HasLoadedModel ? allSupportedExtensions : onlyModelExtensions;
@@ -244,6 +244,19 @@ private void LoadAssetFromFilepath(string filePath, bool unloadExisting)
244244
}
245245
break;
246246

247+
case ".brk":
248+
{
249+
if (MainModel != null)
250+
{
251+
if (unloadExisting)
252+
MainModel.UnloadRegisterAnimations();
253+
MainModel.LoadRegisterAnim(filePath);
254+
255+
MainModel.SetRegisterAnimation(fileName);
256+
}
257+
}
258+
break;
259+
247260
case ".bmt":
248261
{
249262
if (MainModel != null)

0 commit comments

Comments
 (0)