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

    Claude Bonet Tag Not Found

    Scheduled Pinned Locked Moved SDK Help
    11 Posts 0 Posters 852 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 05/01/2005 at 12:42, xxxxxxxx wrote:

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

      ---------
      I'm loading a model that have bones objects and the influenced vertices was "painted" by the Claude Bonet, but when i do obj->GetTag(Tclaudebonet), on any bone object, it returns a NULL value. Why?

      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 08/01/2005 at 03:33, xxxxxxxx wrote:

        hi, nice to see someone how takes care on CBs.
        perhaps this code could help you, but the values (output by console) seem to be invalid, but the amount of CBs is counted correct !!! i don´t know how to read their containing values correctly, and nobody on this forum answered me, yet :°-(
         
        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));
          //Claudebonet test
                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 output
           GePrint(itoa(i,ibuffer,10));
           GePrint(itoa(count,cbbuffer,10));
           //zum nächsten Tag gehen
           tag = tag->GetNext();

        //CBs count
           i++;
           strcpy(ibuffer,"");
           strcpy(cbbuffer,"");
                }  
            } 
            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;
        }

        -----------------------------------
        cheers, christian

        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 08/01/2005 at 06:46, xxxxxxxx wrote:

          Hi,

          @Horta: the CB tags are not on the bones but on the geometry they deform!

          @dojoman: tag->GetDataCount(); will return the count

          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 08/01/2005 at 07:53, xxxxxxxx wrote:

            @3d designer: this gives me the vertex count of the mesh as value count for every CBtag, and this can´t be 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 08/01/2005 at 07:55, xxxxxxxx wrote:

              why can´t this be correct? CB Valuse are set for every vertex, so this must be correct. What do you exactly want the count to return?

              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 08/01/2005 at 08:39, xxxxxxxx wrote:

                the thing is, i want to know which vertex belongs to which CB,
                i have heard that the indices inside the CBs are in the same order like in the mesh, so my idea was to get the count of values of every CBtag to be able to check the current index of the mesh to the corresponding index of the current CBtag by adding every CBcount to a variable (i.e.: generalcount += currentCBcount or similar) ... i hope you know what i am talking about (i am german)
                or is there a better way to know which vertex belongs to which CBtag ??

                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 08/01/2005 at 08:42, xxxxxxxx wrote:

                  something i have to add,
                  the problem is that "tag->GetDataCount();" only works for variable tags, i solved this by casting the basetag, but every CBtag seems to contain as many values as the count of vertices of the whole mesh, and this isnt correct, because whenever i activate a single bone, the CBs appear by their color on a special area of the mesh, and not on the whole mesh, ... u know what i wanna say ??

                  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 08/01/2005 at 08:52, xxxxxxxx wrote:

                    Hi,

                    you cannot work like this. The CB Tag is not dynamically built. It MUST have all vertices included, as each vertex receives a weight value of 0.0 when it is created. It´s not like that vertices displayed as black are not used but they have a value of 0.0!

                    Furthermore you cannot check which vertex belongs to which CB-Tag as there can be overlapping weights, so a unique vertex-CBtag relation is not given.

                    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 08/01/2005 at 09:19, xxxxxxxx wrote:

                      oh my god !!
                      i followed the wrong path ... man, thank you for open my eyes :-))
                      now i understand it, and i can continue my plugin .. GREAT !!!!
                      the only not avoidable prob is, that smd only supports a 1:1 relation between vertex and bone, so that one vertex must only be influenced by one bone ... so how to set priority ? hm, this could cause hard coding 😕
                       
                      thanks anyway 😄

                      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 08/01/2005 at 12:08, xxxxxxxx wrote:

                        oh, thx for replies
                        but i solved this problem some days ago hehe 😜

                        yes, the invisible claude bonet tag lies on the pol object 🙂

                        I think the game engines today dont uses weight values for vertices, it's like vertex map, where the vertices says who is bones they are influenced. In this way, it's much more easy to calculate the final point of each vertices.
                        I think... 😜

                        And getting the CB tag, how i know wich bone it's influenced?

                        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 09/01/2005 at 03:29, xxxxxxxx wrote:

                          @horta:
                          there are as many CBs as bones, the CBs are the first tags which lie on the mesh, so the order of CBs is the same like the order of bones if you go through the tree passing parents and sons
                          rootbone1 -
                             -+ rootbone1_sonbone1
                                --+ rootbone1_sonbone1_son1
                                --+ rootbone1_sonbone1_son2
                             -+ rootbone1_sonbone2
                          rootbone2
                             -+ ...
                          read it recursive to get the same order like the CBtags:

                          you should get this order:
                          rootbone1 > rootbone1_sonbone1 > rootbone1_sonbone1_son1 > ... > rootbone2 ...
                           
                          hope this helps

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