Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   API: getting DAG path for input mesh (https://simplymaya.com/forum/showthread.php?t=1934)

playmesumch00ns 05-11-2002 04:20 PM

API: getting DAG path for input mesh
 
I'm writing a node where I've got a MFnData::kMesh attribute as input (called inputMesh). My trouble is I can't seem to get a DAG path to this input mesh.

In the compute method I do this:

MDagPath dagPath

MDataHandle inMeshDataHandle = data.inputValue(inputMesh);

MObject meshObj = inMeshDataHandle.asMesh();

MFnMesh meshFn(meshObj);

meshFn.getPath(&dagPath);

but getPath fails, telling me the object does not exist! The function set can read it fine, i.e. tell me how many edges the mesh has got etc, so why can't I get the path!? Please, does someone know what I'm doing wrong? This is driving me crazy!!

adldesigner 05-11-2002 04:22 PM

Whoa, ask me about design, photography or whatever but dude, you´ve surpassed my limit. Should have seen my face when I read this. :D

Anyway, don´t worry, I´m sure somebody will have an answer for you!

playmesumch00ns 05-11-2002 04:49 PM

hehe, well thanks for taking the time to read it man. Anyone out there know what the answer is?


All times are GMT. The time now is 02:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018