"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "layer2/ObjectCallback.cpp" between
pymol-open-source-2.2.0.tar.gz and pymol-open-source-2.3.0.tar.gz

About: PyMOL is a Python-enhanced molecular graphics tool. It excels at 3D visualization of proteins, small molecules, density, surfaces, and trajectories. It also includes molecular editing, ray tracing, and movies. Open Source version.

ObjectCallback.cpp  (pymol-open-source-2.2.0):ObjectCallback.cpp  (pymol-open-source-2.3.0)
skipping to change at line 70 skipping to change at line 70
SceneInvalidate(I->Obj.G); SceneInvalidate(I->Obj.G);
} }
/*========================================================================*/ /*========================================================================*/
static void ObjectCallbackRender(ObjectCallback * I, RenderInfo * info) static void ObjectCallbackRender(ObjectCallback * I, RenderInfo * info)
{ {
#ifndef _PYMOL_NOPY #ifndef _PYMOL_NOPY
int state = info->state; int state = info->state;
CRay *ray = info->ray; CRay *ray = info->ray;
Picking **pick = info->pick; auto pick = info->pick;
int pass = info->pass; int pass = info->pass;
PyMOLGlobals *G = I->Obj.G; PyMOLGlobals *G = I->Obj.G;
ObjectCallbackState *sobj = NULL; ObjectCallbackState *sobj = NULL;
if(pass != 1) /* for now, the callback should be called during the first pass (opaque), so if(pass != 1) /* for now, the callback should be called during the first pass (opaque), so
that it is possible to set positions for any object that is ren dered in the that it is possible to set positions for any object that is ren dered in the
opaque pass. This is still a kludge, since the callback should probably opaque pass. This is still a kludge, since the callback should probably
happen in a pass before this (should we add a new pass 2? this will probably happen in a pass before this (should we add a new pass 2? this will probably
need changes all over.. and will introduce some minimal overhea d (another pass need changes all over.. and will introduce some minimal overhea d (another pass
on the objects). For now, these callbacks need to be in the ob ject list before on the objects). For now, these callbacks need to be in the ob ject list before
skipping to change at line 269 skipping to change at line 269
" Warning: could not load callback object\n" " Warning: could not load callback object\n"
ENDFB(I->Obj.G); ENDFB(I->Obj.G);
} }
Py_XDECREF(list); Py_XDECREF(list);
return result; return result;
} }
int ObjectCallbackNewFromPyList(PyMOLGlobals * G, PyObject * list, ObjectCallbac k ** result) int ObjectCallbackNewFromPyList(PyMOLGlobals * G, PyObject * list, ObjectCallbac k ** result)
{ {
int ll;
ObjectCallback *I; ObjectCallback *I;
PyObject *val; PyObject *val;
ok_assert(1, list != NULL); ok_assert(1, list != NULL);
ok_assert(1, PyList_Check(list)); ok_assert(1, PyList_Check(list));
ll = PyList_Size(list);
ok_assert(1, I = ObjectCallbackNew(G)); ok_assert(1, I = ObjectCallbackNew(G));
val = PyList_GetItem(list, 0); val = PyList_GetItem(list, 0);
ok_assert(2, ObjectFromPyList(G, val, &I->Obj)); ok_assert(2, ObjectFromPyList(G, val, &I->Obj));
val = PyList_GetItem(list, 1); val = PyList_GetItem(list, 1);
ok_assert(2, ObjectCallbackAllStatesFromPyObject(I, val)); ok_assert(2, ObjectCallbackAllStatesFromPyObject(I, val));
ObjectCallbackRecomputeExtent(I); ObjectCallbackRecomputeExtent(I);
 End of changes. 3 change blocks. 
4 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)