Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    MDATA_SELECTION_VISIBLE trouble

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 215 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

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

      On 28/02/2010 at 11:08, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   11.5demo 
      Platform:      
      Language(s) :     C++  ;

      ---------
      Hi there,

      I wrote a small SceneHook Plugin that reacts to the "Only Select Visual Elements" checkbox of the four selection tools.

      GePrint(LongToString(doc->GetAction()) returns the ID´s 200000083,200000084,200000085,200000086 (ID_MODELING_LIVESELECTION, ID_MODELING_RECTSELECTION, ID_MODELING_FREESELECTION, ID_MODELING_POLYSELECTION) when selecting the tools, so I know if they are active.

      But when I try to check if the option is set, I run into some trouble...:

      BaseContainer *data = GetToolData(doc, doc->GetAction());
      if(!data) return FALSE;
      if(data->GetBool(MDATA_SELECTION_VISIBLE) || data->GetBool(MDATA_SELECTLIVE_VISIBLE){

      All select tools have the ID 2107 (MDATA_SELECTION_VISIBLE) for that checkbox aside from the "Live Selection" - 2108 (MDATA_SELECTLIVE_VISIBLE).

      Strangely "GetBool(2107)" returns false in any case for the free- and poly selection tools.

      Also tryed data- >GetParameter(DescLevel(MDATA_SELECTION_VISIBLE),d); ...

      I found that the live-and rectangle selection tools enumerate those ID´s in their *.h file while the free- and poly selection tools don´t - I think this might be the issue.

      Hoever I can read and set them perfectly in Coffee and PY4D... strange.

      Maybe I overlooked something vital here...
      Is there a solution or workaround to this?

      Cheers!

      PS:
      I also noticed that a bd- >Handle2D(Vector(mx+18, my+10,0), HANDLE_MIDDLE); drawn to the viewport gets overlayed by geometry objects if OpenGL is active.

      Is there a simple way to prevent this or do I have to draw a Handle3D?

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

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

        On 28/02/2010 at 12:36, xxxxxxxx wrote:

        It seams that free and poly selection inherit the MDATA_SELECTION_VISIBLE option from the rectangle tool so I really had the wrong approach here...

        Works fine now.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post