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 help

    Scheduled Pinned Locked Moved SDK Help
    8 Posts 0 Posters 576 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 30/10/2006 at 13:32, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9.6 
      Platform:      
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hi. Forgive me as I am completely new to any type of coding. However I am trying to write some coffee scripts for 9.6. My question is, is there a mathematical operator for "not equal to"?

      for example in the following line of code I would like

      if (tool->GetType() not equal 1016202)

      I'm not sure if there is a mathematical expression for "not equal". Can someone advise? Thanks so much

      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 30/10/2006 at 13:56, xxxxxxxx wrote:

        Same as C/C++/Java: !=

        as is:

        if (tool->GetType() != 1016202)

        Don't forget that there is a difference between the 'equals' operators:

        = is for assignment: var x = 10;
        == is for conditional comparison: if (x == 10)

        Lot of beginners get caught out by that one! 🙂

        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 30/10/2006 at 14:44, xxxxxxxx wrote:

          Thanks so much for your help!!

          By the way, don't know anything about C/C++/Java. This is my first coding experience ever.

          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 30/10/2006 at 15:31, xxxxxxxx wrote:

            Study the COFFEE documentation (esp. the "Introduction", "The C.O.F.F.E.E. Language", and "Tutorials"). I'd also suggest getting some sort of C++ or Java 'Reference' book. This will give you a general idea of the syntax and how various operators/statements work in C++/Java - which work similarly in COFFEE to a good extent.

            Look at the examples in the documentation (there are usually links to code or embedded code in these at the bottom of various Reference sections).

            You can download the R9.5 COFFEE Windows Documentation here.

            If you are on a Mac, you will have to live with HTML Documentation from here

            Good luck in your learning and coding! 🙂

            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 30/10/2006 at 20:01, xxxxxxxx wrote:

              thanks for all your generosity. SO far, I'm getting a big headache doing this. But I've made some progress.

              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 30/10/2006 at 20:43, xxxxxxxx wrote:

                One more question. Writing a script

                I have an arbitray tool chosen and active. I run the following script

                CallCommand X
                (do this)
                CallCommand Y
                (do this)
                CallCommand Z
                (do this)

                THe way the above script is written, after the script is run, tool Z will be the active tool. However I want the original tool to remain the active tool.

                How would I get the script to return back to the original tool that was active?

                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/10/2006 at 02:56, xxxxxxxx wrote:

                  You could do something like this:

                    
                  var old_tool = doc->GetActiveTool()->GetType();  
                  CallCommand(CommandX);  
                  CallCommand(CommandY);  
                  CallCommand(CommandZ);  
                  CallCommand(old_tool);  
                  

                  This stores the Command ID in the variable old_tool, then calls your CommandX,Y,Z and then calls the old tool again.

                  cheers,
                  Matthias

                  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/11/2006 at 17:51, xxxxxxxx wrote:

                    Thanks so much for your help.   Got it figured out.

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