Download CommonLua/Ged/XTemplates/ClassDefEditor.lua from sirnii/myspace: direct link, hf CLI and curl.
- Browser
- Download file 1.28 kB
-
https://huggingface.co/spaces/sirnii/myspace/resolve/main/CommonLua/Ged/XTemplates/ClassDefEditor.lua
- Command line
-
hf download hf://spaces/sirnii/myspace/CommonLua/Ged/XTemplates/ClassDefEditor.lua
-
curl -L -o ClassDefEditor.lua https://huggingface.co/spaces/sirnii/myspace/resolve/main/CommonLua/Ged/XTemplates/ClassDefEditor.lua
1.28 kB
| -- ========== GENERATED BY XTemplate Editor (Alt-F3) DO NOT EDIT MANUALLY! ========== | |
| PlaceObj('XTemplate', { | |
| group = "GedApps", | |
| id = "ClassDefEditor", | |
| save_in = "Ged", | |
| PlaceObj('XTemplateTemplate', { | |
| '__template', "PresetEditor", | |
| }, { | |
| PlaceObj('XTemplateAction', { | |
| 'ActionId', "OpenEditor", | |
| 'ActionSortKey', "2", | |
| 'ActionName', T(419747557885, --[[XTemplate ClassDefEditor ActionName]] "Open Preset Editor"), | |
| 'ActionIcon', "CommonAssets/UI/Ged/explorer.tga", | |
| 'ActionToolbar', "main", | |
| 'ActionToolbarSplit', true, | |
| 'ActionState', function (self, host) | |
| local class = g_Classes[rawget(host, "selected_class")] | |
| return not IsKindOf(class, "PresetDef") and "hidden" | |
| end, | |
| 'OnAction', function (self, host, source, ...) | |
| local panel = host.idPresets | |
| host:Op("GedOpOpenPresetEditor", panel.context, panel:GetMultiSelection(), host.PresetClass) | |
| end, | |
| }), | |
| PlaceObj('XTemplateWindow', { | |
| '__context', function (parent, context) return "SelectedPreset" end, | |
| '__class', "GedBindView", | |
| 'BindView', "class", | |
| 'BindFunc', "GedGetObjectClass", | |
| 'OnViewChanged', function (self, value, control) | |
| local app = GetParentOfKind(self, "GedApp") | |
| rawset(app, "selected_class", value) | |
| app:ActionsUpdated() | |
| end, | |
| }), | |
| }), | |
| }) | |