File tree Expand file tree Collapse file tree 3 files changed +30
-11
lines changed
Python3Scripting_examples/tools_create_mesh
source/plugins/Sea5kg/Python3Scripting Expand file tree Collapse file tree 3 files changed +30
-11
lines changed Original file line number Diff line number Diff line change 33dyn_mesh = unigine .ObjectMeshDynamic .create (unigine .ObjectMeshDynamic .DYNAMIC_ALL );
44
55# 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+ #
89# pos = player.get_world_position()
910# 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+ # )
1019
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;
1820# dyn_mesh.set_world_position(pos + direction);
1921# dyn_mesh.set_world_rotation(rot);
2022
Original file line number Diff line number Diff line change @@ -61,8 +61,6 @@ set(CMAKE_MAP_IMPORTED_CONFIG_DEBUG ${temp_map_imported})
6161unset (temp_map_imported)
6262cmake_policy (POP)
6363
64-
65-
6664# set(PYTHON3SCRIPTING_VERSION "0.0.2")
6765file (STRINGS "${PROJECT_SOURCE_DIR} /../../../../version" PYTHON3SCRIPTING_VERSION)
6866
@@ -178,6 +176,7 @@ else()
178176 )
179177endif ()
180178
179+ # SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic")
181180
182181set_target_properties (${current_target}
183182 PROPERTIES
@@ -201,6 +200,7 @@ target_link_libraries(${current_target}
201200 Qt5::Gui
202201 Qt5::Widgets
203202 QCodeEditor
203+ "-Wl,--whole-archive ${PYTHON3_LIB} -Wl,--no-whole-archive"
204204 ${PYTHON3_LIB}
205205 )
206206
Original file line number Diff line number Diff line change @@ -37,7 +37,24 @@ PythonExecutor::PythonExecutor(
3737 m_vWrappers[i]->Call_PyImport_AppendInittab ();
3838 }
3939
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+
4056 Py_Initialize ();
57+
4158 // Py_SetPythonHome
4259 // mainstate = PyThreadState_Swap(NULL);
4360 Py_SetProgramName (L" main.py" );
You can’t perform that action at this time.
0 commit comments