View Full Version : calling dnoise() from the api ?
ranxx 06-16-2008, 04:13 PM hey all,
is there a way to call dnoise() from within the api ? I am writing a plugin from which I would like to access the standard mel function dnoise(). Is there a way to do this without writing it myself ? I have been looking into using the publicly available libnoise, but it seems that seeing as maya has this function internally there should be a way to access it from c++ code.
thanks
-ranxx
|
|
Robert Bateman
06-16-2008, 04:51 PM
MGlobal::executeCommand
ranxx
06-16-2008, 05:03 PM
but doesn't that just execute mel code from within the api ? I was hoping to be able to just call something like dnoise() from within c++ code, without having to invoke the mel interpreter. The whole reason I am writing this in c++ is for speed of execution.
-ranxx
MGlobal::executeCommand
Robert Bateman
06-16-2008, 05:53 PM
tough luck. the only way to access mel is via mel.
ranxx
06-16-2008, 06:27 PM
anybody else have any suggestions ?
thanks
-ranxx
bduncan
06-16-2008, 11:31 PM
I'm afraid Rob is right, going through MEL (or Python) is the only way to get access to the command engine from the C++ API. They exposed the command engine directly to Python, but they never did for C++, so you're stuck having to call commands indirectly. Most of the time this isn't so bad because the overhead of compiling/executing a MEL command isn't too significant...but for a speed-sensitive function, I would recomend using your external library.
CGTalk Moderation
06-16-2008, 11:31 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.