From 782f0b94a258e06da2aadc5b03be2550caf64eab Mon Sep 17 00:00:00 2001 From: Manuel Martin Date: Mon, 11 Dec 2023 10:53:30 +0100 Subject: [PATCH] Persist HubsUrl updates --- addons/io_hubs_addon/debugger.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/addons/io_hubs_addon/debugger.py b/addons/io_hubs_addon/debugger.py index cf0ad93e..4c7718f2 100644 --- a/addons/io_hubs_addon/debugger.py +++ b/addons/io_hubs_addon/debugger.py @@ -645,16 +645,17 @@ def get_url(self): return self.url_ -class HubsUrl(bpy.types.PropertyGroup): - name: bpy.props.StringProperty() - url: bpy.props.StringProperty(set=set_url, get=get_url) - url_: bpy.props.StringProperty(options={"HIDDEN"}) - - def save_prefs_on_prop_update(self, context): save_prefs(context) +class HubsUrl(bpy.types.PropertyGroup): + name: bpy.props.StringProperty(update=save_prefs_on_prop_update) + url: bpy.props.StringProperty( + set=set_url, get=get_url, update=save_prefs_on_prop_update) + url_: bpy.props.StringProperty(options={"HIDDEN"}) + + class HubsSceneDebuggerPrefs(bpy.types.PropertyGroup): hubs_instances: bpy.props.CollectionProperty( type=HubsUrl)