Maxon Developers
    • Downloads
      • All Downloads
      • Cinema 4D Python SDK
      • Cinema 4D C++ SDK
      • Cineware SDK
      • ZBrush GoZ SDK
      • Cinema 4D Python Examples
      • Cinema 4D C++ Examples
      • Project Tool
      • SDK Database
    • Documentation
      • Cinema 4D Python SDK
      • Cinema 4D C++ SDK
      • Cineware SDK
      • ZBrush GoZ SDK
    • Forum
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Forums
      • Overview
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • News & Information
      • Downloads
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Register
    • Login

    SplineObject Question

    SDK Help
    0
    5
    105
    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 24/04/2012 at 17:40, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   13 
      Platform:   Windows  ; Mac  ;  
      Language(s) :

      ---------
      Is it acceptable or possible to AutoAlloc the SplineObject class?

      I try to do

      AutoAlloc<SplineObject>spline(4, SPLINETYPE_LINEAR);

      and I get an error that says argument 2 cannot be converted from LONG to SPLINETYPE.

      Is it not possible to AutoAlloc a SPlineObject?

      Thanks,

      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 24/04/2012 at 20:38, xxxxxxxx wrote:

        Blah!  nevermind,  I just realized I have to pass my spline to another function so AutoAlloc won't work for me.  😞

        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 14/05/2012 at 13:31, xxxxxxxx wrote:

          Okay I am trying to accomplish this again but getting the same results.  This time I do not plan to pass the SplineObject to anything else.  I still get the same error that parameter cannot convert from LONG to SPLINETYPE.

          Is it not possible to AutoAlloc a SplineObject?

          Thanks,

          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 15/05/2012 at 09:59, xxxxxxxx wrote:

            In the 2nd or 3rd line of the error message, you can read something like this:

            m:\blah\resource\_api\ge_autoptr.h(25) : while compiling class template member function 'AutoAlloc<TYPE>::AutoAlloc(LONG,LONG)'
            

            Double-click that line and you'll see that there are several different constructors for AutoAlloc. Because you're passing two parameters to the construction call, the compiler will use this constructor:

            AutoAlloc(LONG p1, LONG p2)     { ptr = TYPE::Alloc(p1,p2); }
            

            Therefore, the second parameter in your call, SPLINETYPE_LINEAR, will be auto-casted from SPLINETYPE to LONG. Then it gets handed over to the actual constructor of the SplineObject class. That one, again, wants the second parameter to be of type SPLINETYPE. But LONG can not be auto-casted back to SPLINETYPE, and that's when the compiler error is thrown.

            Long story short... don't use AutoAlloc in this case 😉

            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 15/05/2012 at 10:24, xxxxxxxx wrote:

              Ah I see!  Thanks Jack.  That helps me understand it better.  🙂

              ~Shawn

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