from retail

This commit is contained in:
Bunny67
2022-05-19 22:04:17 +03:00
parent 9465daedd8
commit e7e789686a
86 changed files with 9118 additions and 5486 deletions
+9 -15
View File
@@ -12,30 +12,24 @@ local hiddenAll = OptionsPrivate.commonOptions.CreateHiddenAll("animation")
local getAll = OptionsPrivate.commonOptions.CreateGetAll("animation")
local setAll = OptionsPrivate.commonOptions.CreateSetAll("animation", getAll)
local function filterAnimPresetTypes(intable, id)
local ret = {};
local region = WeakAuras.regions[id] and WeakAuras.regions[id].region;
local regionType = WeakAuras.regions[id] and WeakAuras.regions[id].regionType;
local data = WeakAuras.GetData(id);
if data.controlledChildren then
return ret
end
if(region and regionType and data) then
for key, value in pairs(intable) do
local preset = OptionsPrivate.Private.anim_presets[key];
if(preset) then
if(regionType == "group" or regionType == "dynamicgroup") then
local valid = true;
for index, childId in pairs(data.controlledChildren) do
local childRegion = WeakAuras.regions[childId] and WeakAuras.regions[childId].region
if(childRegion and ((preset.use_scale and not childRegion.Scale) or (preset.use_rotate and not childRegion.Rotate))) then
valid = false;
end
end
if(valid) then
ret[key] = value;
end
else
if not((preset.use_scale and not region.Scale) or (preset.use_rotate and not region.Rotate)) then
ret[key] = value;
end
if not((preset.use_scale and not region.Scale) or (preset.use_rotate and not region.Rotate)) then
ret[key] = value;
end
end
end