Python node and Vec3Array

23 views
Skip to first unread message

Sveinbjörn J. Tryggvason

unread,
Mar 8, 2012, 7:36:42 AM3/8/12
to coral-app
Hi, I've been looking into coral and I'm really impressed and this
looks very, very promising. I was dabbling with writing a python node
that would create some points I could draw with a DrawPoint node. I
specialized my output to a Vec3Array type but now I'm having problems
finding out how to output points as an array. To output a single point
I could simply do this:
self.output.outValue().setVec3ValueAt(0, Imath.Vec3f(1,5,10))
but what about outputting an array? There is a setVec3Values method,
but I'm not sure what that method is expecting (the error message
specifies an c++ Imath Vec3f vector along with an allocator).

One more thing, is there a way to unload or reload a plugin that you
have already loaded?

All the best,
Sveinbjörn

Andrea Interguglielmi

unread,
Mar 8, 2012, 11:40:31 AM3/8/12
to cora...@googlegroups.com
Hi Sveinbjörn,

Thanks for trying out coral, there are lots of cases where some c++ APIs don't have a python wrapper yet, and the same applies the other way around in some cases.
I'll fix that for you within the next couple of days, meanwhile if you're actually compiling from the source you might want to have a look at the python wrappers yourself, they are pretty easy to understand.
 
Cheers,
Andrea


2012/3/8 Sveinbjörn J. Tryggvason <s...@sjt.is>

Sveinbjörn J. Tryggvason

unread,
Mar 8, 2012, 12:11:43 PM3/8/12
to cora...@googlegroups.com
Ok, I haven't had the time to gather all the dependencies for coral -
maybe I'll find the time in the coming days, but a fix would be
greatly appreciated.

Fantastic stuff!
-Svenni

Andrea Interguglielmi

unread,
Mar 12, 2012, 8:24:54 AM3/12/12
to cora...@googlegroups.com
Hi Sveinbjörn, the fix is not in the latest commit to the sources, but it might be a while before another release.

Sveinbjörn J. Tryggvason

unread,
Mar 12, 2012, 8:33:53 AM3/12/12
to cora...@googlegroups.com
Ok, no worries.

On Mon, Mar 12, 2012 at 12:24 PM, Andrea Interguglielmi

Andrea Interguglielmi

unread,
Mar 12, 2012, 8:45:59 AM3/12/12
to cora...@googlegroups.com
oops, I meant to say the fix is "now" on the latest commit : )


2012/3/12 Sveinbjörn J. Tryggvason <s...@sjt.is>

Sveinbjörn J. Tryggvason

unread,
Mar 12, 2012, 9:29:51 AM3/12/12
to cora...@googlegroups.com
When I read this back it makes more sense that way :)

I guess it's dependency-gathering-time!

-svenni

On Mon, Mar 12, 2012 at 12:45 PM, Andrea Interguglielmi

Reply all
Reply to author
Forward
0 new messages