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

    COFFEE works in Editor but not render!?

    SDK Help
    0
    17
    1.2k
    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
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 26/10/2005 at 12:56, xxxxxxxx wrote:

      I can't confirm this. The following seems to work fine here: (with my user data at :1)

          
          
          GetFirstTag(obj, type)  
          {  
              var tag = obj->GetFirstTag();  
              while (tag) {  
                if (tag->GetType() == type) return tag;  
                tag = tag->GetNext();  
              }  
              return NULL;  
          }
          
          
          
          
          main(doc,op)  
          {  
           println(GetFirstTag(op,Tcoffeeexpression)#ID_USERDATA:1);  
          }
      
      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 26/10/2005 at 13:16, xxxxxxxx wrote:

        Yup it works (for me as well) in printing to console as well as editor animation.
        But it still doesn't animate the op (a Camera in this case) when rendering or making a render preview.

        I will try again in a minimalistic scene.

        Cheers
        Lennart

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 26/10/2005 at 14:05, xxxxxxxx wrote:

          Hi,

          I was just wondering if you had overloaded the copy(), read(), write(), functions in the tag. I assume you have or it doesn't need it though, because you said it works with a very simple set up. I also haven't used the R9 COFFEE SDK. Sorry if this is a dumb question, but I just thought I'd mention it.

          Good luck.

          Aaron

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 26/10/2005 at 14:06, xxxxxxxx wrote:

            I certainly must be missing something obvious here...
            If I put another Tag as first tag, then the Coffe tag is not found.

            It all stops at the line:
            tag=tag->GetNext();

            with the error:
            (9) Member not found
            File: expression
            Line:7

            So in my case it is still the same problem and I'm at loss atm.

            Cheers
            Lennart

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 26/10/2005 at 14:17, xxxxxxxx wrote:

              And it was of coarse my fault!
              I had misspelt GetNext (typed getNext)
              It was still gray in the expression editor (should it be that) so I missed it.
              -and- it worked in editor..
              Let me apologize and thanks for the help.

              Cheers
              Lennart

              1 Reply Last reply Reply Quote 0
              • H
                Helper
                last edited by

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 27/10/2005 at 11:32, xxxxxxxx wrote:

                @Aaron. I totaly missed your post. Thanks for the input.
                No copy,read,write() was / is involved, this was in a clean coffe tag test setup.

                To finally get it into work in a cof file I put the Tagchecking code in its own "apartment" before Execute.

                Cheers
                Lennart

                1 Reply Last reply Reply Quote 0
                • H
                  Helper
                  last edited by

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 27/10/2005 at 22:16, xxxxxxxx wrote:

                  What do you mean by "apartment?" A function? Just wondering.

                  Aaron M

                  1 Reply Last reply Reply Quote 0
                  • H
                    Helper
                    last edited by

                    THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                    On 28/10/2005 at 15:23, xxxxxxxx wrote:

                    Hi, like this:

                    public:

                    GetFirstTag(obj,type);
                    Execute(doc,op);

                    PluginName::GetFirstTag(obj,type);
                    {
                    the code
                    }

                    PluginName::Execute(doc,op);

                    etc.

                    Next worry is that now, when it is a expressionplugin (.cof),
                    I need to move the UserData faders to the plugintag (instead of the "old" COFFEE Tag)

                    In the code to get the UserData on the COFFEE there is the line:
                    var coffeetag = GetFirstTag(op,Tcoffeeexpression);
                    I'm trying to get the plugin tag instead..(replaceing Tcoffeeexpression)

                    In the SDK there are the options:
                    -Tplugin (it gets red in the ExpressionManager but don't work, for me)
                    -Tcoffeeplugin (doesn't get red and doesn't work, for me)
                    -Texpressionplugin(doesn't get red and doesn't work, for me)

                    (The final code is of coarse writen into the text.cof file. I just load it into a in active COFFEE tag to see better the code while test typing)

                    I suppose I miss something here...(as usual)...

                    To recap. I need to place UserData on the new PluginTag (That this expression plugin make)
                    The method used for getting the UserData from a regular COFFEE Tag doesn't seem to apply.

                    (The choise to use UserData faders/sliders is so far on purpose, ease of
                    use and the ability for the user to customize each instance while keeping entries low)

                    Thanks and Cheers
                    Lennart Wåhlin - tcastudios

                    1 Reply Last reply Reply Quote 0
                    • H
                      Helper
                      last edited by

                      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                      On 28/10/2005 at 18:02, xxxxxxxx wrote:

                      None of those. To get your own plugin tags from an object, use the unique Plugin ID that you received (or one of the specified range of test ones if you have not gotten one yet).

                      So, if you declared the Plugin ID somewhere like this:

                      enum  
                      {  
                      MYPLUGIN_ID = 12345678  
                      }
                      

                      Do this:

                      var myplugintag = GetFirstTag(op, MYPLUGIN_ID);
                      

                      At least this is how it works in the C++ SDK. 🙂 It is possible that you may need to check using instanceof() and instead of using the Plugin ID, you would use the plugin class name:

                      // Your plugin tag class derivative  
                      class MyPluginTag : PluginTag  
                      {  
                      };  
                        
                      // Wherever you're searching for your plugin tag on 'op'  
                      var tag;  
                      // Go through object 'op' tags  
                      // - Note that the for loop has no body.  
                      // - It ends when there are no more tags on 'op' or one of yours is found  
                      for (tag = op->GetFirstTag(); tag && !instanceof(tag, MyPluginTag); tag = tag->GetNext());  
                      if (!tag) println("None of my tags found!");
                      

                      I think this is probably more like what COFFEE would expect.

                      1 Reply Last reply Reply Quote 0
                      • H
                        Helper
                        last edited by

                        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                        On 29/10/2005 at 08:22, xxxxxxxx wrote:

                        Hi, and thanks. It looks as if using the Plugin ID works fine in my first tests today. I did try it yesterday but must have done something wrong then.

                        Cheers
                        Lennart

                        1 Reply Last reply Reply Quote 0
                        • H
                          Helper
                          last edited by

                          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                          On 30/10/2005 at 18:58, xxxxxxxx wrote:

                          Hi everyone. I´m still working on my "bone" tag. I have changed the user data links into dialogs and containers, in order to have a full regular tag.
                          But I had a strange problem: when I render in the viewer, I get just the first deformation of my scene, not the whole animation.
                          It is amazing, but if I put my code in a default c4d coffee tag, everything goes well, except that I have to search the objects by their names, instead of getting them from a user area. I suppose that it's a harder way for c4d to get them this way. Have someone any idea?
                          My code is a bit more organized since I posted it, and it works faster. I still draw the vertex weights by hand, but it's not so difficult that for the default c4d bones. I could post my c4d version of the p3 woman, but I don´t know if it is legal, so I will make a menu plugin that import a Poser-exported .obj and copyes my rigging...

                          1 Reply Last reply Reply Quote 0
                          • H
                            Helper
                            last edited by

                            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                            On 09/05/2006 at 05:55, xxxxxxxx wrote:

                            Ive got the same problem (works in editor but not in render) and I just cant fix it.
                            My spin on the problem is that my coffee is running in a coffee node inside an xpresso tag.
                            And ive tried using the getfirsttag() method listed above. (I ported my code into a expressiontagplugin, and (when c4d decides its in the mood to run it) it did work. But not from within my coffee node.
                            Ive also tried searching for objects and their tags using different methods, specifying them hardcoded by hand, you name it (to simulate the getfirsttag solution above)
                            Ive tried putting userdata items on my xpresso tag, on the object that contains the xpresso tag, hardcoding my values into variables inside the code, passing my userdata items in via xpresso.
                            All methods work for getting my data into my coffee - lots of println()'s show the data its processing on is fine, file names of files im reading are fine, the values being processed are fine.
                            But..... Nothing! Always works in the editor - not the renderer.
                            Note: I want this to be run specifically from inside c4d - not from a plugin. And I cant run it from a coffee tag as they dont support the file operations (really suprises me the file reading limitations in a cofee tag)
                            Does anyone have any ideas? Im all out 😞 😞 😞
                            Many thanks
                            martin

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