Engine.saveUserPreset() no confirm dialog
-
Is there a way to prevent the Confirm Overwrite dialog to show up when using
Engine.saveUserPreset("presetName")
? -
@ustk Why don't you want confirmation?
-
@d-healey I got a special use case where moving some parameters should instantly save a preset in the background, so this has to be transparent...
-
@ustk I think it makes sense to remove the confirmation altogether from the source then if people want a confirmation they can add it themselves with
Engine.showYesNoWindow()
-
@d-healey maybe
Content.storeAllControlsAsPreset
could be a solution but I never used it and don't know what theValueTree automationData
parameter is... -
@d-healey Yeah probably, this preset thingy is giving me headache for the whole day...
-
So with a workaround
storeAllControlsAsPreset
is the solution.
But it works only once. The second time you try to store, the file isn't overwritten.
It's ok if I delete the file prior to saving, but it's not very classy...HiseSnippet 1314.3ocsX88SiaDDdcHKWS3fCnmTenuXwSAUZHo2UZqN0dgDBsTNfHLG5d65h8ljUwdWW60ThpPpuz+Oaetuz+CZm0+H14hC3D0ZIPryty27MyN6L6ROOgI02W3gzpb0XWJR6oXiwb4vNCILN5jiPZafOi3Kod5QhZO1k36SsPZZq78JAZUJiB+96W2lXS3lzTQHz0BlI8MLGlLUZuVmxrsOlXQuh4jY0ur0IlBdGgsH.3yJ3FHWh4Hx.54D0xJgQZq10hIEdFRhj5CqosvZrwPwuviV+0Le1M1T0flHC.nHwnNCY1V8R7UeDRqbuTOekHO+43yXVrIxSi.aFNgdpFYiAZkllRkmhRMmGkNVXao.XNzqTF5UNhdagML8XtxzYTbaM7IbXyoOAB6YoUzZQk9tUvcDvJ3x5NjQzi8fASzn1AMZrmN7qceU0pU2eecevQnUYbaFmp2OfaJYBttfGJusjqfxSXWyT33J3.n6oeKwNfta0esZEVe8Zwip.Cqr+9VTapjdLyF9wyWVaGHBIq65Q8oxcT1rRkDxEZgCssisf+g98BW1z5rm9NJ8pbe06eU0DUGPkcR3SscRn5N6V2WMQHbcH112.4R0lwUR7b.+436wyrHd+DuJV2L9ErA3jmmA7XttTJClmSMCGCcKkeEsELia8g6L8g+RcJKzUrElDackH8uUWsFiwPA.GEqBSa8pkQ3a8odQNj+tg7VkKqlOESXCS820SM5EdGw7nl.mGWS44YB2mKjzK30BIR06qp+gS0uetyE621.4xaZUgFuGRwZ7.mandY2QUKDN8M8w6UK1waynMxLKTvOgyjW3RiGmV.nYNE.PwYBPo.sXFBKUFVHXi3BAF1LXu.w.PdB9Tt3llnPxGWPU+2+q+70n2dxQDIIAF.QvJtTOIS4LZGQuEJOGUeoB9Hp+HovELzjjO.5oMZ6.oTvCM5Swoocn6lTFW2q03IC9C2V9jaomviRQTUljz6T8BvW103pKtrKh4elvALEwCTSqDpP1tJNGK25mJhkeB9Qsa4GMPmZzeaTFihrZglswx53C8boCFvHx3p1ajURyo6mrxC0hqYwawkIE5imWJTlH5F3HVDKJalTzWAvXc7kpX8zPf0dP0yDbeF97.GCI0MV1D.JWP.VCqzNjCKfCjAfMCAvXDaFJnUvP.ffvSdJc7hGHm1QboTKUtVJEVKOk2LVYH68FQawcgpuM1f9yAT3pXSDWLGICEVGegoDN.cIgOft36kUvFCC522ltbYRqg6xIPZ9UL57nd7gzsmx18f9gg.7bHD3vtBNPmYhIH8Ovmkptn1mhadP87+V.acME5YxjiKjs5+YsOrd8u4zipW+EA8hFWXasM9MT9.4vhYoQJKc8OBV5chdQiKXJzVX39ubN01.ZZqZT+HYP4BxmfuHP5FH+O.psvm0qKTSzKArTPJUXPdlBjtbqYfXyBlVtJ9Gf114jRO600gGMHrBrUE3y9RB0Slhm.t+wTU9UWKm6CYQYeR0B77hF497hbucQAo6V3dLo4v74aob3q5kK+Oy2I8T61uOjMkR1x3ie2x9xrEfJWJBjL9fyHROFbKfvVVv6UgRsQIU9IojwiajT0zfxsZjbLMdxlIGBTS1LYRjCwzS7dy3mL.A0OJTBvId3Kgq.OIGFqO4BeXbi5MPNvqTeuooJT74.2yWmuXIz4EKgNubIz4KWBcNXIz4qVBc95GTG0+ffCCjBmniIffdcCu3slVTirvLRz+xuGSdj
-
@Christoph-Hart @d-healey said in Engine.saveUserPreset() no confirm dialog:
@ustk I think it makes sense to remove the confirmation altogether…
In fact I just added an option to
hi_core
->CONFIRM_PRESET_OVERWRITE
, and took the opportunity to fix some info bubble not showing in the jucer
https://github.com/christophhart/HISE/pull/239/commits/1f164d79127d6273a01d5e1e0d995c2897c59d5c -
@ustk Do I need to change this option when compiling Hise or can I set it in Hise Preferences?
-
@ulrik Never mind, the answer was to change it when compiling Hise.
-
@ulrik And when compiling the binary too
-
@ustk you mean when compiling the plugin? I didn't add any extra definitions inside Hise, and it worked, or am I misunderstanding?
-
@ustk Sorry for reviving this ancient topic.
I removed the confirmation message successfully in HISE, but it still shows up in the compiled binary.
How do I remove it for the compiled version?
I export directly from HISE.
-
@CyberGen You probably need to add the same preprocessor to your project settings.
-
@aaronventure tried it on the extra definitions tab but:
"invalid token at start of a preprocessor expression"
Compilation Failed. -
@aaronventure Oh, I see now.
"CONFIRM_PRESET_OVERWRITE=0" no semicolon at the end.
It works now.
Thank You.