Lacking OArrayProperty and OScalarProperty python bindings?

13 views
Skip to first unread message

Lucas Miller

unread,
Oct 11, 2012, 4:25:24 PM10/11/12
to alemb...@googlegroups.com
Hey,

One of you wouldn't happen to have an uncommited version of the python bindings with OArrayProperty or OScalarProperty support, would you?

Otherwise it's gonna be kinda hard to put stuff under userProperties that aren't geom params.

Lucas


Alex Suter

unread,
Oct 11, 2012, 4:51:19 PM10/11/12
to alemb...@googlegroups.com

I’ll ask around.

 

        -- Alex

Ji Hun Yu

unread,
Oct 11, 2012, 4:55:52 PM10/11/12
to alemb...@googlegroups.com
Hey Lucas,

Can you give more specific information about your issue?

There are PyOScalarProperty and PyOArrayProperty in google code. They are the bindings of OScalarProperty and OArrayProperty. Somehow you can't make use of thse?
- Jihun



Sent: Thursday, October 11, 2012 1:25 PM
To: alemb...@googlegroups.com
Subject: Lacking OArrayProperty and OScalarProperty python bindings?

Lucas Miller

unread,
Oct 11, 2012, 5:51:00 PM10/11/12
to alemb...@googlegroups.com
I was updating the python bindings to return the child bounds property directly:

        .def( "getChildBoundsProperty",
              &OGeomBaseSchema::getChildBoundsProperty,
              "Accessing ChildBoundsProperty will create its 3dBox property "
              "if needed",
              with_custodian_and_ward_postcall<0,1>() )

And I was surprised that the returned OBox3dProperty didn't have any of the expected functions on it.

What secret sauce am I missing?

Also, I noticed that the use of  with_custodian_and_ward_postcall is a bit inconsistent between some of the calls to getUserProperties and getArbGeomParams.

Reading about the call, I'm guessing this is only really necessary if a reference is returned, and it really isn't needed on getUserProperties, and getArbGeomParams.

Is this correct?

Lucas

Lucas Miller

unread,
Oct 11, 2012, 6:13:45 PM10/11/12
to alemb...@googlegroups.com
Whoops,

I figured it out, I made a mistake introspecting the getChildBoundsProperty that caused me to miss the exposed setValue function.

Lucas

Ji Hun Yu

unread,
Oct 11, 2012, 6:28:13 PM10/11/12
to alemb...@googlegroups.com
The with_custodian_and_ward_postcall means that the object that returns a value should be alive as long as the returned object is alive. In our case, it is redundant in most of the times because the returned oproperty or geomparams will actually keep a reference to its parent object in c++ side.

I have got most of them removed, but I think there are a few left out there still.
- Jihun



Sent: Thursday, October 11, 2012 2:51 PM
To: alemb...@googlegroups.com
Subject: Re: Lacking OArrayProperty and OScalarProperty python bindings?

Reply all
Reply to author
Forward
0 new messages