byu-animation / dccpipe

Open DCC Pipeline management tools
Apache License 2.0
10 stars 4 forks source link

Convert Department class to read from JSON file #50

Open mswindler opened 5 years ago

mswindler commented 5 years ago

Currently Department is basically an enumerated class: https://github.com/byu-animation/dccpipe/blob/84cf805748f9de2806d97a35733ce21f9e693499/pipe/am/environment.py#L224

Which isn't the greatest practice unless it is done correctly, and using an empty class with a bunch of constants isn't the right practice in Python.

Eventually we'll want to take a look at how we handle departments entirely, and make them more robust (i.e. when publishing to a department, exporting, etc.), but there are a few departments that we must keep:

Maya Departments:

Houdini departments:

Other useful departments:

Departments we should consider re-designing:

Game plan:

So what we'd want to do is keep the departments we need as the default available departments in a project JSON file. Each grouping of departments should be in list format in the JSON file.

Then, Department should have it's own file (first of all) and the class methods should deal with reading and writing to that JSON file to get and add departments.