- ⚡我的小博客
- 🌱 C++
- 🔭 UE4在职程序
muchenhen / muuetools Goto Github PK
View Code? Open in Web Editor NEWSome personal tools of Unreal Engine
License: MIT License
Some personal tools of Unreal Engine
License: MIT License
具体需求是这样的
打开一个文件夹--根据文件夹名称新建一个关卡序列--打开关卡序列--在序列上新建相机--导入相机--导入角色骨骼--导入角色动画
FString SSFMenu::OpenWindowsFiles()
{
FString DirName;
FString ExtensionStr = TEXT("*.*");//文件类型
IDesktopPlatform* DesktopPlatform = FDesktopPlatformModule::Get();
bool aSuccess = DesktopPlatform->OpenDirectoryDialog(nullptr, TEXT("创建镜头"), FPaths::ConvertRelativePathToFull(FPaths::ProjectDir()), DirName);
if (aSuccess)
{
//文件选择成功,文件路径 path
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, DirName);
//文件选择成功,文件路径 path
UE_LOG(LogTemp, Warning, TEXT("打开成功"));
//新建内存
TArray<FString> Fenge;
DirName.ParseIntoArray(Fenge, TEXT("/"), true);
FString Changci = Fenge[4];
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, TEXT("场次:" + Fenge[4]));
FString Jingtouhao = Fenge[5];
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, TEXT("镜头号:" + Fenge[5]));
FString PackageName = "/Game/shot/";
PackageName = PackageName + Fenge[4] + "/" + Fenge[5] + "/" + Fenge[5];
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green, PackageName);
UPackage* Package = CreatePackage(NULL, *PackageName);
//新建关卡序列文件
auto MaterialFactory = NewObject<ULSFN>();
UObject* Guanqiaxulie = (UObject*)MaterialFactory->FactoryCreateNew(UFactory::StaticClass(), Package, *Jingtouhao, RF_Standalone | RF_Public, NULL, GWarn);
FAssetRegistryModule::AssetCreated(Guanqiaxulie);
Package->FullyLoad();
Package->SetDirtyFlag(true);
//打开关卡序列
//新建相机
//auto ss = new FSequencerEdMode();
FStringAssetReference SequenceName(PackageName);
ULevelSequence* SequenceAsset = Cast<ULevelSequence>(SequenceName.TryLoad());
UMovieScene* MovieScene = SequenceAsset->GetMovieScene();
//pNewCamera->CameraComponent->FieldOfView = ViewportClient->ViewFOV; //@todo set the focal length from this field of view
//创建相机序列
//MovieScene->AddCameraCutTrack(UMovieSceneCameraCutTrack::StaticClass());
//MovieScene->AddNewBindingTag("SFPluginCamera");
auto Dakai = NewObject<UEditorEngine>();
Dakai->EditObject(Guanqiaxulie);
// UWorld* World = GCurrentLevelEditingViewportClient ? GCurrentLevelEditingViewportClient->GetWorld() : nullptr;
// if (!World)
// {
// return;
// }
// FSequencerCommands::Get().CreateCamera;
// Commands.CreateCamera;
//遍历
/* TArray<FString> FoundFiles;
FFileManagerGeneric::Get().FindFiles(FoundFiles, *aaa, TEXT(".ue4stats"));
for (FString& FilePath : FoundFiles)
{
const TCHAR* PathDelimiter = FPlatformMisc::GetDefaultPathSeparator();
}*/
}
return DirName;
}
尼玛的 为什么
这种纯文本的文件看起来太麻烦了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.