Keeping selections valid



  • 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



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 13/07/2004 at 07:16, xxxxxxxx wrote:

    Good question Steve - I hope someone knows the answer to it.  I wanted to do something similar, but ran into the same problem(s)...  what I ended up doing (instead) was creating a tag that is mearly a list of (pre-existing) Selection tags (well, thier names, to be precise).  This way, the user manipulates the Selection tags themselves as usual and uses my new tag to specify which Selection tags are being tracked.
    This works fine if you just need to track/identify selections, but may not work if you need to do something more exotic with them.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 13/07/2004 at 16:27, xxxxxxxx wrote:

    Hi Giblet,
    Well, unless anyone has any bright ideas then it does look like I'm going to have to use that approach. It's messy though, since there's more tags for the user to have to deal with...

    Does anyone know if there is any way of having the selection tags invisible, and operated by another tag which has a corresponding set of buttons in the attrib panel?

    If not then I'm just going to have to have two tags, and make the user establish some kind of link between them (location, name, or baselink)

    Cheers - Steve



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 15/07/2004 at 00:57, xxxxxxxx wrote:

    I just got confirmed that the selection tags are updated separately by the modeling tools themselves, and it isn't possible to pass along this treatment to "hidden" selection tags. So your best bet is probably to rely on the built-in selection tags, and let the user manage them.


Log in to reply