[Bf-blender-cvs] [34898747708] id_override_static: Merge branch 'master' into id_override_static
Bastien Montagne
noreply at git.blender.org
Tue May 30 17:22:29 CEST 2017
Commit: 34898747708f26867138797d85d9ab9da3ef7631
Author: Bastien Montagne
Date: Tue May 30 16:20:58 2017 +0200
Branches: id_override_static
https://developer.blender.org/rB34898747708f26867138797d85d9ab9da3ef7631
Merge branch 'master' into id_override_static
===================================================================
===================================================================
diff --cc source/blender/blenkernel/intern/library_remap.c
index 0a2a936ab59,24626c6ead7..70233386727
--- a/source/blender/blenkernel/intern/library_remap.c
+++ b/source/blender/blenkernel/intern/library_remap.c
@@@ -724,16 -723,12 +724,16 @@@ void BKE_libblock_relink_to_newid(ID *i
BKE_library_foreach_ID_link(NULL, id, id_relink_to_newid_looper, NULL, 0);
}
- void BKE_libblock_free_data(Main *UNUSED(bmain), ID *id)
+ void BKE_libblock_free_data(Main *UNUSED(bmain), ID *id, const bool do_id_user)
{
if (id->properties) {
- IDP_FreeProperty(id->properties);
+ IDP_FreeProperty_ex(id->properties, do_id_user);
MEM_freeN(id->properties);
}
+
+ if (id->override) {
+ BKE_override_free(&id->override);
+ }
}
/**
diff --cc source/blender/blenlib/intern/listbase.c
index aa273d22175,46dcee48eda..334018ec2c0
--- a/source/blender/blenlib/intern/listbase.c
+++ b/source/blender/blenlib/intern/listbase.c
@@@ -630,47 -664,7 +664,47 @@@ void *BLI_rfindptr(const ListBase *list
}
/**
+ * Finds the first element of listbase which contains the specified bytes
+ * at the specified offset, returning NULL if not found.
+ */
+void *BLI_listbase_bytes_find(const ListBase *listbase, const void *bytes, const size_t bytes_size, const int offset)
+{
+ Link *link = NULL;
+ const void *ptr_iter;
+
+ for (link = listbase->first; link; link = link->next) {
+ ptr_iter = (const void *)(((const char *)link) + offset);
+
+ if (memcmp(bytes, ptr_iter, bytes_size) == 0) {
+ return link;
+ }
+ }
+
+ return NULL;
+}
+/* same as above but find reverse */
+/**
+ * Finds the last element of listbase which contains the specified bytes
+ * at the specified offset, returning NULL if not found.
+ */
+void *BLI_listbase_bytes_rfind(const ListBase *listbase, const void *bytes, const size_t bytes_size, const int offset)
+{
+ Link *link = NULL;
+ const void *ptr_iter;
+
+ for (link = listbase->last; link; link = link->prev) {
+ ptr_iter = (const void *)(((const char *)link) + offset);
+
+ if (memcmp(bytes, ptr_iter, bytes_size) == 0) {
+ return link;
+ }
+ }
+
+ return NULL;
+}
+
+/**
- * Returns the 1-based index of the first element of listbase which contains the specified
+ * Returns the 0-based index of the first element of listbase which contains the specified
* null-terminated string at the specified offset, or -1 if not found.
*/
int BLI_findstringindex(const ListBase *listbase, const char *id, const int offset)
diff --cc source/blender/blenloader/intern/readfile.c
index cec639da2d8,01951b0266f..75e171f74d2
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@@ -127,9 -127,9 +127,10 @@@
#include "BKE_group.h"
#include "BKE_library.h" // for which_libbase
#include "BKE_library_idmap.h"
+#include "BKE_library_override.h"
#include "BKE_library_query.h"
#include "BKE_idcode.h"
+ #include "BKE_idprop.h"
#include "BKE_material.h"
#include "BKE_main.h" // for Main
#include "BKE_mesh.h" // for ME_ defines (patching)
diff --cc source/blender/editors/interface/interface_handlers.c
index e35a561a11a,a3f0e29065d..4d4b0f19d7b
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@@ -6757,10 -6757,9 +6757,11 @@@ static bool ui_but_menu(bContext *C, ui
{
uiPopupMenu *pup;
uiLayout *layout;
+ MenuType *mt = WM_menutype_find("WM_MT_button_context", true);
bool is_array, is_array_component;
uiStringInfo label = {BUT_GET_LABEL, NULL};
+ wmOperatorType *ot;
+ PointerRNA op_ptr;
/* if ((but->rnapoin.data && but->rnaprop) == 0 && but->optype == NULL)*/
/* return 0;*/
diff --cc source/blender/makesrna/intern/rna_access.c
index 751f5297a3a,a299302f04f..24eea22c898
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@@ -50,7 -50,7 +50,8 @@@
#include "BKE_idcode.h"
#include "BKE_idprop.h"
#include "BKE_fcurve.h"
+ #include "BKE_library.h"
+#include "BKE_library_override.h"
#include "BKE_main.h"
#include "BKE_report.h"
More information about the Bf-blender-cvs
mailing list