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

    Make all edges selected in generator

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 413 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 03/03/2012 at 12:21, xxxxxxxx wrote:

      Trying to work out how to get all edges on a poly object selected 
      when dropping into a Python Generator

      i.e. nothing selected before dropping on to generator (so it becomes a child of the generator - with all edges selected)

      tried all manner of things - put me out of my misery please

      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 06/03/2012 at 03:40, xxxxxxxx wrote:

        Anyone?

        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 06/03/2012 at 08:22, xxxxxxxx wrote:

          Here's one way to do it:

          import c4d  
          from c4d import utils  
          def main() :  
            
            obj = doc.SearchObject("Polygon")#The polygon object  
            if obj.GetUp() is None: return False  
            
            if obj.GetUp().GetName() == "Python Generator":  
                obj.Edit()              #Make the object active  
                doc.SetMode(c4d.Medges) #Change to edges mode  
                utils.SendModelingCommand(c4d.MCOMMAND_SELECTALL, list = [obj], mode = c4d.MODELINGCOMMANDMODE_EDGESELECTION, bc = c4d.BaseContainer(), doc = doc)  
                  
                c4d.EventAdd()          #Update C4D  
            
          if __name__=='__main__':  
            main()
          

          -ScottA

          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 06/03/2012 at 13:08, xxxxxxxx wrote:

            Hi Scott

            I'm doing this from the generator itself
            but I think the edit and set mode code you've posted are the key 
            just have to find a way to stop the poly objects from constantly selecting itself

            appreciate  feedback

            atb

            Paul

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