mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 06:32:42 +00:00
Reset tool preferences just once when running from CLI
This commit is contained in:
parent
4bd7d8eb21
commit
ffb4397238
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2018-2020 Igara Studio S.A.
|
||||
Copyright (c) 2018-2021 Igara Studio S.A.
|
||||
Copyright (c) 2018 David Capello
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
@ -1,10 +1,13 @@
|
||||
-- Copyright (C) 2019 Igara Studio S.A.
|
||||
-- Copyright (C) 2019-2021 Igara Studio S.A.
|
||||
--
|
||||
-- This file is released under the terms of the MIT license.
|
||||
-- Read LICENSE.txt for more information.
|
||||
|
||||
-- Preferences for tools
|
||||
do
|
||||
-- The first time we get the tool preferences in CLI mode, we get
|
||||
-- the default options for this tool (in GUI, we get the current
|
||||
-- user-defined options).
|
||||
local t = app.preferences.tool('pencil')
|
||||
assert(t.opacity == 255)
|
||||
assert(t.tolerance == 0)
|
||||
@ -14,10 +17,10 @@ do
|
||||
t.brush.size = 2
|
||||
assert(t.brush.size == 2)
|
||||
|
||||
-- Getting the tool again will give us the default configuration
|
||||
-- again in batch mode
|
||||
-- Getting the tool again must give us the configuration that was
|
||||
-- set inside the script
|
||||
t = app.preferences.tool('pencil')
|
||||
assert(t.brush.size == 1)
|
||||
assert(t.brush.size == 2)
|
||||
end
|
||||
|
||||
-- Preferences for documents
|
||||
|
Loading…
x
Reference in New Issue
Block a user