Ryven icon indicating copy to clipboard operation
Ryven copied to clipboard

reload node packages

Open asdMild opened this issue 4 years ago • 8 comments

it's hard to edit node in node_manager but restart the Ryven evert time after node_manager export the node. is it possibile to add a button to hotreload the *.rpc , or reload module automaticaly

asdMild avatar Feb 06 '21 06:02 asdMild

That would be very difficult. In the NodeManager, you also program the nodes, so the internal abstract objects would have to get replaced by new instances. Also, if you didn't correctly implement save&load for you node yet (which often isn't the first thing you do), this would lead to issues.

May I also refer to the src code edit feature inside the editor: when making nodes, you can usually temporarily reprogram methods of single instances inside the editor itself (src code edit area below the flow, next to the logs). In combination with the console (right click on node, add console ref, and then you can access the node's API in the console, add/remove inputs and outputs and all that stuff), this is usually the fastest way to develop nodes, as you only use the NodeManager in the beginning for the basic setup, and in the end for saving the complete implementation.

leon-thomm avatar Feb 06 '21 12:02 leon-thomm

EDIT sorry, I got your question wrong: if it's just about reloading the package, that probably wouldn't be hard to implement (I'm not entirely sure but I think I can safely add this soon).

leon-thomm avatar Feb 06 '21 12:02 leon-thomm

EDIT sorry, I got your question wrong: if it's just about reloading the package, that probably wouldn't be hard to implement (I'm not entirely sure but I think I can safely add this soon).

yes, just reloading the package. I find there is two different type of py file in the project, the METACODE is duy to my modify in the node_manager, and the other file is generated when start Ryven. is it possibile to re-generate the internal file and reload the module like:

copy(METACODE, internal_node_file) reload(internal_node_file)

thanks for the suggest of program inside Ryven, i will try it. i was used it as extra editor in ue4, restart the env of python builtin ue4 is waste time. maybe the best way is program inside Ryven, than copy the code out and save as package

at last the ryven is amazing, thanks a lot

asdMild avatar Feb 06 '21 12:02 asdMild

cc i try this , i only need restart ryven in the menu of ue4, don't restart ue4. it may useful if the ryven run inside another qt loop

asdMild avatar Feb 06 '21 14:02 asdMild

wait, are you running this inside unreal engine?

I can probably just reparse the sources on runtime and "reregister" the node internally. I'm not 100% sure, but I think this should work without reference issues. Yes, the actual source code is generated from the METACODE file and the package file, by Ryven, when the package is imported. This process could totally be repeated for already parsed packages.

leon-thomm avatar Feb 06 '21 14:02 leon-thomm

wait, are you running this inside unreal engine?

I can probably just reparse the sources on runtime and "reregister" the node internally. I'm not 100% sure, but I think this should work without reference issues. Yes, the actual source code is generated from the METACODE file and the package file, by Ryven, when the package is imported. This process could totally be repeated for already parsed packages.

yes, i running this inside unreal engine, in a QtApp exec in the ue4 python. if you can reparse the source on runntime, it was helpful for user like me . also, i create a custom node to write runtime code, which is Commonly used in development

it is exciting to have a reload button in the ryven, or just re import the package and everything get refreshed.

asdMild avatar Feb 07 '21 05:02 asdMild

yes, i running this inside unreal engine, in a QtApp exec in the ue4 python.

Nice, I never did this myself, I assumed this would require a lot of additional configuration. Are you using Epic's Unreal Python or Unreal Engine Python? As far as I can see, Unreal Python only supports editor scripting (however workflow automation using python could get even better with Ryven), while Unreal Engine Python would also allow gameplay mechanics. So, with Unreal Engine Python, maybe a flexible blueprint system but python based using Ryven could be possible... :o more like a long term thought, but definitely something worth considering.

In any case, if you experience Ryven to be really useful for ue4 editor scripting or whatever, hit me up so I can see if I can optimize it and add a docs section for this.

if you can reparse the source on runntime, it was helpful for user like me . also, i create a custom node to write runtime code, which is Commonly used in development

it is exciting to have a reload button in the ryven, or just re import the package and everything get refreshed.

as I mentioned, you would have to place new instances of your modified node to get the new version running in the scene, the old instances would remain unchanged, but this should be possible, and I see it could be useful for these kinds of applications.

leon-thomm avatar Feb 07 '21 08:02 leon-thomm

yes, i running this inside unreal engine, in a QtApp exec in the ue4 python.

Nice, I never did this myself, I assumed this would require a lot of additional configuration. Are you using Epic's Unreal Python or Unreal Engine Python? As far as I can see, Unreal Python only supports editor scripting (however workflow automation using python could get even better with Ryven), while Unreal Engine Python would also allow gameplay mechanics. So, with Unreal Engine Python, maybe a flexible blueprint system but python based using Ryven could be possible... :o more like a long term thought, but definitely something worth considering.

In any case, if you experience Ryven to be really useful for ue4 editor scripting or whatever, hit me up so I can see if I can optimize it and add a docs section for this.

if you can reparse the source on runntime, it was helpful for user like me . also, i create a custom node to write runtime code, which is Commonly used in development it is exciting to have a reload button in the ryven, or just re import the package and everything get refreshed.

as I mentioned, you would have to place new instances of your modified node to get the new version running in the scene, the old instances would remain unchanged, but this should be possible, and I see it could be useful for these kinds of applications.

thanks, i use the Ryven as the UI of ue4-cmd.exe which run ue4 without gui, in this case, the gpu is not load at all, and we can modify large files quickly.

the Ryven can both running in the ue4 with qt or a singleton QApplication which is in the loop of ue4-cmd.exe commandline, i just add a save-UAsset node, and everything work well.

in the future, the Ryven will be the lower gpu-cost way to modify large files. it's a long term plan, and it will make our ue4-pipeline easy to use.

after all , i will hit you up if it make a good work in out project ps: ue4-ryven is still in beta , i will finish it after my vacation

asdMild avatar Feb 07 '21 16:02 asdMild