1 year ago
#363599
richard
py file in blender wont show its line breaks
I ran into a strange issue and could need some help. A Javascript file writes a python file, that i can use in blender to setup and animate my scene. everything works fine, and as expected on Windows. Now it turns out that if i run the javascript on mac, then the python file, thats been written cannot be run in blender. Because the python file wont have line breaks. Strangely though it shows the Linebreaks of that exact file in all other text editors (Notepad, Wordpad, Chrome browser, sublime text, etc.) The javascriptfile is writing linebreaks with "\n", and from what i read this should be fine with linus and macOs.Is "\n" the proper code?
Now my workaround would be to use ";" at the end of each line, but how would i code the end of a for loop, without using unindents of a new line?
Another workaround would be to quit the for loop, and let each for cycle be written explicitly, (without the need of indents)
But i really would appreciate a solution that keeps the code simple. I really would like to understand why blender loses linebreaks "\n" when the py is created on macOS.
every Help is appreciated. heres a screenshot of the pythonfile in sublime text editor:
the py file in sublime text editor https://i.stack.imgur.com/rJibW.png
heres a screenshot of the same file in blender the same file in blender https://i.stack.imgur.com/ScLUq.png
javascript
python
macos
blender
line-breaks
0 Answers
Your Answer