IPropertyTypeCustomization on FName affects single variable and array, but not TMap

I made a simple IPropertyTypeCustomization, as seen [here][1] (it has all the code too), and I noticed a problem when I went into a blueprint.

I would go into a blueprint, and create a function. Within this function, I just create a local variable. I set the property type to Name. Here, I can see that my IPropertyTypeCustomization works as I change from Variable to Array, from Array to Set, and from Set to Map…

As you can see, the first three (var, arr and set) work, but map doesn’t.

Variable

129903-namemodvar.png

Array

129904-namemodarr.png

Set

129905-namemodset.png

Map

129906-namemodmap.png

Hey Drunkenvalley-

When you create a TMap, the First part (None) is a key and the second (0) is the value. The key is used as a unique identifier for the different elements of the map (much the way an array’s index identifies the array element). If you make the second part of the map (currently interger) a Name variable, you’ll see that your plugin is working the same for the element FName as it is in your other examples.

Cheers

I know what a TMap is. That’s not the point though. The TMap’s key is still a variable. The expected behavior is that the key receives the customization that has been defined for that property type.

Hi Drunkenvalley,

Currently, we don’t apply property customizations to the key of TMap entries. Since the key could be any class, we don’t want to shoehorn a complex customization into the left side of the details panel. The unfortunate side effects are that things such as struct keys can’t be modified in the details panel, and safe customizations such as yours are blocked as well.

The first issue has been fixed for 4.16, as we now break the key and value out into separate rows for structs so that they can be edited. We can probably do something similar for customized properties, since the customization would be drawn into the right side of the details panel as usual. I’ve put in feature request UE-43495, so that should be live on the issue tracker shortly. There isn’t currently any guarantee if or when that will be added, but I’ll update you on this post if I hear any news.

Best,

Cody

I’m not convinced you’d really “shoehorn a complex customization into the left side of the details panel”, but I’ll take your word for it all the same.

Anyway, thank you for the effort. I appreciate it. We were doing some things with TMaps where we really wanted to customize the key entry, but were unable to do so at the time. Perhaps we could’ve instead done something with a detail customization at large using a different type of object, but… ah well, it was a little late by then.