Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/BPY_extern.h
| Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | int BPY_context_member_get(struct bContext *C, | ||||
| const char *member, | const char *member, | ||||
| struct bContextDataResult *result); | struct bContextDataResult *result); | ||||
| void BPY_context_set(struct bContext *C); | void BPY_context_set(struct bContext *C); | ||||
| /** | /** | ||||
| * Use for updating while a python script runs - in case of file load. | * Use for updating while a python script runs - in case of file load. | ||||
| */ | */ | ||||
| void BPY_context_update(struct bContext *C); | void BPY_context_update(struct bContext *C); | ||||
| #define BPY_context_dict_clear_members(C, ...) \ | |||||
| BPY_context_dict_clear_members_array(&((C)->data.py_context), \ | |||||
| (C)->data.py_context_orig, \ | |||||
| ((const char *[]){__VA_ARGS__}), \ | |||||
| VA_NARGS_COUNT(__VA_ARGS__)) | |||||
| /** | /** | ||||
| * Use for `CTX_*_set(..)` functions need to set values which are later read back as expected. | * Use for `CTX_*_set(..)` functions need to set values which are later read back as expected. | ||||
| * In this case we don't want the Python context to override the values as it causes problems | * In this case we don't want the Python context to override the values as it causes problems | ||||
| * see T66256. | * see T66256. | ||||
| * | * | ||||
| * \param dict_p: A pointer to #bContext.data.py_context so we can assign a new value. | * \param dict_p: A pointer to #bContext.data.py_context so we can assign a new value. | ||||
| * \param dict_orig: The value of #bContext.data.py_context_orig to check if we need to copy. | * \param dict_orig: The value of #bContext.data.py_context_orig to check if we need to copy. | ||||
| * | |||||
| * \note Typically accessed via #BPY_context_dict_clear_members macro. | |||||
| */ | */ | ||||
| void BPY_context_dict_clear_members_array(void **dict_p, | void BPY_context_dict_clear_members_array(void **dict_p, | ||||
| void *dict_orig, | void *dict_orig, | ||||
| const char *context_members[], | const char *context_members[], | ||||
| uint context_members_len); | uint context_members_len); | ||||
| void BPY_id_release(struct ID *id); | void BPY_id_release(struct ID *id); | ||||
| Show All 18 Lines | |||||