Summary: | Kritarunner -s expects known module, not filepath | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Fredrik Averpil <fredrik> |
Component: | Scripting | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | dhruvagovil, halla, mail |
Priority: | NOR | Keywords: | triaged |
Version: | 4.0 pre-alpha | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | Version Fixed In: |
Description
Fredrik Averpil
2018-03-07 09:51:11 UTC
I just had a quick look at the code in plugins/pykrita/kritarunner/plugin/utilities.cpp. In Python::setPath I can see that PYTHONPATH is not being merged into Krita's search paths on Windows and in some scenarios, it is being skipped on macOS/Linux too... I'd say either _always_ merge PYTHONPATH into the search paths or _never_ do it. The latter probably being a wise choice avoid future problems (which usually turns up when users start putting stuff in their PYTHONPATH). Regardless, I want to re-iterate on that I would prefer to specify a script filepath to kritarunner. This would not only add simplicity to kritarunner, but also offer the possibility to tailor to the user's need in terms of the script's location. After having given all of this some thought, it would also be good to be able to define arguments or the function name to execute (with arguments to the function). Git commit 720abdf60609493cf4287fdc2587cc3af09fd5ad by Boudewijn Rempt. Committed on 09/03/2018 at 10:55. Pushed by rempt into branch 'master'. Disable the 3.0 defaults bundle by default This is an ugly hack, but since we cannot whitelist by-default-blacklisted default resources, since there's no concept of whitelisting, hacking around with the config file is the best we can do. M +2 -1 krita/data/bundles/CMakeLists.txt A +- -- krita/data/bundles/Krita_3_Default_Resources.bundle M +13 -0 libs/widgets/KoResourceServer.h M +3 -1 libs/widgets/KoResourceServerProvider.cpp M +10 -2 plugins/extensions/resourcemanager/dlg_bundle_manager.cpp https://commits.kde.org/krita/720abdf60609493cf4287fdc2587cc3af09fd5ad Git commit cef00e79ae2d5de02eb47f6523bacb046177efdc by Boudewijn Rempt. Committed on 09/03/2018 at 10:55. Pushed by rempt into branch 'krita/4.0'. Disable the 3.0 defaults bundle by default This is an ugly hack, but since we cannot whitelist by-default-blacklisted default resources, since there's no concept of whitelisting, hacking around with the config file is the best we can do. M +2 -1 krita/data/bundles/CMakeLists.txt A +- -- krita/data/bundles/Krita_3_Default_Resources.bundle M +13 -0 libs/widgets/KoResourceServer.h M +3 -1 libs/widgets/KoResourceServerProvider.cpp M +10 -2 plugins/extensions/resourcemanager/dlg_bundle_manager.cpp https://commits.kde.org/krita/cef00e79ae2d5de02eb47f6523bacb046177efdc Er... Wrong commit. I agree with Frederik on his proposed solutions and I share his concern over expecting the module to be importable. It would be very in line with other packages like Nuke, Katana, Maya etc to allow the running of a script from a full path or relative path. I am not very familiar with the technical details of kritarunner, but this does sound like a solid proposal to me. |