Update Python env and requirements
This commit is contained in:
parent
11ad2d5742
commit
c4a507c6ac
11
AGENTS.md
11
AGENTS.md
@ -7,10 +7,10 @@ EG 是一个基于 Panda3D 引擎开发的 3D 编辑器和游戏引擎,集成
|
||||
## 核心技术栈
|
||||
|
||||
- **渲染引擎**: Panda3D 1.10.15 + RenderPipeline (延迟渲染、PBR材质)
|
||||
- **GUI框架**: PyQt5 + imgui_bundle (用于编辑器界面)
|
||||
- **GUI框架**: imgui_bundle + p3dimgui (用于编辑器界面)
|
||||
- **VR支持**: OpenVR 2.2.0
|
||||
- **脚本系统**: Python 3.10.12
|
||||
- **其他依赖**: PyQt5-WebEngine, assimp, pillow 等
|
||||
- **脚本系统**: Python 3.11
|
||||
- **其他依赖**: openvr, numpy, aiohttp, pyassimp, pillow 等
|
||||
|
||||
## 项目架构
|
||||
|
||||
@ -88,9 +88,8 @@ EG 是一个基于 Panda3D 引擎开发的 3D 编辑器和游戏引擎,集成
|
||||
|
||||
### 环境要求
|
||||
|
||||
- Python 3.10.12
|
||||
- Python 3.11
|
||||
- Panda3D 1.10.15
|
||||
- PyQt5 5.15.9
|
||||
- OpenVR 2.2.0 (VR功能)
|
||||
|
||||
### 运行方式
|
||||
@ -216,4 +215,4 @@ pip install -r requirements/requirements.txt
|
||||
|
||||
---
|
||||
|
||||
*该文档由iFlow CLI自动生成,最后更新时间: 2026年1月28日*
|
||||
*该文档由iFlow CLI自动生成,最后更新时间: 2026年3月17日*
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
|
||||
## 验收标准
|
||||
|
||||
- 不安装 PyQt/PySide 时,`python main.py` 能进入编辑器主界面。
|
||||
- 不安装 PyQt/PySide 时,`python Start_Run.py` 能进入编辑器主界面。
|
||||
- 场景导入/保存/加载流程不触发 Qt 相关异常。
|
||||
- 关键交互(选择、变换、场景树)行为与清理前一致。
|
||||
|
||||
|
||||
BIN
eg_smoke_x76dg4m2/eg_smoke_x76dg4m2.png
Normal file
BIN
eg_smoke_x76dg4m2/eg_smoke_x76dg4m2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 785 KiB |
9
eg_smoke_x76dg4m2/smoke_project/project.json
Normal file
9
eg_smoke_x76dg4m2/smoke_project/project.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "smoke_project",
|
||||
"path": "D:\\IMGUI\\EG\\eg_smoke_x76dg4m2\\smoke_project",
|
||||
"created_at": "2026-03-15 17:36:38",
|
||||
"last_modified": "2026-03-15 17:36:39",
|
||||
"version": "1.0.0",
|
||||
"engine_version": "1.0.0",
|
||||
"scene_file": "scenes\\scene.bam"
|
||||
}
|
||||
BIN
eg_smoke_x76dg4m2/smoke_project/scenes/scene.bam
Normal file
BIN
eg_smoke_x76dg4m2/smoke_project/scenes/scene.bam
Normal file
Binary file not shown.
BIN
eg_smoke_x76dg4m2/smoke_project/smoke_project.png
Normal file
BIN
eg_smoke_x76dg4m2/smoke_project/smoke_project.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 785 KiB |
@ -403,12 +403,12 @@ class ProjectManager:
|
||||
run_bat_path = os.path.join(build_dir, "run.bat")
|
||||
with open(run_bat_path, "w") as f:
|
||||
f.write("@echo off\n")
|
||||
f.write("python main.py %*\n")
|
||||
f.write("python Start_Run.py %*\n")
|
||||
else: # Unix-like系统 (Linux, macOS等)
|
||||
run_sh_path = os.path.join(build_dir, "run.sh")
|
||||
with open(run_sh_path, "w") as f:
|
||||
f.write("#!/bin/bash\n")
|
||||
f.write("python3.10 main.py \"$@\"\n")
|
||||
f.write("python3.11 Start_Run.py \"$@\"\n")
|
||||
|
||||
# 为Unix-like系统添加执行权限
|
||||
st = os.stat(run_sh_path)
|
||||
@ -583,7 +583,14 @@ class ProjectManager:
|
||||
gui_info["bg_image_path"] = normalize_resource_path(gui_info["bg_image_path"])
|
||||
|
||||
def _createRequirementsFile(self,build_dir):
|
||||
requirements_content = """panda3d>=1.10.13"""
|
||||
requirements_content = """Panda3D==1.10.15
|
||||
imgui-bundle
|
||||
Pillow>=9.0.1
|
||||
numpy>=1.24
|
||||
aiohttp>=3.9
|
||||
openvr==2.2.0
|
||||
pyassimp>=5.2.5
|
||||
"""
|
||||
|
||||
requirements_path = os.path.join(build_dir,"requirements.txt")
|
||||
with open(requirements_path,"w",encoding="utf-8") as f:
|
||||
@ -820,11 +827,17 @@ setup(
|
||||
|
||||
# 依赖项
|
||||
install_requires=[
|
||||
"panda3d>=1.10.13",
|
||||
"Panda3D==1.10.15",
|
||||
"imgui-bundle",
|
||||
"Pillow>=9.0.1",
|
||||
"numpy>=1.24",
|
||||
"aiohttp>=3.9",
|
||||
"openvr==2.2.0",
|
||||
"pyassimp>=5.2.5",
|
||||
],
|
||||
|
||||
# Python版本要求
|
||||
python_requires=">=3.6",
|
||||
python_requires=">=3.11",
|
||||
|
||||
# 分类信息
|
||||
classifiers=[
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
## 🚀 在新电脑上运行此项目
|
||||
|
||||
### 方法1:使用Conda(推荐)
|
||||
### 方法1:使用Conda(推荐)
|
||||
|
||||
```bash
|
||||
# 1. 安装Miniconda
|
||||
@ -19,8 +19,8 @@ conda env create -f environment.yml
|
||||
# 4. 激活环境
|
||||
conda activate eg-project
|
||||
|
||||
# 5. 运行项目
|
||||
python main.py
|
||||
# 5. 运行项目
|
||||
python Start_Run.py
|
||||
```
|
||||
|
||||
### 方法2:使用virtualenv + pip
|
||||
@ -35,26 +35,24 @@ python -m venv venv
|
||||
source venv/bin/activate # Linux/Mac
|
||||
# 或 venv\Scripts\activate # Windows
|
||||
|
||||
# 3. 安装依赖
|
||||
pip install -r clean-requirements.txt
|
||||
# 3. 安装依赖
|
||||
pip install -r requirements/requirements.txt
|
||||
|
||||
# 4. 运行项目
|
||||
python main.py
|
||||
# 4. 运行项目
|
||||
python Start_Run.py
|
||||
```
|
||||
|
||||
## 📁 需要复制的文件
|
||||
|
||||
**必须复制:**
|
||||
- `main.py` - 主程序
|
||||
- `gui_preview_window.py` - GUI窗口
|
||||
- `demo/` - 演示文件夹
|
||||
- `environment.yml` - Conda环境配置
|
||||
- `clean-requirements.txt` - 核心依赖
|
||||
- `environment.yml` - Conda环境配置
|
||||
- `requirements.txt` - 核心依赖
|
||||
|
||||
**不要复制:**
|
||||
- `.conda/` - 虚拟环境文件夹
|
||||
- `__pycache__/` - Python缓存
|
||||
- `requirements.txt` - 包含系统包的混乱依赖
|
||||
- `conda-requirements.txt` - 仅用于最小 Conda 环境说明
|
||||
|
||||
## 🔧 Cursor IDE 设置
|
||||
|
||||
@ -67,10 +65,12 @@ python main.py
|
||||
## 📦 项目依赖说明
|
||||
|
||||
- **Panda3D**: 3D图形引擎
|
||||
- **imgui-bundle / p3dimgui**: ImGui GUI框架
|
||||
- **Pillow**: 图像处理
|
||||
- **python-dotenv**: 环境变量管理
|
||||
- **pyassimp**: 3D模型加载
|
||||
- **imgui-bundle / p3dimgui**: ImGui 编辑器界面与 Panda3D 桥接
|
||||
- **Pillow**: 图像处理与网页截图纹理转换
|
||||
- **numpy**: VR / SSBO 数值处理
|
||||
- **aiohttp**: 异步资源与场景 IO
|
||||
- **openvr**: VR 支持
|
||||
- **pyassimp**: 模型转换辅助
|
||||
|
||||
## 🌍 跨平台注意事项
|
||||
|
||||
@ -86,5 +86,5 @@ A: 确保系统有OpenGL支持,或使用conda安装
|
||||
**Q: ImGui界面显示异常?**
|
||||
A: 检查显卡驱动/OpenGL支持,并确认已安装 `imgui-bundle`
|
||||
|
||||
**Q: 导入错误?**
|
||||
A: 检查Python版本(需要3.10+)
|
||||
**Q: 导入错误?**
|
||||
A: 检查 Python 版本,当前项目统一使用 Python 3.11。
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
Panda3D>=1.10.15
|
||||
Panda3D==1.10.15
|
||||
imgui-bundle
|
||||
Pillow>=9.0.1
|
||||
python-dotenv>=1.0.1
|
||||
numpy>=1.24
|
||||
aiohttp>=3.9
|
||||
openvr==2.2.0
|
||||
pyassimp>=5.2.5
|
||||
|
||||
@ -1,34 +1,3 @@
|
||||
# This file may be used to create an environment using:
|
||||
# $ conda create --name <env> --file <this file>
|
||||
# platform: linux-64
|
||||
# created-by: conda 25.5.1
|
||||
@EXPLICIT
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/_libgcc_mutex-0.1-main.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/ca-certificates-2025.2.25-h06a4308_0.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/ld_impl_linux-64-2.40-h12ee557_0.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/libstdcxx-ng-11.2.0-h1234567_1.conda
|
||||
https://repo.anaconda.com/pkgs/main/noarch/tzdata-2025b-h04d1e81_0.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/libgomp-11.2.0-h1234567_1.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/_openmp_mutex-5.1-1_gnu.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/libgcc-ng-11.2.0-h1234567_1.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/bzip2-1.0.8-h5eee18b_6.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/expat-2.7.1-h6a678d5_0.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/libffi-3.4.4-h6a678d5_1.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/libuuid-1.41.5-h5eee18b_0.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/ncurses-6.4-h6a678d5_0.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/openssl-3.0.16-h5eee18b_0.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/pthread-stubs-0.3-h0ce48e5_1.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/xorg-libxau-1.0.12-h9b100fa_0.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/xorg-libxdmcp-1.1.5-h9b100fa_0.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/xorg-xorgproto-2024.1-h5eee18b_1.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/xz-5.6.4-h5eee18b_1.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/zlib-1.2.13-h5eee18b_1.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/libxcb-1.17.0-h9b100fa_0.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/readline-8.2-h5eee18b_0.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/sqlite-3.45.3-h5eee18b_0.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/xorg-libx11-1.8.12-h9b100fa_1.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/tk-8.6.14-h993c535_1.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/python-3.10.18-h1a3bd86_0.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/setuptools-78.1.1-py310h06a4308_0.conda
|
||||
https://repo.anaconda.com/pkgs/main/linux-64/wheel-0.45.1-py310h06a4308_0.conda
|
||||
https://repo.anaconda.com/pkgs/main/noarch/pip-25.1-pyhc872135_2.conda
|
||||
# Minimal conda spec for the current project environment.
|
||||
python=3.11
|
||||
pip
|
||||
|
||||
@ -1,14 +1,15 @@
|
||||
name: eg-project
|
||||
channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- python=3.10
|
||||
- pip
|
||||
name: eg-project
|
||||
channels:
|
||||
- conda-forge
|
||||
- defaults
|
||||
dependencies:
|
||||
- python=3.11
|
||||
- pip
|
||||
- pip:
|
||||
- Panda3D>=1.10.15
|
||||
- imgui-bundle
|
||||
- Pillow>=9.0.1
|
||||
- python-dotenv>=1.0.1
|
||||
- pyassimp>=5.2.5
|
||||
- six
|
||||
- Panda3D==1.10.15
|
||||
- imgui-bundle
|
||||
- Pillow>=9.0.1
|
||||
- numpy>=1.24
|
||||
- aiohttp>=3.9
|
||||
- openvr==2.2.0
|
||||
- pyassimp>=5.2.5
|
||||
|
||||
@ -1,90 +1,14 @@
|
||||
apturl==0.5.2
|
||||
bcrypt==3.2.0
|
||||
beautifulsoup4==4.10.0
|
||||
blinker==1.4
|
||||
Brlapi==0.8.3
|
||||
certifi==2020.6.20
|
||||
chardet==4.0.0
|
||||
click==8.0.3
|
||||
colorama==0.4.4
|
||||
command-not-found==0.3
|
||||
cryptography==3.4.8
|
||||
cupshelpers==1.0
|
||||
dbus-python==1.2.18
|
||||
defer==1.0.6
|
||||
DirectFolderBrowser==22.1
|
||||
DirectGuiDesigner==22.4.1
|
||||
DirectGuiExtension==22.9
|
||||
distro==1.7.0
|
||||
distro-info==1.1+ubuntu0.2
|
||||
duplicity==0.8.21
|
||||
fasteners==0.14.1
|
||||
future==0.18.2
|
||||
html5lib==1.1
|
||||
httplib2==0.20.2
|
||||
idna==3.3
|
||||
importlib-metadata==4.6.4
|
||||
jeepney==0.7.1
|
||||
keyring==23.5.0
|
||||
language-selector==0.1
|
||||
launchpadlib==1.10.16
|
||||
lazr.restfulclient==0.14.4
|
||||
lazr.uri==1.0.6
|
||||
lockfile==0.12.2
|
||||
louis==3.20.0
|
||||
lxml==4.8.0
|
||||
macaroonbakery==1.3.1
|
||||
Mako==1.1.3
|
||||
MarkupSafe==2.0.1
|
||||
monotonic==1.6
|
||||
more-itertools==8.10.0
|
||||
netifaces==0.11.0
|
||||
oauthlib==3.2.0
|
||||
olefile==0.46
|
||||
Panda3D==1.10.15
|
||||
panda3d-frame==22.10.post1
|
||||
Panda3DNodeEditor==22.5
|
||||
paramiko==2.9.3
|
||||
pexpect==4.8.0
|
||||
Pillow==9.0.1
|
||||
platformdirs==4.3.6
|
||||
protobuf==3.12.4
|
||||
ptyprocess==0.7.0
|
||||
pyassimp==5.2.5
|
||||
pycairo==1.20.1
|
||||
pycups==2.0.1
|
||||
Pygments==2.11.2
|
||||
PyGObject==3.42.1
|
||||
PyJWT==2.3.0
|
||||
pymacaroons==0.13.0
|
||||
PyNaCl==1.5.0
|
||||
pyparsing==2.4.7
|
||||
pyRFC3339==1.1
|
||||
python-apt==2.4.0+ubuntu4
|
||||
python-dateutil==2.8.1
|
||||
python-debian==0.1.43+ubuntu1.1
|
||||
python-dotenv==1.0.1
|
||||
pytz==2022.1
|
||||
pyxdg==0.27
|
||||
PyYAML==5.4.1
|
||||
reportlab==3.6.8
|
||||
requests==2.25.1
|
||||
SceneEditor==22.5
|
||||
screen-resolution-extra==0.0.0
|
||||
SecretStorage==3.3.1
|
||||
six==1.16.0
|
||||
soupsieve==2.3.1
|
||||
systemd-python==234
|
||||
ubuntu-drivers-common==0.0.0
|
||||
ubuntu-pro-client==8001
|
||||
ufw==0.36.1
|
||||
unattended-upgrades==0.1
|
||||
urllib3==1.26.5
|
||||
usb-creator==0.3.7
|
||||
wadllib==1.3.6
|
||||
webencodings==0.5.1
|
||||
xdg==5
|
||||
xkit==0.0.0
|
||||
zipp==1.0.0
|
||||
openvr==2.2.0
|
||||
imgui-bundle
|
||||
# Core runtime dependencies for the current ImGui editor stack.
|
||||
Panda3D==1.10.15
|
||||
imgui-bundle
|
||||
Pillow>=9.0.1
|
||||
numpy>=1.24
|
||||
aiohttp>=3.9
|
||||
openvr==2.2.0
|
||||
|
||||
# Asset import / conversion helpers.
|
||||
pyassimp>=5.2.5
|
||||
|
||||
# Optional features:
|
||||
# playwright>=1.40 # Required by core/imgui_webview.py
|
||||
# bpy # Required only when using Blender-based conversion flows
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "Test Project",
|
||||
"path": "/home/hello/EG/test_project",
|
||||
"created": "2026-01-26 10:00:00",
|
||||
"last_modified": "2026-01-26 16:22:02",
|
||||
"last_modified": "2026-03-15 17:36:41",
|
||||
"version": "1.0",
|
||||
"scene_file": "scenes/scene.bam"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user