Re: Diving into python, some questions...

Date : Fri, 1 Sep 2006 08:22:29 +0930
To : XSI(at)Softimage.COM
From : Nick <nick.petit(at)gmail.com>
Subject : Re: Diving into python, some questions...
it's .Parameters (watch the capitalization, Python is unforgiving...)
I sometimes cast the Parameters to a list ( "list(oObj.Parameters)" ) and iterate through them as you normally would any list, but I've only rarely and on very specific cases run into problems with getting a collection from doing a oObj.Parameters call... those cases involve custom props, proxy params and ScOps on the prop, or ye old dynamic dispatch problem...

btw, did I mention I'm still on 4.2 using python 2.3? (Hopefully not for too much longer...)

On 9/1/06, Steven Caron <carons(at)gmail.com> wrote:
i have been using nestedobjects alot, but seems silly.
 
why cant i just use .parameters and return a collection of parameters and loop through as objects, access their values. period
 
steven

 
On 8/31/06, Greg Smith <greg(at)stanwinston.com > wrote:
With Python I have noticed to be a bit more picky with parameters. In
e.g. if you run a loop to return the name of all the parameters under a
given object, lets say a Pass object, all you'll get is a Name
Parameter. To access RenderOptions or Partition data, you actually have
to use the NestedObjects Property. So this might be what your actually
looking for.

Greg

On Wed, 2006-08-30 at 16:49 -0700, Steven Caron wrote:
> I am having a ton of trouble with the .Parameters method...
>
> is this usually the case? some command will return an object that has
> parameters and i cant retrieve them like i expect. i should be able to
> get a parameters collection with the .Parameters method
>
> any advice?
> steven
>
>
> On 8/27/06, Aloys Baillet < aloys.baillet(at)gmail.com> wrote:
>         Hi Steven,
>
>         I think this was to make XSI developpers life easier, not
>         yours!
>         None, True and False are the standard python kewords
>         equivalent to JScript's null, true and false (notice the
>         Capitalization!)...
>         For the module import, global scope is highly recommended.
>         Here are Guido VR guide lines for developping Python, in
>         python. I find this is a good starting point to see what is
>         "good" or "bad"...
>         http://www.python.org/dev/peps/pep-0008/
>
>         Cheers,
>
>
>         Aloys
>
>
>         On 8/27/06, Steven Caron < carons(at)gmail.com> wrote:
>                 could someone point out to me the reason the new
>                 command wizard for python, has...?
>
>                 null = None
>                 false = 0
>                 true = 1
>
>                 is this purely to make it easy for me? does python not
>                 understand true and false as 1 and 0 automatically?
>
>                 also should i put my module imports outside my
>                 function's scope? there is your typical
>                 win32com.client imports being called at the top of the
>                 generated code. should i go ahead and put my xml
>                 parser module up there? or should i keep it in my
>                 function's scope?
>
>                 btw i am having more fun now
>
>
>                 steven
>
>
>
>
>
>         --
>         Aloys Baillet - XSI Technical Director
>         Character Dpt - Animal Logic
>         --
>

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi



Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.