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>2007-03-11 19:25:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-03-11 19:25:17 +0300
commite0c77c0f14f6ad3a742ab7b556ccb46b1ef4fbdf (patch)
treed3795bc43f7fa7cecf49471a4a72e827a2b24e78 /source/blender/blenkernel/intern/curve.c
parentf84c02429ebc03faca8413d08540fa04d2461b93 (diff)
made all data adding functions accept a name such as add_mesh or add_curve, previously only some datatypes adding functions accepted a name.
also updated the Bpy.py epydocs
Diffstat (limited to 'source/blender/blenkernel/intern/curve.c')
-rw-r--r--source/blender/blenkernel/intern/curve.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index fcdcf847dee..076727093f1 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -112,16 +112,11 @@ void free_curve(Curve *cu)
if(cu->tb) MEM_freeN(cu->tb);
}
-Curve *add_curve(int type)
+Curve *add_curve(char *name, int type)
{
Curve *cu;
- char *str;
-
- if(type==OB_CURVE) str= "Curve";
- else if(type==OB_SURF) str= "Surf";
- else str= "Text";
- cu= alloc_libblock(&G.main->curve, ID_CU, str);
+ cu= alloc_libblock(&G.main->curve, ID_CU, name);
cu->size[0]= cu->size[1]= cu->size[2]= 1.0;
cu->flag= CU_FRONT+CU_BACK;