tin2tin / Blender_Screenwriter

Blender add-on for writing screenplays and convert them directly into timed storyboards.
193 stars 21 forks source link

problem with preview #13

Closed samytichadou closed 5 years ago

samytichadou commented 5 years ago

Hi, i installed the addon on ubuntu 19.04 and tried with blender 2.82 (-e5b788bad8bc-linux-glibc217-x86_64) I have hard times to get a preview working, i opened the fountain script you provided in the zip of the last release, but when clicking on any of the 3 operators, i don't get anything and it raises no error at all. The preview operator do get me a "wrong way" cursor which disappears when clicking or hitting esc key. I don't have a good knowledge of the addon so far, what should happend when working correctly ? splitting the text editor to get a preview windows when hitting preview is that right ?

AndreaMonzini commented 5 years ago

Hi, i use Linux too ( latest Pop_OS 19.10 distro ) Try to start new project from zero or eventually unlink the preview text data-block. I usually need to restart Blender to update the modules. Check also please the addon folder if there are double installations:

/home/USER/.config/blender/2.82/scripts/addons/

Eventually delete the addon and reinstall it.

What version of the addon are you using? The release 011, 012 ? https://github.com/tin2tin/Blender_Screenwriter/releases Or the last committed version?

samytichadou commented 5 years ago

Hi @AndreaMonzini thanks for your answer ! I'm using the 012 (from releases), no luck when reinstalling the addon, deleting pycache, starting with clean project so far. No dupes in the addon folder (clean 2.82 version) Just to be sure, the way to go is click on the preview button to get the split text editor isn't that right ? and then refresh it or enable live preview ? Or do i have to do a second text editor manually ?

I just overviewed the code so far, not sure about it... thanks !

AndreaMonzini commented 5 years ago

Just to be sure, the way to go is click on the preview button to get the split text editor isn't that right ? and then refresh it or enable live preview ?

Yes, the preview button will open a second text editor for a dual view and starts the preview. Use refresh button to update the preview or use the live preview.

Anyway i will test the different versions to check if it works here. Important: If you download the last committed version as ZIP from Github, you should unzip it and re-zip it without a parent folder.

AndreaMonzini commented 5 years ago

Just checked that the Release 012 and the last committed master work with 2.82 on my Linux distro. I zipped the last master:

Blender_Screenwriter-master.zip

samytichadou commented 5 years ago

No luck so far, but it seems the problem is related with this part of the dual screen operator

    if area == thisarea:
        if debug: print('debug --- context area is this area') ### DEBUG
        continue
    elif area.x == tgxvalue and area.y == thisarea.y:
        otherarea = area
        if debug: print('debug --- context area is not this area') ### DEBUG
        break

the break in it kind of stops the operator if your blender screen has some non text editor area, trying to get the grasp of it !

AndreaMonzini commented 5 years ago

If you start Blender from terminal can you please report the terminal messages? (To run quickly the first time Blender from terminal i just drag and drop Blender executable in the terminal in my distro). Can you also make maybe a GIF video? Thank you.

samytichadou commented 5 years ago

i am running from terminal, but so far no error raised. if i understand correctly, it gets stuck on any non text editor area in the context screen and return finished because of the join operator. I may have a workaround, i'll post it here if it works !

samytichadou commented 5 years ago

ok i took a different approach, for now the addon was trying to get all areas and guessing which one could be preview to join it (i'm guessing in order to "cancel" dual screen) but it was a clunky way to do it because of the iteration across the areas, so i get rid of this part for now, and the behavior becomes :

would this behavior makes sense to you guys ?

For now there is no "cancelling" the dual screen mode, this could be difficult to do properly, because the user can rearrange its workspace before that. I'm looking into it right now !

i believe the cancelling should be another operator don't you think ?

I'll add that to the push request i made !

samytichadou commented 5 years ago

Hey, i'm rewriting the screenwriter dual_screen operator, and trying to reimplement the join, but here's the problem so far :

Here's a video of the problem

So my thinking on this problem the join option seems to be too clunky, i think the user should just be able to split current area through the dual_screen operator, then join if needed manually. After all the manual way is just one click and drag

tin2tin commented 5 years ago

Yes, maybe you're right. I discussed it with the coder who changed the behaviour in 2.81. before you could determine which way to join through the API. I pasted it into one of the now closed issues.

Maybe it's better to leave it without the join until it is properly fixed in the API.

samytichadou commented 5 years ago

i just made a pull with rewrite operator, tried to clean the code and add a "global" message and variable logic to it. the pull request It now iterates through diferrents windows if any to find a previous preview, then create one if doesn't exist

tin2tin commented 5 years ago

This has been solved by https://github.com/tin2tin/Blender_Screenwriter/pull/17