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

    select visible polygons like a scanner

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 315 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 18/11/2013 at 23:36, xxxxxxxx wrote:

      Hi there, I have the Problem that I would select only visible Polygons from a CAD File. My Idea is to make a cameramove around the object (animation) and select with liveselection (with a big radius and pressed shiftbutton) the visible polygons.
      But now the question: can I make a script that hold the shift key and click in the middle from the editorview and repeate this?
      I hope you can help me (I´m a script beginner, Sorry)

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

        On 19/11/2013 at 02:16, xxxxxxxx wrote:

        scripts don't work that way. if you are looking for something like an adobe action, c4d does not 
        offer that.

        utils.GeRayCollider and utils.ViewportSelect are the classes you could use for your task.

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

          On 19/11/2013 at 06:53, xxxxxxxx wrote:

          Thank you, and how can I use this? Do you have a code snipple for example?
          Thx for the help!

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

            On 19/11/2013 at 07:18, xxxxxxxx wrote:

            Snipple ? I think you mean snippet 😉 Both classes are more a concept rather than a ready to 
            use solution. Your task is quite exotic, so you won't find an example that does exactly what 
            you want. But there are plenty of threads (and examples) here that deal with the GeRayCollider 
            class. Use the search function. For the VPS class it is more or less the same. Come up with some
            (own) code and we will help you. You need specific questions.

            Here is a code snippet dealing with the mouse over highlighting for some polygon selection tools,
            utilizing the vps class for that. Be aware that vps can produce nasty memory leaks (when initialized 
            step by step for multiple objects. there should be a thread started by me, describing that problem).

            http://codepad.org/6rMpVdQ5

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