File tree 3 files changed +30
-11
lines changed
Python3Scripting_examples/tools_create_mesh
source/plugins/Sea5kg/Python3Scripting
3 files changed +30
-11
lines changed Original file line number Diff line number Diff line change 3
3
dyn_mesh = unigine .ObjectMeshDynamic .create (unigine .ObjectMeshDynamic .DYNAMIC_ALL );
4
4
5
5
# TODO find position by a camera
6
- # viewport_window_id = unigineeditor.ViewportManager.get_active_viewport_window()
7
- # player = unigineeditor.ViewportManager.get_viewport_window_player(viewport_window_id)
6
+ # viewport_window_id = unigine.ViewportManager.get_active_viewport_window()
7
+ # player = unigine.ViewportManager.get_viewport_window_player(viewport_window_id)
8
+ #
8
9
# pos = player.get_world_position()
9
10
# rot = player.get_world_rotation()
11
+ #
12
+ # view_direction = player.get_view_direction()
13
+ # mesh_position = unigine.vec3()
14
+ # direction.set(
15
+ # direction.x * 10.0 + pos.x,
16
+ # direction.y * 10.0 + pos.y,
17
+ # direction.z * 10.0 + pos.z,
18
+ # )
10
19
11
- # direction = player.get_view_direction()
12
- # Unigine::Math::Vec3 direction = {
13
- # floatDirection.x,
14
- # floatDirection.y,
15
- # floatDirection.z
16
- # };
17
- # direction *= 10.0f;
18
20
# dyn_mesh.set_world_position(pos + direction);
19
21
# dyn_mesh.set_world_rotation(rot);
20
22
Original file line number Diff line number Diff line change @@ -61,8 +61,6 @@ set(CMAKE_MAP_IMPORTED_CONFIG_DEBUG ${temp_map_imported})
61
61
unset (temp_map_imported)
62
62
cmake_policy (POP)
63
63
64
-
65
-
66
64
# set(PYTHON3SCRIPTING_VERSION "0.0.2")
67
65
file (STRINGS "${PROJECT_SOURCE_DIR} /../../../../version" PYTHON3SCRIPTING_VERSION)
68
66
@@ -178,6 +176,7 @@ else()
178
176
)
179
177
endif ()
180
178
179
+ # SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic")
181
180
182
181
set_target_properties (${current_target}
183
182
PROPERTIES
@@ -201,6 +200,7 @@ target_link_libraries(${current_target}
201
200
Qt5::Gui
202
201
Qt5::Widgets
203
202
QCodeEditor
203
+ "-Wl,--whole-archive ${PYTHON3_LIB} -Wl,--no-whole-archive"
204
204
${PYTHON3_LIB}
205
205
)
206
206
Original file line number Diff line number Diff line change @@ -37,7 +37,24 @@ PythonExecutor::PythonExecutor(
37
37
m_vWrappers[i]->Call_PyImport_AppendInittab ();
38
38
}
39
39
40
+ // /// PyByteArray_Type p;
41
+ // PyObject *o;
42
+ // PyByteArray_Check(o);
43
+
44
+ // PyStatus status;
45
+
46
+ // PyConfig config;
47
+ // PyConfig_InitPythonConfig(&config);
48
+ // // config.isolated = 1;
49
+
50
+ // status = Py_InitializeFromConfig(&config);
51
+ // if (PyStatus_Exception(status)) {
52
+ // // goto exception;
53
+ // }
54
+ // PyConfig_Clear(&config);
55
+
40
56
Py_Initialize ();
57
+
41
58
// Py_SetPythonHome
42
59
// mainstate = PyThreadState_Swap(NULL);
43
60
Py_SetProgramName (L" main.py" );
You can’t perform that action at this time.
0 commit comments