ObjectGadget.cpp (pymol-v2.1.0.tar.bz2) | : | ObjectGadget.cpp (pymol-open-source-2.2.0) | ||
---|---|---|---|---|
skipping to change at line 407 | skipping to change at line 407 | |||
result = ObjectGadgetPlainAsPyList(I); | result = ObjectGadgetPlainAsPyList(I); | |||
break; | break; | |||
} | } | |||
return (PConvAutoNone(result)); | return (PConvAutoNone(result)); | |||
} | } | |||
void ObjectGadgetPurge(ObjectGadget * I) | void ObjectGadgetPurge(ObjectGadget * I) | |||
{ | { | |||
int a; | int a; | |||
SceneObjectDel(I->Obj.G, (CObject *) I, false); | ||||
for(a = 0; a < I->NGSet; a++) | for(a = 0; a < I->NGSet; a++) | |||
if(I->GSet[a]) { | if(I->GSet[a]) { | |||
I->GSet[a]->fFree(); | I->GSet[a]->fFree(); | |||
I->GSet[a] = NULL; | I->GSet[a] = NULL; | |||
} | } | |||
VLAFreeP(I->GSet); | VLAFreeP(I->GSet); | |||
ObjectPurge(&I->Obj); | ObjectPurge(&I->Obj); | |||
} | } | |||
void ObjectGadgetFree(ObjectGadget * I) | void ObjectGadgetFree(ObjectGadget * I) | |||
skipping to change at line 456 | skipping to change at line 455 | |||
static int ObjectGadgetGetNState(ObjectGadget * I) | static int ObjectGadgetGetNState(ObjectGadget * I) | |||
{ | { | |||
return (I->NGSet); | return (I->NGSet); | |||
} | } | |||
/*========================================================================*/ | /*========================================================================*/ | |||
static void ObjectGadgetRender(ObjectGadget * I, RenderInfo * info) | static void ObjectGadgetRender(ObjectGadget * I, RenderInfo * info) | |||
{ | { | |||
int state = info->state; | int state = info->state; | |||
CRay *ray = info->ray; | ||||
int pass = info->pass; | int pass = info->pass; | |||
if(!pass) { | if(pass < 0 || info->ray || info->pick) { | |||
ObjectPrepareContext(&I->Obj, ray); | ObjectPrepareContext(&I->Obj, info); | |||
for(StateIterator iter(I->Obj.G, I->Obj.Setting, state, I->NGSet); | for(StateIterator iter(I->Obj.G, I->Obj.Setting, state, I->NGSet); | |||
iter.next();) { | iter.next();) { | |||
GadgetSet * gs = I->GSet[iter.state]; | GadgetSet * gs = I->GSet[iter.state]; | |||
gs->render(info); | gs->render(info); | |||
} | } | |||
} | } | |||
} | } | |||
/*========================================================================*/ | /*========================================================================*/ | |||
void ObjectGadgetInit(PyMOLGlobals * G, ObjectGadget * I) | void ObjectGadgetInit(PyMOLGlobals * G, ObjectGadget * I) | |||
End of changes. 4 change blocks. | ||||
4 lines changed or deleted | 2 lines changed or added |