Notifications
Clear all

[Closed] [SDK] Geometry object with proxy helper/shape/icon?

Ok, uses again Nitrous to render custom mesh, but nothing shows… again

So to sum up:

  • I can’t render custom/additional meshes for example: Mesh myMesh_1, myMesh_2 – but examples shows that should not be a problem. Neighter using GraphicsWindow or Nitrius

  • I can’t draw simple lines or text using GraphicsWindow in Object pluigin (works only with Modyfier plugin)

  • the only mesh I CAN render is standard member “mesh”

Its very weird or I am missing something…

I think I found the reason :

any of these functions: Display(), PrepareDisplay() or UpdatePerNode() are not called.
I put DebugPrint in each function to see when every function is called, none of theese three is ever called, so the display code is not run.

But why these functions are not called? Should I set some additional Notifications?

Are you returning a proper IObjectDisplay2 interface when queried?

YES I FINALLY GOT IT !
Everything WORKS

So the problem was in overriding this virtual method:
BaseInterface* myObject::GetInterface(Interface_ID iid)

but I followed max SDK help files:
http://help.autodesk.com/cloudhelp/2017/ENU/Max-SDK/files/GUID-A7262BEC-A063-4E70-A1D9-7971DBF2E883.htm

I should not declare and override it.

and so then overriding this virtual method:
unsigned long myObject::GetObjectDisplayRequirement() const

by returning for ex: MaxSDK::Graphics::ObjectDisplayRequireLegacyDisplayMode; will call Display() method
and returning 0 will call PrepareDisplay() and UpdatePerNodeItems()

I finnaly can draw custom meshes and lines etc in vierport

Klvunk, ivanisavich THANK FOR YOUR HELP

Page 2 / 2