Page MenuHome

Use function render from 3Dview using custom addon fails
Closed, ArchivedPublic


System Information
OSX 10.11.6
Intel Iris Pro 1536

Blender Version
2.80 #f1f8859ad52b 2018-12-21 21:14
Short description of error
Im made update my addon to 2.80 this allow me to use the render menu in the 3Dview. This addon makes it easier and faster to switch render engines. I used the main render menu setup. Though when i run the same code as the function Render does render.render i get this error in the console;

ERROR (wm.operator): /Users/fsiddi/bin/buildbot-worker/mac_x86_64_10_9_cmake/blender.git/source/blender/windowmanager/intern/wm_event_system.c:1345 wm_operator_invoke: invalid operator call 'RENDER_OT_view_show'

Exact steps for others to reproduce the error

  1. Download my addon
  2. Install addon
  3. Use standard shortcut ALT + SHIFT + E > Render
  4. Use shortcut again to view the render
  5. Nothing happens > see console for error



Event Timeline

Jacques Lucke (JacquesLucke) claimed this task.

Writing layout.operator_context = "INVOKE_DEFAULT" in the menu drawing code fixes the issue.

PS i just noticed that the has "layout.operator_context = 'INVOKE_AREA'"
This also works, ill keep that just to be safe. Didnt get an error using either one.