Reparent a blueprint with parent class : none

I had a BP derived from a C++ class. I’ve decided to rename the class. Unfortunately, I didn’t keep the initial class. Therefore, when I’ve loaded the project, ue4editor give me an error about missing parent class. I’ve decided to put back the original class.

Apparently, the editor does not try to use the initial class, he sets the Parent class to none.

How can I reparent the class manually, since when I try to right click the blueprint from the editor, it crashes. The editor does not keep the existing class but set it to none. Why not keeping the existing parent class or at least lets the user choose a class manually when the parent isn’t anymore present or set to none.

Now, is there a workaround to manually sets the parent class of a uasset ?

Txs for your help, D.

There is a class redirector in the INI file. Redirect it to something else so u can open it. Then change reparent after that

Is it in DefaultEngine.ini ?
Because I put these lines.

[/Script/Engine.Engine]
+ActiveClassRedirects=(OldClassName=“KIACharacter”,NewClassName=“KBotCharacter”)
+ActiveClassRedirects=(OldClassName=“KIACharacterController”,NewClassName=“KBotCharacterController”)

The blueprint was deriving from KIACharacter (in fact AKIACharacter)

UCLASS()
class AKIACharacter : public AKBasicCharacter
{

but now as it fails, from None.

What is strange is that I put back the files and the blueprint is still unable to find the original parent class.

Do I have to keep the A in front of the class name in the DefaultEngine.ini ?

Txs for your appreciated help.
D.

1 Like

I’ve checked the uasset file and see that ParentClass is set to none.

In the file :
NumReplicatedProperties 0 ParentClassPackage None

It should be :

NumReplicatedProperties 0 ParentClassPackage Class’/Script/KSGM.KIACharacter’ BlueprintType BPTYPE_Normal

Is there a way to change this within the file directly ? to set back the right parent class.
Where the bp is loaded in the engine. I will be able to change the parent class within the debugger at runtime to be sure it takes the right parent class.

Txs for your help.
D.

I’ve found a work around.
Fortunately, the system keeps files in the Save/Backup.
I recovered the files from here.

In my opinion, there is still a missing functionnality when the class has no parent and should be. From the editor, the user should be able to choose a parent class.

Regards,
D.

Hi domzorg,

I’m glad you had a backup to rely on. However, f you still have a copy of the project that has the error, try right-clicking on the blueprint node. You should have the option to re-parent it from there.

TJ

1 Like

Hi TJ,

If you do right-click on a blueprint that has none as parent class, the editor crash.

D.

Hmm, well that is odd. The best way to re-parent is to create the new parent first before you delete the original one. Re-parent the child to it, then delete the old parent. Doing it the opposite way could have created an error. If you have time, could you make a safe test copy of your project and try this method?

1 Like

Yes it works.
It fails only if you rename the C++ files and the class name.
After that the engine will not find the parent and sets the parent to none.
Once the blueprint is in this state, no way to reparent it.
It will be great if, once a blueprint has none as a parent, the editor will let you manually choose a parent.

Many txs for your help.
Have a nice day,
D. Aigroz

3 Likes

I can confirm that right clicking a blueprint with no parent class crashes the editor. Has done for multiple versions.

This works quite well if you need to rename a c++ file that is being used as a parent to a BP.

Bumping because its 2019 and moving a blueprint to a new c++ class is still ridiculously hard. Redirects don’t seem to work.

1 Like

Bumping because I just parented to None by hitting the undo arrow trying to get the parent to switch back to Object. Now I can’t use my blueprint, as it crashes the editor whenever I try to interact with it :frowning:
The editor shouldn’t crash when it does a simple thing like this. It should just “revert” to Object, or not show the arrow if you can’t revert - not revert to None and destroy itself.

I accidentally (Stupid and not easy to do, I know), deleted a parent class for many widget blueprints, and now those widget blueprints have no parent and I cannot open the blueprints to edit to assign a new parent class.

Right clicking on Widget blueprints gives no option to re-parent.

I cannot figure out how to fix this, and if I cannot fix, I have lost a month of work on my UI :frowning:

Any help would be greatly appreciated. I also agree, it seems extremely stupid that you cannot open a blueprint with parent none, or at the very least, reparent in some fashion in editor, unless I am missing something…I certainly hope I am missing something.

1 Like

Can you explain more please? What ini file? I’ve looked in all the files in the Config folder and I can’t find anything about a redirector.

When this happened to me, I was able to use the plugin
https://www.unrealengine.com/marketplace/en-US/product/check-blueprints-compile?sessionInvalidated=true
And when I tried to open asset, it warned me it did not have a parent, and editor may crash. The Editor did not crash for me, it open the asset blueprint, and I was able to go to the Class Defaults and change the Parent Class from None to a different class, and it recompiled ok

Saved me big time on a lot of re-work/backup

9 years later, just had a similar issue. Maybe this will help someone. You can reparent in the blueprint editor, but for me the Unreal editor had bugged and the c++ parent class wasn’t being detected. I had to close the editor and rebuild in vscode.