diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-04-23 02:08:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-04-23 02:08:19 +0400 |
commit | 94ad8c810c1699188f4c54a9307af31fc5fd9e7a (patch) | |
tree | 1383cf6f4649cf29ecc7753f74fe899fd3bf65e1 /source/blender/python/api2_2x/Constraint.c | |
parent | 1c52e2cfa4096f3775472bd11d5ac982edc5ae3a (diff) |
Changed TESTBASE and TESTBASE_LIB to check the hidden flag
Checked every instance of testbase to see this dosnt break anything, also changed TESTBASE and TESTBASELIB, both were used incorrectly in places.
added error_libdata() for library error messages that are everywhere.
added object_data_is_libdata to test if the object and its data's are from a library.
fixed 2 crashs in adding Curve points to a library object (remember to check, verify_ipocurve returns NULL!)
made duplicating and making dupli's real for lib objects possible, disabled joining into lib armatures and meshes.
Diffstat (limited to 'source/blender/python/api2_2x/Constraint.c')
-rw-r--r-- | source/blender/python/api2_2x/Constraint.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Constraint.c b/source/blender/python/api2_2x/Constraint.c index 901947574b4..37c24dbbda6 100644 --- a/source/blender/python/api2_2x/Constraint.c +++ b/source/blender/python/api2_2x/Constraint.c @@ -392,10 +392,14 @@ static PyObject *Constraint_insertKey( BPy_Constraint * self, PyObject * arg ) return EXPP_ReturnPyObjError( PyExc_TypeError, "expected a float argument" ); - // constraint_active_func(ob_v, con_v); + /* constraint_active_func(ob_v, con_v); */ get_constraint_ipo_context( ob, actname ); icu= verify_ipocurve((ID *)ob, ID_CO, actname, con->name, CO_ENFORCE); - + + if (!icu) + return EXPP_ReturnPyObjError( PyExc_RuntimeError, + "cannot get a curve from this IPO, may be using libdata" ); + if( ob->action ) insert_vert_ipo( icu, get_action_frame(ob, cfra), con->enforce); else |