selecting.py (pymol-v2.1.0.tar.bz2) | : | selecting.py (pymol-open-source-2.2.0) | ||
---|---|---|---|---|
skipping to change at line 230 | skipping to change at line 230 | |||
''' | ''' | |||
DESCRIPTION | DESCRIPTION | |||
API only. Get (object-specific-selection, object-state) tuples for all | API only. Get (object-specific-selection, object-state) tuples for all | |||
objects in selection. | objects in selection. | |||
''' | ''' | |||
for oname in _self.get_object_list('(' + selection + ')'): | for oname in _self.get_object_list('(' + selection + ')'): | |||
osele = '(%s) & ?%s' % (selection, oname) | osele = '(%s) & ?%s' % (selection, oname) | |||
if state < 0: | if state < 0: | |||
first = last = _self.get_object_state(oname) | first = last = _self.get_object_state(oname) | |||
elif state == 0: | ||||
first = 1 | ||||
last = _self.count_states('%' + oname) | ||||
else: | else: | |||
first = last = state | first = last = state | |||
if first == 0: | ||||
first = 1 | ||||
last = _self.count_states('%' + oname) | ||||
for ostate in range(first, last + 1): | for ostate in range(first, last + 1): | |||
yield osele, ostate | yield osele, ostate | |||
End of changes. 2 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |