On 14/08/2013 at 05:38, xxxxxxxx wrote:
Hi tofuburger,
as far as I understand, this is not what we need. We want to make an object *pickable*. The PickSessions, as far as I understand it, is to pick an object. That is also the usage example given in the documentation:
"Data structure for pick sessions. Custom GUIs can implement their own pick session feature. Currently only the LinkBoxGui supports pick sessions."
Also, since the object doesn't seem to be visible to the CINEMA 4D picking in the first place, it would probably also be invisible to a PickSession.
Let me reiterate, what Satara and I are trying to achieve. We have a generator object, that has three different viewport modes. Two of these modes just create polygonal geometry and place it in the cache. Picking works fine.
The third mode uses the Draw() function of the object to draw points, lines, and polygons right into the viewport. In that case, our object is not pickable using the standard cinema 4d selection tools (live selection, lasso selection, etc.). It generally seems like objects that draw themselves as something else than just geometry in the cache, can be made pickable somehow. Examples are the light and camera objects, as well as the Joints from the character tools.
Light and Camera might be special cases that are not exposed through the API, but as far as I know, the Character Tools use the regular SDK.
Another thing, that may or may not influence this, is that we are planning to move our drawing into a SceneHook instead of the objects draw function. Reason for this is that we
(1) in certain cases want to overlay our manually drawn stuff over the polygonal geometry and
(2) want to make sure it also gets drawn when used with render instances, which currently doesn't seem to work.
Still hoping for a way to get this to work.
Best
Timm