CreativeLyons / NukeSurvivalToolkit_publicRelease

public version of the nuke survival toolkit
MIT License
219 stars 45 forks source link

Replace os.path.join calls with "/".join for Windows #23

Open jacobmartinez3d opened 2 years ago

jacobmartinez3d commented 2 years ago

On Windows any paths that wind up containing "\n" will result in a broken path with a newline in the middle.

example:

C:\\apps\nuke\gizmos\...

Since Nuke already respects "/" as a separator on all OS's, this commit enforces this.

serjanbiogenic commented 2 years ago

Even with the suggested update to the cpode, the toolkit doesn't launch for me on Nuke 13 / Windows 10

"File "C:/Users/Username/.nuke/NukeSurvivalToolkit/menu.py", line 18, in import NST_helper ValueError: source code string cannot contain null bytes"

alfrhani commented 2 years ago

This message appears when I open the program and then closes.

"C:/Users/USER/.nuke/init.py : error interpreting this plugin"

please help.

rfletchr commented 9 months ago

\n should never ever be part of a path. If that is there then something is seriously wrong.

If you want to ensure a path is correctly formed for your os use os.path.abspath https://docs.python.org/3/library/os.path.html#os.path.abspath