CinnamonMetal Posted October 25, 2017 Share Posted October 25, 2017 Suppose I have a variable that contained hou.pwd() by making this variable an argument of a function then calling the function name with hou.pwd() as the argument for the call back script of the function is that how you link the callback script with the function ? Quote Link to comment Share on other sites More sharing options...
acey195 Posted October 25, 2017 Share Posted October 25, 2017 (edited) hou.pwd() just point to the current node (where the code is called from), alternatively you can use hou.node(".") which basically does the same thing, unless someone knows a real difference. to query other nodes you can either use relative pathing: hou.node("../otherNode") or absolute paths if you wish hou.node("/obj/geo1/otherNode") on the other hand, for the network editor, if you want to return all selected nodes, there is the function: hou.selectedNodes() which you could use in shelf tools for instance Edited October 25, 2017 by acey195 Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted October 25, 2017 Author Share Posted October 25, 2017 (edited) I understand the function(parameter) then within the CallBack Script you call the function with the parameter being hou.pwd(). I assume this is linking the function with what is within the CallBack script. If my understanding is correct, then hou.pwd() must be first call in the Callback script that represents the current node ? One other thing why call .HDAModule() within the call back script of a HDA if you're not using any functions or classes within the module ? Edited October 26, 2017 by CinnamonMetal Quote Link to comment Share on other sites More sharing options...
acey195 Posted October 26, 2017 Share Posted October 26, 2017 to call scripts in the hda module you can use: hou.pwd().hdaModule().functionName() or hou.node('.').hdaModule().functionName() Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted October 26, 2017 Author Share Posted October 26, 2017 You must place it in a order. hou.pwd() being the first, hdaModule(),representing the digital asset (HDA) followed by the function; any reason for this order ? As well I was reading on the .hdaModule() class and I was wondering how can I read all the methods and functions within this module ? Quote Link to comment Share on other sites More sharing options...
acey195 Posted October 26, 2017 Share Posted October 26, 2017 its Python, an object oriented programming language, its the: function of the hdamodule of the node going backwards, for the other question, its python, so you can put whatever you want in the hda module. 1 Quote Link to comment Share on other sites More sharing options...
CinnamonMetal Posted October 26, 2017 Author Share Posted October 26, 2017 Thanks 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.