On Thu, Sep 25, 2008 at 5:42 AM, Mario Dubec <[EMAIL PROTECTED]> wrote:
>
> I used this ccecking in compute while I was translating one C++ node from
> devkit (particleAttributeNode I think).

I would still recommend moving that code out to either the
legalConnection/legalDisconnection methods or
connectionMade/connectionBroken. I doubt that will fix your crash, but
it's a good start to cleaning up the compute().

The particleAttributeNode sample node is doing it the way that it is
because, quite frankly, it's badly written. The author tried to cram
what should be two different nodes into one and ended up with some bad
code as a result.

> What I did not say in the script, but I have, is the final part of the
> computation:
>
> outputHandle = dataBlock.outputValue(node.debugMe)
> outputHandle.setString(result)
> dataBlock.setClean(plug)

In that case you should only be executing your code when the plug
passed to your compute() method is for 'debugMe'. For all others your
compute() method should immediately return
om.MStatus.kUnknownParameter.

> so I was expecting, when nothing is connected, the value would be 0 and
> stage 4
> when I connect appropriate nodes, value would be 1 and stage 4
>
> but I get crash only :(

At which stage does it crash?

-- 
-deane

--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

Reply via email to