Midtown Madness2 road plugin

Post a reply

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: Midtown Madness2 road plugin

Re: Midtown Madness2 road plugin

Post by Oleg » Wed Jul 09, 2014 8:12 am

moved to "ZModeler2: SDK" subforum

Re: Midtown Madness2 road plugin

Post by Oleg » Wed Jul 09, 2014 8:11 am

Inside queryLayout(... scene::INode* pNode ...)

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;

Midtown Madness2 road plugin

Post by annabelledodd » Tue Jul 08, 2014 6:47 pm

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?

Top