exel Posted August 6, 2009 Share Posted August 6, 2009 This seems like it should be simple: I'm trying to use an expression (python) to assign a material named after the object, by putting an expression in a Material SOP like this: hou.node("../../shopnet/" + hou.node("../").name()).path() ( /obj/geo1 should get assigned the full path to ../../shopnet/geo1 ) but it's not evaluating, I get a warning: The node "hou.node("../...." was not found or was the wrong type for this operation. I've tried this same expression in an Attribute Create SOP and it works, how can I force this to evaluate for the Material SOP? Thanks for any help! -JS- Quote Link to comment Share on other sites More sharing options...
eetu Posted August 6, 2009 Share Posted August 6, 2009 Dunno, seems to work here? eetu. materialsop_path.hipnc Quote Link to comment Share on other sites More sharing options...
exel Posted August 6, 2009 Author Share Posted August 6, 2009 Dunno, seems to work here? eetu. hmm weird! your file works for me, but I try the exact same thing in my file and it doesn't do anything, the parameter field doesn't even turn green. SOP flakyness? Oh well, I got around it by using an attribute create SOP (which didn't work at first, but then started working when I tried it again 10 minutes later) -JS- Quote Link to comment Share on other sites More sharing options...
eetu Posted August 6, 2009 Share Posted August 6, 2009 Ah, I think I got it. When you click on the parameter name it toggles the field between the "value" and "source" modes (as you full well know) I guess you've just pasted/written the expression when the field was in the "value" mode... eetu. Quote Link to comment Share on other sites More sharing options...
exel Posted August 6, 2009 Author Share Posted August 6, 2009 Ah, I think I got it. When you click on the parameter name it toggles the field between the "value" and "source" modes (as you full well know) I guess you've just pasted/written the expression when the field was in the "value" mode... eetu. hmm that's a little wonky but you're right, I had to toggle the blank field (?) and then it worked. Thanks! -JS- 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.