Here is a guide to set up
"Open With Blender" Option on p3d files
like this:
Save this as `openp3d.bat` in your Blender folder
@ECHO OFF
setlocal enableDelayedExpansion
@REM ! CHANGE this path to your blender.exe !
set Blender="E:\Programm\Blender3.0\blender.exe"
ECHO "Starting Blender..."
ECHO "Don't close this window until your done in Blender"
set PythonExpr=^
import bpy, sys;^
bpy.ops.object.select_all(action='SELECT');^
bpy.ops.object.delete(use_global=False);^
bpy.ops.armatoolbox.import_p3d(filepath=sys.argv[-1]);
for %%f in (%*) do (
set str="%%f"
set str=!str:p3d=blend!
echo !str!
%Blender% !str! --python-expr "%PythonExpr%" -- %%f
)
CHANGE line 4 to to your blender.exe path !
Use the Default Programs Editor tool to edit the context menu of .p3d files.
you can download the tool here https://defaultprogramseditor.com/
Add a new context menu item and name it Open With Blender by following this steps:
- Select File Type Settings
- Select Context Menu
- Search ".p3d" select it and click next
- Click Add
- Command name: "Open With Blender"
- Program path: "pathTo.bat" "%1" eg: "E:\Programm\Blender3.0\openp3d\openp3d.bat" "%1"
( You can use the Browse... function )
- Item Icon: Blender.exe icon found in your blender Install directory.
- Click Next
- Save Context Menu and you are done.
Now you can right click Open With Blender .p3d files
It even works with multiple selected files
This Script was made for Cytech by Atom_Monky