Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
Radz

Deleted constraint restores on its own

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?  

Share this post


Link to post
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

Share this post


Link to post
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.

 

Share this post


Link to post
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 :) 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0