Jump to content

Accesses Attributes in DOP


luthio1

Recommended Posts

Hey,

I have a Box wich is a RBG Object and is wired up to a rigitbodysolver. now i want to access the primitive attributes on this box to apply a force only if the attribute reaches a certain value. (this is just a simple example to explain my problem)

So i used the Group node in DOP and there i want to use this expression:

prim("/obj/AutoDopNetwork/box/Geometry", 0,"A",0)

or

prim("$OBJID/Geometry", 0,"A",0)

but it does not work, but why?

regards

Lukas

DOPgroup.jpg

Screenshot:

https://www.dropbox.com/s/jibls0j4e3i7oeu/DOPgroup.jpg

DopGroups.hip

Link to comment
Share on other sites

accessing data from DOPs is different than SOPs since data like Geometry doesn't belong to particular DOP nodes but to DOP objects

the syntax for it is

dopnetpath:objectnameORid/dataname

so in your case it would be

prim("/obj/AutoDopNetwork:box/Geometry", 0,"A",0)

or since you are using it in the dopnet

prim("..:box/Geometry", 0,"A",0)

but for it to work as you wan you will need to update geometry on the object either by using deforming geometry or by using some DOP dolver to modify it

and that's not very expensive if you only need to access attribute from the source geo

so you can just reach to source geo directly

prim(opfullpath(chsop("../box/soppath")), 0,"A",0)

you may also browse the forums as there is plenty of examples how to activate rbds based on some attribute etc

Edited by anim
  • Like 1
Link to comment
Share on other sites

hey,

now the problem is that i can access the the attribute but the DOP network does not behave in the way i excpected.

So i have my fractured cube with prim Attribute "selected = 0" and over time some of them get "selected = 1".

what i want to do is to list all RBD Fractured objects with the "selected = 1" in a group and apply gravity on them.

But somehow it does not work.

in this example file i am checking the attribute of the prim number 11 and at frame 49 it changes its "selected" attribute from 0 to 1 so gravity should be applied. (but does not)

however if the attribute "selected = 1" from the first frame on it works. (all opperation types are on "Set Always" so this should not be the problem)

screenshot:

https://www.dropbox....x/Dop Group.jpg

regards

lukas

Dop Group Test 02.hip

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