Store project-specific settings in the preferences.

This stores project-specific settings, such as filesystem paths, for each
project, and restores those settings when the project is selected again.
Does not touch settings that haven't been set for the newly selected
project.
This commit is contained in:
2018-01-02 16:42:37 +01:00
parent 0a7e7195a2
commit ba14c33b6d
4 changed files with 126 additions and 38 deletions

View File

@@ -42,7 +42,7 @@ import bpy
from bpy.types import AddonPreferences, Operator, WindowManager, Scene, PropertyGroup
from bpy.props import StringProperty, EnumProperty, PointerProperty, BoolProperty, IntProperty
from .. import async_loop, pillar
from .. import async_loop, pillar, project_specific
from ..utils import pyside_cache, redraw
log = logging.getLogger(__name__)
@@ -67,7 +67,9 @@ class FlamencoManagerGroup(PropertyGroup):
manager = EnumProperty(
items=available_managers,
name='Flamenco Manager',
description='Which Flamenco Manager to use for jobs')
description='Which Flamenco Manager to use for jobs',
update=project_specific.store,
)
status = EnumProperty(
items=[