Finds the selected ids

        After the scene has been rendered again in selection mode, this method gathers and returns the ids of the
        selected object and restores the matrices.

        :return: The selection stack
344389
def find_selection():
        
        hits = glRenderMode(GL_RENDER)

        glMatrixMode(GL_PROJECTION)
        glPopMatrix()
        glMatrixMode(GL_MODELVIEW)

        return hits
673449
def get_menus(self, id):
        
        resp = self.get_details([id])
        menus = []
        for obj in resp['objects']:
            if obj['has_menu']:
                menus += obj['menus']
        return menus
204934
function () {
            // do nothing if there is no saved states
            if (this._matrixStack.length !== 0) {
                var color = this._colorStack.pop();
                var matrix = this._matrixStack.pop();

                // restore the previous context
                this.currentColor.copy(color);
                this.currentTransform.copy(matrix);

                // recycle objects
                me.pool.push(color);
                me.pool.push(matrix);
            }

            if (this._scissorStack.length !== 0) {
                // FIXME : prevent `scissor` object realloc and GC
                this.currentScissor.set(this._scissorStack.pop());
            } else {
                // turn off scissor test
                this.gl.disable(this.gl.SCISSOR_TEST);
                this.currentScissor[0] = 0;
                this.currentScissor[1] = 0;
                this.currentScissor[2] = this.backBufferCanvas.width;
                this.currentScissor[3] = this.backBufferCanvas.height;
            }
        }
847154
def find_selected(self, event):
        ''''''
        first = self.id()
        last = first + len(self.items) - 1
        evid = event.GetId()
        if evid >= first and evid <= last:
            self.choice = evid - first
            return self
        return None
1004245
def selected
      if @selected_dirty
        @_selected = []

        if RMQ.is_blank?(self.selectors)
          @_selected << context_or_context_view
        else
          working_selectors = self.selectors.dup
          extract_views_from_selectors(@_selected, working_selectors)

          unless RMQ.is_blank?(working_selectors)
            subviews = all_subviews_for(root_view)
            subviews.each do |subview|
              @_selected  << subview if match(subview, working_selectors)
            end
          end

          @_selected.uniq!
        end

        @selected_dirty = false
      else
        @_selected ||= []
      end

      @_selected
    end
1312584
def toDict(self):
        
        d = {}
        nindices = self.getNumIndices()
        for i in range(self.getNumRows()):
            row = list(self.getRowByIndex(i))
            if nindices > 1:
                key = tuple(row[:nindices])
            elif nindices == 1:
                key = row[0]
            else:
                key = None
            if len(row) - nindices == 0:
                d[key] = None
            elif len(row) - nindices == 1:
                d[key] = row[nindices]
            else:
                d[key] = tuple(row[nindices:])
        return d
894313
def _selectView( self ):
        
        scene = self.uiGanttVIEW.scene()
        scene.blockSignals(True)
        scene.clearSelection()
        for item in self.uiGanttTREE.selectedItems():
            item.viewItem().setSelected(True)
        scene.blockSignals(False)
        
        curr_item = self.uiGanttTREE.currentItem()
        vitem = curr_item.viewItem()
        
        if vitem:
            self.uiGanttVIEW.centerOn(vitem)
39965
def selected_fields(self):
        
        items = self.lstFields.selectedItems()
        if items and self.mode == MULTI_MODE:
            return [item.text() for item in items]
        elif items and self.mode == SINGLE_MODE:
            return items[0].text()
        else:
            return []
728838
def selectedIndexes(self):
        """"""
        model = self.model()
        indexes = []
        for comp in self._selectedComponents:
            index = model.indexByComponent(comp)
            if index is None:
                # must have been removed from model, discard
                self._selectedComponents.remove(comp)
            else:
                indexes.append(index)
        return indexes
720015
function getter_THREE_Scene(inst) {
	return [
		inst.name,
		inst.up,
		inst.position,
		inst.quaternion,
		inst.scale,
		inst.rotationAutoUpdate,
		inst.matrix,
		inst.matrixWorld,
		inst.matrixAutoUpdate,
		inst.visible,
		inst.castShadow,
		inst.receiveShadow,
		inst.frustumCulled,
		inst.renderOrder,
		inst.userData,
		inst.children,
		inst.fog,
		inst.overrideMaterial];
}
440566
def module_ids(self, rev=False):
		
		shutit_global.shutit_global_object.yield_to_draw()
		ids = sorted(list(self.shutit_map.keys()),key=lambda module_id: self.shutit_map[module_id].run_order)
		if rev:
			return list(reversed(ids))
		return ids
1336812
def selected(self):
        
        selected = self._selected
        if len(self._selected) == 0 and self.required:
            # nothing has been selected yet BUT the component is required
            selected = self.defaults
        return selected
1245841
def find_selected(self, event):
        ''''''
        for m in self.items:
            ret = m.find_selected(event)
            if ret is not None:
                return ret
        return None
53492
def get_rendered_fields(self, ctx=None):
        '''
        
        '''
        res = []
        if ctx is None:
            ctx = RenderContext()
        if self._evaluate_condition(ctx):
            ctx.push(self)
            res = super(Conditional, self).get_rendered_fields(ctx)
            ctx.pop()
        return res
59156
def get_scene(self):
        
        return self._x, self._y, self._hsml, self._m, self._kview
318431
def selected_indexes(self, ):
        
        i = self.model().index(self.currentIndex(), 0, self.rootModelIndex())
        return [i]
626795
def selected_mapping(self):
        
        value_map = {}
        tree_clone = self.treeClasses.invisibleRootItem().clone()
        for tree_branch in tree_clone.takeChildren():
            value_list = []
            for tree_leaf in tree_branch.takeChildren():
                value_list += [tree_leaf.data(0, Qt.UserRole)]
            if value_list:
                value_map[tree_branch.data(0, Qt.UserRole)] = value_list
        return value_map