THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/07/2004 at 04:56, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.500
Platform: Windows ;
Language(s) : C++ ;
---------
I've got a tag plugin (derived from TagData) which needs to keep track of selections. At a basic level, I need it to act like a Polygon Selection tag.
I've got no problems with getting selections in and out, etc, but after certain editing operations, I end up with an incorrect selection.
The problem is when there is a change to the polygon structure of the mesh. I'm receiving Message() calls for MSG_POLYGONS_CHANGED, but not always with a map. In these cases I can't update the selection because I don't know how it has changed.
Thinking about this some more, if a selected polygon is split during modelling, there needs to be some way of indicating that an additional polygon now needs to be selected, in addition to any remapping. Clearly this can't be sent as part of the VariableChanged data in the Message call, but where is it?
Assuming that the modelling tools look for selection tags and directly update them, then is there any way I can get my local selection to receive the same messages? I guess not, since the tools wouldn't know how to talk to my tag.
How do I keep a BaseSelect object up to date, other than by listening for and acting upon MSG_POLYGONS_CHANGED messages - which doesn't really work, because it's incomplete data?
So, what is the best way of allowing a plugin tag to keep track of a selection, other than creating an additional selection tag? (Something I'd rather not do, since it involves more clutter, and I'd have to worry about the tags being moved about independently in the hierarchy.)
Can I create a new tag derived from a Polygon Selection tag, or an invisible tag somehow owned by my tag?
I'm sure I'm missing something here - any help or insight very much appreciated...
Cheers - Steve