Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-11-17 12:45:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-17 12:45:45 +0300
commit51dcbdde033f6e8e55c4b1b4a47ca0624a6571ee (patch)
tree18315acbbe218deeea38c22ab41027df7d2cb06f /source/blender/blenkernel/intern/object.c
parentacc883da83b5fa7839a094e8dbf259077ca64f2e (diff)
use 'const char *' by default with RNA functions except when the value is flagged as PROP_THICK_WRAP.
Also use const char in many other parts of blenders code. Currently this gives warnings for setting operator id, label and description since these are an exception and allocated beforehand.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index a10901d15d6..99375c9fb20 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -693,7 +693,7 @@ int exist_object(Object *obtest)
return 0;
}
-void *add_camera(char *name)
+void *add_camera(const char *name)
{
Camera *cam;
@@ -794,7 +794,7 @@ float dof_camera(Object *ob)
return cam->YF_dofdist;
}
-void *add_lamp(char *name)
+void *add_lamp(const char *name)
{
Lamp *la;
@@ -989,7 +989,7 @@ static char *get_obdata_defname(int type)
}
/* more general add: creates minimum required data, but without vertices etc. */
-Object *add_only_object(int type, char *name)
+Object *add_only_object(int type, const char *name)
{
Object *ob;
@@ -2899,7 +2899,7 @@ void object_delete_ptcache(Object *ob, int index)
/* shape key utility function */
/************************* Mesh ************************/
-static KeyBlock *insert_meshkey(Scene *scene, Object *ob, char *name, int from_mix)
+static KeyBlock *insert_meshkey(Scene *scene, Object *ob, const char *name, int from_mix)
{
Mesh *me= ob->data;
Key *key= me->key;
@@ -2930,7 +2930,7 @@ static KeyBlock *insert_meshkey(Scene *scene, Object *ob, char *name, int from_m
return kb;
}
/************************* Lattice ************************/
-static KeyBlock *insert_lattkey(Scene *scene, Object *ob, char *name, int from_mix)
+static KeyBlock *insert_lattkey(Scene *scene, Object *ob, const char *name, int from_mix)
{
Lattice *lt= ob->data;
Key *key= lt->key;
@@ -2962,7 +2962,7 @@ static KeyBlock *insert_lattkey(Scene *scene, Object *ob, char *name, int from_m
return kb;
}
/************************* Curve ************************/
-static KeyBlock *insert_curvekey(Scene *scene, Object *ob, char *name, int from_mix)
+static KeyBlock *insert_curvekey(Scene *scene, Object *ob, const char *name, int from_mix)
{
Curve *cu= ob->data;
Key *key= cu->key;
@@ -2998,7 +2998,7 @@ static KeyBlock *insert_curvekey(Scene *scene, Object *ob, char *name, int from_
return kb;
}
-KeyBlock *object_insert_shape_key(Scene *scene, Object *ob, char *name, int from_mix)
+KeyBlock *object_insert_shape_key(Scene *scene, Object *ob, const char *name, int from_mix)
{
if(ob->type==OB_MESH) return insert_meshkey(scene, ob, name, from_mix);
else if ELEM(ob->type, OB_CURVE, OB_SURF)return insert_curvekey(scene, ob, name, from_mix);