Hi Kamrann!
I’ve actually already gone down this path - I’m using my own version of FCreateBlueprintFromActorDialog so I can put in my own delegates and handle things where I wish. The last part I’m having trouble with is adding components to my blueprint asset.
My static mesh components don’t come through when using CreateBlueprintFromActor, presumably because they’re added dynamically rather than via AddDefaultSubobject. When I invoke FKismetEditorUtilities::AddComponentsToBlueprint and pass in the mesh components I grab from the C++ actor that the blueprint is based off, they’re all added, but the pre-existing root component is ignored, and a new one is created that has no transform. I’ve tried manually adding the C++ actor’s root USceneComponent again via AddComponentsToBlueprint, and this works better (the root component is no longer made one of the static mesh components), but it’s still not ‘right’ (there is no way to move the root component, and it has no transform).
Is there a way to add components to the blueprint while respecting the pre-existing root component?
EDIT: There are also no visible components until I recompile the asset manually. When I do that, I’m spammed with one of these per component added:
[2015.09.18-00.19.28:471][765]LogBlueprint:Warning: USimpleConstructionScript::FixupRootNodeParentReferences() - Couldn't find native parent component 'SceneComponent' for 'StaticMeshComponent_534' in BlueprintGeneratedClass 'REINST_MyBlueprintName_Blueprint_C_41' (it may have been removed)
And this at some point:
[2015.09.18-00.19.28:481][765]LogActor:Warning: MyBlueprintName_Blueprint_C /Engine/Transient.World_2:PersistentLevel.MyBlueprintName_Blueprint_C_1 has natively added scene component(s), but none of them were set as the actor's RootComponent - picking one arbitrarily
[2015.09.18-00.19.28:507][765]PIE:Warning: Warning AttachTo: '/Engine/Transient.World_2:PersistentLevel.MyBlueprintName_Blueprint_C_1.SceneComponent' cannot be attached to itself. Aborting.