Jump to content

$HITID from POPs not available in CopySOP?


Akabane

Recommended Posts

Hi, i'm trying to use the vars $HITID and $PSTATE to drive a stamp variable on a copy SOP, but it states that it's an Undefined Variable.

But it's not!

I see those attributes in the spreadsheet of the pop entering the copy sop. Of course i set "use template point attributes" and "copy local variables" but no luck. Any other vars, like $ID or the 3 of $V work...any tips?

EDIT: Just saw the helpcard of Copy, it seems that hitid, pstate etc are not computed, but it's possible that i can only use the attrs stated in the help of the node?

Edited by Akabane
Link to comment
Share on other sites

The attributes stated in the help card are just ones that that current operator supports. Some operators don't support various variables. Also, getting actual variable references out of POPs can be hit or miss. You can use a point() expression to reference the attribute values from the template geometry instead of the variable. For example, point(opinputpath(".", 1), $PT, "pstate", 0) instead of $PSTATE.

Link to comment
Share on other sites

Thanks, it works flawlessly! A curiosity anyway, can i use this expression to create a new attribute called $PSTATE (for example) outside of the pops, overriding the original one, making it accessible outside? Thanks again, didn't know about point()

Link to comment
Share on other sites

you can

create Attribute Create SOP

Name: pstate

Variable: PSTATE

Class: Point

Type: Integer

Write Values: off

this will only update variable mappings since Write Values is off it will use values from POPs

Link to comment
Share on other sites

  • 2 weeks later...

you can

create Attribute Create SOP

Name: pstate

Variable: PSTATE

Class: Point

Type: Integer

Write Values: off

this will only update variable mappings since Write Values is off it will use values from POPs

Very usefull! thanks!

Edited by cabra
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...