Review: upgrade to pyglue


Jeremy Selan <jeremy...@...>
 

Commits:
http://github.com/jeremyselan/OpenColorIO/commit/a764a5f7fb151d13be93107697262a670ba34392


This add kwarg support to most of the transform constructors in
python. Makes it way more convenient to construct profiles in python.

Old:
t = OCIO.FileTransform()
t.setSrc('taco')

New:
t = OCIO.FileTransform(src='taco')

group = OCIO.GroupTransform(transforms)

-- Jeremy


"dbr/Ben" <b...@...>
 

Looks much more Python'y \o/

Would be good to have more helpful method signatures for __init__ - would make this feature more discoverable - currently it just says:

help(OCIO.FileTransform)
...
| __init__(...)
| x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Also,
OCIO.FileTransform(cccid = "a")
..causes a segfault - probably due to line 213:

if(cccid) transform->setCCCId(src);

On 04/02/2011, at 5:42 AM, Jeremy Selan wrote:

Commits:
http://github.com/jeremyselan/OpenColorIO/commit/a764a5f7fb151d13be93107697262a670ba34392


This add kwarg support to most of the transform constructors in
python. Makes it way more convenient to construct profiles in python.

Old:
t = OCIO.FileTransform()
t.setSrc('taco')

New:
t = OCIO.FileTransform(src='taco')

group = OCIO.GroupTransform(transforms)

-- Jeremy


Jeremy Selan <jeremy...@...>
 

Ope, that's an embarrassing copy/paste error... fixed!

I totally agree that python docstrings are critical. I'll add the
task to the git issues list, and try to get to it soon.

-- Jeremy

On Fri, Feb 4, 2011 at 2:26 AM, dbr/Ben <b...@...> wrote:
Looks much more Python'y \o/

Would be good to have more helpful method signatures for __init__ - would make this feature more discoverable - currently it just says:

help(OCIO.FileTransform)
...
 |  __init__(...)
 |      x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Also,
OCIO.FileTransform(cccid = "a")
..causes a segfault - probably due to line 213:

if(cccid) transform->setCCCId(src);

On 04/02/2011, at 5:42 AM, Jeremy Selan wrote:

Commits:
http://github.com/jeremyselan/OpenColorIO/commit/a764a5f7fb151d13be93107697262a670ba34392


This add kwarg support to most of the transform constructors in
python. Makes it way more convenient to construct profiles in python.

Old:
t = OCIO.FileTransform()
t.setSrc('taco')

New:
t = OCIO.FileTransform(src='taco')

group = OCIO.GroupTransform(transforms)

-- Jeremy