[Bf-python] finding correct operator poll context

Adhi Hargo cadmus.sw at gmail.com
Sat Jun 15 00:43:01 CEST 2013


I found related functions in
source/blender/windowmanager/intern/wm_operators.c. The polling
function, WM_operator_winactive, only returns false when there's no
active window (bpy.context.window).

Maybe the script is ran UI-less?

A bpy operator's C functions can be scattered in some files (usually
they're not), but there's a Python interface function where they're
all presented as Python methods, so it shouldn't be hard to find all C
functions related to a Python operator. TAGS file
(etags/ctags-generated) or find+grep is really handy for this purpose.

-- 
- Adhi Hargo



More information about the Bf-python mailing list