BlackStartx/PyCharm-Blender-Plugin

Is it possible to output to the console?

Opened this issue · 6 comments

Thanks for your addon.
Is it possible to output to the console via print?
Files are updated when the text changes, but there is no printing to the console.
I need functionality similar to how it is done in the addon for VSCode
Windows 11
Blend-Charm.2022.3.Community.Edition
Blender 3.4

Hi Vts~ ^-^

This seems related to #4,

As stated there I'll post the workaround here too, you can use the python logging library.

Example:

import logging

logging.log(logging.INFO, "Hello World!")

The logging library seems to stream data to a buffer that it's handled by the console (probably stderr), while the print stream to another buffer (probably stdout) that it's not handled.

Sorry for the issue,

  • BlackStartx

I succeeded through logging.WARN, but how to make the error output that blender itself produces?

is it possible to disable console redirection altogether, and activate the standard blender console?

Zexyp commented

is it possible to disable console redirection altogether, and activate the standard blender console?

I think it's not possible. The console output can be seen in the BlendCharm plugin window.
If you really want the console to open through Blender you can just use Blender directly without starting it using the plugin.

Thank you

CGSeb commented

Hi, it seems related to the "level" of log shown by the BlendCharm console filtering the "info" log level. There is probably a setting to change this in the plugin code?

After testing the debug mode we do have all the logs in the debug mode, but not in the simple execution