Documentation & page contents

Get a Pattern in · 08 · from_swatch

Build a material from a swatch

You have a fabric swatch. Build a Material, drape a library blank.

You have

a fabric swatch

You want

Build a Material, drape a library blank

You have a fabric photo. You want a Material on an existing Product, then a blank drape.

A swatch image does not establish physical behavior. Supply measured properties where available and review inferred assumptions.

Steps

  1. material.build material
  2. material.list materials
  3. product.get product
  4. body.select body
  5. garment.drape run

Sample inputs

KeyValue
buildsamples/materials/build_french_terry.json
bodysamples/bodies/male_m_native_straight.json
product_idaop-hoodie

Expected fixture checks

These are the checks declared by this sample, not a captured production result. Referenced sample files are included in the gated SDK checkout.

{
  "run.phase": "draped"
}

Run

Obtain and install the SDK before running this example from its root directory.

python examples/run_workflow.py from_swatch