[Closed] Max not calling BaseObject::Display for GenCamera object
I’m working on creating a custom camera type for a renderer plugin. So far I’ve managed to make a very basic camera that inherits from GenCamera. This new type is successfully listed in the command panel along with the other camera types and I can create one and move/rotate/scale it in the viewport as you would expect.
The problem I’m running into is that Max is never calling the Display function that I have defined in my new camera type, so nothing appears in the viewport. I looked over the documentation here and I have implemented all the functions it mentions, but I can’t get Max to ever call either the HitTest or Display function.
Anyone have thoughts on where I might be going wrong with this? Is there a flag I have to set somewhere so Max will try to display my camera?
I just set up some simple logging, I was having trouble getting it to display so the first thing that happens when Display is called is that it will log a specific message to a file and flush the log. I’m never seeing that message come up int the log.
Looking over the documentation a bit more, it seems I was going about this entirely the wrong way. It looks like BaseObject::Display doesn’t work with the viewport in recent versions of Max and I should instead be implementing my viewport rendering through the IObjectDisplay2 interface.