relational views and python

Date : Mon, 30 Jul 2007 13:34:28 +0930
To : XSI <XSI(at)Softimage.COM>
From : benp <ben.paschke(at)rsp.com.au>
Subject : relational views and python
hey list,
is it possible to use pyhon as the script language inside a relational view?
Python seems to work, but the relational view object when accessed
inside the _Init callback seems to be odd. Good ol' win32com fun, i
expect, right?

if i have this defining my script block:

<script language="Python"><![CDATA[
def RV_Init( in_rv ):
    ap = Application
    log = ap.LogMessage
    log("init - %s"& in_rv.Name)
]]></script>

i can't seem to access any members from the 'in_rv' object (which i
think should be a 'view' object) . I get this error:

# ERROR : Traceback (most recent call last):
#   File "<Script Block >", line 7, in RV_Init
#     log("init - %s"& in_rv.Name)
# AttributeError: 'PyIUnknown' object has no attribute 'Name'
#  - [line 6]
# ERROR : Relational view script Error (Python ActiveX Scripting Engine)
# ERROR : In file: customBrowser.xsivw
# ERROR :    [4] def RV_Init( in_rv ):
# ERROR :    [5]     ap = Application
# ERROR :   >[6]     log = ap.LogMessage
# ERROR :    [7]     log("init - %s"& in_rv.Name)
# ERROR :    [8] (null)


any ideas?
thanks,
benp
---
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.