Whenever I first open the usd, it usually gets the files that I make and include in the main script node just fine. However, whenever I need to make a change and test these files, I have to restart Isaac completely. Is there any workaround to this or a fix I need to try?
For example:
sys.path.append(r"C:\Users\repo\folder")
from import
This works, but if I change the contents of I have to completely restart Isaac to get the script node to update with the new file/change.
Do you have any news about the problem? Iām having the same issue. Itās painful to have to restart the app every time I make a change to a file that is not an extension neither a BehaviorScript.
I tried attaching those files to the Python Scripting component of a prim from the stage but it didnāt work.
Besides, I donāt see any option to refresh or reload a file, which would be a nice implementation.
You should just need to hit the reload everytime you make changes to the script. If you are doing it in a path to a .py i would save the file in VS code for example then hit reload on the script node attribute panel. Hopefully this solves your issue.
So this works well for the exact file you made changes in, but if you import a file and made changes in that import it doesnāt bring those changes in. I was wondering if there was a way to fix that.
I think that the problem k71196 and I are having is that we are not using omnigraph or nodes, just python code files.
Letās suppose we are using a BehaviorScript which is actually hot reloaded. Then, in this script we are importing our own .py file from which we get, for example, a function to develop a specific task. The problem is that if the .py file is not within the same scope of the BehaviorScript (the same applies to extensions), modifications in the file will not be hot reloaded.
And the content of ābehaviorScript.pyā starts as follows:
from MyOwnScripts.script1 import function
function()
In this situation, each time you run the BehaviorScript it will print āThis is a functionā. However, if you change the function so that it now prints āThis function has changedā and then rerun the BehaviorScript, it will still print āThis is a functionā.
In order to solve this problem, you can restructure you files so that the ones which you want to be hot reloaded are within the same scope of the BehaviorScript. Nevertheless, if you want to keep you folder structure organized, a different solution is to create links (hard links work, soft ones I am not sure) which point to that files inside the scope of the BehaviorScript.
The ideal solution would be to have a refresh button in the content browser which reloads everything from our project or something similar.
What I mean is having a reference to the file we want to be hot reloaded within the same scope of the BehaviorScript, that is, under the same parent folder.
When you talk about ānodesā, correct me if I am wrong, they are only valid when using Omnigraph, right?
If this is the case, that is the problem, I am not using Omnigraph, I just open a scene where I have a prim with a BehaviorScript attached to it, and in that BehaviorScript I import my custom script, which does not update afer modifications, do I explain myself?
Regarding extensions, as you mentioned, they are very nice. However, they have the same problem, using custom imported scripts which are not within the same scope of the extensions will not be hot reloaded.