Allowing Arbitrary Indentation in Python
Ross Ridge
rridge at caffeine.csclub.uwaterloo.ca
Wed Dec 19 21:44:34 EST 2007
Sam <L33tminion at gmail.com> wrote:
>cmds.window(t='gwfUI Builder')
>cmds.paneLayout(configuration='vertical3', ps=((1, 25, 100), (3, 20,
>100)))
> cmds.paneLayout(configuration='horizontal2')
> cmds.frameLayout(l='Layouts')
> cmds.scrollLayout(cr=True)
> cmds.columnLayout(adj=True, cat=('both', 2))
> for i in layouts:
> cmds.button(l=i)
> cmds.setParent('..')
> cmds.setParent('..')
> cmds.setParent('..')
> cmds.setParent('..')
>cmds.setParent('..')
>cmds.showWindow()
An alternative would be to do something like the following:
cmds.window(t='gwfUI Builder')
cmds.paneLayout(configuration='vertical3', ps=((1, 25, 100),
(3, 20, 100)))
cmds. paneLayout(configuration='horizontal2')
cmds. frameLayout(l='Layouts')
cmds. scrollLayout(cr=True)
cmds. columnLayout(adj=True, cat=('both', 2))
for i in layouts:
cmds. button(l=i)
cmds. setParent('..')
cmds. setParent('..')
cmds. setParent('..')
cmds. setParent('..')
cmds.setParent('..')
cmds.showWindow()
Stylistically it's not much better, but you don't need to change Python
interpreter for it work.
Ross Ridge
--
l/ // Ross Ridge -- The Great HTMU
[oo][oo] rridge at csclub.uwaterloo.ca
-()-/()/ http://www.csclub.uwaterloo.ca/~rridge/
db //
More information about the Python-list
mailing list