Essential Text Editor add-ons for coders

Writing screenplays in Blender:
fountain%20preview%20live

6 Likes

A Fountain test plug-in ready for contributions:
Fountain_test.zip (4.7 KB)

2 Likes

Hello,
to understand how the python code works i simple added Page Break formatting ( Fountain === ) and i added blank lines to the elements ignored by the Fountain formatting. ( skipping the ignored elements the formatting loses 1 line )
In the fountain.py are missing some elements like “Title:” , " Credits:" etc…so i am trying to understand how to add the missing elements in the Python parsing module.

The live preview is not stable ( after enabled and disabled, it can cause troubles to the preview )

Anyway writing scripts directly in Blender is fantastic !

Fountain_test_A1.zip (5.1 KB)

1 Like

@Andrea_Monzini I’ve optimized the Live Preview(which had very slow typing before on big text files) and it can now be properly switched off: Fountain_test.zip (4.7 KB)

Andrea, if you feel up for doing some more work on the formatting, maybe you could investigate why INT. & EXT. are missing from the scene headings?

If anyone else wants to help out, then the operators needs proper polls(detect .fountain in doc name) and toggle back from ‘Live Preview’ is not working.

1 Like

@tin2tin i downloaded the new zip but i cannot find easily the code differences ( the file name is the same “fountain_preview_simple13.py”), could you please check if the zip is updated?

I am investigating the INT. and EXT. in the python module, i was able to preview the “INT./EXT.” but i have big troubles to update the fountain.py module:

  • Load and save the module in the addon path ( in my case “.config/blender…” ) is not working
  • F3, “Reload Scripts” is not helping ( no updating )
  • Deactivate and reactivate the addon sometime cause errors and i have to reinstall the original addon.
  • Restart Blender, remove and reinstalling the addon seems to work but it is not the best workflow.

Suggestions to update the Python module in a productive way? thank you !

I merged your changes into the file, you should be able to see them there?

When I’m installing add-ons they end up here:
C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons

If I close all instances of Blender and use an external text editor to edit and save the fountain.py file and restart Blender the changes are there. Btw. I had to comment something out in the header code of fountain.py in the included file.

I cannot see the changes, the file is like the old one, maybe the zip is not updated.

In GNU/Linux the path for the loaded addons is different but it is not a problem:
/home/user/.config/blender/2.8x/scripts/addons

I would prefer to use the Text Editor if possible, but maybe in this case would be better to use an external editor to work with the Python module.

Anyway thank you, i need to learn more :slight_smile:

I quickly made a repository here, just to get this thing started:

2 Likes

Got the Blender Screenwriter to toggle dual view(but only in 2.80!) and faster preview updates:
fountain%20preview%20live2

1 Like

Hi, it is not clear from the GIF but with the live preview, the preview panel has some glitch with the formatting:

Blender_screenwriter_1

For some reason i was not able to install properly the .zip from Github.
The zip was installed in the correct addon Path but it was not visible in the preferences/addon for the activation.
To make the installation to work i had to unzip and re zip the file again with an different archive software ( Gnome Archive Manager )
The default GUI compression ( Zip Compression with Nautilus ) of my GNU/Linux distro does not work and has the same problem of the zip from Github so probably it’s the way the zip is compressed.

Just updated it again. Now polls are fixed(disables buttons when no .fountain document) is in the Text Editor.

@Andrea_Monzini could you try this one?

Just tested the last version, i see the same formatting glitches when i type or when i scroll as you can see in the Gif:

BS_glitches

Did you also use the included fountain file?

Yes, when i install the zip i see that the fountain.py is installed in the addon path and it is visible in the prefereces/addon as a module:

Finally to see the changes of the last version i had to unlink the “Preview.txt”, save the. blend file, restart Blender and “Preview Screenplay” again.

The jumps glitches seem solved!
INT./EXT. formatting works !

The live preview seems to update every two keys pressed as you can see in the Gif:

Live2

Great to hear that the glitch is gone. I’ve tried to tinker with the typing, and just uploaded a new version. Could you try it out?

1 Like

Live preview update every key pressed now!
Refresh works too !

I am thinking to improve the formatting with left margin, what do you think?
( i am adding 4 spaces to test it ).

It would be even better to have the entire text centered, but that would mean figuring out how many characters are visible.

Simply added 4 spaces:

Looks better for sure, but could you define a variable(ex. margin = " "*4) and insert that instead, so if we find a way to change it dynamically, it’ll be easy?

1 Like