What does property pinning do?

Godot Version

4.x

Question

There’s a feature that I’ve noticed a few times, but not been able to tell what it does, when right clicking a property in the inspector, it can optionally be ‘pinned’.

image

I found this proposal, though it doesn’t have any linked PRs and is still open, so I don’t believe this is the same thing. I can’t find anything else about this feature online, it’s entirely undocumented? And from what I can tell, nothing seems to happen when a property is pinned.

I was hoping this would surface the property to instanced scenes so that you wouldn’t need to enable editable children to change the values of children, however this doesn’t seem to be the case. Out of curiosity, what does property pinning do?

I found this in the documentation. It’s a way to control pinning through script but It includes what pinning is. For some reason I still don’t understand what pinning is. So I’m not sure if this helps

"property_pinned(property: StringName, pinned: bool)

Emit it if you want to mark (or unmark) the value of a property for being saved regardless of being equal to the default value.

The default value is the one the property will get when the node is just instantiated and can come from an ancestor scene in the inheritance/instantiation chain, a script or a builtin class."

1 Like