I have been trying to figure out how to get a reference to the theme that is being used (in GDscript), if the theme is propagated to the child by the parent.
Normally, to get the theme, you would simply call
self.theme, but this gives an error (attempting to call null on null instance) indicating that the child does not have a theme (because we never specifically set one in the editor). But the child does use the Theme of its parent, but I'm unsure how to properly get this reference.
For example, I would be trying to figure out what Theme the PanelContainer is using.
Control - *has a theme*
Label - *uses parent theme*
PanelContainer - *uses parent theme*
Please keep in mind I won't know how far down the tree the child is, so a simple
self.get_parent() won't do the trick here.