Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Python_超人
宇宙模拟器
提交
e5ae9d23
宇宙模拟器
项目概览
Python_超人
/
宇宙模拟器
通知
19
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
宇宙模拟器
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
e5ae9d23
编写于
7月 06, 2023
作者:
三月三net
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Python超人-宇宙模拟器
上级
889aa577
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
47 addition
and
1 deletion
+47
-1
tools/sim_recorder.py
tools/sim_recorder.py
+2
-1
tools/sim_video_3d_cap_ext.py
tools/sim_video_3d_cap_ext.py
+2
-0
tools/universe_sim.bat
tools/universe_sim.bat
+25
-0
tools/video_cap.bat
tools/video_cap.bat
+18
-0
未找到文件。
tools/sim_recorder.py
浏览文件 @
e5ae9d23
...
...
@@ -23,7 +23,7 @@ def crop(mp4_file):
print
(
"裁剪视频失败"
)
def
get_window_img_dc
(
window_name
=
"
universe_sim
"
):
def
get_window_img_dc
(
window_name
=
"
宇宙模拟器(universe sim)
"
):
# 获取桌面
# hdesktop = win32gui.GetDesktopWindow()
handle
=
win32gui
.
FindWindow
(
None
,
window_name
)
...
...
@@ -33,6 +33,7 @@ def get_window_img_dc(window_name="universe_sim"):
def
record
():
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'--fps'
,
type
=
int
,
default
=
30
,
help
=
'frame per second'
)
parser
.
add_argument
(
'--window_name'
,
type
=
str
,
default
=
'宇宙模拟器(universe sim)'
,
help
=
'window_name'
)
parser
.
add_argument
(
'--total_time'
,
type
=
int
,
default
=
10000000
,
help
=
'video total time'
)
parser
.
add_argument
(
'--savename'
,
type
=
str
,
default
=
'video_right.mp4'
,
help
=
'save file name'
)
parser
.
add_argument
(
'--screen_type'
,
default
=
0
,
type
=
int
,
choices
=
[
0
,
1
],
help
=
'1: full screen, 0: region screen'
)
...
...
tools/sim_video_3d_cap_ext.py
浏览文件 @
e5ae9d23
...
...
@@ -29,6 +29,7 @@ def get_window_handle(window_name="宇宙模拟器(universe sim)"):
def
get_args
():
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'--fps'
,
type
=
int
,
default
=
30
,
help
=
'frame per second'
)
parser
.
add_argument
(
'--window_name'
,
type
=
str
,
default
=
'宇宙模拟器(universe sim)'
,
help
=
'window_name'
)
parser
.
add_argument
(
'--total_time'
,
type
=
int
,
default
=
10000000
,
help
=
'video total time'
)
parser
.
add_argument
(
'--save_name'
,
type
=
str
,
default
=
'video.mp4'
,
help
=
'save file name'
)
parser
.
add_argument
(
'--start_index'
,
type
=
int
,
default
=-
1
,
help
=
'start_index'
)
...
...
@@ -97,6 +98,7 @@ def sim_window_screen_shot(wait_ses=-1):
try
:
img
=
screen_shot
(
img_dc
)
except
Exception
as
e
:
press_pause_key
()
print
(
"ERROR:"
,
str
(
e
))
traceback
.
print_exc
()
return
None
...
...
tools/universe_sim.bat
0 → 100644
浏览文件 @
e5ae9d23
@REM @echo off
@REM 设置环境和参数
SET
Anaconda3
=
D
:/Anaconda3
SET
env
=
pythoncr
SET
DISK
=
D
:
SET
SimDir
=
%DISK%
/gitee/universe
_sim
SET
SimFileDir
=
%
1
SET
SimFileName
=
%
2
SET
param3
=
%
3
SET
PYTHONPATH
=
%SimDir%
;
SET
SimFilePath
=
%SimDir%
/sim
_scenes/
%SimFileDir%
/
CALL
%Anaconda3
%
/Scripts/activate
.bat
%Anaconda3
%
CALL
conda
activate
%env%
%DISK%
cd
%SimFilePath%
@REM universe_sim.bat science speed_of_light_3d
python
-m
%SimFileName%
cd
%SimDir%
\tools
tools/video_cap.bat
0 → 100644
浏览文件 @
e5ae9d23
@REM @echo off
@REM 设置环境和参数
SET
Anaconda3
=
D
:/Anaconda3
SET
env
=
pythoncr
SET
DISK
=
D
:
SET
SimDir
=
%DISK%
/gitee/universe
_sim
SET
SimFileName
=
%
1
CALL
%Anaconda3
%
/Scripts/activate
.bat
%Anaconda3
%
CALL
conda
activate
%env%
%DISK%
cd
%SimDir%
\tools
@REM video_cap.bat speed_of_light_3d
python
-m
sim_video_3d_cap_ext
--save
_name
=
%SimFileName%
_2.mp4
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录