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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    GetPointR, RealToString

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 321 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 01/10/2012 at 02:31, xxxxxxxx wrote:

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

      ---------
      hi

      I don't know what my problem is

      obj is Ocube.

      const Vector *padr= ToPoint(obj)->GetPointR();
               GePrint(RealToString(padr[0].x));    <--- crash point

      then, Crash....

      what is problem? .. 😢

      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 01/10/2012 at 03:53, xxxxxxxx wrote:

        Hi,

        obj should be PointObject and not BaseObject !
        Use IsInstanceOf() to test this.

        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 01/10/2012 at 04:04, xxxxxxxx wrote:

          Exactly. A little addition:

          To get your hands on the resulting point object, use the cache (obj->GetCache()). And if cache is NULL for some reason, try the modeling command MCOMMAND_CURRENTSTATETOOBJECT. In both cases, the result will be a point object (presumed, of course, that obj is a generator that creates point objects).

          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 01/10/2012 at 06:06, xxxxxxxx wrote:

            An even smaller addition:

            Always check allocations and anything that returns a pointer for NULL as an error condition.  It can let you know (if you use GePrint()) that something isn't doing what you expect without crashing.

            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 02/10/2012 at 12:59, xxxxxxxx wrote:

              Thank you very much, all

              GetCache is useful for me.

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