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
    • Recent
    • Tags
    • Users
    • Login

    Move selected points

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 251 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

      On 12/06/2014 at 01:13, xxxxxxxx wrote:

      Say I have a cube and select the top 4 points. How do I move,rotate, scale that 4 points with python.😊

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

        On 13/06/2014 at 09:19, xxxxxxxx wrote:

        I came this far:

        Pnt_Obj = doc.SearchObject("Cube")
                    
            Pnts_List = [1,3,5,7]    
                        
            for i in Pnts_List:
                
                Vec = Pnt_Obj.GetPoint(i)
                
                PosX = Vec.x
                PosY = Vec.y
                PosZ = Vec.z
                        
                Pnt_Obj.SetPoint(i,c4d.Vector(PosX, PosY + Input1, PosZ))
                
                Pnt_Obj.Message (c4d.MSG_UPDATE)

        ---------------------------------------------------------------
        The problem is that it do adjust with the slider "Input1" but it just keep on adjusting because it keeps updating the Vector of the points. Please 😢 how do I fix this??

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

          On 13/06/2014 at 11:11, xxxxxxxx wrote:

          This might help (the actual math). Another "dirty way" is to create a cluster from the selected points rotate the cluster and then kill the object. It's a lot more work to do, and slower, but will get the result you want.

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

            On 14/06/2014 at 22:36, xxxxxxxx wrote:

            thanks for your reply ShawnFrueh

            will check it out, just thought there could be an easier way to move points around 😢

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