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

    how can I select all polygone objects

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 419 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 08/11/2011 at 00:18, xxxxxxxx wrote:

      Sorry for this noob question

      First: Ihave googled,... read sevear instruction..
      But I'm not a programmner ;-[

      I have to do repeating several changes in a projekt like:
      ---
      select all 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:
      Does anybody have an example for selection all polygones.

      The easyest way would be to use the filter in the objekt-manager
      But I don't find a way to execute "select all polygon-objekts"

      Here my code til now:
      ----------------------
      import c4d
      from c4d import plugins, utils, bitmaps, gui, documents
      #Welcome to the world of Python

      import c4d
      from c4d import plugins, utils, bitmaps, gui, documents
      #Welcome to the world of Python

      def main() :
          c4d.CallCommand(100004746)       #Aufruf Filter

      if __name__=='__main__':
          main()
      ----------------------

      But now?
      What is the command for select all polygon-objekts
      and than to select f.e. the UV-Tag

      Thanks a lot

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

        There is no such command, or do you know such a command within Cinema 4D ?
        You need to write it yourself.

        import c4d  
          
        def walk(op) :  
          if not op: return  
          elif op.GetDown() :  
              return op.GetDown()  
          while op.GetUp() and not op.GetNext() :  
              op = op.GetUp()  
          return op.GetNext()  
          
        def selectAllPolygonObjects(doc) :  
          op  = doc.GetFirstObject()  
          
          while op:  
              if op.CheckType(c4d.Opolygon) :  
                  op.SetBit(c4d.BIT_ACTIVE)  
              else:  
                  op.DelBit(c4d.BIT_ACTIVE)  
              op  = walk(op)  
          
        selectAllPolygonObjects(doc)  
        c4d.EventAdd()
        

        Cheers,

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

          Hey
          chapoo!!!
          You are the best.
          I posted it in the C4D-Network but I didn't get such a good working solution.

          Thanks a lot!

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