Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-10-29 12:25:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-10-29 12:25:11 +0300
commitc508e6198a614619bb9d82cd59c0fdb7f55f427d (patch)
treebda1b4de7fbc1ef951f4bf49dfd440086902613a /source/blender/blenkernel/BKE_context.h
parent40731af9d0b85e3cf93e46e48b814faa06aac74b (diff)
Python can now run operators with their own context (data context).
The aim of this is to avoid having to set the selection each time before running an operator from python. At the moment this is set as a python dictionary with string keys and rna values... eg. C = {} C["active_object"] = bpy.data.objects['SomeOb'] bpy.ops.object.game_property_new(C) # ofcourse this works too.. bpy.ops.object.game_property_new({"active_object":ob}) # or... C = {"main":bpy.data, "scene":bpy.data.scenes[0], "active_object":bpy.data.objects['SomeOb'], "selected_editable_objects":list(bpy.data.objects)} bpy.ops.object.location_apply(C)
Diffstat (limited to 'source/blender/blenkernel/BKE_context.h')
-rw-r--r--source/blender/blenkernel/BKE_context.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h
index 09e13c2930e..feba39ee11d 100644
--- a/source/blender/blenkernel/BKE_context.h
+++ b/source/blender/blenkernel/BKE_context.h
@@ -124,6 +124,9 @@ void CTX_store_free_list(ListBase *contexts);
int CTX_py_init_get(bContext *C);
void CTX_py_init_set(bContext *C, int value);
+void *CTX_py_dict_get(bContext *C);
+void CTX_py_dict_set(bContext *C, void *value);
+
/* Window Manager Context */
struct wmWindowManager *CTX_wm_manager(const bContext *C);