- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am converting a custom deformer that I wrote using the Python API into C++. One error that I have not been able to resolve is this one.
Error C2248 'Autodesk::Maya::OpenMaya20180000::MFnNurbsSurface::MFnNurbsSurface': cannot access private member declared in class 'Autodesk::Maya::OpenMaya20180000::MFnNurbsSurface' Project3 c:\users\xxx\source\repos\test_node\project3\xxx.cpp 163
I've looked through some similar forum posts and it seems as though this is happening because the constructor for MFnNurbsSurface is private for some reason. I've updated to the most recent devkit for maya 2018 but that does not resolve it. Is this a known bug, and if so are there any workarounds? Below are what I think are the relevant parts of the code.
inputSurface = tAttr.create("inputSurface", "is", MFnNurbsSurfaceData::kNurbsSurface);
V
V
MDataHandle inputSurface_data = dataBlock.inputValue(inputSurface, &status);
McheckErr(status, "Error getting inputSurface data handle\n");
MObject inputSurface_val = inputSurface_data.asNurbsSurface();
V
V
MFnNurbsSurface mFnSurface = MFnNurbsSurface(inputSurface_val); <<<THIS IS THE LINE THAT CAUSE THE ERRORS
Any help or insight would be greatly appreciated.
Solved! Go to Solution.