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

    Python or Coffee

    General Discussion
    0
    4
    603
    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 07/11/2011 at 02:45, xxxxxxxx wrote:

      Here a Newbee-Question:

      I have to do repeating several changes in a projekt like:
      ---
      select al polygon objects
      change to point-mode
      selekt all points
      optimice
      ---
      or
      ---
      select al polygon objects
      change to polygone-mode
      selekt all polygons
      untriangulate
      ---
      or
      ---
      select all UV-Tags
      delete all selected Tags

      Now my Question:
      What ist the best way to solve the problem?
      Phyton or Coffee
      Does anybody have an example for the problems at the top.

      Thanks

      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 07/11/2011 at 05:44, xxxxxxxx wrote:

        Hi Ronald,

        I think you should use the "Script Log" (located in the "Script" menu). Its help page ("Script Menu" -> "Script Log") contains useful information on how to use it.
        This editor allows you to write a Python script just by recording the actions you perform in CINEMA 4D. Just like a macro recorder.

        For example I get the following Python code when
        I create a Cube
        Make the cube editable
        Activate Points mode
        Call optimize on the cube

        import c4d
        from c4d import documents, plugins
        #Welcome to the world of Python
          
        def main() :
            c4d.CallCommand(5159) # Cube
            c4d.CallCommand(12236) # Make Editable
            c4d.CallCommand(12139) # Points
            c4d.CallCommand(14039) # Optimize...
          
          
        if __name__=='__main__':
            main()
        

        Yannick

        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 07/11/2011 at 06:36, xxxxxxxx wrote:

          Hi Yannick,

          thanks for your replay.
          My main-problem is not to find the "CallCommand"!
          My main-problem is to select all polygon objects or a normal-tag.
          There must be a way to select all and than proceed a modification like
          delete!
          Does anybody out there kow a way to select all polygon-objects??

          Thanks a lot

          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 07/11/2011 at 07:52, xxxxxxxx wrote:

            It might help to go to my website and download the CoffeeBible:https://sites.google.com/site/scottayersmedia/scripting

            It could use another update. But I've stopped updating it because Coffee is fading. And Python is taking over.
            But it's full of things like grabbing objects, points polygons, etc.. and lots of other common tasks that might help you get started.

            -ScottA

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