-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add functionality to open blend files from editor #189
base: master
Are you sure you want to change the base?
Conversation
SamuelBilek
commented
Sep 2, 2024
- Open blend file from right click context menu in file explorer
- Open multiple blend files from the command palette
hm, there are things that I like and things that i dont like:
|
I based the interactive opening of files on the work of my colleagues, as they work with addons that can use hundreds of Also, the right-click open uses most of the functionality of the command you don't like, so I am not sure how go about it 😅 I get your concern that this could mess with user settings, but from my testing, Blender always opens the last file it was provided in the launch args, so users would keep their other settings (except file-launch-related args like |
Yah, I get it.
Originally I wanted to propose:
but it seems that it will not work as Blender has non-posix argument handling:
What introduces SO MANY corner cases that it makes my head hurt... I dont wan to deal with it today.
You mean that vs code should be aware about those blender instances? |
I would prefer to have a separate config for opening files. We don't have to check for Yes I think vscode should be aware of those instances, so you can see how each blend file interacts with your addons from vscode. Sorry to make your head hurt, don't worry about this too much. This was my first time working in typescript and vscode extension development as a part of a creative project and I don't need to push it quickly 😸 |
- Open blend file from right click context menu in file explorer - Open multiple blend files from the command palette
9d438b0
to
ab35863
Compare
In the new commit I added two new lists of arguments that mimic the |
This way we separate which arguments should be passed during Blender: Start command and which arguments should be passed during the Blender: Open With Blender and Blender: Open File(s) commands.
5053f11
to
e765e0b
Compare
i see where you are going. I propose a little twist: lets make 2 options:
Create a blender command using logic (pseudo code): if " -- " in blender.additionalArguments and blender.pythonArguments: # finding -- in blender.additionalArguments needs refinement
raise error
if normal launch:
blender.additionalArguments + "--" + blender.pythonArguments
if run with file:
blender.additionalArguments + <file to open> + "--" + blender.pythonArguments
# i think we also need
if " -- " in blender.additionalArguments:
raise error Reason:
Is it better, or just confusing? |
I think this is more limiting to for the user than my approach:
We could mix our approaches:
Since we would be mixing old with new, I think we could maybe go one step further and put the new
What do you think about these ideas? :) |
Oh, ok, I was not aware about all all the details, I will think about it. |
Hello! Did you come to a conclusion what to do here? :) |
I still think the I am in the middle of trips, in next 2 weeks I will not be available much, sorry. 🤸 |