diff options
author | Antonioya <blendergit@gmail.com> | 2019-03-11 19:13:30 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-03-11 19:13:51 +0300 |
commit | 958f34dd030d9a0ba7fee9534a0791141f361799 (patch) | |
tree | f6b2e7ce329e443586d03ecd4f65e981c02eeff7 /source/blender/blenkernel | |
parent | 93633efe69ca4e610304b34268e523f54f9d7d57 (diff) |
GPencil: Add support for Bound Box
The bound box was not calculated for grease pencil objects.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/gpencil.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index c9cb38fcc4e..88c4e1249e3 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -1127,14 +1127,11 @@ static void boundbox_gpencil(Object *ob) /* get bounding box */ BoundBox *BKE_gpencil_boundbox_get(Object *ob) { - bGPdata *gpd; - if (ELEM(NULL, ob, ob->data)) return NULL; - gpd = ob->data; - if ((ob->runtime.bb) && ((ob->runtime.bb->flag & BOUNDBOX_DIRTY) == 0) && - ((gpd->flag & GP_DATA_CACHE_IS_DIRTY) == 0)) + bGPdata *gpd = (bGPdata *)ob->data; + if ((ob->runtime.bb) && ((gpd->flag & GP_DATA_CACHE_IS_DIRTY) == 0)) { return ob->runtime.bb; } |