constrain a hair point?



  • 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



  • 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



  • 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.



  • 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


Log in to reply