script-bakery icon indicating copy to clipboard operation
script-bakery copied to clipboard

make settings access consistent

Open patmo141 opened this issue 11 years ago • 0 comments

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.

patmo141 avatar Jul 30 '13 15:07 patmo141