Merge branch 'master' into blender2.8

This commit is contained in:
2017-08-28 11:27:50 +02:00
23 changed files with 62 additions and 4 deletions

View File

@@ -52,8 +52,8 @@
#ifndef __ATOMIC_OPS_UTILS_H__
#define __ATOMIC_OPS_UTILS_H__
/* needed for int types */
#include "../../../source/blender/blenlib/BLI_sys_types.h"
#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>
#include <limits.h>

View File

@@ -626,6 +626,8 @@ char *BKE_animdata_driver_path_hack(bContext *C, PointerRNA *ptr, PropertyRNA *p
}
break;
}
default:
break;
}
/* fix RNA pointer, as we've now changed the ID root by changing the paths */

View File

@@ -255,6 +255,8 @@ PreviewImage **BKE_previewimg_id_get_p(const ID *id)
ID_PRV_CASE(ID_SCE, Scene);
ID_PRV_CASE(ID_SCR, bScreen);
#undef ID_PRV_CASE
default:
break;
}
return NULL;

View File

@@ -146,6 +146,9 @@ Key *BKE_key_add(ID *id) /* common function */
key->elemsize = 16;
break;
default:
break;
}
return key;
@@ -1406,6 +1409,8 @@ Key **BKE_key_from_id_p(ID *id)
Lattice *lt = (Lattice *)id;
return &lt->key;
}
default:
break;
}
return NULL;

View File

@@ -368,6 +368,8 @@ Material ***give_matarar_id(ID *id)
return &(((Curve *)id)->mat);
case ID_MB:
return &(((MetaBall *)id)->mat);
default:
break;
}
return NULL;
}
@@ -384,6 +386,8 @@ short *give_totcolp_id(ID *id)
return &(((Curve *)id)->totcol);
case ID_MB:
return &(((MetaBall *)id)->totcol);
default:
break;
}
return NULL;
}
@@ -403,6 +407,8 @@ static void material_data_index_remove_id(ID *id, short index)
case ID_MB:
/* meta-elems don't have materials atm */
break;
default:
break;
}
}
@@ -421,6 +427,8 @@ static void material_data_index_clear_id(ID *id)
case ID_MB:
/* meta-elems don't have materials atm */
break;
default:
break;
}
}

View File

@@ -484,6 +484,8 @@ bool BKE_object_defgroup_array_get(ID *id, MDeformVert **dvert_arr, int *dvert_t
*dvert_tot = lt->pntsu * lt->pntsv * lt->pntsw;
return true;
}
default:
break;
}
}

View File

@@ -522,6 +522,8 @@ static void unpack_generate_paths(
case ID_IM:
BLI_snprintf(r_relpath, relpathlen, "//textures/%s", tempname);
break;
default:
break;
}
{
@@ -712,6 +714,8 @@ bool BKE_pack_check(ID *id)
Library *li = (Library *)id;
return li->packedfile != NULL;
}
default:
break;
}
return false;
}
@@ -750,5 +754,7 @@ void BKE_unpack_id(Main *bmain, ID *id, ReportList *reports, int how)
BKE_reportf(reports, RPT_ERROR, "Cannot unpack individual Library file, '%s'", li->name);
break;
}
default:
break;
}
}

View File

@@ -379,6 +379,8 @@ static void seqclipboard_ptr_restore(Main *bmain, ID **id_pt)
}
break;
}
default:
break;
}
}

View File

@@ -1129,6 +1129,8 @@ void set_active_mtex(ID *id, short act)
case ID_PA:
((ParticleSettings *)id)->texact = act;
break;
default:
break;
}
}

View File

@@ -10125,6 +10125,7 @@ void BLO_expand_main(void *fdhandle, Main *mainvar)
break;
case ID_WS:
expand_workspace(fd, mainvar, (WorkSpace *)id);
default:
break;
}

View File

@@ -2251,6 +2251,8 @@ static void animfilter_modifier_idpoin_cb(void *afm_ptr, Object *ob, ID **idpoin
}
/* TODO: images? */
default:
break;
}
}

View File

@@ -1053,6 +1053,8 @@ int ANIM_apply_keyingset(bContext *C, ListBase *dsources, bAction *act, KeyingSe
DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
break;
}
default:
break;
}
/* send notifiers for updates (this doesn't require context to work!) */

View File

@@ -240,6 +240,9 @@ bool ED_vgroup_parray_alloc(ID *id, MDeformVert ***dvert_arr, int *dvert_tot, co
}
return false;
}
default:
break;
}
}

View File

@@ -1785,6 +1785,8 @@ static void copy_mtex_copybuf(ID *id)
case ID_LS:
mtex = &(((FreestyleLineStyle *)id)->mtex[(int)((FreestyleLineStyle *)id)->texact]);
break;
default:
break;
}
if (mtex && *mtex) {

View File

@@ -1120,7 +1120,10 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
}
}
else {
switch (GS(tselem->id->name)) {
/* TODO(sergey): Casting to short here just to handle ID_NLA which is
* NOT inside of IDType enum.
*/
switch ((short)GS(tselem->id->name)) {
case ID_SCE:
tselem_draw_icon_uibut(&arg, ICON_SCENE_DATA); break;
case ID_ME:
@@ -1190,6 +1193,8 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
tselem_draw_icon_uibut(&arg, ICON_LINE_DATA); break;
case ID_GD:
tselem_draw_icon_uibut(&arg, ICON_GREASEPENCIL); break;
default:
break;
}
}
}

View File

@@ -843,6 +843,8 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
}
break;
}
default:
break;
}
}

View File

@@ -301,6 +301,8 @@ static void time_draw_idblock_keyframes(View2D *v2d, ID *id, short onlysel, cons
case ID_CF:
cachefile_to_keylist(&ads, (CacheFile *)id, &keys, NULL);
break;
default:
break;
}
/* build linked-list for searching */

View File

@@ -301,7 +301,7 @@ typedef enum ID_Type {
#ifdef GS
# undef GS
#endif
#define GS(a) (CHECK_TYPE_ANY(a, char *, const char *, char [66], const char[66]), (*((const short *)(a))))
#define GS(a) (CHECK_TYPE_ANY(a, char *, const char *, char [66], const char[66]), (ID_Type)(*((const short *)(a))))
#define ID_NEW_SET(_id, _idn) \
(((ID *)(_id))->newid = (ID *)(_idn), ((ID *)(_id))->newid->tag |= LIB_TAG_NEW, (void *)((ID *)(_id))->newid)

View File

@@ -193,6 +193,8 @@ static char *rna_ImageUser_path(PointerRNA *ptr)
{
return rna_Node_ImageUser_path(ptr);
}
default:
break;
}
}

View File

@@ -179,6 +179,8 @@ static Mesh *rna_KeyBlock_normals_get_mesh(PointerRNA *ptr, ID *id)
return ob->data;
}
}
default:
break;
}
}

View File

@@ -1084,6 +1084,8 @@ static void rna_SpaceProperties_pin_id_update(Main *UNUSED(bmain), Scene *UNUSED
case ID_LA:
WM_main_add_notifier(NC_LAMP, NULL);
break;
default:
break;
}
}

View File

@@ -270,6 +270,8 @@ void rna_TextureSlot_update(bContext *C, PointerRNA *ptr)
WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL);
break;
}
default:
break;
}
}

View File

@@ -910,6 +910,8 @@ static char *wm_prop_pystring_from_context(bContext *C, PointerRNA *ptr, Propert
CTX_TEST_SPACE_TYPE(SPACE_FILE, "space_data.params", CTX_wm_space_file(C)->params);
break;
}
default:
break;
}
if (member_id) {