Skip to content

Commit

Permalink
fixed 4.27 compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto authored and roberto committed Aug 14, 2022
1 parent 52a8f67 commit be8fc2e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2461,7 +2461,7 @@ USkeletalMesh* FglTFRuntimeParser::LoadSkeletalMeshFromRuntimeLODs(const TArray<
return nullptr;
}

if (RuntimeLODs[0].Primitives[0].OverrideBoneMap.IsEmpty())
if (RuntimeLODs[0].Primitives[0].OverrideBoneMap.Num() < 1)
{
AddError("LoadSkeletalMeshFromRuntimeLODs()", "Empty Primitive OverrideBoneMap");
return nullptr;
Expand Down Expand Up @@ -2496,7 +2496,7 @@ USkeletalMesh* FglTFRuntimeParser::LoadSkeletalMeshFromRuntimeLODs(const TArray<

for (const FglTFRuntimePrimitive& Primitive : RuntimeLODs[LODIndex].Primitives)
{
if (Primitive.OverrideBoneMap.IsEmpty())
if (Primitive.OverrideBoneMap.Num() < 1)
{
AddError("LoadSkeletalMeshFromRuntimeLODs()", "Empty Primitive OverrideBoneMap");
return nullptr;
Expand Down Expand Up @@ -2524,4 +2524,4 @@ USkeletalMesh* FglTFRuntimeParser::LoadSkeletalMeshFromRuntimeLODs(const TArray<
}

return FinalizeSkeletalMeshWithLODs(SkeletalMeshContext);
}
}
4 changes: 4 additions & 0 deletions Source/glTFRuntimeEditor/Private/glTFRuntimeEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ void FglTFRuntimeEditorModule::SpawnglTFRuntimeActor()
void FglTFRuntimeEditorModule::BuildglTFRuntimeMenu(FMenuBuilder& Builder)
{
Builder.BeginSection("glTFRuntime", FText::FromString("glTFRuntime"));
#if ENGINE_MAJOR_VERSION > 4
Builder.AddMenuEntry(LoadGLTFText, LoadGLTFText, FSlateIcon(FAppStyle::GetAppStyleSetName(), "ClassIcon.Default"), FExecuteAction::CreateRaw(this, &FglTFRuntimeEditorModule::SpawnglTFRuntimeActor));
#else
Builder.AddMenuEntry(LoadGLTFText, LoadGLTFText, FSlateIcon(FEditorStyle::GetStyleSetName(), "ClassIcon.Default"), FExecuteAction::CreateRaw(this, &FglTFRuntimeEditorModule::SpawnglTFRuntimeActor));
#endif
Builder.EndSection();
}

Expand Down
3 changes: 2 additions & 1 deletion Source/glTFRuntimeEditor/glTFRuntimeEditor.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public glTFRuntimeEditor(ReadOnlyTargetRules Target) : base(Target)
"RenderCore",
"LevelEditor",
"glTFRuntime",
"DesktopPlatform"
"DesktopPlatform",
"EditorStyle"
// ... add private dependencies that you statically link with here ...
}
);
Expand Down

0 comments on commit be8fc2e

Please sign in to comment.