Rename ID_IS_LINKED_DATABLOCK to ID_IS_LINKED.
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 6 Nov 2017 16:17:10 +0000 (17:17 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Mon, 6 Nov 2017 16:17:10 +0000 (17:17 +0100)
This makes code closer to id_override/assent-engine ones, which
introduce a new type of linked data, and hence reserve
ID_IS_LINKED_DATABLOCK to real linked datablocks.

57 files changed:
source/blender/blenkernel/intern/armature_update.c
source/blender/blenkernel/intern/bpath.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/library_query.c
source/blender/blenkernel/intern/library_remap.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/object_update.c
source/blender/blenkernel/intern/packedFile.c
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/keyframes_draw.c
source/blender/editors/armature/pose_edit.c
source/blender/editors/armature/pose_lib.c
source/blender/editors/interface/interface_eyedropper.c
source/blender/editors/interface/interface_ops.c
source/blender/editors/interface/interface_region_tooltip.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/mesh_data.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_data_transfer.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_shapekey.c
source/blender/editors/object/object_transform.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/particle_object.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/space_logic/logic_ops.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_outliner/outliner_tools.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_fly.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/space_view3d/view3d_walk.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/util/ed_util.c
source/blender/makesdna/DNA_ID.h
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_object.c
source/blender/render/intern/source/pipeline.c
source/blender/windowmanager/intern/wm_operators.c

index 45d1d36aeca495f8e15142b4f0404aea9e58dbbc..aac9cfdf79235b2ed621bad06b27b25b092110eb 100644 (file)
@@ -705,7 +705,7 @@ void BKE_pose_eval_flush(EvaluationContext *UNUSED(eval_ctx),
 
 void BKE_pose_eval_proxy_copy(EvaluationContext *UNUSED(eval_ctx), Object *ob)
 {
-       BLI_assert(ID_IS_LINKED_DATABLOCK(ob) && ob->proxy_from != NULL);
+       BLI_assert(ID_IS_LINKED(ob) && ob->proxy_from != NULL);
        DEBUG_PRINT("%s on %s\n", __func__, ob->id.name);
        if (BKE_pose_copy_result(ob->pose, ob->proxy_from->pose) == false) {
                printf("Proxy copy error, lib Object: %s proxy Object: %s\n",
index f210c6aa7f3757e935eb732b8d9909106c4e60b1..158c6c31432babaf27bef25640cd80fb9ed56754 100644 (file)
@@ -425,7 +425,7 @@ void BKE_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
 {
        const char *absbase = (flag & BKE_BPATH_TRAVERSE_ABS) ? ID_BLEND_PATH(bmain, id) : NULL;
 
-       if ((flag & BKE_BPATH_TRAVERSE_SKIP_LIBRARY) && ID_IS_LINKED_DATABLOCK(id)) {
+       if ((flag & BKE_BPATH_TRAVERSE_SKIP_LIBRARY) && ID_IS_LINKED(id)) {
                return;
        }
 
index c36c6c56d5eb98fdd3bc370a834aada28a2ad472..230db6dccffba9acfc5e242ca7cd78e775fa7e80 100644 (file)
@@ -229,7 +229,7 @@ void BKE_brush_make_local(Main *bmain, Brush *brush, const bool lib_local)
         * - mixed: make copy
         */
 
-       if (!ID_IS_LINKED_DATABLOCK(brush)) {
+       if (!ID_IS_LINKED(brush)) {
                return;
        }
 
index 7ad2ed91e878f62e7003acd10946e3196e918f90..a5d0df8819847f939b7fc487887e465b9decfd3b 100644 (file)
@@ -4724,7 +4724,7 @@ void BKE_constraints_id_loop(ListBase *conlist, ConstraintIDFunc func, void *use
 /* helper for BKE_constraints_copy(), to be used for making sure that ID's are valid */
 static void con_extern_cb(bConstraint *UNUSED(con), ID **idpoin, bool UNUSED(is_reference), void *UNUSED(userData))
 {
-       if (*idpoin && ID_IS_LINKED_DATABLOCK(*idpoin))
+       if (*idpoin && ID_IS_LINKED(*idpoin))
                id_lib_extern(*idpoin);
 }
 
index 6bf2b10b3ee404fc68560e979707f073710b8ff0..7e259b38842edeacb78de133ad9ed3ac9ac0790c 100644 (file)
@@ -162,7 +162,7 @@ void BKE_id_lib_local_paths(Main *bmain, Library *lib, ID *id)
 
 void id_lib_extern(ID *id)
 {
-       if (id && ID_IS_LINKED_DATABLOCK(id)) {
+       if (id && ID_IS_LINKED(id)) {
                BLI_assert(BKE_idcode_is_linkable(GS(id->name)));
                if (id->tag & LIB_TAG_INDIRECT) {
                        id->tag -= LIB_TAG_INDIRECT;
@@ -309,7 +309,7 @@ void BKE_id_expand_local(Main *bmain, ID *id)
  */
 void BKE_id_copy_ensure_local(Main *bmain, const ID *old_id, ID *new_id)
 {
-       if (ID_IS_LINKED_DATABLOCK(old_id)) {
+       if (ID_IS_LINKED(old_id)) {
                BKE_id_expand_local(bmain, new_id);
                BKE_id_lib_local_paths(bmain, old_id->lib, new_id);
        }
@@ -328,7 +328,7 @@ void BKE_id_make_local_generic(Main *bmain, ID *id, const bool id_in_mainlist, c
         * In case we make a whole lib's content local, we always want to localize, and we skip remapping (done later).
         */
 
-       if (!ID_IS_LINKED_DATABLOCK(id)) {
+       if (!ID_IS_LINKED(id)) {
                return;
        }
 
@@ -955,7 +955,7 @@ void BKE_main_lib_objects_recalc_all(Main *bmain)
 
        /* flag for full recalc */
        for (ob = bmain->object.first; ob; ob = ob->id.next) {
-               if (ID_IS_LINKED_DATABLOCK(ob)) {
+               if (ID_IS_LINKED(ob)) {
                        DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
                }
        }
@@ -1632,7 +1632,7 @@ static ID *is_dupid(ListBase *lb, ID *id, const char *name)
        
        for (idtest = lb->first; idtest; idtest = idtest->next) {
                /* if idtest is not a lib */ 
-               if (id != idtest && !ID_IS_LINKED_DATABLOCK(idtest)) {
+               if (id != idtest && !ID_IS_LINKED(idtest)) {
                        /* do not test alphabetic! */
                        /* optimized */
                        if (idtest->name[2] == name[0]) {
@@ -1697,7 +1697,7 @@ static bool check_for_dupid(ListBase *lb, ID *id, char *name)
                for (idtest = lb->first; idtest; idtest = idtest->next) {
                        int nrtest;
                        if ( (id != idtest) &&
-                            !ID_IS_LINKED_DATABLOCK(idtest) &&
+                            !ID_IS_LINKED(idtest) &&
                             (*name == *(idtest->name + 2)) &&
                             STREQLEN(name, idtest->name + 2, left_len) &&
                             (BLI_split_name_num(leftest, &nrtest, idtest->name + 2, '.') == left_len)
@@ -1779,7 +1779,7 @@ bool new_id(ListBase *lb, ID *id, const char *tname)
        char name[MAX_ID_NAME - 2];
 
        /* if library, don't rename */
-       if (ID_IS_LINKED_DATABLOCK(id))
+       if (ID_IS_LINKED(id))
                return false;
 
        /* if no name given, use name of current ID
index 23c049ea9178f5a0eb159bf6a072ecb629d86aeb..f6101498aca8bf74427a43ac8f993457585b350d 100644 (file)
@@ -370,7 +370,7 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, LibraryIDLinkCallback call
 
        for (; id != NULL; id = (flag & IDWALK_RECURSE) ? BLI_LINKSTACK_POP(data.ids_todo) : NULL) {
                data.self_id = id;
-               data.cb_flag = ID_IS_LINKED_DATABLOCK(id) ? IDWALK_CB_INDIRECT_USAGE : 0;
+               data.cb_flag = ID_IS_LINKED(id) ? IDWALK_CB_INDIRECT_USAGE : 0;
 
                if (bmain != NULL && bmain->relations != NULL && (flag & IDWALK_READONLY)) {
                        /* Note that this is minor optimization, even in worst cases (like id being an object with lots of
@@ -539,7 +539,7 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, LibraryIDLinkCallback call
                                 * Since this field is set/owned by 'user' of this ID (and not ID itself), it is only indirect usage
                                 * if proxy object is linked... Twisted. */
                                if (object->proxy_from) {
-                                       data.cb_flag = ID_IS_LINKED_DATABLOCK(object->proxy_from) ? IDWALK_CB_INDIRECT_USAGE : 0;
+                                       data.cb_flag = ID_IS_LINKED(object->proxy_from) ? IDWALK_CB_INDIRECT_USAGE : 0;
                                }
                                CALLBACK_INVOKE(object->proxy_from, IDWALK_CB_LOOPBACK);
                                data.cb_flag = data_cb_flag;
index f8c193fe1085f0bd33825d4c69d31fa520978f80..62cc5108b4ed2ed0a57a986ec828d62ad96d456c 100644 (file)
@@ -732,7 +732,7 @@ static int id_relink_to_newid_looper(void *UNUSED(user_data), ID *UNUSED(self_id
  */
 void BKE_libblock_relink_to_newid(ID *id)
 {
-       if (ID_IS_LINKED_DATABLOCK(id))
+       if (ID_IS_LINKED(id))
                return;
 
        BKE_library_foreach_ID_link(NULL, id, id_relink_to_newid_looper, NULL, 0);
index 9fae5a3c3f245413c084d44efa858eeb065bc63b..147b169910edf31add74d78593d625152417b651 100644 (file)
@@ -718,8 +718,8 @@ void assign_material(Object *ob, Material *ma, short act, int assign_type)
        if (act < 1) act = 1;
        
        /* prevent crashing when using accidentally */
-       BLI_assert(!ID_IS_LINKED_DATABLOCK(ob));
-       if (ID_IS_LINKED_DATABLOCK(ob)) return;
+       BLI_assert(!ID_IS_LINKED(ob));
+       if (ID_IS_LINKED(ob)) return;
        
        /* test arraylens */
        
@@ -992,7 +992,7 @@ static void do_init_render_material(Material *ma, int r_mode, float *amb)
                Group *group;
 
                for (group = G.main->group.first; group; group = group->id.next) {
-                       if (!ID_IS_LINKED_DATABLOCK(group) && STREQ(group->id.name, ma->group->id.name)) {
+                       if (!ID_IS_LINKED(group) && STREQ(group->id.name, ma->group->id.name)) {
                                ma->group = group;
                        }
                }
@@ -2101,7 +2101,7 @@ int do_version_tface(Main *main)
        
        /* 1st part: marking mesh materials to update */
        for (me = main->mesh.first; me; me = me->id.next) {
-               if (ID_IS_LINKED_DATABLOCK(me)) continue;
+               if (ID_IS_LINKED(me)) continue;
 
                /* get the active tface layer */
                index = CustomData_get_active_layer_index(&me->fdata, CD_MTFACE);
@@ -2155,7 +2155,7 @@ int do_version_tface(Main *main)
                                 * at doversion time: direct_link might not have happened on it,
                                 * so ma->mtex is not pointing to valid memory yet.
                                 * later we could, but it's better not */
-                               else if (ID_IS_LINKED_DATABLOCK(ma))
+                               else if (ID_IS_LINKED(ma))
                                        continue;
                                
                                /* material already marked as disputed */
@@ -2220,7 +2220,7 @@ int do_version_tface(Main *main)
 
        /* we shouldn't loop through the materials created in the loop. make the loop stop at its original length) */
        for (ma = main->mat.first, a = 0; ma; ma = ma->id.next, a++) {
-               if (ID_IS_LINKED_DATABLOCK(ma)) continue;
+               if (ID_IS_LINKED(ma)) continue;
 
                /* disputed material */
                if (ma->game.flag == MAT_BGE_DISPUTED) {
index 118bafa94d27a5efe4e9444883b810fb2bc5bbc8..1e7c3104d1770cacb405fe0c53b26d37c67ce10e 100644 (file)
@@ -733,7 +733,7 @@ void test_object_modifiers(Object *ob)
  */
 const char *modifier_path_relbase(Object *ob)
 {
-       if (G.relbase_valid || ID_IS_LINKED_DATABLOCK(ob)) {
+       if (G.relbase_valid || ID_IS_LINKED(ob)) {
                return ID_BLEND_PATH(G.main, &ob->id);
        }
        else {
index 925c528e271e9ef0f5d523517792510db333aeab..f7c2ac8ecbf48d81d1f9f058049dff6d368f5e23 100644 (file)
@@ -2630,7 +2630,7 @@ void BKE_node_clipboard_add_node(bNode *node)
        node_info->id = node->id;
        if (node->id) {
                BLI_strncpy(node_info->id_name, node->id->name, sizeof(node_info->id_name));
-               if (ID_IS_LINKED_DATABLOCK(node->id)) {
+               if (ID_IS_LINKED(node->id)) {
                        BLI_strncpy(node_info->library_name, node->id->lib->filepath, sizeof(node_info->library_name));
                }
                else {
index 44058c989ff0b0ce5ee23d317a53484c1fd82abb..c64a183a511920b3f8a8312ccb7370380deb7457 100644 (file)
@@ -1205,7 +1205,7 @@ void BKE_object_make_local_ex(Main *bmain, Object *ob, const bool lib_local, con
         * In case we make a whole lib's content local, we always want to localize, and we skip remapping (done later).
         */
 
-       if (!ID_IS_LINKED_DATABLOCK(ob)) {
+       if (!ID_IS_LINKED(ob)) {
                return;
        }
 
@@ -1247,15 +1247,15 @@ void BKE_object_make_local(Main *bmain, Object *ob, const bool lib_local)
 /* Returns true if the Object is from an external blend file (libdata) */
 bool BKE_object_is_libdata(Object *ob)
 {
-       return (ob && ID_IS_LINKED_DATABLOCK(ob));
+       return (ob && ID_IS_LINKED(ob));
 }
 
 /* Returns true if the Object data is from an external blend file (libdata) */
 bool BKE_object_obdata_is_libdata(Object *ob)
 {
        /* Linked objects with local obdata are forbidden! */
-       BLI_assert(!ob || !ob->data || (ID_IS_LINKED_DATABLOCK(ob) ? ID_IS_LINKED_DATABLOCK(ob->data) : true));
-       return (ob && ob->data && ID_IS_LINKED_DATABLOCK(ob->data));
+       BLI_assert(!ob || !ob->data || (ID_IS_LINKED(ob) ? ID_IS_LINKED(ob->data) : true));
+       return (ob && ob->data && ID_IS_LINKED(ob->data));
 }
 
 /* *************** PROXY **************** */
@@ -1302,7 +1302,7 @@ void BKE_object_copy_proxy_drivers(Object *ob, Object *target)
                                                        /* only on local objects because this causes indirect links
                                                         * 'a -> b -> c', blend to point directly to a.blend
                                                         * when a.blend has a proxy thats linked into c.blend  */
-                                                       if (!ID_IS_LINKED_DATABLOCK(ob))
+                                                       if (!ID_IS_LINKED(ob))
                                                                id_lib_extern((ID *)dtar->id);
                                                }
                                        }
@@ -1320,7 +1320,7 @@ void BKE_object_copy_proxy_drivers(Object *ob, Object *target)
 void BKE_object_make_proxy(Object *ob, Object *target, Object *gob)
 {
        /* paranoia checks */
-       if (ID_IS_LINKED_DATABLOCK(ob) || !ID_IS_LINKED_DATABLOCK(target)) {
+       if (ID_IS_LINKED(ob) || !ID_IS_LINKED(target)) {
                printf("cannot make proxy\n");
                return;
        }
@@ -2628,7 +2628,7 @@ void BKE_object_handle_update_ex(EvaluationContext *eval_ctx,
                                printf("recalcob %s\n", ob->id.name + 2);
                        
                        /* handle proxy copy for target */
-                       if (ID_IS_LINKED_DATABLOCK(ob) && ob->proxy_from) {
+                       if (ID_IS_LINKED(ob) && ob->proxy_from) {
                                // printf("ob proxy copy, lib ob %s proxy %s\n", ob->id.name, ob->proxy_from->id.name);
                                if (ob->proxy_from->proxy_group) { /* transform proxy into group space */
                                        Object *obg = ob->proxy_from->proxy_group;
index e03af585cf2fe94ee5ac2afa4ebb1ca4b0600714..17721a8077f93fbebdd155b3e4cac65a33ebbdea 100644 (file)
@@ -192,7 +192,7 @@ void BKE_object_handle_data_update(EvaluationContext *eval_ctx,
                        break;
                }
                case OB_ARMATURE:
-                       if (ID_IS_LINKED_DATABLOCK(ob) && ob->proxy_from) {
+                       if (ID_IS_LINKED(ob) && ob->proxy_from) {
                                if (BKE_pose_copy_result(ob->pose, ob->proxy_from->pose) == false) {
                                        printf("Proxy copy error, lib Object: %s proxy Object: %s\n",
                                               ob->id.name + 2, ob->proxy_from->id.name + 2);
@@ -304,7 +304,7 @@ void BKE_object_eval_uber_transform(EvaluationContext *UNUSED(eval_ctx),
        // XXX: it's almost redundant now...
 
        /* Handle proxy copy for target, */
-       if (ID_IS_LINKED_DATABLOCK(ob) && ob->proxy_from) {
+       if (ID_IS_LINKED(ob) && ob->proxy_from) {
                if (ob->proxy_from->proxy_group) {
                        /* Transform proxy into group space. */
                        Object *obg = ob->proxy_from->proxy_group;
index 89f25136caf0efc699fc5ccefd7b61c42cd7ca69..35e2531675df73ad1e3e30bb07c01deab1f8a20e 100644 (file)
@@ -232,7 +232,7 @@ void packAll(Main *bmain, ReportList *reports, bool verbose)
        int tot = 0;
        
        for (ima = bmain->image.first; ima; ima = ima->id.next) {
-               if (BKE_image_has_packedfile(ima) == false && !ID_IS_LINKED_DATABLOCK(ima)) {
+               if (BKE_image_has_packedfile(ima) == false && !ID_IS_LINKED(ima)) {
                        if (ima->source == IMA_SRC_FILE) {
                                BKE_image_packfiles(reports, ima, ID_BLEND_PATH(bmain, &ima->id));
                                tot ++;
@@ -245,14 +245,14 @@ void packAll(Main *bmain, ReportList *reports, bool verbose)
        }
 
        for (vfont = bmain->vfont.first; vfont; vfont = vfont->id.next) {
-               if (vfont->packedfile == NULL && !ID_IS_LINKED_DATABLOCK(vfont) && BKE_vfont_is_builtin(vfont) == false) {
+               if (vfont->packedfile == NULL && !ID_IS_LINKED(vfont) && BKE_vfont_is_builtin(vfont) == false) {
                        vfont->packedfile = newPackedFile(reports, vfont->name, bmain->name);
                        tot ++;
                }
        }
 
        for (sound = bmain->sound.first; sound; sound = sound->id.next) {
-               if (sound->packedfile == NULL && !ID_IS_LINKED_DATABLOCK(sound)) {
+               if (sound->packedfile == NULL && !ID_IS_LINKED(sound)) {
                        sound->packedfile = newPackedFile(reports, sound->name, bmain->name);
                        tot++;
                }
index 5df85c19b6c6cbb86b5ddd41627317dc85fecbe2..10da33fc0dd082d634997ca362e6a4afd1caebf3 100644 (file)
@@ -380,7 +380,7 @@ void DepsgraphNodeBuilder::build_object(Scene *scene, Base *base, Object *ob)
                                break;
 
                        case OB_ARMATURE: /* Pose */
-                               if (ID_IS_LINKED_DATABLOCK(ob) && ob->proxy_from != NULL) {
+                               if (ID_IS_LINKED(ob) && ob->proxy_from != NULL) {
                                        build_proxy_rig(ob);
                                }
                                else {
index ebfd5d404dbab383bec481284d1314be38601f05..3854850e778768dfc775b88e3d506ace87bbd7a8 100644 (file)
@@ -518,7 +518,7 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
                        }
 
                        case OB_ARMATURE: /* Pose */
-                               if (ID_IS_LINKED_DATABLOCK(ob) && ob->proxy_from != NULL) {
+                               if (ID_IS_LINKED(ob) && ob->proxy_from != NULL) {
                                        build_proxy_rig(ob);
                                }
                                else {
index e18560b95aff10e238940239f72f92ad566856f2..2ac305dbc308f12b12428d729edca16a5dbe611e 100644 (file)
@@ -1321,7 +1321,7 @@ static size_t animfilter_action(bAnimContext *ac, ListBase *anim_data, bDopeShee
        /* don't include anything from this action if it is linked in from another file,
         * and we're getting stuff for editing...
         */
-       if ((filter_mode & ANIMFILTER_FOREDIT) && ID_IS_LINKED_DATABLOCK(act))
+       if ((filter_mode & ANIMFILTER_FOREDIT) && ID_IS_LINKED(act))
                return 0;
                
        /* do groups */
index 5f675e690b940c624ea5f41e4ac36ce9bc1ff7ec..f25dbf2381c13f58a5b210316fc6050c700d9f10 100644 (file)
@@ -751,7 +751,7 @@ void draw_fcurve_channel(View2D *v2d, AnimData *adt, FCurve *fcu, float ypos, fl
        
        bool locked = (fcu->flag & FCURVE_PROTECTED) ||
                      ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) ||
-                     ((adt && adt->action) && ID_IS_LINKED_DATABLOCK(adt->action));
+                     ((adt && adt->action) && ID_IS_LINKED(adt->action));
        
        BLI_dlrbTree_init(&keys);
        BLI_dlrbTree_init(&blocks);
@@ -772,7 +772,7 @@ void draw_agroup_channel(View2D *v2d, AnimData *adt, bActionGroup *agrp, float y
        DLRBT_Tree keys, blocks;
        
        bool locked = (agrp->flag & AGRP_PROTECTED) ||
-                     ((adt && adt->action) && ID_IS_LINKED_DATABLOCK(adt->action));
+                     ((adt && adt->action) && ID_IS_LINKED(adt->action));
        
        BLI_dlrbTree_init(&keys);
        BLI_dlrbTree_init(&blocks);
@@ -792,7 +792,7 @@ void draw_action_channel(View2D *v2d, AnimData *adt, bAction *act, float ypos, f
 {
        DLRBT_Tree keys, blocks;
        
-       bool locked = (act && ID_IS_LINKED_DATABLOCK(act));
+       bool locked = (act && ID_IS_LINKED(act));
        
        BLI_dlrbTree_init(&keys);
        BLI_dlrbTree_init(&blocks);
index e14069dfb12491fb6ebbcec9349776a169bb1454..c49a370c2861b3cb3e029236aeb734495fed6b4b 100644 (file)
@@ -86,7 +86,7 @@ void ED_armature_enter_posemode(bContext *C, Base *base)
        ReportList *reports = CTX_wm_reports(C);
        Object *ob = base->object;
        
-       if (ID_IS_LINKED_DATABLOCK(ob)) {
+       if (ID_IS_LINKED(ob)) {
                BKE_report(reports, RPT_WARNING, "Cannot pose libdata");
                return;
        }
index 9cd5a0aed300f92ba7c8ab41b9312c0c8c0b0760..ac38500c84170b6eba8f71bbf58c536fab8c8b45 100644 (file)
@@ -184,7 +184,7 @@ static int has_poselib_pose_data_poll(bContext *C)
 static int has_poselib_pose_data_for_editing_poll(bContext *C)
 {
        Object *ob = get_poselib_object(C);
-       return (ob && ob->poselib && !ID_IS_LINKED_DATABLOCK(ob->poselib));
+       return (ob && ob->poselib && !ID_IS_LINKED(ob->poselib));
 }
 
 /* ----------------------------------- */
@@ -386,7 +386,7 @@ static int poselib_add_poll(bContext *C)
        if (ED_operator_posemode(C)) {
                Object *ob = get_poselib_object(C);
                if (ob) {
-                       if ((ob->poselib == NULL) || !ID_IS_LINKED_DATABLOCK(ob->poselib)) {
+                       if ((ob->poselib == NULL) || !ID_IS_LINKED(ob->poselib)) {
                                return true;
                        }
                }
index 3d7c25e4f22bd77441096c5501fefb9c5f097f6e..564b29d33437d5d5b3bf598c497fa129a78ace31 100644 (file)
@@ -840,7 +840,7 @@ static int depthdropper_init(bContext *C, wmOperator *op)
                RegionView3D *rv3d = CTX_wm_region_view3d(C);
                if (rv3d && rv3d->persp == RV3D_CAMOB) {
                        View3D *v3d = CTX_wm_view3d(C);
-                       if (v3d->camera && v3d->camera->data && !ID_IS_LINKED_DATABLOCK(v3d->camera->data)) {
+                       if (v3d->camera && v3d->camera->data && !ID_IS_LINKED(v3d->camera->data)) {
                                RNA_id_pointer_create(v3d->camera->data, &ddr->ptr);
                                ddr->prop = RNA_struct_find_property(&ddr->ptr, "dof_distance");
                        }
@@ -1090,7 +1090,7 @@ static int depthdropper_poll(bContext *C)
                RegionView3D *rv3d = CTX_wm_region_view3d(C);
                if (rv3d && rv3d->persp == RV3D_CAMOB) {
                        View3D *v3d = CTX_wm_view3d(C);
-                       if (v3d->camera && v3d->camera->data && !ID_IS_LINKED_DATABLOCK(v3d->camera->data)) {
+                       if (v3d->camera && v3d->camera->data && !ID_IS_LINKED(v3d->camera->data)) {
                                return 1;
                        }
                }
index d0c110d1db5f435ed91a5c220639d1932c374afe..47b7e9aa085b0d268685b96d9684d84f25f9b06c 100644 (file)
@@ -439,7 +439,7 @@ bool UI_context_copy_to_selected_list(
 
                                        if ((id_data == NULL) ||
                                            (id_data->tag & LIB_TAG_DOIT) == 0 ||
-                                           ID_IS_LINKED_DATABLOCK(id_data) ||
+                                           ID_IS_LINKED(id_data) ||
                                            (GS(id_data->name) != id_code))
                                        {
                                                BLI_remlink(&lb, link);
index ace1afb79aa59706d557e042651af9718d726df4..7d10087dcd973054fd1f4758f14609749b90fc57 100644 (file)
@@ -432,7 +432,7 @@ static uiTooltipData *ui_tooltip_data_from_button(bContext *C, uiBut *but)
 
                if (but->rnapoin.id.data) {
                        const ID *id = but->rnapoin.id.data;
-                       if (ID_IS_LINKED_DATABLOCK(id)) {
+                       if (ID_IS_LINKED(id)) {
                                uiTooltipField *field = text_field_add(
                                        data, &(uiTooltipFormat){
                                            .style = UI_TIP_STYLE_NORMAL,
index d90baa66dc88b448171e0f1d264cc227a93bbd92..e1e18b1f102a1bd867990bd15ca9a03617bdf1dc 100644 (file)
@@ -986,7 +986,7 @@ static uiLayout *draw_modifier(
                        }
                        
                        UI_block_lock_clear(block);
-                       UI_block_lock_set(block, ob && ID_IS_LINKED_DATABLOCK(ob), ERROR_LIBDATA_MESSAGE);
+                       UI_block_lock_set(block, ob && ID_IS_LINKED(ob), ERROR_LIBDATA_MESSAGE);
                        
                        if (!ELEM(md->type, eModifierType_Fluidsim, eModifierType_Softbody, eModifierType_ParticleSystem,
                                   eModifierType_Cloth, eModifierType_Smoke))
@@ -1033,7 +1033,7 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr)
                return NULL;
        }
        
-       UI_block_lock_set(uiLayoutGetBlock(layout), (ob && ID_IS_LINKED_DATABLOCK(ob)), ERROR_LIBDATA_MESSAGE);
+       UI_block_lock_set(uiLayoutGetBlock(layout), (ob && ID_IS_LINKED(ob)), ERROR_LIBDATA_MESSAGE);
        
        /* find modifier and draw it */
        cageIndex = modifiers_getCageIndex(scene, ob, &lastCageIndex, 0);
@@ -1261,7 +1261,7 @@ uiLayout *uiTemplateConstraint(uiLayout *layout, PointerRNA *ptr)
                return NULL;
        }
        
-       UI_block_lock_set(uiLayoutGetBlock(layout), (ob && ID_IS_LINKED_DATABLOCK(ob)), ERROR_LIBDATA_MESSAGE);
+       UI_block_lock_set(uiLayoutGetBlock(layout), (ob && ID_IS_LINKED(ob)), ERROR_LIBDATA_MESSAGE);
 
        /* hrms, the temporal constraint should not draw! */
        if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
@@ -1623,7 +1623,7 @@ void uiTemplateColorRamp(uiLayout *layout, PointerRNA *ptr, const char *propname
        block = uiLayoutAbsoluteBlock(layout);
 
        id = cptr.id.data;
-       UI_block_lock_set(block, (id && ID_IS_LINKED_DATABLOCK(id)), ERROR_LIBDATA_MESSAGE);
+       UI_block_lock_set(block, (id && ID_IS_LINKED(id)), ERROR_LIBDATA_MESSAGE);
 
        colorband_buttons_layout(layout, block, cptr.data, &rect, cb, expand);
 
@@ -2283,7 +2283,7 @@ void uiTemplateCurveMapping(
        cb->prop = prop;
 
        id = cptr.id.data;
-       UI_block_lock_set(block, (id && ID_IS_LINKED_DATABLOCK(id)), ERROR_LIBDATA_MESSAGE);
+       UI_block_lock_set(block, (id && ID_IS_LINKED(id)), ERROR_LIBDATA_MESSAGE);
 
        curvemap_buttons_layout(layout, &cptr, type, levels, brush, neg_slope, cb);
 
index 5e92399f1050e22693de3c53bc0337421d8f5660..bf25f7ee7d1fe80d8b59e8a9a481b24e43cdbac0 100644 (file)
@@ -3329,7 +3329,7 @@ static int edbm_separate_exec(bContext *C, wmOperator *op)
                        Object *ob = base_iter->object;
                        if (ob->type == OB_MESH) {
                                Mesh *me = ob->data;
-                               if (!ID_IS_LINKED_DATABLOCK(me)) {
+                               if (!ID_IS_LINKED(me)) {
                                        BMesh *bm_old = NULL;
                                        int retval_iter = 0;
 
index 737c8ac665deb5e58148f8970e326385b7db30fc..bd7aaec075ba7fcdb5f0d329904bb5367e95d409 100644 (file)
@@ -525,7 +525,7 @@ static int layers_poll(bContext *C)
 {
        Object *ob = ED_object_context(C);
        ID *data = (ob) ? ob->data : NULL;
-       return (ob && !ID_IS_LINKED_DATABLOCK(ob) && ob->type == OB_MESH && data && !ID_IS_LINKED_DATABLOCK(data));
+       return (ob && !ID_IS_LINKED(ob) && ob->type == OB_MESH && data && !ID_IS_LINKED(data));
 }
 
 static int mesh_uv_texture_add_exec(bContext *C, wmOperator *UNUSED(op))
@@ -773,7 +773,7 @@ static int mesh_customdata_mask_clear_poll(bContext *C)
                        return false;
                }
 
-               if (!ID_IS_LINKED_DATABLOCK(me)) {
+               if (!ID_IS_LINKED(me)) {
                        CustomData *data = GET_CD_DATA(me, vdata);
                        if (CustomData_has_layer(data, CD_PAINT_MASK)) {
                                return true;
@@ -827,7 +827,7 @@ static int mesh_customdata_skin_state(bContext *C)
 
        if (ob && ob->type == OB_MESH) {
                Mesh *me = ob->data;
-               if (!ID_IS_LINKED_DATABLOCK(me)) {
+               if (!ID_IS_LINKED(me)) {
                        CustomData *data = GET_CD_DATA(me, vdata);
                        return CustomData_has_layer(data, CD_MVERT_SKIN);
                }
index 7b17db020e6f79a9a0ed5bda2ce1388824a3eedc..3f82298f5b3df5df49ac155acb24783906fff06b 100644 (file)
@@ -1193,7 +1193,7 @@ static int object_delete_exec(bContext *C, wmOperator *op)
                        Base *base_other;
 
                        for (scene_iter = bmain->scene.first; scene_iter; scene_iter = scene_iter->id.next) {
-                               if (scene_iter != scene && !ID_IS_LINKED_DATABLOCK(scene_iter)) {
+                               if (scene_iter != scene && !ID_IS_LINKED(scene_iter)) {
                                        base_other = BKE_scene_base_find(scene_iter, base->object);
                                        if (base_other) {
                                                if (is_indirectly_used && ID_REAL_USERS(base->object) <= 1 && ID_EXTRA_USERS(base->object) == 0) {
@@ -1587,8 +1587,8 @@ static int convert_poll(bContext *C)
        Object *obact = CTX_data_active_object(C);
        Scene *scene = CTX_data_scene(C);
 
-       return (!ID_IS_LINKED_DATABLOCK(scene) && obact && scene->obedit != obact &&
-               (obact->flag & SELECT) && !ID_IS_LINKED_DATABLOCK(obact));
+       return (!ID_IS_LINKED(scene) && obact && scene->obedit != obact &&
+               (obact->flag & SELECT) && !ID_IS_LINKED(obact));
 }
 
 /* Helper for convert_exec */
@@ -1673,7 +1673,7 @@ static int convert_exec(bContext *C, wmOperator *op)
                         * However, changing this is more design than bugfix, not to mention convoluted code below,
                         * so that will be for later.
                         * But at the very least, do not do that with linked IDs! */
-                       if ((ID_IS_LINKED_DATABLOCK(ob) || (ob->data && ID_IS_LINKED_DATABLOCK(ob->data))) && !keep_original) {
+                       if ((ID_IS_LINKED(ob) || (ob->data && ID_IS_LINKED(ob->data))) && !keep_original) {
                                keep_original = true;
                                BKE_reportf(op->reports, RPT_INFO,
                                            "Converting some linked object/object data, enforcing 'Keep Original' option to True");
@@ -2428,7 +2428,7 @@ static int join_poll(bContext *C)
 {
        Object *ob = CTX_data_active_object(C);
 
-       if (!ob || ID_IS_LINKED_DATABLOCK(ob)) return 0;
+       if (!ob || ID_IS_LINKED(ob)) return 0;
 
        if (ELEM(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_ARMATURE))
                return ED_operator_screenactive(C);
@@ -2481,7 +2481,7 @@ static int join_shapes_poll(bContext *C)
 {
        Object *ob = CTX_data_active_object(C);
 
-       if (!ob || ID_IS_LINKED_DATABLOCK(ob)) return 0;
+       if (!ob || ID_IS_LINKED(ob)) return 0;
 
        /* only meshes supported at the moment */
        if (ob->type == OB_MESH)
index 59b5906258c2d1bfc9d56231b079b97c57afd58b..94caaedec19814190cdd2221084cd5827acbae69 100644 (file)
@@ -591,7 +591,7 @@ static int edit_constraint_poll_generic(bContext *C, StructRNA *rna_type)
                return 0;
        }
 
-       if (ID_IS_LINKED_DATABLOCK(ob) || (ptr.id.data && ID_IS_LINKED_DATABLOCK(ptr.id.data))) {
+       if (ID_IS_LINKED(ob) || (ptr.id.data && ID_IS_LINKED(ptr.id.data))) {
                CTX_wm_operator_poll_msg_set(C, "Cannot edit library data");
                return 0;
        }
index 891001258483a6468b9a8ab5f3a515ee03cc1044..7845cfe102297975f1fc5789c6efa5b58af32d8a 100644 (file)
@@ -300,7 +300,7 @@ static void data_transfer_exec_preprocess_objects(
                }
 
                me = ob->data;
-               if (ID_IS_LINKED_DATABLOCK(me)) {
+               if (ID_IS_LINKED(me)) {
                        /* Do not transfer to linked data, not supported. */
                        BKE_reportf(op->reports, RPT_WARNING, "Skipping object '%s', linked data '%s' cannot be modified",
                                    ob->id.name + 2, me->id.name + 2);
@@ -330,7 +330,7 @@ static bool data_transfer_exec_is_object_valid(
                me->id.tag &= ~LIB_TAG_DOIT;
                return true;
        }
-       else if (!ID_IS_LINKED_DATABLOCK(me)) {
+       else if (!ID_IS_LINKED(me)) {
                /* Do not transfer apply operation more than once. */
                /* XXX This is not nice regarding vgroups, which are half-Object data... :/ */
                BKE_reportf(op->reports, RPT_WARNING,
@@ -387,7 +387,7 @@ static int data_transfer_exec(bContext *C, wmOperator *op)
                return OPERATOR_FINISHED;
        }
 
-       if (reverse_transfer && ID_IS_LINKED_DATABLOCK(ob_src->data)) {
+       if (reverse_transfer && ID_IS_LINKED(ob_src->data)) {
                /* Do not transfer to linked data, not supported. */
                return OPERATOR_CANCELLED;
        }
index 4fbe242fcaa3d19a672fad65a62e1a0b9ab53a9a..4e949c82a9ff0a452bea140cf5ac5fca9cb66694 100644 (file)
@@ -471,7 +471,7 @@ void ED_object_editmode_enter(bContext *C, int flag)
        View3D *v3d = NULL;
        bool ok = false;
 
-       if (ID_IS_LINKED_DATABLOCK(scene)) return;
+       if (ID_IS_LINKED(scene)) return;
 
        if (sa && sa->spacetype == SPACE_VIEW3D)
                v3d = sa->spacedata.first;
@@ -540,7 +540,7 @@ void ED_object_editmode_enter(bContext *C, int flag)
                 * BKE_object_obdata_is_libdata that prevent the bugfix #6614, so
                 * i add this little hack here.
                 */
-               if (ID_IS_LINKED_DATABLOCK(arm)) {
+               if (ID_IS_LINKED(arm)) {
                        error_libdata();
                        return;
                }
@@ -622,7 +622,7 @@ static int editmode_toggle_poll(bContext *C)
        Object *ob = CTX_data_active_object(C);
 
        /* covers proxies too */
-       if (ELEM(NULL, ob, ob->data) || ID_IS_LINKED_DATABLOCK(ob->data))
+       if (ELEM(NULL, ob, ob->data) || ID_IS_LINKED(ob->data))
                return 0;
 
        /* if hidden but in edit mode, we still display */
@@ -849,7 +849,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
        Nurb *nu;
        bool do_depgraph_update = false;
        
-       if (ID_IS_LINKED_DATABLOCK(scene)) return;
+       if (ID_IS_LINKED(scene)) return;
 
        if (!(ob = OBACT)) return;
        
@@ -1440,7 +1440,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
        {
                data = ob->data;
 
-               if (data && ID_IS_LINKED_DATABLOCK(data)) {
+               if (data && ID_IS_LINKED(data)) {
                        linked_data = true;
                        continue;
                }
@@ -1523,7 +1523,7 @@ static void UNUSED_FUNCTION(image_aspect) (Scene *scene, View3D *v3d)
        int a, b, done;
        
        if (scene->obedit) return;  // XXX get from context
-       if (ID_IS_LINKED_DATABLOCK(scene)) return;
+       if (ID_IS_LINKED(scene)) return;
        
        for (base = FIRSTBASE; base; base = base->next) {
                if (TESTBASELIB(v3d, base)) {
index 048884a500e3b4ae40ce1a34059b29ba5caaed4b..4e90a9bc7c41e777e821b6d974340a8c10923c30 100644 (file)
@@ -819,9 +819,9 @@ int edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag
        PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", rna_type);
        Object *ob = (ptr.id.data) ? ptr.id.data : ED_object_active_context(C);
        
-       if (!ob || ID_IS_LINKED_DATABLOCK(ob)) return 0;
+       if (!ob || ID_IS_LINKED(ob)) return 0;
        if (obtype_flag && ((1 << ob->type) & obtype_flag) == 0) return 0;
-       if (ptr.id.data && ID_IS_LINKED_DATABLOCK(ptr.id.data)) return 0;
+       if (ptr.id.data && ID_IS_LINKED(ptr.id.data)) return 0;
        
        return 1;
 }
index f191875dab2bdd5ca43e35afc1b5c6484ed7e078..f8c80f2a9333fcf2e7f2504151d180aedf383e65 100644 (file)
@@ -295,17 +295,17 @@ static int make_proxy_invoke(bContext *C, wmOperator *op, const wmEvent *event)
        Object *ob = ED_object_active_context(C);
 
        /* sanity checks */
-       if (!scene || ID_IS_LINKED_DATABLOCK(scene) || !ob)
+       if (!scene || ID_IS_LINKED(scene) || !ob)
                return OPERATOR_CANCELLED;
 
        /* Get object to work on - use a menu if we need to... */
-       if (ob->dup_group && ID_IS_LINKED_DATABLOCK(ob->dup_group)) {
+       if (ob->dup_group && ID_IS_LINKED(ob->dup_group)) {
                /* gives menu with list of objects in group */
                /* proxy_group_objects_menu(C, op, ob, ob->dup_group); */
                WM_enum_search_invoke(C, op, event);
                return OPERATOR_CANCELLED;
        }
-       else if (ID_IS_LINKED_DATABLOCK(ob)) {
+       else if (ID_IS_LINKED(ob)) {
                uiPopupMenu *pup = UI_popup_menu_begin(C, IFACE_("OK?"), ICON_QUESTION);
                uiLayout *layout = UI_popup_menu_layout(pup);
 
@@ -1472,7 +1472,7 @@ static int make_links_scene_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        }
 
-       if (ID_IS_LINKED_DATABLOCK(scene_to)) {
+       if (ID_IS_LINKED(scene_to)) {
                BKE_report(op->reports, RPT_ERROR, "Cannot link objects into a linked scene");
                return OPERATOR_CANCELLED;
        }
@@ -1585,7 +1585,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
                                        case MAKE_LINKS_ANIMDATA:
                                                BKE_animdata_copy_id(bmain, (ID *)ob_dst, (ID *)ob_src, false);
                                                if (ob_dst->data && ob_src->data) {
-                                                       if (ID_IS_LINKED_DATABLOCK(obdata_id)) {
+                                                       if (ID_IS_LINKED(obdata_id)) {
                                                                is_lib = true;
                                                                break;
                                                        }
@@ -1627,7 +1627,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
                                                Curve *cu_src = ob_src->data;
                                                Curve *cu_dst = ob_dst->data;
 
-                                               if (ID_IS_LINKED_DATABLOCK(obdata_id)) {
+                                               if (ID_IS_LINKED(obdata_id)) {
                                                        is_lib = true;
                                                        break;
                                                }
@@ -1751,7 +1751,7 @@ static void single_object_users(Main *bmain, Scene *scene, View3D *v3d, const in
                ob = base->object;
 
                if ((base->flag & flag) == flag) {
-                       if (!ID_IS_LINKED_DATABLOCK(ob) && ob->id.us > 1) {
+                       if (!ID_IS_LINKED(ob) && ob->id.us > 1) {
                                /* base gets copy of object */
                                base->object = obn = ID_NEW_SET(ob, BKE_object_copy(bmain, ob));
 
@@ -1841,7 +1841,7 @@ static void new_id_matar(Main *bmain, Material **matar, const int totcol)
 
        for (a = 0; a < totcol; a++) {
                id = (ID *)matar[a];
-               if (id && !ID_IS_LINKED_DATABLOCK(id)) {
+               if (id && !ID_IS_LINKED(id)) {
                        if (id->newid) {
                                matar[a] = (Material *)id->newid;
                                id_us_plus(id->newid);
@@ -1869,10 +1869,10 @@ static void single_obdata_users(Main *bmain, Scene *scene, const int flag)
 
        for (base = FIRSTBASE; base; base = base->next) {
                ob = base->object;
-               if (!ID_IS_LINKED_DATABLOCK(ob) && (base->flag & flag) == flag) {
+               if (!ID_IS_LINKED(ob) && (base->flag & flag) == flag) {
                        id = ob->data;
 
-                       if (id && id->us > 1 && !ID_IS_LINKED_DATABLOCK(id)) {
+                       if (id && id->us > 1 && !ID_IS_LINKED(id)) {
                                DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
 
                                switch (ob->type) {
@@ -1950,7 +1950,7 @@ static void single_object_action_users(Scene *scene, const int flag)
 
        for (base = FIRSTBASE; base; base = base->next) {
                ob = base->object;
-               if (!ID_IS_LINKED_DATABLOCK(ob) && (flag == 0 || (base->flag & SELECT)) ) {
+               if (!ID_IS_LINKED(ob) && (flag == 0 || (base->flag & SELECT)) ) {
                        DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
                        BKE_animdata_copy_id_action(&ob->id, false);
                }
@@ -1967,7 +1967,7 @@ static void single_mat_users(Main *bmain, Scene *scene, const int flag, const bo
 
        for (base = FIRSTBASE; base; base = base->next) {
                ob = base->object;
-               if (!ID_IS_LINKED_DATABLOCK(ob) && (flag == 0 || (base->flag & SELECT)) ) {
+               if (!ID_IS_LINKED(ob) && (flag == 0 || (base->flag & SELECT)) ) {
                        for (a = 1; a <= ob->totcol; a++) {
                                ma = give_current_material(ob, a);
                                if (ma) {
@@ -2123,7 +2123,7 @@ void ED_object_single_users(Main *bmain, Scene *scene, const bool full, const bo
 
                for (Base *base = scene->base.first; base; base = base->next) {
                        Object *ob = base->object;
-                       if (!ID_IS_LINKED_DATABLOCK(ob)) {
+                       if (!ID_IS_LINKED(ob)) {
                                IDP_RelinkProperty(ob->id.properties);
                        }
                }
@@ -2221,7 +2221,7 @@ static bool make_local_all__instance_indirect_unused(Main *bmain, Scene *scene)
        bool changed = false;
 
        for (ob = bmain->object.first; ob; ob = ob->id.next) {
-               if (ID_IS_LINKED_DATABLOCK(ob) && (ob->id.us == 0)) {
+               if (ID_IS_LINKED(ob) && (ob->id.us == 0)) {
                        Base *base;
 
                        id_us_plus(&ob->id);
index 6cede87958ff5b28bfe901d2fd66f9a04270654c..27da607c6967e6107132afdaad85aa8576f29f26 100644 (file)
@@ -225,7 +225,7 @@ static int shape_key_mode_poll(bContext *C)
 {
        Object *ob = ED_object_context(C);
        ID *data = (ob) ? ob->data : NULL;
-       return (ob && !ID_IS_LINKED_DATABLOCK(ob) && data && !ID_IS_LINKED_DATABLOCK(data) && ob->mode != OB_MODE_EDIT);
+       return (ob && !ID_IS_LINKED(ob) && data && !ID_IS_LINKED(data) && ob->mode != OB_MODE_EDIT);
 }
 
 static int shape_key_mode_exists_poll(bContext *C)
@@ -234,7 +234,7 @@ static int shape_key_mode_exists_poll(bContext *C)
        ID *data = (ob) ? ob->data : NULL;
 
        /* same as shape_key_mode_poll */
-       return (ob && !ID_IS_LINKED_DATABLOCK(ob) && data && !ID_IS_LINKED_DATABLOCK(data) && ob->mode != OB_MODE_EDIT) &&
+       return (ob && !ID_IS_LINKED(ob) && data && !ID_IS_LINKED(data) && ob->mode != OB_MODE_EDIT) &&
               /* check a keyblock exists */
               (BKE_keyblock_from_object(ob) != NULL);
 }
@@ -246,7 +246,7 @@ static int shape_key_move_poll(bContext *C)
        ID *data = (ob) ? ob->data : NULL;
        Key *key = BKE_key_from_object(ob);
 
-       return (ob && !ID_IS_LINKED_DATABLOCK(ob) && data && !ID_IS_LINKED_DATABLOCK(data) &&
+       return (ob && !ID_IS_LINKED(ob) && data && !ID_IS_LINKED(data) &&
                ob->mode != OB_MODE_EDIT && key && key->totkey > 1);
 }
 
@@ -254,7 +254,7 @@ static int shape_key_poll(bContext *C)
 {
        Object *ob = ED_object_context(C);
        ID *data = (ob) ? ob->data : NULL;
-       return (ob && !ID_IS_LINKED_DATABLOCK(ob) && data && !ID_IS_LINKED_DATABLOCK(data));
+       return (ob && !ID_IS_LINKED(ob) && data && !ID_IS_LINKED(data));
 }
 
 static int shape_key_add_exec(bContext *C, wmOperator *op)
index f9e58462e5761f43ddc4297c9b64f0a1461217ac..9fea7bf5b8938f5c9a5da363d16b8c40db83c908 100644 (file)
@@ -436,7 +436,7 @@ static int apply_objects_internal(
                                changed = false;
                        }
 
-                       if (ID_IS_LINKED_DATABLOCK(obdata)) {
+                       if (ID_IS_LINKED(obdata)) {
                                BKE_reportf(reports, RPT_ERROR,
                                            "Cannot apply to library data: Object \"%s\", %s \"%s\", aborting",
                                            ob->id.name + 2, BKE_idcode_to_name(GS(obdata->name)), obdata->name + 2);
@@ -843,7 +843,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
                        if (ob->data == NULL) {
                                /* special support for dupligroups */
                                if ((ob->transflag & OB_DUPLIGROUP) && ob->dup_group && (ob->dup_group->id.tag & LIB_TAG_DOIT) == 0) {
-                                       if (ID_IS_LINKED_DATABLOCK(ob->dup_group)) {
+                                       if (ID_IS_LINKED(ob->dup_group)) {
                                                tot_lib_error++;
                                        }
                                        else {
@@ -868,7 +868,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
                                        }
                                }
                        }
-                       else if (ID_IS_LINKED_DATABLOCK(ob->data)) {
+                       else if (ID_IS_LINKED(ob->data)) {
                                tot_lib_error++;
                        }
 
index 6e7ae58da81da063aab2ecfb9877283845534af7..9afc3772f9068fc5063d8b96d401512fab7d5996 100644 (file)
@@ -2459,8 +2459,8 @@ static int vertex_group_poll(bContext *C)
        Object *ob = ED_object_context(C);
        ID *data = (ob) ? ob->data : NULL;
 
-       return (ob && !ID_IS_LINKED_DATABLOCK(ob) &&
-               data && !ID_IS_LINKED_DATABLOCK(data) &&
+       return (ob && !ID_IS_LINKED(ob) &&
+               data && !ID_IS_LINKED(data) &&
                OB_TYPE_SUPPORT_VGROUP(ob->type) &&
                ob->defbase.first);
 }
@@ -2469,8 +2469,8 @@ static int vertex_group_supported_poll(bContext *C)
 {
        Object *ob = ED_object_context(C);
        ID *data = (ob) ? ob->data : NULL;
-       return (ob && !ID_IS_LINKED_DATABLOCK(ob) && OB_TYPE_SUPPORT_VGROUP(ob->type) &&
-               data && !ID_IS_LINKED_DATABLOCK(data));
+       return (ob && !ID_IS_LINKED(ob) && OB_TYPE_SUPPORT_VGROUP(ob->type) &&
+               data && !ID_IS_LINKED(data));
 }
 
 static int vertex_group_mesh_poll(bContext *C)
@@ -2478,8 +2478,8 @@ static int vertex_group_mesh_poll(bContext *C)
        Object *ob = ED_object_context(C);
        ID *data = (ob) ? ob->data : NULL;
 
-       return (ob && !ID_IS_LINKED_DATABLOCK(ob) &&
-               data && !ID_IS_LINKED_DATABLOCK(data) &&
+       return (ob && !ID_IS_LINKED(ob) &&
+               data && !ID_IS_LINKED(data) &&
                ob->type == OB_MESH &&
                ob->defbase.first);
 }
@@ -2488,7 +2488,7 @@ static int UNUSED_FUNCTION(vertex_group_mesh_supported_poll)(bContext *C)
 {
        Object *ob = ED_object_context(C);
        ID *data = (ob) ? ob->data : NULL;
-       return (ob && !ID_IS_LINKED_DATABLOCK(ob) && ob->type == OB_MESH && data && !ID_IS_LINKED_DATABLOCK(data));
+       return (ob && !ID_IS_LINKED(ob) && ob->type == OB_MESH && data && !ID_IS_LINKED(data));
 }
 
 
@@ -2497,7 +2497,7 @@ static int UNUSED_FUNCTION(vertex_group_poll_edit) (bContext *C)
        Object *ob = ED_object_context(C);
        ID *data = (ob) ? ob->data : NULL;
 
-       if (!(ob && !ID_IS_LINKED_DATABLOCK(ob) && data && !ID_IS_LINKED_DATABLOCK(data)))
+       if (!(ob && !ID_IS_LINKED(ob) && data && !ID_IS_LINKED(data)))
                return 0;
 
        return BKE_object_is_in_editmode_vgroup(ob);
@@ -2509,7 +2509,7 @@ static int vertex_group_vert_poll_ex(bContext *C, const bool needs_select, const
        Object *ob = ED_object_context(C);
        ID *data = (ob) ? ob->data : NULL;
 
-       if (!(ob && !ID_IS_LINKED_DATABLOCK(ob) && data && !ID_IS_LINKED_DATABLOCK(data)))
+       if (!(ob && !ID_IS_LINKED(ob) && data && !ID_IS_LINKED(data)))
                return false;
 
        if (ob_type_flag && (((1 << ob->type) & ob_type_flag)) == 0) {
@@ -2570,7 +2570,7 @@ static int vertex_group_vert_select_unlocked_poll(bContext *C)
        Object *ob = ED_object_context(C);
        ID *data = (ob) ? ob->data : NULL;
 
-       if (!(ob && !ID_IS_LINKED_DATABLOCK(ob) && data && !ID_IS_LINKED_DATABLOCK(data)))
+       if (!(ob && !ID_IS_LINKED(ob) && data && !ID_IS_LINKED(data)))
                return 0;
 
        if (!(BKE_object_is_in_editmode_vgroup(ob) ||
@@ -2593,7 +2593,7 @@ static int vertex_group_vert_select_mesh_poll(bContext *C)
        Object *ob = ED_object_context(C);
        ID *data = (ob) ? ob->data : NULL;
 
-       if (!(ob && !ID_IS_LINKED_DATABLOCK(ob) && data && !ID_IS_LINKED_DATABLOCK(data)))
+       if (!(ob && !ID_IS_LINKED(ob) && data && !ID_IS_LINKED(data)))
                return 0;
 
        /* only difference to #vertex_group_vert_select_poll */
@@ -2785,7 +2785,7 @@ static int vertex_group_select_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Object *ob = ED_object_context(C);
 
-       if (!ob || ID_IS_LINKED_DATABLOCK(ob))
+       if (!ob || ID_IS_LINKED(ob))
                return OPERATOR_CANCELLED;
 
        vgroup_select_verts(ob, 1);
index c6afc61f80e2620af4e937bd6d3314cf67cc81b5..199d5e0fbfa4b011db40dfaf95c76e44e11134c1 100644 (file)
@@ -4694,7 +4694,7 @@ static int particle_edit_toggle_poll(bContext *C)
 
        if (ob == NULL || ob->type != OB_MESH)
                return 0;
-       if (!ob->data || ID_IS_LINKED_DATABLOCK(ob->data))
+       if (!ob->data || ID_IS_LINKED(ob->data))
                return 0;
        if (CTX_data_edit_object(C))
                return 0;
index b2de966084825183bc658facfc6806227b9f93a2..aaa9afdd8c61925504cdc05d1a9c118e835586f6 100644 (file)
@@ -977,7 +977,7 @@ static void remove_particle_systems_from_object(Object *ob_to)
        
        if (ob_to->type != OB_MESH)
                return;
-       if (!ob_to->data || ID_IS_LINKED_DATABLOCK(ob_to->data))
+       if (!ob_to->data || ID_IS_LINKED(ob_to->data))
                return;
        
        for (md = ob_to->modifiers.first; md; md = md_next) {
@@ -1013,7 +1013,7 @@ static bool copy_particle_systems_to_object(Main *bmain,
        
        if (ob_to->type != OB_MESH)
                return false;
-       if (!ob_to->data || ID_IS_LINKED_DATABLOCK(ob_to->data))
+       if (!ob_to->data || ID_IS_LINKED(ob_to->data))
                return false;
        
        /* For remapping we need a valid DM.
index 2e7e1d1eebf4efcafc716e93eda9008c502b31f9..908d218d35349e65781b36d3aff28af9a1960336 100644 (file)
@@ -168,7 +168,7 @@ int ED_operator_screen_mainwinactive(bContext *C)
 int ED_operator_scene_editable(bContext *C)
 {
        Scene *scene = CTX_data_scene(C);
-       if (scene && !ID_IS_LINKED_DATABLOCK(scene))
+       if (scene && !ID_IS_LINKED(scene))
                return 1;
        return 0;
 }
@@ -178,7 +178,7 @@ int ED_operator_objectmode(bContext *C)
        Scene *scene = CTX_data_scene(C);
        Object *obact = CTX_data_active_object(C);
 
-       if (scene == NULL || ID_IS_LINKED_DATABLOCK(scene))
+       if (scene == NULL || ID_IS_LINKED(scene))
                return 0;
        if (CTX_data_edit_object(C))
                return 0;
@@ -279,7 +279,7 @@ int ED_operator_node_editable(bContext *C)
 {
        SpaceNode *snode = CTX_wm_space_node(C);
        
-       if (snode && snode->edittree && !ID_IS_LINKED_DATABLOCK(snode->edittree))
+       if (snode && snode->edittree && !ID_IS_LINKED(snode->edittree))
                return 1;
        
        return 0;
@@ -341,20 +341,20 @@ int ED_operator_object_active(bContext *C)
 int ED_operator_object_active_editable(bContext *C)
 {
        Object *ob = ED_object_active_context(C);
-       return ((ob != NULL) && !ID_IS_LINKED_DATABLOCK(ob) && !ed_object_hidden(ob));
+       return ((ob != NULL) && !ID_IS_LINKED(ob) && !ed_object_hidden(ob));
 }
 
 int ED_operator_object_active_editable_mesh(bContext *C)
 {
        Object *ob = ED_object_active_context(C);
-       return ((ob != NULL) && !ID_IS_LINKED_DATABLOCK(ob) && !ed_object_hidden(ob) &&
-               (ob->type == OB_MESH) && !ID_IS_LINKED_DATABLOCK(ob->data));
+       return ((ob != NULL) && !ID_IS_LINKED(ob) && !ed_object_hidden(ob) &&
+               (ob->type == OB_MESH) && !ID_IS_LINKED(ob->data));
 }
 
 int ED_operator_object_active_editable_font(bContext *C)
 {
        Object *ob = ED_object_active_context(C);
-       return ((ob != NULL) && !ID_IS_LINKED_DATABLOCK(ob) && !ed_object_hidden(ob) &&
+       return ((ob != NULL) && !ID_IS_LINKED(ob) && !ed_object_hidden(ob) &&
                (ob->type == OB_FONT));
 }
 
@@ -447,8 +447,8 @@ int ED_operator_posemode_local(bContext *C)
        if (ED_operator_posemode(C)) {
                Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
                bArmature *arm = ob->data;
-               return !(ID_IS_LINKED_DATABLOCK(&ob->id) ||
-                        ID_IS_LINKED_DATABLOCK(&arm->id));
+               return !(ID_IS_LINKED(&ob->id) ||
+                        ID_IS_LINKED(&arm->id));
        }
        return false;
 }
index 5343aa72b01fa7d3125bc67fe8453ff364b2efc9..6b197bbb3921625cd4ff317c60e5d4e3ae003c01 100644 (file)
@@ -1342,7 +1342,7 @@ static int texture_paint_toggle_poll(bContext *C)
        Object *ob = CTX_data_active_object(C);
        if (ob == NULL || ob->type != OB_MESH)
                return 0;
-       if (!ob->data || ID_IS_LINKED_DATABLOCK(ob->data))
+       if (!ob->data || ID_IS_LINKED(ob->data))
                return 0;
        if (CTX_data_edit_object(C))
                return 0;
index f8509a3824cb2e180a6e477e7815be5d74361fac..d61777a6d12eea198dc7e24ba93be6242e18ded4 100644 (file)
@@ -1108,7 +1108,7 @@ static int paint_poll_test(bContext *C)
        Object *ob = CTX_data_active_object(C);
        if (ob == NULL || ob->type != OB_MESH)
                return 0;
-       if (!ob->data || ID_IS_LINKED_DATABLOCK(ob->data))
+       if (!ob->data || ID_IS_LINKED(ob->data))
                return 0;
        if (CTX_data_edit_object(C))
                return 0;
index 35a29f4bad89fec63a3ebc1ae00f3231f4ca1d9c..7b9a8634490ef9faf3699bd35b16d3e87183d2ca 100644 (file)
@@ -66,7 +66,7 @@ static int edit_sensor_poll(bContext *C)
 {
        PointerRNA ptr = CTX_data_pointer_get_type(C, "sensor", &RNA_Sensor);
 
-       if (ptr.data && ID_IS_LINKED_DATABLOCK(ptr.id.data)) return 0;
+       if (ptr.data && ID_IS_LINKED(ptr.id.data)) return 0;
        return 1;
 }
 
@@ -74,7 +74,7 @@ static int edit_controller_poll(bContext *C)
 {
        PointerRNA ptr = CTX_data_pointer_get_type(C, "controller", &RNA_Controller);
 
-       if (ptr.data && ID_IS_LINKED_DATABLOCK(ptr.id.data)) return 0;
+       if (ptr.data && ID_IS_LINKED(ptr.id.data)) return 0;
        return 1;
 }
 
@@ -82,7 +82,7 @@ static int edit_actuator_poll(bContext *C)
 {
        PointerRNA ptr = CTX_data_pointer_get_type(C, "actuator", &RNA_Actuator);
 
-       if (ptr.data && ID_IS_LINKED_DATABLOCK(ptr.id.data)) return 0;
+       if (ptr.data && ID_IS_LINKED(ptr.id.data)) return 0;
        return 1;
 }
 
index af6fdf2ab866ca4a62a8c2e060975d1e22e6c102..d8d6b09ac6bb088ed98237f807b6d644bf7ae5cb 100644 (file)
@@ -401,7 +401,7 @@ void restrictbutton_gr_restrict_flag(void *poin, void *poin2, int flag)
 
        if (group_restrict_flag(gr, flag)) {
                for (gob = gr->gobject.first; gob; gob = gob->next) {
-                       if (ID_IS_LINKED_DATABLOCK(gob->ob))
+                       if (ID_IS_LINKED(gob->ob))
                                continue;
 
                        gob->ob->restrictflag &= ~flag;
@@ -413,7 +413,7 @@ void restrictbutton_gr_restrict_flag(void *poin, void *poin2, int flag)
        }
        else {
                for (gob = gr->gobject.first; gob; gob = gob->next) {
-                       if (ID_IS_LINKED_DATABLOCK(gob->ob))
+                       if (ID_IS_LINKED(gob->ob))
                                continue;
 
                        /* not in editmode */
@@ -654,7 +654,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
                                int but_flag = UI_BUT_DRAG_LOCK;
                                gr = (Group *)tselem->id;
 
-                               if (ID_IS_LINKED_DATABLOCK(gr))
+                               if (ID_IS_LINKED(gr))
                                        but_flag |= UI_BUT_DISABLED;
                                
                                UI_block_emboss_set(block, UI_EMBOSS_NONE);
@@ -827,7 +827,7 @@ static void outliner_draw_userbuts(uiBlock *block, ARegion *ar, SpaceOops *soops
                                char buf[16] = "";
                                int but_flag = UI_BUT_DRAG_LOCK;
 
-                               if (ID_IS_LINKED_DATABLOCK(id))
+                               if (ID_IS_LINKED(id))
                                        but_flag |= UI_BUT_DISABLED;
 
                                UI_block_emboss_set(block, UI_EMBOSS_NONE);
@@ -993,7 +993,7 @@ static void tselem_draw_icon_uibut(struct DrawIconArg *arg, int icon)
        else {
                uiBut *but = uiDefIconBut(arg->block, UI_BTYPE_LABEL, 0, icon, arg->xb, arg->yb, UI_UNIT_X, UI_UNIT_Y, NULL,
                                          0.0, 0.0, 1.0, arg->alpha,
-                                         (arg->id && ID_IS_LINKED_DATABLOCK(arg->id)) ? arg->id->lib->name : "");
+                                         (arg->id && ID_IS_LINKED(arg->id)) ? arg->id->lib->name : "");
                
                if (arg->id)
                        UI_but_drag_set_id(but, arg->id);
@@ -1574,7 +1574,7 @@ static void outliner_draw_tree_element(
                else
                        offsx += 2 * ufac;
                
-               if (tselem->type == 0 && ID_IS_LINKED_DATABLOCK(tselem->id)) {
+               if (tselem->type == 0 && ID_IS_LINKED(tselem->id)) {
                        glPixelTransferf(GL_ALPHA_SCALE, 0.5f);
                        if (tselem->id->tag & LIB_TAG_MISSING) {
                                UI_icon_draw((float)startx + offsx + 2 * ufac, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_BROKEN);
index c45d9c021404327bb2a2e2a53a4862d897c795ef..0b001ca9578b9fd2b0aedc680349c9f1694e26fe 100644 (file)
@@ -230,7 +230,7 @@ static void do_item_rename(ARegion *ar, TreeElement *te, TreeStoreElem *tselem,
        else if (ELEM(tselem->type, TSE_SEQUENCE, TSE_SEQ_STRIP, TSE_SEQUENCE_DUP)) {
                BKE_report(reports, RPT_WARNING, "Cannot edit sequence name");
        }
-       else if (ID_IS_LINKED_DATABLOCK(tselem->id)) {
+       else if (ID_IS_LINKED(tselem->id)) {
                BKE_report(reports, RPT_WARNING, "Cannot edit external libdata");
        }
        else if (te->idcode == ID_LI && ((Library *)tselem->id)->parent) {
@@ -421,7 +421,7 @@ static int outliner_id_remap_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        }
 
-       if (ID_IS_LINKED_DATABLOCK(old_id)) {
+       if (ID_IS_LINKED(old_id)) {
                BKE_reportf(op->reports, RPT_WARNING,
                            "Old ID '%s' is linked from a library, indirect usages of this data-block will not be remapped",
                            old_id->name);
@@ -793,7 +793,7 @@ void object_toggle_visibility_cb(
        Base *base = (Base *)te->directdata;
        Object *ob = (Object *)tselem->id;
 
-       if (ID_IS_LINKED_DATABLOCK(tselem->id)) {
+       if (ID_IS_LINKED(tselem->id)) {
                BKE_report(reports, RPT_WARNING, "Cannot edit external libdata");
                return;
        }
@@ -854,7 +854,7 @@ void object_toggle_selectability_cb(
 {
        Base *base = (Base *)te->directdata;
 
-       if (ID_IS_LINKED_DATABLOCK(tselem->id)) {
+       if (ID_IS_LINKED(tselem->id)) {
                BKE_report(reports, RPT_WARNING, "Cannot edit external libdata");
                return;
        }
@@ -909,7 +909,7 @@ void object_toggle_renderability_cb(
 {
        Base *base = (Base *)te->directdata;
 
-       if (ID_IS_LINKED_DATABLOCK(tselem->id)) {
+       if (ID_IS_LINKED(tselem->id)) {
                BKE_report(reports, RPT_WARNING, "Cannot edit external libdata");
                return;
        }
@@ -1997,7 +1997,7 @@ static int parent_drop_exec(bContext *C, wmOperator *op)
        RNA_string_get(op->ptr, "child", childname);
        ob = (Object *)BKE_libblock_find_name(ID_OB, childname);
 
-       if (ID_IS_LINKED_DATABLOCK(ob)) {
+       if (ID_IS_LINKED(ob)) {
                BKE_report(op->reports, RPT_INFO, "Can't edit library linked object");
                return OPERATOR_CANCELLED;
        }
@@ -2045,7 +2045,7 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, const wmEvent *event)
                if (ob == par) {
                        return OPERATOR_CANCELLED;
                }
-               if (ID_IS_LINKED_DATABLOCK(ob)) {
+               if (ID_IS_LINKED(ob)) {
                        BKE_report(op->reports, RPT_INFO, "Can't edit library linked object");
                        return OPERATOR_CANCELLED;
                }
@@ -2242,7 +2242,7 @@ static int scene_drop_invoke(bContext *C, wmOperator *op, const wmEvent *event)
                RNA_string_get(op->ptr, "object", obname);
                ob = (Object *)BKE_libblock_find_name(ID_OB, obname);
 
-               if (ELEM(NULL, ob, scene) || ID_IS_LINKED_DATABLOCK(scene)) {
+               if (ELEM(NULL, ob, scene) || ID_IS_LINKED(scene)) {
                        return OPERATOR_CANCELLED;
                }
 
index 86b58537f18670c6dea0b3cf385cf9e854e24077..3321c2669d8bef01eb8eee07cc917ac226ef33f7 100644 (file)
@@ -443,7 +443,7 @@ static void id_local_cb(
         bContext *C, ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *UNUSED(te),
         TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data))
 {
-       if (ID_IS_LINKED_DATABLOCK(tselem->id) && (tselem->id->tag & LIB_TAG_EXTERN)) {
+       if (ID_IS_LINKED(tselem->id) && (tselem->id->tag & LIB_TAG_EXTERN)) {
                Main *bmain = CTX_data_main(C);
                /* if the ID type has no special local function,
                 * just clear the lib */
index 41125478ec0031d3944e60fa87786f0bf54ac1be..cf77afa32c40d5238ec32f1205f2a645ac745420 100644 (file)
@@ -491,7 +491,7 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
        
        outliner_add_element(soops, &te->subtree, ob->poselib, te, 0, 0); // XXX FIXME.. add a special type for this
        
-       if (ob->proxy && !ID_IS_LINKED_DATABLOCK(ob))
+       if (ob->proxy && !ID_IS_LINKED(ob))
                outliner_add_element(soops, &te->subtree, ob->proxy, te, TSE_PROXY, 0);
                
        outliner_add_element(soops, &te->subtree, ob->gpd, te, 0, 0);
index d9486ce0f60515ab10eb85b69541bc582405eb85..4f0d2c939702a21c44d38b70f3ed0f98c4129d4e 100644 (file)
@@ -92,7 +92,7 @@ static int text_edit_poll(bContext *C)
        if (!text)
                return 0;
 
-       if (ID_IS_LINKED_DATABLOCK(text)) {
+       if (ID_IS_LINKED(text)) {
                // BKE_report(op->reports, RPT_ERROR, "Cannot edit external libdata");
                return 0;
        }
@@ -108,7 +108,7 @@ int text_space_edit_poll(bContext *C)
        if (!st || !text)
                return 0;
 
-       if (ID_IS_LINKED_DATABLOCK(text)) {
+       if (ID_IS_LINKED(text)) {
                // BKE_report(op->reports, RPT_ERROR, "Cannot edit external libdata");
                return 0;
        }
@@ -128,7 +128,7 @@ static int text_region_edit_poll(bContext *C)
        if (!ar || ar->regiontype != RGN_TYPE_WINDOW)
                return 0;
 
-       if (ID_IS_LINKED_DATABLOCK(text)) {
+       if (ID_IS_LINKED(text)) {
                // BKE_report(op->reports, RPT_ERROR, "Cannot edit external libdata");
                return 0;
        }
index 087f1a28316c924c3be65e848b6a184bea0d313f..d7e3b78cdc32361e5ab242b364bb2b6fe080b951 100644 (file)
@@ -7336,7 +7336,7 @@ static void draw_object_wire_color(Scene *scene, Base *base, unsigned char r_ob_
        }
        else {
                /* Sets the 'colindex' */
-               if (ID_IS_LINKED_DATABLOCK(ob)) {
+               if (ID_IS_LINKED(ob)) {
                        colindex = (base->flag & (SELECT + BA_WAS_SEL)) ? 2 : 1;
                }
                /* Sets the 'theme_id' or fallback to wire */
@@ -8046,7 +8046,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
                                    !(G.f & G_RENDER_OGL))
                                {
                                        /* check > 0 otherwise grease pencil can draw into the circle select which is annoying. */
-                                       drawcentercircle(v3d, rv3d, ob->obmat[3], do_draw_center, ID_IS_LINKED_DATABLOCK(ob) || ob->id.us > 1);
+                                       drawcentercircle(v3d, rv3d, ob->obmat[3], do_draw_center, ID_IS_LINKED(ob) || ob->id.us > 1);
                                }
                        }
                }
index 32d7e142640a346d4a6eeaced2b8a04ab7aeae20..5203e0617eead58b02908a0dcd25f3c4933b801b 100644 (file)
@@ -100,7 +100,7 @@ bool ED_view3d_offset_lock_check(const  View3D *v3d, const  RegionView3D *rv3d)
 bool ED_view3d_camera_lock_check(const View3D *v3d, const RegionView3D *rv3d)
 {
        return ((v3d->camera) &&
-               (!ID_IS_LINKED_DATABLOCK(v3d->camera)) &&
+               (!ID_IS_LINKED(v3d->camera)) &&
                (v3d->flag2 & V3D_LOCK_CAMERA) &&
                (rv3d->persp == RV3D_CAMOB));
 }
index 959281c3fa5f64df057402d28781bb753c069327..eda780d01a7a3a509840a6b6faaa4e4ffb045ffc 100644 (file)
@@ -351,7 +351,7 @@ static bool initFlyInfo(bContext *C, FlyInfo *fly, wmOperator *op, const wmEvent
                fly->rv3d->persp = RV3D_PERSP;
        }
 
-       if (fly->rv3d->persp == RV3D_CAMOB && ID_IS_LINKED_DATABLOCK(fly->v3d->camera)) {
+       if (fly->rv3d->persp == RV3D_CAMOB && ID_IS_LINKED(fly->v3d->camera)) {
                BKE_report(op->reports, RPT_ERROR, "Cannot fly a camera from an external library");
                return false;
        }
index 40662af3bc950d1ae7264852163e812767ac202a..0bccab626e609a577efdf291408890771b654fb5 100644 (file)
@@ -509,7 +509,7 @@ static int view3d_camera_to_view_poll(bContext *C)
 
        if (ED_view3d_context_user_region(C, &v3d, &ar)) {
                RegionView3D *rv3d = ar->regiondata;
-               if (v3d && v3d->camera && !ID_IS_LINKED_DATABLOCK(v3d->camera)) {
+               if (v3d && v3d->camera && !ID_IS_LINKED(v3d->camera)) {
                        if (rv3d && (rv3d->viewlock & RV3D_LOCKED) == 0) {
                                if (rv3d->persp != RV3D_CAMOB) {
                                        return 1;
index 3b23bef43135f9faea317cb1b2df074373f04a00..9464f332d399f51e288bbe2ccc3c976937542200 100644 (file)
@@ -509,7 +509,7 @@ static bool initWalkInfo(bContext *C, WalkInfo *walk, wmOperator *op)
                walk->rv3d->persp = RV3D_PERSP;
        }
 
-       if (walk->rv3d->persp == RV3D_CAMOB && ID_IS_LINKED_DATABLOCK(walk->v3d->camera)) {
+       if (walk->rv3d->persp == RV3D_CAMOB && ID_IS_LINKED(walk->v3d->camera)) {
                BKE_report(op->reports, RPT_ERROR, "Cannot navigate a camera from an external library");
                return false;
        }
index 9d63afeb85c1d345e31393b296ddb29cf11b5a3c..af83b666bba209918f83d3958f5a68d7da6de829 100644 (file)
@@ -6608,7 +6608,7 @@ static void createTransObject(bContext *C, TransInfo *t)
                }
                
                /* select linked objects, but skip them later */
-               if (ID_IS_LINKED_DATABLOCK(ob)) {
+               if (ID_IS_LINKED(ob)) {
                        td->flag |= TD_SKIP;
                }
                
index 063ceac6761590e9efb83bb0fb9f52f7af6cfed1..278b8e34311dfcd76da99d6eadebf202e05ad6ba 100644 (file)
@@ -105,7 +105,7 @@ void ED_editors_init(bContext *C)
                        ob->mode = OB_MODE_OBJECT;
                        data = ob->data;
 
-                       if (ob == obact && !ID_IS_LINKED_DATABLOCK(ob) && !(data && ID_IS_LINKED_DATABLOCK(data)))
+                       if (ob == obact && !ID_IS_LINKED(ob) && !(data && ID_IS_LINKED(data)))
                                ED_object_toggle_modes(C, mode);
                }
        }
index b2a3cb4f9bc3ff24aae8de8f67281785d177b261..5250749fce33e032c2506ad19845db18d36d53eb 100644 (file)
@@ -282,7 +282,7 @@ typedef enum ID_Type {
 
 #define ID_MISSING(_id) (((_id)->tag & LIB_TAG_MISSING) != 0)
 
-#define ID_IS_LINKED_DATABLOCK(_id) (((ID *)(_id))->lib != NULL)
+#define ID_IS_LINKED(_id) (((ID *)(_id))->lib != NULL)
 
 #ifdef GS
 #  undef GS
index 2c62ae52f552b9db31ca1b5f1f7b40917a03ad09..14e0f6d45aae2f7e41613250093d804b17651ec9 100644 (file)
@@ -1755,7 +1755,7 @@ bool RNA_property_editable(PointerRNA *ptr, PropertyRNA *prop)
 
        return ((flag & PROP_EDITABLE) &&
                (flag & PROP_REGISTER) == 0 &&
-               (!id || !ID_IS_LINKED_DATABLOCK(id) || (prop->flag & PROP_LIB_EXCEPTION)));
+               (!id || !ID_IS_LINKED(id) || (prop->flag & PROP_LIB_EXCEPTION)));
 }
 
 /**
@@ -1781,7 +1781,7 @@ bool RNA_property_editable_info(PointerRNA *ptr, PropertyRNA *prop, const char *
        }
 
        /* property from linked data-block */
-       if (id && ID_IS_LINKED_DATABLOCK(id) && (prop->flag & PROP_LIB_EXCEPTION) == 0) {
+       if (id && ID_IS_LINKED(id) && (prop->flag & PROP_LIB_EXCEPTION) == 0) {
                if (!(*r_info)[0]) {
                        *r_info = "Can't edit this property from a linked data-block.";
                }
@@ -1823,7 +1823,7 @@ bool RNA_property_editable_index(PointerRNA *ptr, PropertyRNA *prop, int index)
 
        id = ptr->id.data;
 
-       return (flag & PROP_EDITABLE) && (!id || !ID_IS_LINKED_DATABLOCK(id) || (prop->flag & PROP_LIB_EXCEPTION));
+       return (flag & PROP_EDITABLE) && (!id || !ID_IS_LINKED(id) || (prop->flag & PROP_LIB_EXCEPTION));
 }
 
 bool RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop)
index e179d78898f613e9c9b71c4957712ed2b67c6882..52bcb29d21fc129d343893c6e4ec36095ca3f2a4 100644 (file)
@@ -715,10 +715,10 @@ static int rna_Object_active_material_editable(PointerRNA *ptr, const char **UNU
        bool is_editable;
 
        if ((ob->matbits == NULL) || (ob->actcol == 0) || ob->matbits[ob->actcol - 1]) {
-               is_editable = !ID_IS_LINKED_DATABLOCK(ob);
+               is_editable = !ID_IS_LINKED(ob);
        }
        else {
-               is_editable = ob->data ? !ID_IS_LINKED_DATABLOCK(ob->data) : false;
+               is_editable = ob->data ? !ID_IS_LINKED(ob->data) : false;
        }
 
        return is_editable ? PROP_EDITABLE : 0;
index ce2fd3a1a48503d420e2631cd2b506a5226cd516..d4b87ef1c18c8aaeafee7e0ff054fe7a8a033835 100644 (file)
@@ -520,7 +520,7 @@ static void scene_render_name_get(const Scene *scene,
                                   const size_t max_size,
                                   char *render_name)
 {
-       if (ID_IS_LINKED_DATABLOCK(scene)) {
+       if (ID_IS_LINKED(scene)) {
                BLI_snprintf(render_name, max_size, "%s %s",
                             scene->id.lib->id.name, scene->id.name);
        }
index 6d5d0964616ffd656410a3e5023b11ee5e4211b1..fbd6d89e7bc091e424b3f815bee9b6db1ce32562 100644 (file)
@@ -3270,7 +3270,7 @@ static void previews_id_ensure(bContext *C, Scene *scene, ID *id)
 
        /* Only preview non-library datablocks, lib ones do not pertain to this .blend file!
         * Same goes for ID with no user. */
-       if (!ID_IS_LINKED_DATABLOCK(id) && (id->us != 0)) {
+       if (!ID_IS_LINKED(id) && (id->us != 0)) {
                UI_id_icon_render(C, scene, id, false, false);
                UI_id_icon_render(C, scene, id, true, false);
        }
@@ -3860,7 +3860,7 @@ static const EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), PointerRNA *UNU
        int i = 0;
 
        for (; id; id = id->next) {
-               if (local == false || !ID_IS_LINKED_DATABLOCK(id)) {
+               if (local == false || !ID_IS_LINKED(id)) {
                        item_tmp.identifier = item_tmp.name = id->name + 2;
                        item_tmp.value = i++;
                        RNA_enum_item_add(&item, &totitem, &item_tmp);