Skip to content

Commit

Permalink
untag action
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellumertz committed Aug 26, 2024
1 parent c6cafa4 commit 5312989
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
8 changes: 8 additions & 0 deletions Generative/Clouds/Clouds Functions/Clouds GUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ function Clouds.GUI.Main()
ImGui.EndMenu(ctx)
end

if ImGui.BeginMenu(ctx, "Actions") then
if ImGui.MenuItem(ctx, 'Untag Selected Items') then
Clouds.Item.UntagSelected(proj)
end
tooltip(ctx, Settings.tooltip, ToolTips.settings.untag)
ImGui.EndMenu(ctx)
end

if ImGui.BeginMenu(ctx, 'About') then
if ImGui.MenuItem(ctx, 'Manual') then
DL.url.OpenURL(URL.manual)
Expand Down
12 changes: 12 additions & 0 deletions Generative/Clouds/Clouds Functions/Clouds Items.lua
Original file line number Diff line number Diff line change
Expand Up @@ -290,4 +290,16 @@ function Clouds.Item.ShowHideAllEnvelopes()
Clouds.Item.ShowHideEnvelope(CloudTable.grains.randomize_size.envelope,FXENVELOPES.grains.randomize_size)
Clouds.Item.ShowHideEnvelope(CloudTable.grains.position.envelope,FXENVELOPES.grains.position)
Clouds.Item.ShowHideEnvelope(CloudTable.grains.randomize_position.envelope,FXENVELOPES.grains.randomize_position)
end

------ Generated Items:

function Clouds.Item.UntagSelected(proj)
for item in DL.enum.SelectedMediaItem(proj) do
local retval, extstate = DL.item.GetExtState(item, EXT_NAME, 'is_item')
if extstate ~= '' then
DL.item.SetExtState(item, EXT_NAME, 'is_item', '')
end
-- body
end
end
3 changes: 3 additions & 0 deletions Generative/Clouds/Clouds Functions/Clouds Tooltips.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
--@noindex
ToolTips = {
create_item = 'This button will create a cloud Item.\nSelect a cloud item to set the parameters and generate clouds!',
settings = {
untag = 'Remove internal tags from selected items generated by the Clouds script.\nThese tags mark items for deletion during new generations.\nRemoving them preserves items across regenerations, treating them as standard items.'
},
items = {
head = 'Set which items will be copied.',
set = 'Set items list to current item selection.',
Expand Down
4 changes: 2 additions & 2 deletions Generative/Clouds/daniellumertz_Clouds.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- @version 0.2.2b
-- @version 0.2.3b
-- @author Daniel Lumertz
-- @provides
-- [nomain] DL Functions/*.lua
Expand All @@ -16,7 +16,7 @@

-- Constants:
SCRIPT_NAME = 'Clouds'
SCRIPT_V = '0.2.2b'
SCRIPT_V = '0.2.3b'
EXT_NAME = 'daniellumertz_Clouds' -- keys: settings (for clouds), is_item (for generated items)
FX_NAME = 'daniellumertz_Clouds'
Proj = 0
Expand Down

0 comments on commit 5312989

Please sign in to comment.