Cleanup: pass objects as const arguments
This commit is contained in:
@@ -337,9 +337,9 @@ bool BKE_object_obdata_texspace_get(struct Object *ob,
|
||||
float **r_loc,
|
||||
float **r_size);
|
||||
|
||||
struct Mesh *BKE_object_get_evaluated_mesh(struct Object *object);
|
||||
struct Mesh *BKE_object_get_pre_modified_mesh(struct Object *object);
|
||||
struct Mesh *BKE_object_get_original_mesh(struct Object *object);
|
||||
struct Mesh *BKE_object_get_evaluated_mesh(const struct Object *object);
|
||||
struct Mesh *BKE_object_get_pre_modified_mesh(const struct Object *object);
|
||||
struct Mesh *BKE_object_get_original_mesh(const struct Object *object);
|
||||
|
||||
/* Lattice accessors.
|
||||
* These functions return either the regular lattice, or the edit-mode lattice,
|
||||
|
@@ -4447,7 +4447,7 @@ bool BKE_object_obdata_texspace_get(Object *ob, short **r_texflag, float **r_loc
|
||||
}
|
||||
|
||||
/** Get evaluated mesh for given object. */
|
||||
Mesh *BKE_object_get_evaluated_mesh(Object *object)
|
||||
Mesh *BKE_object_get_evaluated_mesh(const Object *object)
|
||||
{
|
||||
ID *data_eval = object->runtime.data_eval;
|
||||
return (data_eval && GS(data_eval->name) == ID_ME) ? (Mesh *)data_eval : NULL;
|
||||
@@ -4460,7 +4460,7 @@ Mesh *BKE_object_get_evaluated_mesh(Object *object)
|
||||
* - For copied-on-write objects it will give pointer to a copied-on-write
|
||||
* mesh which corresponds to original object's mesh.
|
||||
*/
|
||||
Mesh *BKE_object_get_pre_modified_mesh(Object *object)
|
||||
Mesh *BKE_object_get_pre_modified_mesh(const Object *object)
|
||||
{
|
||||
if (object->type == OB_MESH && object->runtime.data_orig != NULL) {
|
||||
BLI_assert(object->id.tag & LIB_TAG_COPIED_ON_WRITE);
|
||||
@@ -4481,7 +4481,7 @@ Mesh *BKE_object_get_pre_modified_mesh(Object *object)
|
||||
* - For evaluated objects it will be same mesh as corresponding original
|
||||
* object uses as data.
|
||||
*/
|
||||
Mesh *BKE_object_get_original_mesh(Object *object)
|
||||
Mesh *BKE_object_get_original_mesh(const Object *object)
|
||||
{
|
||||
Mesh *result = NULL;
|
||||
if (object->id.orig_id == NULL) {
|
||||
|
Reference in New Issue
Block a user