-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete is skipped #68
Comments
Here is a workaround:
|
Closed
CGArtPython
added a commit
to CGArtPython/blender_vscode
that referenced
this issue
Jan 8, 2023
…e when run from VS Code Extension JacquesLucke#135 # Summary of issue Calling a script via operator results in an empty context. # Related devtalk.blender from @JacquesLucke https://devtalk.blender.org/t/how-to-run-a-script-from-outside-blender-script-live-link-addon/9792/3?u=jacqueslucke # Solution Use bpy.app.timers to register a function to run the target script. # Changes pythonFiles\include\blender_vscode\operators\script_runner.py * remove the RunScriptOperator and move the contents of the execute method into a the `run_script()` function * register a timer callback to the `run_script()` function that will execute the target script # Potentially related issues * When adding objects to collections the objects only show after the script ends. JacquesLucke#101 * accessing bpy.context.object crashes Blender JacquesLucke#86 * Crash when adding mesh JacquesLucke#63 * Delete is skipped JacquesLucke#68 # Testing * execute a simple script that uses `bpy.context.active_object` * set the #context.area: SEQUENCE_EDITOR and run this script https://github.com/CGArtPython/blender_plus_python/blob/main/sequence_editor_frame_import/sequence_editor_frame_import_done.py * execute the script from issue JacquesLucke#101 JacquesLucke#101 * execute the script from issue JacquesLucke#86 JacquesLucke#86 * execute the script from issue JacquesLucke#63 JacquesLucke#63 * execute the script from issue JacquesLucke#68 JacquesLucke#68 * execute the script from issue JacquesLucke#41 JacquesLucke#41
CGArtPython
added a commit
to CGArtPython/blender_vscode
that referenced
this issue
Apr 2, 2023
…e when run from VS Code Extension JacquesLucke#135 # Summary of issue Calling a script via operator results in an empty context. # Related devtalk.blender from @JacquesLucke https://devtalk.blender.org/t/how-to-run-a-script-from-outside-blender-script-live-link-addon/9792/3?u=jacqueslucke # Solution Use bpy.app.timers to register a function to run the target script. # Changes pythonFiles\include\blender_vscode\operators\script_runner.py * remove the RunScriptOperator and move the contents of the execute method into a the `run_script()` function * register a timer callback to the `run_script()` function that will execute the target script # Potentially related issues * When adding objects to collections the objects only show after the script ends. JacquesLucke#101 * accessing bpy.context.object crashes Blender JacquesLucke#86 * Crash when adding mesh JacquesLucke#63 * Delete is skipped JacquesLucke#68 # Testing * execute a simple script that uses `bpy.context.active_object` * set the #context.area: SEQUENCE_EDITOR and run this script https://github.com/CGArtPython/blender_plus_python/blob/main/sequence_editor_frame_import/sequence_editor_frame_import_done.py * execute the script from issue JacquesLucke#101 JacquesLucke#101 * execute the script from issue JacquesLucke#86 JacquesLucke#86 * execute the script from issue JacquesLucke#63 JacquesLucke#63 * execute the script from issue JacquesLucke#68 JacquesLucke#68 * execute the script from issue JacquesLucke#41 JacquesLucke#41
CGArtPython
added a commit
to CGArtPython/blender_vscode
that referenced
this issue
Apr 2, 2023
…e when run from VS Code Extension JacquesLucke#135 # Summary of issue Calling a script via operator results in an empty context. # Related devtalk.blender from @JacquesLucke https://devtalk.blender.org/t/how-to-run-a-script-from-outside-blender-script-live-link-addon/9792/3?u=jacqueslucke # Solution Use bpy.app.timers to register a function to run the target script. # Changes pythonFiles\include\blender_vscode\operators\script_runner.py * remove the RunScriptOperator and move the contents of the execute method into a the `run_script()` function * register a timer callback to the `run_script()` function that will execute the target script # Potentially related issues * When adding objects to collections the objects only show after the script ends. JacquesLucke#101 * accessing bpy.context.object crashes Blender JacquesLucke#86 * Crash when adding mesh JacquesLucke#63 * Delete is skipped JacquesLucke#68 # Testing * execute a simple script that uses `bpy.context.active_object` * set the #context.area: SEQUENCE_EDITOR and run this script https://github.com/CGArtPython/blender_plus_python/blob/main/sequence_editor_frame_import/sequence_editor_frame_import_done.py * execute the script from issue JacquesLucke#101 JacquesLucke#101 * execute the script from issue JacquesLucke#86 JacquesLucke#86 * execute the script from issue JacquesLucke#63 JacquesLucke#63 * execute the script from issue JacquesLucke#68 JacquesLucke#68 * execute the script from issue JacquesLucke#41 JacquesLucke#41
I am closing this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This simple script works from Blender (selects everything, deletes everything, inserts a camera), but fails from VS code - in the sense that it does select everything, and it also inserts a camera, but it doesn't perform the delete operation.
The text was updated successfully, but these errors were encountered: