Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locate Blender executable via File Manager #2255

Merged
merged 11 commits into from
Oct 24, 2018

Conversation

DylanC
Copy link
Collaborator

@DylanC DylanC commented Oct 18, 2018

I've been thinking with so many path issues for new users really we need a button to browse to select the correct location/executable. Also in the same section of code Qt would automatically be selecting the correct string with the correct slashes for that particular OS.

This is my first Python change (ever), so any help/feedback on questions I'll have would be welcome.

@DylanC DylanC changed the title Locate Blender executable via File Manager WIP - Locate Blender executable via File Manager Oct 18, 2018
@peanutbutterandcrackers
Copy link
Contributor

peanutbutterandcrackers commented Oct 19, 2018

Great! Looks good so far. Although, I wonder if there should also be a button for InkScape for A. It'll look aesthetically better, IMHO and B. Perhaps the only reason we don't get InkScape issues reported is because not many want to open up the advanced title editor? Just a thought.

Also, I wonder if the 'Browse' dialogue that opens up this time around can be made to be in the root directory by default, this time around. C: (I was testing on Linux Mint 19 and it opened up to the home directory) or /, perhaps (or whatever mac uses. I don't remember a lot of issues being reported from Linux users).

Thank you so much! This will be such a reliever (esp. for our windows-using friends). 👍

P. S: Also, just to try things out, I chose cat and others as the blender path (I don't have blender installed, yet) and it didn't change a thing. I even tried pointing to a file named blender on my home directory and pressed okay. Still no change. Is that a problem? o.O

@DylanC
Copy link
Collaborator Author

DylanC commented Oct 19, 2018

Although, I wonder if there should also be a button for InkScape for A. It'll look aesthetically better, IMHO and B. Perhaps the only reason we don't get InkScape issues reported is because not many want to open up the advanced title editor? Just a thought.

Yes, the Inkscape browse button will be next. I just want to focus on getting the Blender one 100% complete first.

Also, I wonder if the 'Browse' dialogue that opens up this time around can be made to be in the root directory by default

Yep, good idea. I'll put it on my plans for this PR.

Thank you so much! This will be such a reliever (esp. for our windows-using friends). 👍

No problem. I think its a good change that A) I have time to develop it since its small enough. B) It will solve so many issues reported on Blender path issues.

