lisux Posted June 28, 2006 Share Posted June 28, 2006 Hi all. I using a Copy SOP to copy some geometry onto the template points of another one. My problem is that I can the variables that I have for use some custom attributes in the geometry to be copied (not in the template). I get all the time an error Undefined variable . So anytime I try to use use custom variables from the incoming geometry for copy stamping I get errors. there is any way to do this? Thanks Quote Link to comment Share on other sites More sharing options...
doc Posted June 28, 2006 Share Posted June 28, 2006 Hi all.I using a Copy SOP to copy some geometry onto the template points of another one. My problem is that I can the variables that I have for use some custom attributes in the geometry to be copied (not in the template). I get all the time an error Undefined variable . So anytime I try to use use custom variables from the incoming geometry for copy stamping I get errors. there is any way to do this? Thanks 28829[/snapback] Not sure I understand 100% the problem you're talking about. But from what you describe it sounds like your having trouble using custom attributes(from the template input) in your copy sop's stamped parameters. here's what you need to do. The copy sop has only a limited number of local variables, check the docs for details. you can use the $PT in league with a point expression to get the attributes you need from your template input. eg point("../"+opinput(".",1),$PT,"myAttribute",0) let me know if this helps and if you have further questions Luca Quote Link to comment Share on other sites More sharing options...
grasshopper Posted June 28, 2006 Share Posted June 28, 2006 Actually the Copy SOP does let you copy across custom attibutes but it drops the mappings that gives you the local variable names. Really, the Copy SOP should have a method to pass these through (RFE?). Anyway, you can get round it by adding the custom attibute with the same mapping to the local variable on your primitives to copy into the Copy SOP. Then you can use the local variable downstream of the Copy SOP and it will have picked up the atributes values from the template. See attached. Hope I've understood what you wanted... attributeThroughCopy.hip Quote Link to comment Share on other sites More sharing options...
rjpieke Posted June 29, 2006 Share Posted June 29, 2006 Anyway, you can get round it by adding the custom attibute with the same mapping to the local variable on your primitives to copy into the Copy SOP. Then you can use the local variable downstream of the Copy SOP and it will have picked up the atributes values from the template. See attached. 28835[/snapback] If you want to inherit the mapping for all the variables, it's even faster to just use an AttribCopy and copy the 'varmap' detail attribute. See attached. attributeThroughCopy2.hip Quote Link to comment Share on other sites More sharing options...
lisux Posted June 29, 2006 Author Share Posted June 29, 2006 Thanks a lot for all of your questions. Yes I know how to use my varmaps after the Copy SOP, but the problem is that I want to use it in the Copy SOP itself. So like grasshopper have said Copy SOP drops the varmaps and I can't use for example these vars in my stamp parameters, that is my problem. So I am going to post an RFE in the Side FX forum.... Quote Link to comment Share on other sites More sharing options...
rjpieke Posted June 29, 2006 Share Posted June 29, 2006 So like grasshopper have said Copy SOP drops the varmaps and I can't use for example these vars in my stamp parameters, that is my problem.So I am going to post an RFE in the Side FX forum.... 28844[/snapback] While I agree it could be useful to have this functionality, I'm curious to see how it could be implemented in "the best way". My biggest concern is that, in practice, I find myself using $PT and $TPT in an almost 50-50 split (often by necessity, not just laziness - although there's always some of that) in my stamping expressions calling point(). Hmm ... yeah ... just curious to see what SESI thinks Quote Link to comment Share on other sites More sharing options...
grasshopper Posted June 29, 2006 Share Posted June 29, 2006 Thanks a lot for all of your questions.Yes I know how to use my varmaps after the Copy SOP, but the problem is that I want to use it in the Copy SOP itself. So like grasshopper have said Copy SOP drops the varmaps and I can't use for example these vars in my stamp parameters, that is my problem. So I am going to post an RFE in the Side FX forum.... 28844[/snapback] This one might do what you want. I've temporaily used an existing attibute, color, to get at the variable in the copy SOP. You can always reset the color again using a point SOP as shown. Admitedly this gets nasty if you have several attributes that you want to copy stamp. Maybe you could post an example of what you are trying to do if this doesn't work? attributeThroughCopy3.hip Quote Link to comment Share on other sites More sharing options...
lisux Posted June 29, 2006 Author Share Posted June 29, 2006 This one might do what you want. I've temporaily used an existing attibute, color, to get at the variable in the copy SOP. You can always reset the color again using a point SOP as shown. Admitedly this gets nasty if you have several attributes that you want to copy stamp. Maybe you could post an example of what you are trying to do if this doesn't work? 28851[/snapback] It works grasshopper, thanks. The only problem is that you have to disable the inherit of the template attributes, and then it broke my system complitely. Anyway thanks for your help, it helps me a lot ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.