diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-08 02:43:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-08 02:43:34 +0300 |
commit | 04064fb186ae1089a2bf3006f120e68f789b5242 (patch) | |
tree | b73156bffe9063da76a73ac6dab471ee40b7541d /source/blender/blenkernel | |
parent | d022794cad977229386934e7d25365270671874f (diff) |
Cleanup: use DRW_object_is_* for object checks
Also use const qualifier for object's.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_object.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_particle.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index 81182a89f3e..6d7def8f93f 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -102,7 +102,7 @@ typedef enum eObjectVisibilityCheck { OB_VISIBILITY_CHECK_UNKNOWN_RENDER_MODE, } eObjectVisibilityCheck; -bool BKE_object_is_visible(struct Object *ob, const eObjectVisibilityCheck mode); +bool BKE_object_is_visible(const struct Object *ob, const eObjectVisibilityCheck mode); void BKE_object_init(struct Object *ob); struct Object *BKE_object_add_only_object( diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index 3279839f8b5..4374046d701 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -304,7 +304,7 @@ void psys_set_current_num(Object *ob, int index); struct LatticeDeformData *psys_create_lattice_deform_data(struct ParticleSimulationData *sim); struct ParticleSystem *psys_orig_get(struct ParticleSystem *psys); -bool psys_in_edit_mode(struct Depsgraph *depsgraph, struct ParticleSystem *psys); +bool psys_in_edit_mode(struct Depsgraph *depsgraph, const struct ParticleSystem *psys); bool psys_check_enabled(struct Object *ob, struct ParticleSystem *psys, const bool use_render_params); bool psys_check_edited(struct ParticleSystem *psys); diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index cf6f2e5d842..71cf08e267d 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -727,7 +727,7 @@ bool BKE_object_is_mode_compat(const struct Object *ob, eObjectMode object_mode) /** * Return if the object is visible, as evaluated by depsgraph */ -bool BKE_object_is_visible(Object *ob, const eObjectVisibilityCheck mode) +bool BKE_object_is_visible(const Object *ob, const eObjectVisibilityCheck mode) { if ((ob->base_flag & BASE_VISIBLE) == 0) { return false; diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 802c1c6b6b9..7a217f59536 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -307,7 +307,7 @@ static PTCacheEdit *psys_orig_edit_get(ParticleSystem *psys) return psys->orig_psys->edit; } -bool psys_in_edit_mode(Depsgraph *depsgraph, ParticleSystem *psys) +bool psys_in_edit_mode(Depsgraph *depsgraph, const ParticleSystem *psys) { const ViewLayer *view_layer = DEG_get_input_view_layer(depsgraph); if (view_layer->basact == NULL) { @@ -319,7 +319,7 @@ bool psys_in_edit_mode(Depsgraph *depsgraph, ParticleSystem *psys) if (object->mode != OB_MODE_PARTICLE_EDIT) { return false; } - ParticleSystem *psys_orig = psys_orig_get(psys); + const ParticleSystem *psys_orig = psys_orig_get((ParticleSystem *)psys); return (psys_orig->edit || psys->pointcache->edit) && (use_render_params == false); } |