I just upgraded to 2.83, and my addon seems to be working normally but the custom properties I’m adding via the API don’t show in the properties panel anymore. It’s not a huge issue but it did make it easier for debugging.
Is there a show-by-default argument that I can use or is it just intended that they don’t show to the user anymore without being implemented in the interface?
In 2.83 something like bpy.data.objects['Cube']['a'] = 123 shows up in the Object custom properties for me. But there does still seem to be an issue that the property display in the UI doesn’t refresh unless I do a mouse over. Maybe you’re running into that?
This is actually a known issue I reported earlier (see here).
Wait, you mean you use attribute access like obj.myprop? That won’t work as custom properties are only supported through dictionary-style acess, like obj["myprop"] (Custom Properties — Blender Manual)
At the start of the script then I assign them and access them using the dot operator. I did this because I was having trouble accessing a nested collection property. If I were more knowledgeable about Python I think I’d have found another way but I went with this as the easy option.
I have a bunch of custom panels that show the information the same as it did in 2.82a but now I can’t see it regardless of which way I create and assign custom properties.
Ah, those are different types of custom properties and indeed will work with attribute access. Ok, so maybe there is something wrong with those since 2.83
The one where you you add custom properties by hand, but will show custom properties added via API as well, at the bottom of the object panel. This one:
It used to be full of all the stuff I added with my API and other addon’s properties as well.
Right, I was suspecting you meant that panel As far as I know only “custom properties” set from Python as shown here will show up there. I wouldn’t know under which circumstances properties registered to existing Blender classes (as discussed here) would show up there, really curious.
It’s odd that the behaviour changed from 2.82a to 2.83. I looked for a Python API change in the update notes but couldn’t find anything. I did think that API props were set to hidden by default since 2.83 but no mention of that either. The API doc is still on 2.82a at the moment I think so…
It doesn’t really change the functioning of my addon at all, only how easy it is to write so it isn’t the biggest issue but I do think something is wrong since any property I add is not shown regardless of how I create it.
It’s only a data pipe for a game I’m working on so it isn’t public, but if other addons that assign properties in the way I do show up as before then perhaps it is a problem on my end.
I have just done a little code for this type of problem, original code:
import bpy
for obj in bpy.context.view_layer.objects.selected:
if "ID" in obj.keys():
del obj["ID"]
This does not cause an update, however if you add a block of code at the bottom:
import bpy
for obj in bpy.context.view_layer.objects.selected:
if "ID" in obj.keys():
del obj["ID"]
# Force update of UI
for obj in bpy.context.view_layer.objects.selected:
obj.select_set(state = True)
Nothing changes in the selection, but the custom properties get updated in the UI panel… Hacky I know, but it works.