Magic Scene Description ****************** What is a scene description? ====== When we created Alchemy USD was still in its infancy and a lot of DCCs were not officially supported at that time. We went back to our roots with Avatar and created a simple text file that could store any needed data for a scene or asset. The "MSD". It's got some basic features that end up being really powerful in practice. Here's the core of an MSD file ``` { "data": {}, "dependencies": {}, "render_files": {}, "source_files": {}, "source_version": "", } ``` Data Dependencies Render Files Source Files Source Version Creating MSDs ====== the MSD engine can grab source files and render files out of the box with a simple command: ``` import cgl.core.msd as msd path_object = PathObject().from_file_string("/path/to/file.ma") msd_object = MSD(path_object=path_object, dcc="maya") msd.write_msd() ``` this will create an msd file for the given version, task and dcc. the msd is smart enough to pull from Alchemy's "SmartTask()" system when it's attempting to write anything other than the source and render files. so for example if i'm prepping the cookbook for my "texture" task recipes, i put the code i need to describe the scene in the "data" section of the msd. then when i run the msd.write_msd() command, it will pull the task and version from the environment and write the msd to the correct location. it will also pull the source files and render files from the task and version. ```