0

I am writing an addon that deals with creating objects and assigning them properties based on panel parameters. I want the panel to update it's parameters to match the properties of my selected object only when I first select it. If I update for every draw, I will not be able to change those parameters because it will automatically snap back to the parameters of my selected object. How can I update the panel properties only once when I select a new object?enter image description here

  • 1
    Not sure this will solve your problem but maybe explore getter/setter : https://blender.stackexchange.com/a/245167/86891 – Gorgious Dec 20 '21 at 17:50
  • 1
    Also maybe it would be nice to include the code for defining these properties, and consider storing them on bpy.types.Object instead of bpy.types.Scene (if it's the case) that way you won't risk overriding your parameters – Gorgious Dec 20 '21 at 17:51
  • @Gorgious https://github.com/rocstar293/TyTools.git Here is my Git repo. I made a branch with better commentary so you can get an idea of what's going on. The relevent files are panel.py, operators.py, presets.py, and utils.curve.py. but that's a lot so you might be able to see the gist from the utils.curve, which is where I set the object props from scene.props. If you can let me know if I'm going about this the right way, I would very much appreciate it. Thanks! – Tyler Beaird Dec 20 '21 at 21:19

0 Answers0