script-bakery
script-bakery copied to clipboard
make settings access consistent
This is a low urgency internal micro todo that users will have no effect on user experience and is part of code refactor to happen betwen V1 and V1.x. Currently I grab the addon preferences all over the place. eg
settings = context.user_preferences.addons['contour_tools'].preferences
Im accessing it this way during the draw, during the modal and all over the place. Sometimes feeding "context" to functions and re-accessing the settings inside other functions.
It's messy, reduces readability and may affect performance recalling the context.___ all the time although I'm not sure it matters. Mainly I need a consistent way to handle the user preference settings in the code.