buttons editing didnt let lib-obdata to changed once set (thanks for the report broken)
authorCampbell Barton <ideasman42@gmail.com>
Fri, 1 Jun 2007 02:48:36 +0000 (02:48 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 1 Jun 2007 02:48:36 +0000 (02:48 +0000)
NMesh (error in last commit).

source/blender/python/api2_2x/NMesh.c
source/blender/src/buttons_editing.c

index b0ab64a6249ea77d4682524248874e7fd3c17cb0..3c7a15a537afb9e68128c191742afb20ea3269d8 100644 (file)
@@ -1303,7 +1303,7 @@ static PyObject *NMesh_getSelectedFaces( PyObject * self, PyObject * args )
                totfaces= me->totface;
        
        if( flag ) {
-               for( i = 0; i < me->totface; i++ ) {
+               for( i = 0; i < totfaces; i++ ) {
                        if( mf[i].flag & ME_FACE_SEL ) {
                                pyval = PyInt_FromLong( i );
                                PyList_Append( l, pyval );
@@ -1311,7 +1311,7 @@ static PyObject *NMesh_getSelectedFaces( PyObject * self, PyObject * args )
                        }
                }
        } else {
-               for( i = 0; i < me->totface; i++ ) {
+               for( i = 0; i < totfaces; i++ ) {
                        if( mf[i].flag & ME_FACE_SEL )
                                PyList_Append( l, PyList_GetItem( nm->faces, i ) );
                }
index 3760b17f039764c485c9572038b32666f3e3d267..ec2b7b3b2745581b9f7479506460b22ef2a0b13f 100644 (file)
@@ -4447,7 +4447,7 @@ static void editing_panel_links(Object *ob)
        block= uiNewBlock(&curarea->uiblocks, "editing_panel_links", UI_EMBOSS, UI_HELV, curarea->win);
        if(uiNewPanel(curarea, block, "Link and Materials", "Editing", 0, 0, 318, 204)==0) return;
        
-       uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+       uiSetButLock((ob && ob->id.lib), ERROR_LIBDATA_MESSAGE);
        
        buttons_active_id(&id, &idfrom);