diff options
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 4 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_msgbus.c | 4 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 40 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna_anim.c | 14 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna_driver.c | 2 |
5 files changed, 32 insertions, 32 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 71bc01d6b98..a73e4034ca6 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -808,7 +808,7 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult * ptr = &(((BPy_StructRNA *)item)->ptr); // result->ptr = ((BPy_StructRNA *)item)->ptr; - CTX_data_pointer_set(result, ptr->id.data, ptr->type, ptr->data); + CTX_data_pointer_set(result, ptr->owner_id, ptr->type, ptr->data); CTX_data_type_set(result, CTX_DATA_TYPE_POINTER); done = true; } @@ -834,7 +834,7 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult * BLI_addtail(&result->list, link); #endif ptr = &(((BPy_StructRNA *)list_item)->ptr); - CTX_data_list_add(result, ptr->id.data, ptr->type, ptr->data); + CTX_data_list_add(result, ptr->owner_id, ptr->type, ptr->data); } else { CLOG_INFO(BPY_LOG_CONTEXT, diff --git a/source/blender/python/intern/bpy_msgbus.c b/source/blender/python/intern/bpy_msgbus.c index 9db4201c252..630a0392dbd 100644 --- a/source/blender/python/intern/bpy_msgbus.c +++ b/source/blender/python/intern/bpy_msgbus.c @@ -269,7 +269,7 @@ static PyObject *bpy_msgbus_subscribe_rna(PyObject *UNUSED(self), PyObject *args /* Note: we may want to have a way to pass this in. */ bContext *C = (bContext *)BPy_GetContext(); struct wmMsgBus *mbus = CTX_wm_message_bus(C); - wmMsgParams_RNA msg_key_params = {{{0}}}; + wmMsgParams_RNA msg_key_params = {{0}}; wmMsgSubscribeValue msg_val_params = {0}; @@ -342,7 +342,7 @@ static PyObject *bpy_msgbus_publish_rna(PyObject *UNUSED(self), PyObject *args, /* Note: we may want to have a way to pass this in. */ bContext *C = (bContext *)BPy_GetContext(); struct wmMsgBus *mbus = CTX_wm_message_bus(C); - wmMsgParams_RNA msg_key_params = {{{0}}}; + wmMsgParams_RNA msg_key_params = {{0}}; if (py_msgbus_rna_key_from_py(py_sub, &msg_key_params, error_prefix) == -1) { return NULL; diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index e7fed02fe79..b85d48b67da 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -139,7 +139,7 @@ static void id_release_gc(struct ID *id) if (PyType_IsSubtype(Py_TYPE(ob), &pyrna_struct_Type) || PyType_IsSubtype(Py_TYPE(ob), &pyrna_prop_Type)) { BPy_DummyPointerRNA *ob_ptr = (BPy_DummyPointerRNA *)ob; - if (ob_ptr->ptr.id.data == id) { + if (ob_ptr->ptr.owner_id == id) { pyrna_invalidate(ob_ptr); // printf("freeing: %p %s, %.200s\n", (void *)ob, id->name, Py_TYPE(ob)->tp_name); // i++; @@ -308,7 +308,7 @@ static bool rna_disallow_writes = false; static bool rna_id_write_error(PointerRNA *ptr, PyObject *key) { - ID *id = ptr->id.data; + ID *id = ptr->owner_id; if (id) { const short idcode = GS(id->name); /* May need more ID types added here. */ @@ -907,7 +907,7 @@ static PyObject *pyrna_struct_str(BPy_StructRNA *self) static PyObject *pyrna_struct_repr(BPy_StructRNA *self) { - ID *id = self->ptr.id.data; + ID *id = self->ptr.owner_id; PyObject *tmp_str; PyObject *ret; @@ -1019,7 +1019,7 @@ static PyObject *pyrna_prop_str(BPy_PropertyRNA *self) static PyObject *pyrna_prop_repr_ex(BPy_PropertyRNA *self, const int index_dim, const int index) { - ID *id = self->ptr.id.data; + ID *id = self->ptr.owner_id; PyObject *tmp_str; PyObject *ret; const char *path; @@ -1982,7 +1982,7 @@ static int pyrna_py_to_prop( return -1; } else if ((value != Py_None) && ((flag & PROP_ID_SELF_CHECK) && - ptr->id.data == ((BPy_StructRNA *)value)->ptr.id.data)) { + ptr->owner_id == ((BPy_StructRNA *)value)->ptr.owner_id)) { PyErr_Format(PyExc_TypeError, "%.200s %.200s.%.200s ID type does not support assignment to itself", error_prefix, @@ -3447,7 +3447,7 @@ static PyObject *pyrna_struct_subscript(BPy_StructRNA *self, PyObject *key) return NULL; } - return BPy_IDGroup_WrapData(self->ptr.id.data, idprop, group); + return BPy_IDGroup_WrapData(self->ptr.owner_id, idprop, group); } static int pyrna_struct_ass_subscript(BPy_StructRNA *self, PyObject *key, PyObject *value) @@ -3543,7 +3543,7 @@ static PyObject *pyrna_struct_items(BPy_PropertyRNA *self) return PyList_New(0); } - return BPy_Wrap_GetItems(self->ptr.id.data, group); + return BPy_Wrap_GetItems(self->ptr.owner_id, group); } PyDoc_STRVAR(pyrna_struct_values_doc, @@ -3571,7 +3571,7 @@ static PyObject *pyrna_struct_values(BPy_PropertyRNA *self) return PyList_New(0); } - return BPy_Wrap_GetValues(self->ptr.id.data, group); + return BPy_Wrap_GetValues(self->ptr.owner_id, group); } PyDoc_STRVAR(pyrna_struct_is_property_set_doc, @@ -4708,9 +4708,9 @@ PyDoc_STRVAR(pyrna_struct_get_id_data_doc, static PyObject *pyrna_struct_get_id_data(BPy_DummyPointerRNA *self) { /* Used for struct and pointer since both have a ptr. */ - if (self->ptr.id.data) { + if (self->ptr.owner_id) { PointerRNA id_ptr; - RNA_id_pointer_create((ID *)self->ptr.id.data, &id_ptr); + RNA_id_pointer_create((ID *)self->ptr.owner_id, &id_ptr); return pyrna_struct_CreatePyObject(&id_ptr); } @@ -4894,7 +4894,7 @@ static PyObject *pyrna_struct_get(BPy_StructRNA *self, PyObject *args) idprop = IDP_GetPropertyFromGroup(group, key); if (idprop) { - return BPy_IDGroup_WrapData(self->ptr.id.data, idprop, group); + return BPy_IDGroup_WrapData(self->ptr.owner_id, idprop, group); } } @@ -4937,7 +4937,7 @@ static PyObject *pyrna_struct_pop(BPy_StructRNA *self, PyObject *args) idprop = IDP_GetPropertyFromGroup(group, key); if (idprop) { - PyObject *ret = BPy_IDGroup_WrapData(self->ptr.id.data, idprop, group); + PyObject *ret = BPy_IDGroup_WrapData(self->ptr.owner_id, idprop, group); IDP_RemoveFromGroup(group, idprop); return ret; } @@ -5787,7 +5787,7 @@ static PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *dat * and will break if a function returns a pointer from * another ID block, watch this! - it should at least be * easy to debug since they are all ID's */ - RNA_pointer_create(ptr->id.data, ptype, *(void **)data, &newptr); + RNA_pointer_create(ptr->owner_id, ptype, *(void **)data, &newptr); } } @@ -5903,7 +5903,7 @@ static PyObject *pyrna_func_call(BPy_FunctionRNA *self, PyObject *args, PyObject /* include the ID pointer for pyrna_param_to_py() so we can include the * ID pointer on return values, this only works when returned values have * the same ID as the functions. */ - RNA_pointer_create(self_ptr->id.data, &RNA_Function, self_func, &funcptr); + RNA_pointer_create(self_ptr->owner_id, &RNA_Function, self_func, &funcptr); pyargs_len = PyTuple_GET_SIZE(args); pykw_len = kw ? PyDict_Size(kw) : 0; @@ -6987,7 +6987,7 @@ static void pyrna_subtype_set_rna(PyObject *newclass, StructRNA *srna) /* Add staticmethods and classmethods. */ { - const PointerRNA func_ptr = {{NULL}, srna, NULL}; + const PointerRNA func_ptr = {NULL, srna, NULL}; const ListBase *lb; Link *link; @@ -7285,8 +7285,8 @@ PyObject *pyrna_struct_CreatePyObject(PointerRNA *ptr) // PyC_ObSpit("NewStructRNA: ", (PyObject *)pyrna); #ifdef USE_PYRNA_INVALIDATE_WEAKREF - if (ptr->id.data) { - id_weakref_pool_add(ptr->id.data, (BPy_DummyPointerRNA *)pyrna); + if (ptr->owner_id) { + id_weakref_pool_add(ptr->owner_id, (BPy_DummyPointerRNA *)pyrna); } #endif return (PyObject *)pyrna; @@ -7334,8 +7334,8 @@ PyObject *pyrna_prop_CreatePyObject(PointerRNA *ptr, PropertyRNA *prop) pyrna->prop = prop; #ifdef USE_PYRNA_INVALIDATE_WEAKREF - if (ptr->id.data) { - id_weakref_pool_add(ptr->id.data, (BPy_DummyPointerRNA *)pyrna); + if (ptr->owner_id) { + id_weakref_pool_add(ptr->owner_id, (BPy_DummyPointerRNA *)pyrna); } #endif @@ -7358,7 +7358,7 @@ PyObject *pyrna_id_CreatePyObject(ID *id) bool pyrna_id_FromPyObject(PyObject *obj, ID **id) { if (pyrna_id_CheckPyObject(obj)) { - *id = ((BPy_StructRNA *)obj)->ptr.id.data; + *id = ((BPy_StructRNA *)obj)->ptr.owner_id; return true; } else { diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c index 7a3499d0295..5e535d0e3ce 100644 --- a/source/blender/python/intern/bpy_rna_anim.c +++ b/source/blender/python/intern/bpy_rna_anim.c @@ -88,7 +88,7 @@ static int pyrna_struct_anim_args_parse_ex(PointerRNA *ptr, path); return -1; } - else if (ptr->id.data != r_ptr.id.data) { + else if (ptr->owner_id != r_ptr.owner_id) { PyErr_Format(PyExc_ValueError, "%.200s path spans ID blocks", error_prefix, path); return -1; } @@ -370,7 +370,7 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb return PyBool_FromLong(result); } else { - ID *id = self->ptr.id.data; + ID *id = self->ptr.owner_id; ReportList reports; short result; @@ -451,7 +451,7 @@ PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self, PyObject *args, PyOb } if (prop) { - ID *id = ptr.id.data; + ID *id = ptr.owner_id; NlaStrip *strip = (NlaStrip *)ptr.data; FCurve *fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), index); @@ -502,7 +502,7 @@ PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self, PyObject *args, PyOb BKE_reports_init(&reports, RPT_STORE); result = delete_keyframe( - G.main, &reports, (ID *)self->ptr.id.data, NULL, group_name, path_full, index, cfra, 0); + G.main, &reports, (ID *)self->ptr.owner_id, NULL, group_name, path_full, index, cfra, 0); MEM_freeN((void *)path_full); if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1) { @@ -548,7 +548,7 @@ PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args) BKE_reports_init(&reports, RPT_STORE); result = ANIM_add_driver(&reports, - (ID *)self->ptr.id.data, + (ID *)self->ptr.owner_id, path_full, index, CREATEDRIVER_WITH_FMODIFIER, @@ -559,7 +559,7 @@ PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args) } if (result) { - ID *id = self->ptr.id.data; + ID *id = self->ptr.owner_id; AnimData *adt = BKE_animdata_from_id(id); FCurve *fcu; @@ -629,7 +629,7 @@ PyObject *pyrna_struct_driver_remove(BPy_StructRNA *self, PyObject *args) BKE_reports_init(&reports, RPT_STORE); - result = ANIM_remove_driver(&reports, (ID *)self->ptr.id.data, path_full, index, 0); + result = ANIM_remove_driver(&reports, (ID *)self->ptr.owner_id, path_full, index, 0); if (path != path_full) { MEM_freeN((void *)path_full); diff --git a/source/blender/python/intern/bpy_rna_driver.c b/source/blender/python/intern/bpy_rna_driver.c index e9e8d05aa74..a8d8252b231 100644 --- a/source/blender/python/intern/bpy_rna_driver.c +++ b/source/blender/python/intern/bpy_rna_driver.c @@ -91,7 +91,7 @@ bool pyrna_driver_is_equal_anim_rna(const PathResolvedRNA *anim_rna, const PyObj const PointerRNA *ptr_a = &anim_rna->ptr; const PointerRNA *ptr_b = &(((const BPy_StructRNA *)py_anim_rna)->ptr); - if ((ptr_a->id.data == ptr_b->id.data) && (ptr_a->type == ptr_b->type) && + if ((ptr_a->owner_id == ptr_b->owner_id) && (ptr_a->type == ptr_b->type) && (ptr_a->data == ptr_b->data)) { return true; } |