Blender  V3.3
BPY_extern.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #pragma once
8 
9 struct ARegionType;
11 struct ChannelDriver; /* DNA_anim_types.h */
12 struct ID; /* DNA_ID.h */
13 struct ListBase; /* DNA_listBase.h */
14 struct Object; /* DNA_object_types.h */
15 struct PathResolvedRNA;
16 struct Text; /* defined in DNA_text_types.h */
17 struct bConstraint; /* DNA_constraint_types.h */
18 struct bConstraintOb; /* DNA_constraint_types.h */
19 struct bConstraintTarget; /* DNA_constraint_types.h */
20 struct bContext;
21 struct bContextDataResult;
22 struct bPythonConstraint; /* DNA_constraint_types.h */
23 struct wmWindowManager;
24 
25 #include "BLI_utildefines.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
32  struct bConstraintOb *cob,
33  struct ListBase *targets);
34 // void BPY_pyconstraint_settings(void *arg1, void *arg2);
35 void BPY_pyconstraint_target(struct bPythonConstraint *con, struct bConstraintTarget *ct);
36 void BPY_pyconstraint_update(struct Object *owner, struct bConstraint *con);
37 int BPY_is_pyconstraint(struct Text *text);
38 // void BPY_free_pyconstraint_links(struct Text *text);
39 
40 /* global interpreter lock */
41 
42 typedef void *BPy_ThreadStatePtr;
43 
52 
54 #define BPy_BEGIN_ALLOW_THREADS \
55  { \
56  BPy_ThreadStatePtr _bpy_saved_tstate = BPY_thread_save(); \
57  (void)0
58 #define BPy_END_ALLOW_THREADS \
59  BPY_thread_restore(_bpy_saved_tstate); \
60  } \
61  (void)0
62 
63 void BPY_text_free_code(struct Text *text);
67 void BPY_modules_update(void);
68 void BPY_modules_load_user(struct bContext *C);
69 
70 void BPY_app_handlers_reset(bool do_all);
71 
75 void BPY_driver_exit(void);
76 
82 void BPY_driver_reset(void);
83 
88 float BPY_driver_exec(struct PathResolvedRNA *anim_rna,
89  struct ChannelDriver *driver,
90  struct ChannelDriver *driver_orig,
91  const struct AnimationEvalContext *anim_eval_context);
92 
97 void BPY_DECREF(void *pyob_ptr);
98 
99 void BPY_DECREF_RNA_INVALIDATE(void *pyob_ptr);
100 int BPY_context_member_get(struct bContext *C,
101  const char *member,
102  struct bContextDataResult *result);
103 void BPY_context_set(struct bContext *C);
107 void BPY_context_update(struct bContext *C);
108 
109 #define BPY_context_dict_clear_members(C, ...) \
110  BPY_context_dict_clear_members_array(&((C)->data.py_context), \
111  (C)->data.py_context_orig, \
112  ((const char *[]){__VA_ARGS__}), \
113  VA_NARGS_COUNT(__VA_ARGS__))
124 void BPY_context_dict_clear_members_array(void **dict_p,
125  void *dict_orig,
126  const char *context_members[],
127  uint context_members_len);
128 
129 void BPY_id_release(struct ID *id);
130 
134 bool BPY_string_is_keyword(const char *str);
135 
136 /* bpy_rna_callback.c */
137 
138 void BPY_callback_screen_free(struct ARegionType *art);
139 void BPY_callback_wm_free(struct wmWindowManager *wm);
140 
141 /* I18n for addons */
142 #ifdef WITH_INTERNATIONAL
143 const char *BPY_app_translations_py_pgettext(const char *msgctxt, const char *msgid);
144 #endif
145 
146 #ifdef __cplusplus
147 } /* extern "C" */
148 #endif
unsigned int uint
Definition: BLI_sys_types.h:67
int BPY_context_member_get(struct bContext *C, const char *member, struct bContextDataResult *result)
BPy_ThreadStatePtr BPY_thread_save(void)
Definition: bpy_threads.c:15
void BPY_modules_load_user(struct bContext *C)
void BPY_pyconstraint_target(struct bPythonConstraint *con, struct bConstraintTarget *ct)
bool BPY_string_is_keyword(const char *str)
void BPY_context_dict_clear_members_array(void **dict_p, void *dict_orig, const char *context_members[], uint context_members_len)
void BPY_pyconstraint_exec(struct bPythonConstraint *con, struct bConstraintOb *cob, struct ListBase *targets)
void BPY_context_update(struct bContext *C)
Definition: bpy_interface.c:91
void BPY_text_free_code(struct Text *text)
void BPY_DECREF_RNA_INVALIDATE(void *pyob_ptr)
void BPY_modules_update(void)
void BPY_driver_exit(void)
Definition: bpy_driver.c:237
void * BPy_ThreadStatePtr
Definition: BPY_extern.h:42
void BPY_context_set(struct bContext *C)
void BPY_thread_restore(BPy_ThreadStatePtr tstate)
Definition: bpy_threads.c:28
int BPY_is_pyconstraint(struct Text *text)
void BPY_driver_reset(void)
Definition: bpy_driver.c:260
void BPY_pyconstraint_update(struct Object *owner, struct bConstraint *con)
void BPY_callback_screen_free(struct ARegionType *art)
void BPY_id_release(struct ID *id)
Definition: bpy_rna.c:287
void BPY_app_handlers_reset(bool do_all)
float BPY_driver_exec(struct PathResolvedRNA *anim_rna, struct ChannelDriver *driver, struct ChannelDriver *driver_orig, const struct AnimationEvalContext *anim_eval_context)
void BPY_callback_wm_free(struct wmWindowManager *wm)
void BPY_DECREF(void *pyob_ptr)
#define C
Definition: RandGen.cpp:25
#define str(s)
Definition: DNA_ID.h:368