Merge branch 'master' into blender2.8
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 28 Aug 2017 09:27:50 +0000 (11:27 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 28 Aug 2017 09:27:50 +0000 (11:27 +0200)
23 files changed:
intern/atomic/intern/atomic_ops_utils.h
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/icons.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/object_deform.c
source/blender/blenkernel/intern/packedFile.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/texture.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/render/render_shading.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_time/space_time.c
source/blender/makesdna/DNA_ID.h
source/blender/makesrna/intern/rna_image.c
source/blender/makesrna/intern/rna_key.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_texture.c
source/blender/windowmanager/intern/wm_operators.c

index fa8f39b4e81b2db7d080d9b740091b9995be1907..c190b655e0ae4128dd4655559b6c87465bea9b7e 100644 (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>
 
index f71238031a25329ee3d61f2791cf3d04d598c5ed..5b7947df9dd3317ef1e58e6a2f7d1f8995d88311 100644 (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 */
index db50a04348bc96b1cc39d5689828e5ca34b3e36e..a407fd0bae8c874bf5a3cbe1ba82c25e6dd605dd 100644 (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;
index 364817438c5ffd819b9e664d63acf99b88870aff..fd42556067e7c0486514c8a73c295c78514b6ce5 100644 (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;
index be3cc288818f31de9ce4c7c842dbaedfed68c70b..3a74252047188b004a3bcc12e2d310babaa48b96 100644 (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;
        }
 }
 
index 81fa25b1b03f023d360d230db5ab601232d5fedc..754434eaef633a35ceada5b7325f3fda3caca935 100644 (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;
                }
        }
 
index 64f90ef5c520be61568451bd1b0bedd9abdd60fc..89f25136caf0efc699fc5ccefd7b61c42cd7ca69 100644 (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;
        }
 }
index 18c721c8e3f8456c587c305c2101db66d991c31c..5f58af7e53851939f681e7ec6690ceb0713dcc93 100644 (file)
@@ -379,6 +379,8 @@ static void seqclipboard_ptr_restore(Main *bmain, ID **id_pt)
                                        }
                                        break;
                                }
+                               default:
+                                       break;
                        }
                }
 
index 89a3842a23098fc024183dd8e4d330490ac219ba..8f0334a475278e329fbe396f8b749360f0264676 100644 (file)
@@ -1129,6 +1129,8 @@ void set_active_mtex(ID *id, short act)
                case ID_PA:
                        ((ParticleSettings *)id)->texact = act;
                        break;
+               default:
+                       break;
        }
 }
 
index 573ecce322484816bc5d7cb64e6591118568922f..857cd9fb4b5a2c3ac29b5ee8a8d30b23bf334e08 100644 (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;
                                        }
                                        
index 9d296c0316061186fec819b4106f736aaa0d3eb6..90830223077d259e3c0b6d147c3efe3848863b16 100644 (file)
@@ -2251,6 +2251,8 @@ static void animfilter_modifier_idpoin_cb(void *afm_ptr, Object *ob, ID **idpoin
                }
                
                /* TODO: images? */
+               default:
+                       break;
        }
 }
 
index fd73a27c9f6fcf55ab4736eb63e5689af32f34db..ce1379f760de1442d25fc613d9767de42d4a7d1e 100644 (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!) */
index 84a8d36db3cc15615a249684a0e4a30fe5b0b71d..58d93e46bded9cc03bcf8afc0267993e2a9588df 100644 (file)
@@ -240,6 +240,9 @@ bool ED_vgroup_parray_alloc(ID *id, MDeformVert ***dvert_arr, int *dvert_tot, co
                                }
                                return false;
                        }
+
+                       default:
+                               break;
                }
        }
 
index 016013ab4927bdc0bf5f0fa0fca411234ee4f711..58dd67f4923b830092ceccdfd391752279c32d9e 100644 (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) {
index e3baf44bf9cd8239d306a427f9f31a904ef53f48..de82011415963db4e113c42823e4e7a919c9a6b1 100644 (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;
                        }
                }
        }
index 0401505b4cdeacee0e938862bcfdc9ffaaceebcb..0d41b641c2bb54eb05e1b6e3d039e20338795856 100644 (file)
@@ -843,6 +843,8 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
                        }
                        break;
                }
+               default:
+                       break;
        }
 }
 
index 4672cc073fc2d6b1f91ef2cb1149daf76c5b3951..a9066086467ba1b9071bafe73fff9e243983f4eb 100644 (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 */
index 4b628c4bc701a40d4e19ac5a895602c2df54a142..4ea5b8761b95923f3e47ffad4a47873fd136eb1e 100644 (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)
index 686e830f1baa10f25e1d81062d9e0ccce03ffa01..b51a4258a2df6c3a5d26f86ac69763543e88eb3c 100644 (file)
@@ -193,6 +193,8 @@ static char *rna_ImageUser_path(PointerRNA *ptr)
                        {
                                return rna_Node_ImageUser_path(ptr);
                        }
+                       default:
+                               break;
                }
        }
        
index 5cf7e7238e0dde362e71a2e35eff6ed3354bab7b..f28c02bf20d5e3c893952fe358f62395fba38090 100644 (file)
@@ -179,6 +179,8 @@ static Mesh *rna_KeyBlock_normals_get_mesh(PointerRNA *ptr, ID *id)
                                        return ob->data;
                                }
                        }
+                       default:
+                               break;
                }
        }
 
index cc12cd9568e3605d63019423b39776875cedef62..b967e4d0b7a9c184a33be23c8da7e70d14dbd3d5 100644 (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;
        }
 }
 
index 1c7b750fbe12995a9258da1fff767a8de5986546..9490dfd0478a43921638d3a28f0582aeba539d4a 100644 (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;
        }
 }
 
index dfd03813ac362e99c3ab45cb30eba62f0e554649..c1a24bd35b953f8ee7ceb86b18f906017587b259 100644 (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) {