From d2312602125a452e6562a76ab91779943c67396d Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 6 Jul 2016 14:11:01 +0200 Subject: Replace of (id->lib != NULL) check by meaningful macro. Idea is to replace hard-to-track (id->lib != NULL) 'is linked datablock' check everywhere in Blender by a macro doing the same thing. This will allow to easily spot those checks in future, and more importantly, to easily change it (see work done in asset-engine branch). Note: did not touch to readfile.c, since there most of the time 'id->lib' check actually concerns the pointer, and not a check whether ID is linked or not. Will have a closer look at it later. Reviewers: campbellbarton, brecht, sergey Differential Revision: https://developer.blender.org/D2082 --- source/blender/editors/physics/particle_edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/physics/particle_edit.c') diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 30c102b70c5..e22a145b3a6 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -4693,7 +4693,7 @@ static int particle_edit_toggle_poll(bContext *C) if (ob == NULL || ob->type != OB_MESH) return 0; - if (!ob->data || ((ID *)ob->data)->lib) + if (!ob->data || ID_IS_LINKED_DATABLOCK(ob->data)) return 0; if (CTX_data_edit_object(C)) return 0; -- cgit v1.2.3