That whole over-allocating of wmGizmo
is quite ugly, and works against the C++ object model. Having to use placement-new and explicit destructor calls is a code smell too. I understand that that is outside the scope of this change though, I would just prefer some XXX
comment.
This will now say "Object type does not support previews" even for node groups, not just objects. I suggest adding an optional r_disabled_hint
to ED_preview_id_is_supported()
(defaulting to nullptr
) to return a useful poll disabled hint message.
P.S. The current behavior is also somehow confusing. Once you went to Texture paint mode once, the Texture tab is always present. For the Sculpt/Weight mode the tab is only available in the…
This PR crashes for me when renaming the object in the properties editor :/
There is no virtual inheritance, thus no virtual destructor. There cannot be because the compiler would put the virtual function table at the beginning of the struct's memory, breaking listbase…
From what I can tell this is because we don't have a default texture painting brush anymore.
Previous behavior was a bit odd: The texture tab should show up in sculpt/paint modes to allow…
Although usually I'd suggest adding all cases explicitly to get warnings when a new enumerator is added, I don't think we add new button types that often, and this is a fairly easy to find swith-case block. So don't think it would help in practice.
I don't really like this, but understand why it's necessary of course. Better mention this in a comment in ui_but_new()
?
This is no an option exposed to end-users, it's a BPY option (bpy.types.AssetShelf.bl_options
value STORE_ENABLED_CATALOGS_IN_PREFERENCE
).