diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-01-18 13:46:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-01-18 13:46:26 +0300 |
commit | 97692a3bf5a91e83e04c9864e3723f2363006111 (patch) | |
tree | 1c8c829b58732080184cdf89160c8de32cf0ad7b /source/blender/windowmanager/WM_api.h | |
parent | 53ae509cc5ad75dca490dea8c632d542285e0058 (diff) |
Changes to functions from blender/windowmanager/intern/wm_event_system.c
Python operator api was using WM_operator_name_call() which was confusing things too much.
Added WM_operator_call_py() which ended up being a very small function and split out operator creation into wm_operator_create()
Python operator now runs the poll() function and raises an error if it fails.
Eventually there should be error messages for poll that python can use to give the exact reason for failing (eg - library linked data, no active object...)
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index a7b90a7fccd..d7559eac306 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -126,7 +126,8 @@ void WM_operatortype_append_ptr (void (*opfunc)(wmOperatorType*, void *), void int WM_operatortype_remove(const char *idname); int WM_operator_call (struct bContext *C, struct wmOperator *op); -int WM_operator_name_call (struct bContext *C, const char *opstring, int context, struct PointerRNA *properties, struct ReportList *reports); +int WM_operator_name_call (struct bContext *C, const char *opstring, int context, struct PointerRNA *properties); +int WM_operator_call_py(struct bContext *C, struct wmOperatorType *ot, struct PointerRNA *properties, struct ReportList *reports); void WM_operator_properties_create(struct PointerRNA *ptr, const char *opstring); void WM_operator_properties_free(struct PointerRNA *ptr); |