diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-14 15:34:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-14 15:34:21 +0300 |
commit | 36152afa7623943e578600cab1cd355efae1fe0e (patch) | |
tree | 1ab5391e4f20f8fbe08b5835885a78371435867d /source/blender/blenkernel | |
parent | 35785ee7cbc84aad1d6633c9c4a59395ccd71f73 (diff) | |
parent | 5ab77ab4ee445a6680dab5833dc251e2afe036c4 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_object.h | 16 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index ff05ffc8df7..c698db2e8f5 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -72,7 +72,7 @@ void BKE_object_free_caches(struct Object *object); void BKE_object_modifier_hook_reset(struct Object *ob, struct HookModifierData *hmd); -bool BKE_object_support_modifier_type_check(struct Object *ob, int modifier_type); +bool BKE_object_support_modifier_type_check(const struct Object *ob, int modifier_type); void BKE_object_link_modifiers(struct Object *ob_dst, const struct Object *ob_src); void BKE_object_free_modifiers(struct Object *ob, const int flag); @@ -80,9 +80,9 @@ void BKE_object_free_modifiers(struct Object *ob, const int flag); void BKE_object_make_proxy(struct Object *ob, struct Object *target, struct Object *gob); void BKE_object_copy_proxy_drivers(struct Object *ob, struct Object *target); -bool BKE_object_exists_check(struct Object *obtest); -bool BKE_object_is_in_editmode(struct Object *ob); -bool BKE_object_is_in_editmode_vgroup(struct Object *ob); +bool BKE_object_exists_check(const struct Object *obtest); +bool BKE_object_is_in_editmode(const struct Object *ob); +bool BKE_object_is_in_editmode_vgroup(const struct Object *ob); bool BKE_object_is_in_wpaint_select_vert(const struct Object *ob); typedef enum eObjectVisibilityCheck { @@ -123,8 +123,8 @@ void BKE_object_copy_data(struct Main *bmain, struct Object *ob_dst, const struc struct Object *BKE_object_copy(struct Main *bmain, const struct Object *ob); void BKE_object_make_local(struct Main *bmain, struct Object *ob, const bool lib_local); void BKE_object_make_local_ex(struct Main *bmain, struct Object *ob, const bool lib_local, const bool clear_proxy); -bool BKE_object_is_libdata(struct Object *ob); -bool BKE_object_obdata_is_libdata(struct Object *ob); +bool BKE_object_is_libdata(const struct Object *ob); +bool BKE_object_obdata_is_libdata(const struct Object *ob); void BKE_object_obdata_size_init(struct Object *ob, const float scale); @@ -136,7 +136,7 @@ void BKE_object_to_mat4(struct Object *ob, float mat[4][4]); void BKE_object_apply_mat4(struct Object *ob, float mat[4][4], const bool use_compat, const bool use_parent); void BKE_object_matrix_local_get(struct Object *ob, float mat[4][4]); -bool BKE_object_pose_context_check(struct Object *ob); +bool BKE_object_pose_context_check(const struct Object *ob); struct Object *BKE_object_pose_armature_get(struct Object *ob); struct Object *BKE_object_pose_armature_get_visible(struct Object *ob, struct ViewLayer *view_layer); @@ -274,7 +274,7 @@ bool BKE_object_shapekey_free(struct Main *bmain, struct Object *ob); bool BKE_object_flag_test_recursive(const struct Object *ob, short flag); -bool BKE_object_is_child_recursive(struct Object *ob_parent, struct Object *ob_child); +bool BKE_object_is_child_recursive(const struct Object *ob_parent, const struct Object *ob_child); bool BKE_object_is_animated(struct Scene *scene, struct Object *ob); /* return ModifierMode flag */ diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 67769c9ae3b..875d716305f 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -238,7 +238,7 @@ void BKE_object_modifier_hook_reset(Object *ob, HookModifierData *hmd) } } -bool BKE_object_support_modifier_type_check(Object *ob, int modifier_type) +bool BKE_object_support_modifier_type_check(const Object *ob, int modifier_type) { const ModifierTypeInfo *mti; @@ -487,7 +487,7 @@ void BKE_object_free(Object *ob) } /* actual check for internal data, not context or flags */ -bool BKE_object_is_in_editmode(Object *ob) +bool BKE_object_is_in_editmode(const Object *ob) { if (ob->data == NULL) return false; @@ -530,7 +530,7 @@ bool BKE_object_is_in_editmode(Object *ob) return false; } -bool BKE_object_is_in_editmode_vgroup(Object *ob) +bool BKE_object_is_in_editmode_vgroup(const Object *ob) { return (OB_TYPE_SUPPORT_VGROUP(ob->type) && BKE_object_is_in_editmode(ob)); @@ -578,7 +578,7 @@ bool BKE_object_is_visible(Object *ob, const eObjectVisibilityCheck mode) } } -bool BKE_object_exists_check(Object *obtest) +bool BKE_object_exists_check(const Object *obtest) { Object *ob; @@ -1150,7 +1150,7 @@ static void copy_object_lod(Object *obn, const Object *ob, const int UNUSED(flag obn->currentlod = (LodLevel *)obn->lodlevels.first; } -bool BKE_object_pose_context_check(Object *ob) +bool BKE_object_pose_context_check(const Object *ob) { if ((ob) && (ob->type == OB_ARMATURE) && @@ -1352,13 +1352,13 @@ 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) +bool BKE_object_is_libdata(const Object *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) +bool BKE_object_obdata_is_libdata(const Object *ob) { /* Linked objects with local obdata are forbidden! */ BLI_assert(!ob || !ob->data || (ID_IS_LINKED(ob) ? ID_IS_LINKED(ob->data) : true)); @@ -3138,7 +3138,7 @@ bool BKE_object_flag_test_recursive(const Object *ob, short flag) } } -bool BKE_object_is_child_recursive(Object *ob_parent, Object *ob_child) +bool BKE_object_is_child_recursive(const Object *ob_parent, const Object *ob_child) { for (ob_child = ob_child->parent; ob_child; ob_child = ob_child->parent) { if (ob_child == ob_parent) { |