If Blender was started with a CWD relative to an armsdk folder and that armsdk folder was at the same path than the SDK path set in the user preferences, subsequent loads of Blender files didn't result in an update of the local_sdk variable that is passed to Armory upon startup/restart. This would then cause havoc later.
To correctly update that variable, the SDK is now also reloaded in case the type of SDK source (env var, local, prefs) changes. Ideally the local_sdk variable should get removed completely in its current form and the utils.get_sdk_path() function should get refactored, it currently still uses code from a time where the SDK could come bundled with Blender.
If Blender was started with a CWD relative to an
armsdk
folder and thatarmsdk
folder was at the same path than the SDK path set in the user preferences, subsequent loads of Blender files didn't result in an update of thelocal_sdk
variable that is passed to Armory upon startup/restart. This would then cause havoc later.To correctly update that variable, the SDK is now also reloaded in case the type of SDK source (env var, local, prefs) changes. Ideally the
local_sdk
variable should get removed completely in its current form and theutils.get_sdk_path()
function should get refactored, it currently still uses code from a time where the SDK could come bundled with Blender.Thanks to the Discord user wuaieyo for report :)