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-14 05:11:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-03-14 05:11:42 +0300
commitd3ae4b9944c17e14a489255901a32dc8a77246e5 (patch)
treecf84eee9846d2254b985469656d7de2a9f295e25 /source/blender/python/api2_2x/Object.c
parent4badc5da7af34e5e90406fee063cbe29c9b0a036 (diff)
disabled Object.Duplicate() in background mode bacause it needs the 3d view, added a note in the docs.
Diffstat (limited to 'source/blender/python/api2_2x/Object.c')
-rw-r--r--source/blender/python/api2_2x/Object.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c
index 261cfeb762b..600de0b7ba0 100644
--- a/source/blender/python/api2_2x/Object.c
+++ b/source/blender/python/api2_2x/Object.c
@@ -987,6 +987,12 @@ static PyObject *M_Object_Duplicate( PyObject * self_unused,
static char *kwlist[] = {"mesh", "surface", "curve",
"text", "metaball", "armature", "lamp", "material", "texture", "ipo", NULL};
+ /* duplicating in background causes segfaults */
+ if( G.background == 1 )
+ return EXPP_ReturnPyObjError( PyExc_RuntimeError,
+ "cannot duplicate objects in background mode" );
+
+
if (!PyArg_ParseTupleAndKeywords(args, kwd, "|iiiiiiiiii", kwlist,
&mesh_dupe, &surface_dupe, &curve_dupe, &text_dupe, &metaball_dupe,
&armature_dupe, &lamp_dupe, &material_dupe, &texture_dupe, &ipo_dupe))