[Closed] SDK: changeable-type scene object?
I want to create a helper object that can be displayed in several different ways (similar to how a point can be a center marker, tripod, cross, or box). In my case, I want something that can display as a cross (same as for the point helper), a single straight line, or a plane.
Can anyone recommend a good starting point?
pthelp.cpp in the helpers project ? you can junk the save & load code though and much of the display code is a mess.
I did a slightly cleaned up version, you can use that if you like
again for your version you can cull the save & load as you don’t have to support pre max v4 versions
The code you gave me works perfectly, but there’s still a lot of it I don’t really understand. For example, the Display function – what exactly causes this to get called? I’m trying to build a helper up from scratch to learn more about how all the parts interact. I have a Draw function to build the polygon, which is in turn called by the Display function. But the Display function apparently needs something to trigger it which is still lacking.
I could start copying over functions from the point helper example you gave me until I find the right one, but I figured I might as well ask and save myself some aggravation…
EDIT:
Okay, I think I figured it out, or at least enough to get started. In order for Display to be called, the helper object needs a bounding box so Max can determine whether it is within viewport bounds.