I decided to use the 'built-in' nodes browser, and instead use a context menu action to select whether or not to generate roads on the selected spline. The float window will only show some properties for the currently selected spline.
I got a context menu tool to work, but it should only be visible on spline objects. Can I determine the type of object inside queryLayout()?
Also, should this topic be moved because it is no longer about ZModeler 1?
Midtown Madness2 road plugin
Moderator: Oleg
-
- Posts: 1
- Joined: Tue Jul 08, 2014 6:41 pm
- Contact:
Re: Midtown Madness2 road plugin
Inside queryLayout(... scene::INode* pNode ...)
you can use the following:
you can use the following:
Code: Select all
ZPtr<scene::ISplineNode> pSplineNode;
if (ZRESULT_OK == pNode->QueryInterface(IID_(scene::ISplineNode), (void**)&pSplineNode))
{
//given object is a spline;
//ensure you can/need your toolbox on this node
return ZRESULT_OK; //accept tool appearance inside context menu:
}
return ZRESULT_FALSE; //node does not suit for your tools;
Re: Midtown Madness2 road plugin
moved to "ZModeler2: SDK" subforum