Tue, Oct 22, 12:31 AM CDT

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: wx.TreeCtrl GetIndent


PhilC ( ) posted Wed, 12 January 2011 at 1:39 PM · edited Mon, 21 October 2024 at 10:33 PM

wx.TreeCtrl GetIndent

Can someone please explain what this is. I wanted something that would quickly tell me the root/parent/child level of a tree item but unless I'm using this totally incorrectly GetIndent will not do it.

Thanks.


semidieu ( ) posted Wed, 12 January 2011 at 2:11 PM

Good question... also interested to know :)

  I'm using the basic 'GetItemParent' and GetNextChild function to read in a treectrl.


PhilC ( ) posted Wed, 12 January 2011 at 2:24 PM

Yep :)

I can parse a Poser file to produce a tree. I'm needing to walk the tree to reproduce the file. Saw the GetIndent method and foolishly thought that I could keep track of bracket levels with it.


semidieu ( ) posted Wed, 12 January 2011 at 2:51 PM

Just took a look at the documentation:

** **

GetIndent

Returns the current tree control indentation.

   So it won't give you the indentation of the item (if this is what you want). I would use a function that would count the number of parent items using tree.GetItemParent() until you receive an error.

 


PhilC ( ) posted Wed, 12 January 2011 at 3:02 PM

That would work, thanks.


semidieu ( ) posted Wed, 12 January 2011 at 3:12 PM

You're welcome :)


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.