Jump to content

OPNET run a script locally before running ROP Fetch


UpyopyoSky

Recommended Posts

Hi, I have a question about a TOP Network process (please see the attached picture).

I want to run two steps when executing Dirty and Cook:

1- Run a Python script that updates or sets a new cache path on a File Cache node.

2- Then run the actual simulation using a ROP Fetch node.


The problem isn’t with the Python script itself, but rather that the Python Script node seems to execute in the background Houdini session used by TOPs, instead of the current local Houdini session. I want the script to apply changes to my local session, and then trigger the ROP Fetch simulation task.

I suspect that using a Python Script node isn’t the right approach here — I probably need another method to execute the script locally before running the ROP Fetch. Or maybe I could fix by changing parameters like a Generate When parm or Evaluate scripting During parm, etc, not sure at all. 


Of course, I could just run the Python script manually and then Dirty & Cook the network, but I have multiple dependent simulation steps, and I don’t want to manually update the File Cache nodes every time.


So, is there a recommended way to achieve this?

topnet.jpg

Edited by UpyopyoSky
Link to comment
Share on other sites

>>Cook (In-Process)
Not exactly working.

When I execute 'Dirty and cook this node' on a python Script node, the code is executed on the local seesion.

However, when I execute 'Dirty and cook this node' on a ROP Fetch node, the script seems to be executesd, according to the checkbox's icon sign, but nothing happens on the both of local and background sessions.

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