[Smtk-developers] Breaking change

David Thompson david.thompson at kitware.com
Thu May 25 15:54:20 EDT 2017


Hi all,

> I've merged a change to the "save smtk model" operator in SMTK that breaks CMB/ModelBuilder. The corresponding CMB merge request should be tested and merged later this evening.
> 
> Don't update SMTK unless you are ready for breakage in the meantime.

Both CMB and SMTK changes have been merged.

Changes for CMB users:

+ The "Model - Save" operator now has options that affect how data is saved:

    + The _save_ option will only work if every model's data has a pre-existing
      filename *and* you have saved the model to an SMTK file before. It will
      overwrite any pre-existing files with what's in memory. After saving,
      the models in memory will be "clean" so you can quit without an alert popup.

    + The _save as_ option requires you to choose an SMTK file (and should
      ask you if you want to overwrite should it already exist). After saving,
      the models in memory will be "clean" so you can quit without an alert popup.

    + The _save a package/copy_ option requires you to choose an SMTK file.
      After saving, any changes to model names and URLs are reverted so that
      you can keep a backup copy of your work without accidentally overwriting it
      the next time you save.

+ The _file_ menu now has _Save_, _Save As_, and _Save a Package_ menu items
  with keyboard shortcuts Cmd-S/Ctrl-S for Save and Shift-Cmd-S/Shift-Ctrl-S
  for Save As.

Changes for SMTK developers:

+ The "save smtk model" operator no longer has options for "embed data" and
  "rename models". Instead, it contains items that let you specify a set
  of string-property edits to take place on model entities and URL changes
  for mesh collections. These changes can be reverted (when "undo edits" is
  enabled) after the save operation to enable "save a copy" mode.

+ Use the SaveJSON::prepareToSave method to obtain property changes for any
  of the options described above in the CMB section.

These changes make using the operator via C++ more difficult but also add
significant flexibility.

	David


More information about the Smtk-developers mailing list