Skip to content
  • David Thompson's avatar
    Track model files and their modified-state. · 650d2547
    David Thompson authored
    + Mark models as clean/dirty after each operator runs relative to
      the last time they were saved to a file.
      Models will always have a "clean" integer property defined
      that is 0 when the model is dirty and non-zero when it is clean.
      CMB uses this to determine whether there are unsaved models before
      requiring acknowledgment from the user for some actions.
    
    + Operators that save or load models (in SMTK-**native** JSON format,
      not session-specific filetypes) can indicate their outputs are
      "clean," which will cause the model property mentioned above to be
      set properly. All other operators mark modified and created
      entities (or their parent models) as dirty.
    
    + Add a new StoredResource class to the model namespace that holds
      information about session-specific model files (i.e., CAD files),
      auxiliary geometry files (e.g., images). Each file has a URL,
      a set of related model entities, and methods for indicating whether
      it is modified or not.  This change also includes additions to
      enums in Resource and ResourceSet since they previously only tracked
      attribute-related resources.
    
    + The model Manager class now has a `resources()` method that
      constructs or updates a ResourceSet containing StoredResource
      entries for files related to its model entities and returns
      the ResourceSet.
    650d2547