op->GetPointCount() problem
-
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 -
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?
-
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 -
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.
-
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