2021-10-17 18:26:00 +02:00
|
|
|
---
|
|
|
|
title: dependencies
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-02-05 17:44:23 +01:00
|
|
|
The `dependencies` key in the pattern configuration file allow you to configure
|
|
|
|
dependencies between different parts of your pattern.
|
2022-02-19 08:04:25 +01:00
|
|
|
For example, you may only be able to draft the sleeve after having drafted the
|
2022-02-05 17:44:23 +01:00
|
|
|
part that contains the armhole the sleeve should fit in.
|
|
|
|
|
|
|
|
Dependencies control the order in which parts get drafted, but are also used
|
2022-02-19 08:04:25 +01:00
|
|
|
when users requests to [only draft some parts of a
|
2022-02-05 17:44:23 +01:00
|
|
|
pattern](/reference/api/settings/only).
|
|
|
|
Behind the scenes, FreeSewing will draft all dependencies, and make sure to not
|
|
|
|
render them if they were not requested.
|
|
|
|
|
|
|
|
## Structure
|
|
|
|
|
2022-02-19 08:04:25 +01:00
|
|
|
A plain object of `key`-`value` pairs that controls the order in which pattern
|
2022-02-05 17:44:23 +01:00
|
|
|
parts will get drafted.
|
|
|
|
The value can either be a string, or an array of strings.
|
|
|
|
Those strings should be part names.
|
|
|
|
|
|
|
|
You read the configuration as: `key` depends on `value`.
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
2021-08-25 16:09:31 +02:00
|
|
|
```js
|
|
|
|
dependencies: {
|
|
|
|
front: "back",
|
|
|
|
sleeveplacket: ["sleeve", "cuff"]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-02-05 17:44:23 +01:00
|
|
|
In this example:
|
|
|
|
|
2022-02-19 08:04:25 +01:00
|
|
|
- The `front` part depends on the `back` part
|
|
|
|
- The `sleeveplacket` part depends on the `sleeve` and `cuff` parts.
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
<Tip>
|
|
|
|
|
|
|
|
See [Part dependencies](/advanced/dependencies) for more in-depth information on dependencies.
|
|
|
|
|
|
|
|
</Tip>
|