Announcement

Collapse
No announcement yet.

Checking an asset's "Source File"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Checking an asset's "Source File"

    I'm trying to build a utility that checks to see if all of my assets that are in a project have "Source Files" that are located within the project. I want to ensure that source control for the ue4 project includes all of the source that assets were built from. I only need to generate a text report that I can use as a reference to find the source files that are in the wrong place.

    I've started building a plugin that grabs filtered assets via the AssetRegistryModule.Get().Get().GetAssetsByPath(), but now with this list of my assets in the format of FAssetData, I don't see a way to check their "Source File", only their name, package, and similar info.

    Questions:
    Is there a way to pull the Source File info from FAssetData struct?
    Am I going about this the right way with Asset Registry? I'm not yet convinced that I haven't missed an easier solution.

    Thanks for your help!

    #2
    For those interested, I ended up solving this with the following engine tools in a UE4 plugin

    Core UE4 tools used (Check online docs if you want to know more details)
    AssetRegistry and FARFilter - How we get all assets in the project, use the filter to only grab things with a source asset
    IFileManager - File copy utility
    FPaths - path management
    FReimportManager - singleton used to reimport specific asset
    FEditorFileUtils - Save dirty packages after reimport
    ISourceControlModule - source control history reading

    Comment


      #3
      Originally posted by JoeZ_VP View Post
      For those interested, I ended up solving this with the following engine tools in a UE4 plugin

      Core UE4 tools used (Check online docs if you want to know more details)
      AssetRegistry and FARFilter - How we get all assets in the project, use the filter to only grab things with a source asset
      IFileManager - File copy utility
      FPaths - path management
      FReimportManager - singleton used to reimport specific asset
      FEditorFileUtils - Save dirty packages after reimport
      ISourceControlModule - source control history reading
      Hello JoeZ_V, Thank you for sharing your solution, I was wondering if you could be more specific about how you actually searched the AssetRegistry and what you used in your Filter, an example would be great. My background is more on the Python side, but trying to understand how to code for the editor on the cpp side, but I'm finding it confusing so far.

      Comment

      Working...
      X