Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Subdivide

    SDK Help
    0
    26
    14.5k
    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
      Helper
      last edited by

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

      On 03/09/2009 at 20:41, xxxxxxxx wrote:

      After you get objPoly, check that it isn't NULL:

      if (!objPoly) return FALSE;

      Also, make sure that the mdat.bc is set to a BaseContainer. I'd do this in Message after declaring mdat. Declare a BaseContainer and add it:

      BaseContainer bc;
      mdat.bc = bc;

      You may also want to set your input BaseContainer value (HYPERNURBS_SUBDIVISION).

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

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

        On 03/09/2009 at 20:59, xxxxxxxx wrote:

        now I have this in Message()

        > `

          
        \>  Bool SculptTool::Message(BaseDocument* doc, BaseContainer& data, LONG type, void* t_data)  
        \>  {  
        \>    
        \>  switch (type)  
        \>       {  
        \>            case MSG_DESCRIPTION_COMMAND:  
        \>            {  
        \>            DescriptionCommand *dc = (DescriptionCommand* ) t_data;  
        \>            if (dc->id[0].id==COMMAND_SUBDIVIDE)  
        \>                 {  
        \>                 GePrint("Subdivide Button Clicked");  
        \>                 ModelingCommandData mdat;  
        \>                 BaseContainer* bc;  
        \>                 mdat.bc = bc;  
        \>              DoCommand(mdat);  
        \>                 }  
        \>            }  
        \>       }  
        \>       return TRUE;  
        \>  }  
        \>  
        

        `

        and this is the error.

        warning C4700: uninitialized local variable 'bc' used

        I assume there is more I have to do to the basecontainer.

        🙂
        ~Shawn

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

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

          On 03/09/2009 at 21:19, xxxxxxxx wrote:

          Don't use a pointer to it, just declare it as I did above. 🙂

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

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

            On 03/09/2009 at 21:25, xxxxxxxx wrote:

            hmm.. now I get this.

            error C2440: '=' : cannot convert from 'BaseContainer' to 'BaseContainer *'

            after changing

            BaseContainer* bc;

            to

            BaseContainer bc;

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

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

              On 03/09/2009 at 21:37, xxxxxxxx wrote:

              mdat.bc = &bc;

              That will do it.

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

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

                On 03/09/2009 at 21:43, xxxxxxxx wrote:

                yes it did. Thanks a lot Robert.

                Off to bed now.

                Thanks for your help.

                ~Shawn

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