Jump to content

Deleted constraint restores on its own


Radz

Recommended Posts

Hi guys, I have this problem where I've deleted bunch of constraints when certain force threshold is exceeded using some vex code in sop solver but they came back after couple frames. 

Anyone know any circumstances that can cause constraints to restore on its own?  

Link to comment
Share on other sites

I have noticed that as well. The constraints are enforced on a per-frame basis. So deletion of constraints must be enforced on a per-frame basis as well. Once the condition in the solver is met you may need to flag it so it remains persistent. One way might be to create an additional attribute as a flag. Then in the solver examine the flag first to see if the constraint has already been deleted, if so then delete it again. Otherwise process as normal inside the solver.

Edited by Atom
Link to comment
Share on other sites

I do a lot of creating and deleting constraints in VEX, and have also had some issues. I don't think primitive number, or count matters, as the data it needs is on the primitive itself, and unrelated to the order, or the primitive number.

I noticed the Object Merge node that brings in the Relationship Geometry was not giving me the data I expected, so I changed the path in there to an explicit path. I was surprised to find that this solved my problems.

I changed this stamp expression:

`stamps("..", "DATAPATH", chsop("relnode") + ":Relationships/" + chs(chsop("relnode") + "/relname") + "/" + chs(chsop("relnode") + "/relationship/dataname") + "/Geometry")`

with this(the path depends on your scene graph of course):

/obj/geo1/dopnet1:Relationships/constraintnetwork1/constraintnetwork/Geometry

 

Would love to know if this works for you, or if I'm way off.

 

I was going to file a bug for the specific case I hit, but need to recreate the issue in a less complex file first.

 

Link to comment
Share on other sites

Hi guys, I've figured it out and it's my bad really to cache the geo of my animation that causes it to reconstruct the constraint every couple frames.

Mine still works tho without deleting them per frame basis. Once it's broken, it should always be ignored otherwise you write some specific functions for that I think.

As for richard, I tried that but it's not the case unfortunately. 

Thanks anyway guys :) 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...