MDMetaDataEditor icon indicating copy to clipboard operation
MDMetaDataEditor copied to clipboard

Push metadata changes to skeleton class as well as generated class

Open MagForceSeven opened this issue 1 year ago • 4 comments

While working on custom blueprint nodes that leveraged the metadata information, I found that only the generated class was being modified. It is also very useful to immediately update the skeleton class with the same information so that it can be immediately reflected my blueprint nodes without having to recompile (assuming the property already has the metadata field available after a first compile).

MagForceSeven avatar Nov 07 '24 02:11 MagForceSeven

Hey @MagForceSeven thanks for the PR. Could you give example steps to follow where the behavior of the plugin is different before and after with this change?

BenVlodgi avatar Dec 22 '24 05:12 BenVlodgi

I don't have one from the Engine. The plugin that I'm working on should be pushed soon.

However I was working on a node very similar to/based on UK2Node_CreateDelegate which you can check out as using the skeleton class in a number of cases. In my node I use the metadata (specifically the BaseStruct one from the other PR) in order to check the compatibility of delegate and the target function's instanced struct parameter.

What I noticed (and discussed with Dylan) was that editing the metadata didn't seem to invalidate my delegate node until after the blueprint was compiled. I wanted/expected/hoped it would invalidate as as soon as the metadata change was committed.

Thanks for taking a look.

MagForceSeven avatar Dec 24 '24 22:12 MagForceSeven

Thanks for the explanation. If we can be sure this doesn't have any unintended behavior, it sounds like a good change. Do you have a link to the repo where you're using this functionality?

BenVlodgi avatar Dec 28 '24 05:12 BenVlodgi

I just pushed it out yesterday! https://github.com/MagForceSeven/Starfire/tree/main/StarfireMessenger

While it's hard to be 100% sure, but given the narrowness of the change I'd have high hopes that it would be pretty safe.

It's possible that without the change, the dropdown for a blueprint instanced struct member might contain the wrong classes right after you edit it. I know that to show the metadata editor initially, you've got to compile the blueprint. But after that I'm not sure if the details panel is pulling from the generated or skeleton classes. If it's pulling from the skeleton, then this change would cause the dropdown to be correctly filtered after editing and before recompiling. But that wasn't a test I tried at all.

MagForceSeven avatar Dec 28 '24 14:12 MagForceSeven