~ubuntu-branches/ubuntu/lucid/blender/lucid

« back to all changes in this revision

Viewing changes to source/blender/python/api2_2x/Armature.c

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2009-08-06 22:32:19 UTC
  • mfrom: (1.2.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090806223219-8z4eej1u8levu4pz
Tags: 2.49a+dfsg-0ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control: Build-depend on python-2.6 rather than python-2.5.
  - debian/misc/*.desktop: Add Spanish translation to .desktop 
    files.
  - debian/pyversions: 2.6.
  - debian/rules: Clean *.o of source/blender/python/api2_2x/
* New upstream release (LP: #382153).
* Refreshed patches:
  - 01_sanitize_sys.patch
  - 02_tmp_in_HOME
  - 10_use_systemwide_ftgl
  - 70_portability_platform_detection
* Removed patches merged upstream:
  - 30_fix_python_syntax_warning
  - 90_ubuntu_ffmpeg_52_changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Id: Armature.c 17130 2008-10-20 12:33:31Z jesterking $
 
2
 * $Id: Armature.c 19305 2009-03-16 02:55:42Z theeth $
3
3
 *
4
4
 * ***** BEGIN GPL LICENSE BLOCK *****
5
5
 *
244
244
        }
245
245
        if(value == NULL){  /* item not found in dict. throw exception */
246
246
                char* key_str = PyString_AsString( key );
247
 
                if (key_str) {
 
247
                
 
248
                if (key_str==NULL) {
248
249
                        return EXPP_ReturnPyObjError(PyExc_KeyError, "bone key must be a string" );
249
250
                } else {
250
251
                        char buffer[128];
279
280
                //create a new editbone
280
281
                editbone = MEM_callocN(sizeof(EditBone), "eBone");
281
282
                BLI_strncpy(editbone->name, key_str, 32);
282
 
                unique_editbone_name(NULL, editbone->name);
 
283
                unique_editbone_name(NULL, editbone->name, NULL);
283
284
                editbone->dist = ((BPy_EditBone*)value)->dist;
284
285
                editbone->ease1 = ((BPy_EditBone*)value)->ease1;
285
286
                editbone->ease2 = ((BPy_EditBone*)value)->ease2;