Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/12/2004 at 06:31, xxxxxxxx wrote:
User Information: Cinema 4D Version: 8.100 Platform: Windows ; Language(s) : C++ ;
--------- hi, my problem is, that my plugin finds all claudebonet tags, but the datacount is wired, i can´t get the right count of elements/vertices per cb-tag code:
BaseTag *tag = obj->GetFirstTag(); int i=0; int count; char ibuffer [33], cbbuffer [33]; while(tag->GetType() == Tclaudebonet) { VariableTag *gtag = (VariableTag * )tag; Real *cnt = (Real* )gtag->GetDataAddress(); //count = sizeof(cnt) / sizeof(cnt[0]); count=0; LONG anz = cnt[count]; while(anz != NULL) { count++; anz = cnt[count]; } //CBs ausgeben GePrint(itoa(i,ibuffer,10)); GePrint(itoa(count,cbbuffer,10)); //zum nächsten Tag gehen tag = tag->GetNext(); //CBs zaehlen i++; strcpy(ibuffer,""); strcpy(cbbuffer,""); }
On 19/12/2004 at 03:29, xxxxxxxx wrote:
no idea ??
On 16/01/2005 at 08:39, xxxxxxxx wrote:
hey admin, delete this thread, problem solved
On 17/01/2005 at 23:33, xxxxxxxx wrote:
Hello
Don't you wanna share your knowledge about this problem and how you solved it. I want to learn about the way to handle the tag.
If you not wish, I'm to say 'sorry'.
With all my respects ... ZawMinTun
On 19/01/2005 at 13:59, xxxxxxxx wrote:
momento ... code: ------------------------------------------------------------------------ #include <iostream.h> #include <stdlib.h> #include <string.h> #include <c4d.h> class SMDFilter : SceneSaverData { public: virtual LONG Save(PluginSceneSaver *node, const Filename &name, BaseDocument *doc, LONG filterflags); static NodeData *Alloc(void) { return gNew SMDFilter; } };
LONG SMDFilter::Save(PluginSceneSaver *node, const Filename &name, BaseDocument *doc, LONG flags) { doc = GetActiveDocument(); BaseObject *obj = doc->GetActiveObject(); if(obj) { //Polygoncount char polybuffer [33]; GePrint("all Vertices: "); GePrint(itoa(static_cast<PolygonObject *>(obj)->GetPointCount(),polybuffer,10)); GePrint("Claude Bonet Tags: "); //Claudebonet test BaseTag *tag = obj->GetFirstTag(); char ibuffer [33]; int i=0; while(tag->GetType() == Tclaudebonet) { GePrint("............."); VariableTag *gtag = (VariableTag * )tag; int cnt = gtag->GetDataCount(); Real *value = (Real * )gtag->GetDataAddress(); //read relevant values i=0; for(int a=0; a<cnt; a++) { if(value[a]==1.0) i++; } GePrint(itoa(i,ibuffer,10)); //go to the next tag tag = tag->GetNext(); } } else GePrint(" - no object"); return TRUE; } Bool RegisterSMD(void) { if(!RegisterSceneSaverPlugin(1111111,"SMDex",0, SMDFilter::Alloc, EXECUTION_RESULT_OK, 0, NULL)) return FALSE; return TRUE; }
-------------------------------------------------------- i hope this help, dont hesitate to ask
sorry for delay.
On 19/01/2005 at 17:06, xxxxxxxx wrote:
Always nice to share!!! Thanks dojoman! (are you into martial arts, btw?)
Robert
On 21/01/2005 at 10:05, xxxxxxxx wrote:
no but i really like movies based on it. so when i had to decide a cool name for my first email-address (in 1998) i chose this one. so from then, it became my synonym, that´s the simple reason