Forum: Poser Python Scripting


Subject: Poser and Events

Y-Phil opened this issue on Dec 29, 2021 ยท 6 posts


Y-Phil posted Sat, 01 January 2022 at 4:20 PM

Solution found ๐Ÿ˜Š  not using events but rather a simple poseraddon, with something like this in the __init__.,py

class MyClass(poseraddon.Addon, poseraddon.SceneObserver, poseraddon.SceneDataSaver, poseraddon.PrefsSaver):
    def __init__(self):
        self.addonInfo = {
            'id': 'com..my.addon',
            'author': 'me',
            'copyright': '(c) 2022 me',
            'name': "My addon",
            'version': '1.0',
            'observer': 1,
            'scenedata': 1,
        }

    def load(self):
        # load your stuff

    def unload(self):
        # unload your stuff

    def sceneDeleting(self, scene):
        # unload your stuff

    def sceneCreated(self, scene):
        # load your stuff


๐’ซ๐’ฝ๐“Ž๐“


(ใฃโ—”โ—กโ—”)ใฃ

๐Ÿ‘ฟ Win11 on i9-13900K@5GHz, 64GB, RoG Strix B760F Gamng, Asus Tuf Gaming RTX 4070 OC Edition, 1 TB SSD, 6+4+8TB HD
๐Ÿ‘ฟ Mac Mini M2, Sequoia 15.2, 16GB, 500GB SSD
๐Ÿ‘ฟ Nas 10TB
๐Ÿ‘ฟ Poser 13 and soon 14 โค๏ธ