The store in a FreeSewing pattern provides shared key-value storage. If you have some information in one part that you want to make available outside that part (to share it with another part) you can save it to the store.

There are two types of stores:

  • A pattern-wide store that is shared across all parts in all sets
  • A store per set that is shared across parts in that set

When you interact with a store in your part code, it is almost certainly the so-called setStore, the store that is shared across parts in the set.

The pattern-wide store is used for pattern initialization and storing logs and other data in the early stages of the pattern lifecycle.

Part A Part B Part C Part D Part E SetStore 0 Store Pattern with a single sets of settings Set 0 Part A Set 0 Part B Set 0 Part C Set 0 Part D Set 0 Part E Set 1 Part A Set 1 Part C Set 1 Part C Set 1 Part B Set 1 Part E Set 1 Part B Set 1 Part C Set 1 Part E Stack A Stack B Stack C Stack D Stack E SetStore 0 SetStore 1 SetStore 2 SetStore 3 Store Pattern with multiple sets of settings