edward Posted August 15, 2005 Share Posted August 15, 2005 Creating a matrix of mostly 1's is not going to help you. untested: UT_Matrix4 mat; UT_XformOrder default_order; mat.identity(); mat.rotate(UTdegToRad(90), 0, 0, default_order); gdp->transform(mat); Quote Link to comment Share on other sites More sharing options...
MADjestic Posted August 16, 2005 Share Posted August 16, 2005 Thank you, edward. Now I need to get the node's name. That is - I need to get the name of the Node that is created in the network viewer - not an arbotary node - but the node that I first compiled - and then create that node on Houdini. Is there a way to make a variable in the node's code (e.g. my_sop) that will get the name of the node as soon as the node is created in Houdini? (e.g. my_sop1, my_sop2, my_sop3, etc..) I think that must deal with OP Node.h somehow, but not sure about that. thanks. Quote Link to comment Share on other sites More sharing options...
Jason Posted August 16, 2005 Share Posted August 16, 2005 Thank you, edward. Is there a way to make a variable in the node's code (e.g. my_sop) that will get the name of the node as soon as the node is created in Houdini? (e.g. my_sop1, my_sop2, my_sop3, etc..) 20564[/snapback] You might be able to do what you want with a Creation script. This is a snippet of hscript that gets run when particular node is created. Is that what you want? I'm pretty sure this is documented in the Houdini docs. Quote Link to comment Share on other sites More sharing options...
George Posted August 17, 2005 Share Posted August 17, 2005 ... Is there a way to make a variable in the node's code (e.g. my_sop) that will get the name of the node as soon as the node is created in Houdini? (e.g. my_sop1, my_sop2, my_sop3, etc..). 20564[/snapback] Depending on where you need it, you have access to getName() from your cook method. It returns a UT_String which can be cast to a (const char *) if needed. I would avoid using or caching this method's result in the constructor, because by the time the node is constructed, I don't believe it has its correct name set yet. Hope that helps. George. Quote Link to comment Share on other sites More sharing options...
MADjestic Posted August 17, 2005 Share Posted August 17, 2005 Depending on where you need it, you have access to getName() from your cook method. It returns a UT_String which can be cast to a (const char *) if needed. I would avoid using or caching this method's result in the constructor, because by the time the node is constructed, I don't believe it has its correct name set yet.Hope that helps. George. 20594[/snapback] Thanks, George. That's almost what I need. I do understand that the user may decide to change the node's name - but I think it's ok for the project I am currently working on. Thank you, Jason, for your reply. Your suggestion is slightly different from what I need, but it can aslo be valuable. 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.