Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reorder linked layers for build #137

Merged
merged 1 commit into from
May 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions app/services/artwork/version/generator/build.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ import {
getLayerVisibleRotates,
} from '#app/models/design-layer/design-layer.server'
import { type IRotate } from '#app/models/design-type/rotate/rotate.server'
import { type ILayer } from '#app/models/layer/layer.server'
import {
type ILayerWithDesigns,
type ILayer,
} from '#app/models/layer/layer.server'
import { type rotateBasisTypeEnum } from '#app/schema/rotate'
import {
filterSelectedDesignTypes,
findFirstDesignsByTypeInArray,
verifySelectedDesignTypesAllPresent,
} from '#app/utils/design'
import { filterLayersVisible } from '#app/utils/layer.utils'
import { orderLinkedItems } from '#app/utils/linked-list.utils'
import { isArrayRotateBasisType } from '#app/utils/rotate'

// "build" since it is creating the version generator each time
Expand Down Expand Up @@ -65,8 +69,11 @@ export const artworkVersionGeneratorBuildService = async ({

// Step 4: build the generator layers
// each layer can override any of the global settings
const orderedLayers = await orderLinkedItems<ILayerWithDesigns>(
version.layers,
)
const generatorLayers = await buildGeneratorLayers({
layers: version.layers,
layers: orderedLayers,
defaultGeneratorLayer,
})

Expand Down
Loading