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

    constrain a hair point?

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 380 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/02/2016 at 03:08, xxxxxxxx wrote:

      hello everyone!
      I want do sth like hair constraint tag, constraint a hair point
       I  tryed  hairguide.SetPoint()  , the result looks not correct.
      so I think it is not correct way,but I can't found other way .
      please give me an idea?
       thank you

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

        On 02/02/2016 at 01:39, xxxxxxxx wrote:

        Hello and welcome,

        can you tell us a little bit more about what you are doing? Are you working on a TagData plugin, a Python Tag or something else? If the result looks not correct, what result do you expect? Can you share some of your code to show what you are actually trying?

        Best wishes,
        Sebastian

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

          On 02/02/2016 at 03:14, xxxxxxxx wrote:

          thanks for your reply,
          here is the scence file,
          https://www.sendspace.com/file/ae3e0x
          I'm using PythonGenerator ,code are really simply
          def main() :
            hair=doc.SearchObject("Hair")
            gu=hair.GetGuides()
            pos=c4d.Vector(20)
            gu.SetPoint(10,pos)
          I want to  constraint  the last point,and keep the hair dynamic
          the problem is ,the last segment  looks like rigidboby ,
          not like hair.

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

            On 03/02/2016 at 02:12, xxxxxxxx wrote:

            Hello,

            a Python Generator may execute its code only once. So if you want to execute code every time the scene is calculated you should put your code in a Python tag.

            It seems it is needed to re-set the guides after edit with SetGuides(). If you want to edit the behavior of the Guides during the physics simulation you might have to get the dynamic guides with GetDynamicGuides(). But I don't know if it is save to mess around with the guide from a Python tag. One would have to play around with the priorities.

            Best wishes,
            Sebastian

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