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

    Please explain this code

    Scheduled Pinned Locked Moved PYTHON Development
    7 Posts 0 Posters 583 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 01/07/2015 at 01:00, xxxxxxxx wrote:

      Hey guys
      I came across some python code for cinema 4d here:http://code.vonc.fr/?a=21
      This is i am trying to reverse engineer it how he made the code.
      Can somebody pls explain the algorithm or the process he used for making this plugin (allowing alternate selections). I know I am asking for a lot ( website is in french!!!) but it would be gr8 if someone gave a detailed explanation and not just hints. 
      Thanks a lot in advance.

      any help would be appreciated (you can link me to resources where i can learn about handling polygon selections in python for cinema 4d).

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

        On 01/07/2015 at 02:21, xxxxxxxx wrote:

        My approach would be to:
        Translate and replace all the french words.
        Add a print statement to every function.
        Look up all the SDK methods in there to get a feel for what they do and what class they belong to.
        Run it in cinema to get a feel for what it does.

        Or just email the guy and ask 🙂

        -b

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

          On 01/07/2015 at 03:40, xxxxxxxx wrote:

          I have tried playing with the plugin but i cannot understand what Sélectionner, Sur and Décalage do.
          They have varied translation in french. The author is not replying mails. I guess its an old account he uses no more.
          for eg. Decalage means shift in english. It means the intervals right? but it is not working so.

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

            On 01/07/2015 at 04:40, xxxxxxxx wrote:

            Hi,

            I'll leave the code discussion to the community.
            From my side only a link, where BaseSelect class is documented.

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

              On 01/07/2015 at 05:49, xxxxxxxx wrote:

              @CreamyGiraffe Try PM him here: César[URL-REMOVED]


              [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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

                On 01/07/2015 at 14:20, xxxxxxxx wrote:

                An upgrated version of this script including a lot of selections tools is available here in French, English and Czech, CreamyGiraffe : http://code.vonc.fr/?a=23

                I can't explain you all the algo, but you might find all you need with the Neighbor class :
                https://developers.maxon.net/docs/py/2023_2//help/modules/c4d.utils/Neighbor/index.html?highlight=neighbor

                You start at a selected poly and search the selected neighbor polys from it, and the selected neighbor of the neighbors, etc.

                PS : It's not because I don't answer you in the day that my address is unused...

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

                  On 02/07/2015 at 03:16, xxxxxxxx wrote:

                  thanks César

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