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

    op->GetPointCount() problem

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 444 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 20/03/2006 at 11:10, xxxxxxxx wrote:

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

      ---------
      Howdy,

      There is a problem with using op->GetPointCount() in TagData::Message(). If the polygon object is in a HyperNURBS, it returns the point count of the HN and not the polygon object.

      How do you get around this.

      Adios,
      Cactus Dan

      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 22/03/2006 at 13:13, xxxxxxxx wrote:

        Are you sure that it's not just that the message function is called at a time when the polygon object has already been translated by the HN, so that the point count is actually correct?

        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 22/03/2006 at 16:08, xxxxxxxx wrote:

          Howdy,

          Right, it doesn't seem to do that all the time. But I'm curious to know when it will return the HN count and when it will return the actual polygon mesh point count?

          My tag stores the point count in a BaseContainer so that when it receives the message MSG_POINTS_CHANGED, it can check to see if points were added or deleted and adjust it's data accordingly. That works fine because when that message is sent, the op->GetPointCount() is returning the correct count. But I had another block of code that is receiving a custom message and at that point the op->GetPointCount() returned the HN count. I was able to get around this by using the point count stored in the BaseContainer instead of the count returned by op->GetPointCount(). But, it would be good to know for future reference, when it's going to return the HN point count instead of the polygon mesh point count. Just to better understand the flow. ;o)

          Adios,
          Cactus Dan

          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 31/03/2006 at 11:37, xxxxxxxx wrote:

            I think it will only return the HN count when it's actually sitting on the mesh that has been converted by the HN. This will happen during rendering.

            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 31/03/2006 at 12:00, xxxxxxxx wrote:

              Howdy,

              Ah, OK.

              Would that explain the situation where after the tags had been placed, everything worked fine, until another object was added to the document and that's when it crashed?

              That's how I found out that the op->GetPointCount() was returning the wrong count (when I started debuging it).

              Adios,
              Cactus Dan

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