Gildor's Forums

Author Topic: Trying to add support for file list exporting going wrong  (Read 99 times)
Richtoveen
Newbie
*
Posts: 13


View Profile
Trying to add support for file list exporting going wrong
« on: August 23, 2022, 04:21 »

So im currently trying to add support for .txt file list importing in UEViewer, and im stuck in packagesToLoad being full of the last added package, for example i have: SM_Canyon_Reactor_Debris_D and SM_Canyon_Reactor_Debris_E with "SM_Canyon_Reactor_Debris_E" being the last index the array transforms in being full of it instead of having "SM_Canyon_Reactor_Debris_D " aswell , im sure this is not UEViewer problem just something im not used to, if anyone doesnt mind in helping this is source code for the -filelist command line : https://github.com/djhaled/UEViewer/blob/41bc39d123759273301d36ff3d26626dcb84c8bc/UmodelTool/Main.cpp#L957#L978
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7977



View Profile WWW
Re: Trying to add support for file list exporting going wrong
« Reply #1 on: August 23, 2022, 12:29 »

Code:
TArray<const char*> packagesToLoad

This is not an array of strings, it's an array of string pointers. And you're pointing it to the static string, which is even more - generated in a stack and left the scope.
Logged
spiritovod
Hero Member
*****
Posts: 1253


View Profile
Re: Trying to add support for file list exporting going wrong
« Reply #2 on: August 23, 2022, 14:39 »

And also "filelist=" is 9 chars long.

I have some doubts why such option is even required. PackagesToLoad works only with UE3 packages / uassets, I believe something like "-pkg=internal_uasset_path_in_pak -path=path_to_paks" will not work - but if you have assets already extracted, wouldn't it be easier to reorganize them externally, like copy to a separate folder according to the filelist and then process in umodel with single -path=folder.
Logged
Richtoveen
Newbie
*
Posts: 13


View Profile
Re: Trying to add support for file list exporting going wrong
« Reply #3 on: August 24, 2022, 08:58 »

And also "filelist=" is 9 chars long.

I have some doubts why such option is even required. PackagesToLoad works only with UE3 packages / uassets, I believe something like "-pkg=internal_uasset_path_in_pak -path=path_to_paks" will not work - but if you have assets already extracted, wouldn't it be easier to reorganize them externally, like copy to a separate folder according to the filelist and then process in umodel with single -path=folder.

so -pkg= works in ue4 for me, im doing this because its a automatic pipeline for a .umap importer in unreal, i get all paths of meshes i"ll need and send them to UEViewer to extract them.
Logged
spiritovod
Hero Member
*****
Posts: 1253


View Profile
Re: Trying to add support for file list exporting going wrong
« Reply #4 on: August 24, 2022, 14:31 »

@Richtoveen: Oh, so it actually works, good. Here is snippet for your case: pastebin - not very optimal, but at least it should work.
Logged
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS