vscode-unreal-python
vscode-unreal-python copied to clipboard
Add "Execute Document" command that always executes the entire file
If the code contains Chinese characters, or the comment contains Chinese characters, LogPython will be prompted in the UE output: Error: File "Vscode extensions nilssoderman. ue-python-0.2.0 python vscode_execute. py", line 69, in main LogPython: Error: execute_ code(vscode_in_file.read(), exec_ origin, is_ debugging) LogPython: Error: UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 98: illegal multibyte sequence
Hi,
Thanks for reporting this issue, I believe this should've been fixed with the release of 0.2.1 since it's now using UTF-8 to decode the files.
Make sure your running the latest version then please give it another try, and do let me know if the issue persist!
Cheers, Nils
Hi,
Thanks for reporting this issue, I believe this should've been fixed with the release of 0.2.1 since it's now using UTF-8 to decode the files.
Make sure your running the latest version then please give it another try, and do let me know if the issue persist!
Cheers, Nils
Hello, I have tried version 0.2.1 and this issue has been resolved. Thank you for your plug-in, which is very convenient.
At the same time, after using it for a period of time, I have three suggestions for your reference:
1:When clicking on the end of a line, pressing the shortcut key can automatically send a single line without selecting it. Sometimes when selecting rows, if there are spaces in front of them, it will fail to execute, and I always need to be careful to select them.
2:After selecting multiple lines in the box, press the shortcut key to send multiple lines (now implemented)
3: Press the shortcut key to automatically send all code content under the current. py file without selecting all codes
Because now you always need to select rows, or select all to send.. I hope you can set different shortcut keys to distinguish them, so that it can be more convenient to send them to the UE. Another advantage of using different shortcut keys to distinguish them is that I don't have to worry about incorrect operations all the time, resulting in sending the full text to the UE.
I got inspiration for this usage in vscode to 3dsmax maxscript. More convenient. I use translation software. The description may not be accurate. thank you.
Hi,
Glad to hear it's working! And thank you for the feedback/ideas!
1: Ideally you shouldn't have to worry about the spaces, however I noticed there's a bug when executing a single line where it takes spaces into account, I will look into this and provide a fix for the next update!
3: Having different shortcuts for Send All / Send Selection/Line might be a good idea, it'd probably be implemented as an optional config though, so you can chose the default behavior if nothing is selected.
I will take a look at the 3dsMax extension as well, to compare and see what that is doing.
Thanks!
Hi,
Glad to hear it's working! And thank you for the feedback/ideas!
1: Ideally you shouldn't have to worry about the spaces, however I noticed there's a bug when executing a single line where it takes spaces into account, I will look into this and provide a fix for the next update!
3: Having different shortcuts for Send All / Send Selection/Line might be a good idea, it'd probably be implemented as an optional config though, so you can chose the default behavior if nothing is selected.
I will take a look at the 3dsMax extension as well, to compare and see what that is doing.
Thanks!
Thank you for your reply. They can be divided into three shortcuts:
- When selecting a single line or multiple lines in Vscode, press the shortcut key to send the code to UE5(space before code should be considered).
- If the line is not selected, but the cursor is on a line, send the line to UE5(need to consider the space before the code).
- Send the full text to UE5
thank you
Hi,
Version 0.2.2 has now been released, this fixes the bug that would cause the execution to fail if there were spaces in front of a single selected line.
The new commands didn't make this update, needed a bit more time to think about it + I haven't had the time to checkout 3ds max extension yet.
I think three shortcuts are a bit too much for what is essentially the same functionality. I'm currently thinking of splitting it up in two commands:
- Execute Document: (Always executes the entire file)
- Execute (If something is selected the selection will be executed. If not, it will either execute the entire document or the line where the cursor is depending on a config/setting that can be set to whichever the user prefer).
Okay, that's a good idea.
---Original--- From: "Nils @.> Date: Sun, Mar 26, 2023 19:53 PM To: @.>; Cc: @.@.>; Subject: Re: [nils-soderman/vscode-unreal-python] LogPython: Error:UnicodeDecodeError: 'gbk' codec (Issue #6)
Hi,
Version 0.2.2 has now been released, this fixes the bug that would cause the execution to fail if there were spaces in front of a single selected line.
The new commands didn't make this update, needed a bit more time to think about it + I haven't had the time to checkout 3ds max extension yet.
I think three shortcuts are a bit too much for what is essentially the same functionality. I'm currently thinking of splitting it up in two commands:
Execute Document: (Always executes the entire file)
Execute (If something is selected the selection will be executed. If not, it will either execute the entire document or the line where the cursor is depending on a config/setting that can be set to whichever the user prefer).
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Hi,
Version 0.2.2 has now been released, this fixes the bug that would cause the execution to fail if there were spaces in front of a single selected line.
The new commands didn't make this update, needed a bit more time to think about it + I haven't had the time to checkout 3ds max extension yet.
I think three shortcuts are a bit too much for what is essentially the same functionality. I'm currently thinking of splitting it up in two commands:
- Execute Document: (Always executes the entire file)
- Execute (If something is selected the selection will be executed. If not, it will either execute the entire document or the line where the cursor is depending on a config/setting that can be set to whichever the user prefer).
Do you have the latest news about these features?
Hi,
Version 0.2.2 has now been released, this fixes the bug that would cause the execution to fail if there were spaces in front of a single selected line.
The new commands didn't make this update, needed a bit more time to think about it + I haven't had the time to checkout 3ds max extension yet.
I think three shortcuts are a bit too much for what is essentially the same functionality. I'm currently thinking of splitting it up in two commands:
- Execute Document: (Always executes the entire file)
- Execute (If something is selected the selection will be executed. If not, it will either execute the entire document or the line where the cursor is depending on a config/setting that can be set to whichever the user prefer).
Hi, I have followed this project again. Do you have the latest news? It accelerated my testing
Hi,
No news on this feature yet. I've been contemplating whether this is a good idea or if it just adds additional complexity that the majority of users won't use.
Hello,
I'm going to close this issue due to a lack of activity, and I'm personally not sold on the idea of making the execute command more complex. If this request were to come up again it might be revised.
I do appreciate both the bug report and feedback you've provided though, thank you!
Cheers, Nils