x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Getting Assertion failed: Other.BulkData after trying to call SkeletalMesh->GetSourceModel(); in a C++ BlueprintFunctionLibrary Node. Only works if the blueprint is placed in a level and saved before.

Hello everyone,

I'm trying to get a FStaticLODModel off of a SkeletalMesh to expose some infos via a blueprint node.

If I start a fresh editor and just drag the blueprint into the viewport, the editor will crash every time. However if I put it in and save the Level afterwards, it works perfectly, even if create a new Level put it in without saving it afterwards.

Which leads me to believe that something is happening when the level is saved that is needed for this to work.

I also tried getting to the info via loading the LODModel directly from the FSkeletalMeshResource but it results in the same error when trying to access the array. LODModels.Num() returns 1.

The full error message is: Assertion failed: Other.BulkData [File:D:\Build\++UE4+Release-4.12+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\BulkData.cpp] [Line: 1086]

MyBlueprintFunctionLibrary.cpp:

 // Fill out your copyright notice in the Description page of Project Settings.
 
 #include "MyProject.h"
 #include "MyBlueprintFunctionLibrary.h"
 
 
 
 void UMyBlueprintFunctionLibrary::GetSourceModelTest(USkeletalMeshComponent* SkeletalMeshCompIn, int& LodNum)
 {
 
     FSkeletalMeshResource* MeshRes;
 
     MeshRes = SkeletalMeshCompIn->SkeletalMesh->GetImportedResource();
     LodNum = MeshRes->LODModels.Num();
 
     FStaticLODModel SourceModel = SkeletalMeshCompIn->SkeletalMesh->GetSourceModel();
 }
 

MyBlueprintFunctionLibrary.h:

 // Fill out your copyright notice in the Description page of Project Settings.
 
 #pragma once
 
 #include "Kismet/BlueprintFunctionLibrary.h"
 #include "MyBlueprintFunctionLibrary.generated.h"
 
 /**
  * 
  */
 UCLASS()
 class MYPROJECT_API UMyBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
 {
     GENERATED_BODY()
     
     public:
         UFUNCTION(BlueprintCallable, Category = "MeshBP")
         static void GetSourceModelTest(USkeletalMeshComponent* SkeletalMeshCompIn, int& LodNum);
     
 };
 

Would be awesome if someone has some additional insight on this.

Thanks in advance!

Product Version: UE 4.12
Tags:
more ▼

asked Jun 27 '16 at 05:07 AM in C++ Programming

avatar image

mbi
0 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question