Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'example:': 0.03; 'everybody,': 0.05; 'preference': 0.05; 'python': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:Getting': 0.09; 'terry': 0.09; 'toggle': 0.09; 'did.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'sorting': 0.16; 'subject:selection': 0.16; 'subject:user': 0.16; 'wrote:': 0.17; 'jan': 0.18; 'question.': 0.20; 'not,': 0.21; 'help.': 0.22; 'command': 0.24; 'tried': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'skip:[ 10': 0.26; 'select': 0.26; 'am,': 0.27; 'order.': 0.27; 'question': 0.27; 'correct': 0.28; 'header:X-Complaints-To:1': 0.28; 'subject:list': 0.28; 'selection': 0.29; 'ordered': 0.33; 'problem': 0.33; 'to:addr:python-list': 0.33; 'guys': 0.33; 'list': 0.35; 'there': 0.35; 'received:org': 0.36; 'created': 0.36; 'but': 0.36; 'thank': 0.36; 'listing': 0.37; 'rather': 0.37; 'subject:: ': 0.38; 'gives': 0.39; 'to:addr:python.org': 0.39; 'list,': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'enable': 0.60; 'here': 0.65; 'covers': 0.65; 'honest': 0.75; 'received:fios.verizon.net': 0.84; 'window,': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Getting a list in user defined selection order Date: Thu, 14 Mar 2013 18:38:25 -0400 References: <658b2c00-16e8-4284-940c-c88442e7f169@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 In-Reply-To: <658b2c00-16e8-4284-940c-c88442e7f169@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1363300723 news.xs4all.nl 6850 [2001:888:2000:d::a6]:33221 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:41246 On 3/14/2013 5:34 AM, e.tekinalp@gmx.de wrote: > Hello everybody, > > I want to select components(vertices) in a particular Order with python. > So when I create a list the main problem is, that maya is not listing the verts in the correct selected order as I did. > > Here an example: > > I have selected from a polySphere the following vtx > > [sphere.vtx400, sphere.vtx250, sphere.vtx260, sphere.vtx500, sphere.vtx100] > > so maya is giving me a list like that: > > [sphere.vtx100, sphere.vtx250, sphere.vtx260, sphere.vtx400, sphere.vtx500] It is sorting by name. > I know that there is a flag in the cmds.ls that created a list in ordered Selection and that you have to enable the tos flag from the selectPref command > > cmds.selectPref(tso = 1) > vtx = cmds.ls(os = 1, flatten = 1) > cmds.select(vtx) > > But then he gives me an empty list, I also tried to toggle it in the preference window, but to be honest that couldn't be the way. > > So how can I get a list in an userdefined selection order. > > Thank you guys for any help. This is a maya question rather than a python question. Is not there a maye list where you can ask? If not, is a a stackovevflow-like site that covers maya? -- Terry Jan Reedy