From 79f81fc63aad1b4744b44766a6b1a3fd012901cb Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Wed, 2 Sep 2020 10:52:21 -0400 Subject: [PATCH] Fix issue with toolbox operators clobbering page settings. This happens in ZLZ-imported Ages, probably due to object name collisions from multiple pages. --- korman/properties/prop_object.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/korman/properties/prop_object.py b/korman/properties/prop_object.py index e9de5e9..4413160 100644 --- a/korman/properties/prop_object.py +++ b/korman/properties/prop_object.py @@ -19,13 +19,11 @@ from PyHSPlasma import * class PlasmaObject(bpy.types.PropertyGroup): def _enabled(self, context): - # This makes me sad - if not self.is_inited: + if not self.is_property_set("page"): self._init(context) - self.is_inited = True def _init(self, context): - o = context.object + o = self.id_data age = context.scene.world.plasma_age # We want to encourage the pages = layers paradigm. @@ -47,8 +45,8 @@ class PlasmaObject(bpy.types.PropertyGroup): page = StringProperty(name="Page", description="Page this object will be exported to") - # Implementation Details - is_inited = BoolProperty(description="INTERNAL: Init proc complete", + # DEAD - leaving in just in case external code uses it + is_inited = BoolProperty(description="DEAD", default=False, options={"HIDDEN"})