P. S: Also, just to try things out, I chose cat and others as the blender path (I don't have blender installed, yet) and it didn't change a thing. I even tried pointing to a file named blender on my home directory and pressed okay. Still no change. Is that a problem? o.O

Not a problem at all. It hasn't been developed past opening the file manager with the button. I'm working on it slowly to be sure my Python noob skills don't fail me. 😆 Don't ever trust any PR with WIP on it. 😉

@peanutbutterandcrackers
Copy link
Contributor

I see. Haha

All the very best! Looking forward to test further changes into this branch. 👍

@DylanC
Copy link
Collaborator Author

DylanC commented Oct 20, 2018

@peanutbutterandcrackers - Added the same browse button for Inkscape too. I'm setting the path to root but currently its only "/" and that would only work good on Linux I would imagine. I need a more cross platform way of setting this path. @ferdnyc ?

@peanutbutterandcrackers
Copy link
Contributor

@DylanC - I was able to find this on stack overflow. os.path.abspath(os.sep), if it works well even for windows, seems, to me, to be the most succinct way of doing it.

I just tested it, and it looks great!

I have only one more request: could we have the file-choose dialogue only show executable files rather than all files? I think it would make the it easier for the user to point precisely to the executable without being bogged by anything else...

I think we should get the users (who've reported this issue) to test the daily builds as soon as this is merged. This is neat!

@peanutbutterandcrackers
Copy link
Contributor

Also, regarding the aesthetics, I was wondering if things should be changed up a bit... but I am not exactly sure.
1. Current Situation
screenshot at 2018-10-21 21-57-19
2. I wonder if this is better? But I am not so sure
screenshot at 2018-10-21 21-52-29
I kinda' think the browse buttons being there in the middle kinda' gives the dialogue box better aesthetics. But I am no UX person.
On a bit more thought, however, I thought the following changes would be neat too:
screenshot at 2018-10-21 22-26-56
(there are a few minor changes there)
I would have also liked to changed the volume thingy to say Default Clip Volume or sth; but then I realized, what exactly does it do? Whose volume does it set? Openshot's output volume? The clips that are dragged into the timeline (their volume property show 1 by default, it seems)?

@DylanC
Copy link
Collaborator Author

DylanC commented Oct 21, 2018

@peanutbutterandcrackers - Layout wise I think it makes sense to leave them on the bottom. They are the least important items imho. Not everyone wants to do Animations (Blender) or use the Advanced Editor (Inkscape).

Default Image Length and Volume are related to the clips being dropped on the timeline. Maybe it would make sense to call them:

  • Default Clip Image Length
  • Default Clip Volume

Only problem being the length of the first label may be too long. Might need a wider Preferences Dialog.

@DylanC
Copy link
Collaborator Author

DylanC commented Oct 21, 2018

@peanutbutterandcrackers - I've added the path fix. I'm almost happy with this PR but I'd like to find a way to limit the file type to executables rather than "All Files" currently. However maybe that's complicating it too much. It would be a good improvement even as it stands right now.

@peanutbutterandcrackers
Copy link
Contributor

Default Image Length and Volume are related to the clips being dropped on the timeline

So, what that means (along with the fact that volume clip property shows 1), is that once the user drags a clip, the clip will only have 75% of the original volume and that'll be called 100% in the timeline?

Yes, I think the changes should be made. Let's call them 'Default...' and also let's call the "Advanced Tite...", "InkScape" instead.

The changes that I made (in fig 3) seem decent enough. I mean I only changed the src/settings/_default.settings file. I didn't have to change any other lengths...

If you think it is fine the way it is, then I think it's all right, too.

Also, I just stumbled upon this: https://stackoverflow.com/a/44978877
Apparently, QtCore.QDir.rootPath() is how the others do it. Just in case this fails the tests on windows.

I also looked around for a way to filter only executable files but couldn't find one. Perhaps @ferdnyc might have some ideas? Or @N3WWN ?

@peanutbutterandcrackers
Copy link
Contributor

I wonder what has gone wrong. I can't seem to be able to make a comment.

@DylanC
Copy link
Collaborator Author

DylanC commented Oct 22, 2018

@peanutbutterandcrackers - Your comment did work, it appeared about 10 times. So I've cleaned it up. I did notice GitHub acting a bit strange today.

@DylanC
Copy link
Collaborator Author

DylanC commented Oct 22, 2018

So, what that means (along with the fact that volume clip property shows 1), is that once the user drags a clip, the clip will only have 75% of the original volume and that'll be called 100% in the timeline?

I'm not 100% sure about this one. I do know what I said about the image length is correct. Its definitely the clips length when you drop an image to the track. I have used this feature before.

The changes that I made (in fig 3) seem decent enough. I mean I only changed the src/settings/_default.settings file. I didn't have to change any other lengths...

Not sure why but when I made this change at least on my PC the textline (QLineEdit) was squashed/smaller than the rest as a result. I think I will let it stay the same to be safe.

I'm nearly happy enough to merge this, I'll just wait a bit longer for any more feedback.

@peanutbutterandcrackers
Copy link
Contributor

Oh, I see. I think this will be a great fix for 2.4.4. Great work, Cap'ain! 👍

@CapitainFlam
Copy link

CapitainFlam commented Nov 9, 2018

@peanutbutterandcrackers @DylanC
I didn't test your modification (no time for this right now), but taking 5 minutes to give you big CONGRATULATIONS for the job done.
I read your posts and see you [edit big] did good with a browse button and a UX remastered more "logically".

Again, good job guys and girls !

@DylanC
Copy link
Collaborator Author

DylanC commented Nov 10, 2018

@CapitainFlam - Thanks. This change was very badly needed. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants