diff options
-rw-r--r-- | doc/python_api/rst/info_tips_and_tricks.rst | 21 | ||||
-rw-r--r-- | source/blender/editors/render/render_opengl.c | 6 |
2 files changed, 27 insertions, 0 deletions
diff --git a/doc/python_api/rst/info_tips_and_tricks.rst b/doc/python_api/rst/info_tips_and_tricks.rst index 491e97208dc..0b9404906e2 100644 --- a/doc/python_api/rst/info_tips_and_tricks.rst +++ b/doc/python_api/rst/info_tips_and_tricks.rst @@ -26,6 +26,27 @@ There are 3 main uses for the terminal, these are: For Linux and OSX users this means starting the terminal first, then running blender from within it. On Windows the terminal can be enabled from the help menu. +Interface Tricks +================ + + +Access Operator Commands +------------------------ + +You may have noticed that the tooltip for menu items and buttons includes the ``bpy.ops``... command to run that button, a handy (hidden) feature is that you can press Ctrl+C over any menu item/button to copy this command into the clipboard. + + +Access Data Path +---------------- + +To find the path from an :class:`ID` datablock to its setting isn't always so simple since it may be nested away. To get this quickly you can right click on the setting and select select **Copy Data Path**, +if this can't be generated, only the property name is copied. + +.. note:: + + This uses the same method for creating the animation path used by :class:`FCurve.data_path` and :class:`DriverTarget.data_path` drivers. + + Show All Operators ================== diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 66f0e429b76..a3783bdb342 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -46,6 +46,7 @@ #include "DNA_object_types.h" #include "BKE_context.h" +#include "BKE_global.h" #include "BKE_image.h" #include "BKE_main.h" #include "BKE_report.h" @@ -258,6 +259,11 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) const short is_write_still= RNA_boolean_get(op->ptr, "write_still"); char err_out[256]= "unknown"; + if(G.background) { + BKE_report(op->reports, RPT_ERROR, "Can't use OpenGL render in background mode (no opengl context)"); + return 0; + } + /* ensure we have a 3d view */ if(!ED_view3d_context_activate(C)) { |