piotr.karkocha Posted June 13, 2019 Share Posted June 13, 2019 Hi, i am wondering it there is a way to have some of the editor functionality in an application. I have a project based on the VR template, but would like to be able to select nodes with mouse when running the programm in desktop mode, and be able to move them/rotate along the visible axis, just like in the editor (preferrably with option to set the increment). There is one sample on selecting nodes - selection_00, it is a good start, under UnigineScript (systems) but i dont know how to translate it to C++. But is it basically possible to use the code from editor to enable moving/rotating of the nodes? As far as i understand, the editor must be loaded for its logic to work. Or is there another way to do it? Link to comment
morbid Posted June 14, 2019 Share Posted June 14, 2019 Hi Piotr, UnigineEditor is a complex Qt-based application, copy-pasting part of its functionality into your application just wouldn't work. Some of our users developing their own specialized editors, it requires advanced programming. I guess you can rewrite UnigineScript samples into C++, the syntax is very similar. And could you elaborate on your task? Do you want to select object and rotate only? Thanks. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
piotr.karkocha Posted June 14, 2019 Author Share Posted June 14, 2019 Hi Morbid! Ok, i got it. I would like to be able to select, move and rotate along the selected axis, just the way one can do it within the editor. Link to comment
morbid Posted June 14, 2019 Share Posted June 14, 2019 The thing you need is WidgetManipulator Class.. We'll try to provide you a basic sample with manipulators by the end of the next week. Thanks. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
piotr.karkocha Posted June 15, 2019 Author Share Posted June 15, 2019 That is really cool!:) Thanks! Link to comment
morbid Posted June 24, 2019 Share Posted June 24, 2019 Hello Piotr, Please check the attached sample. You can test this code in a default SDK project. Just replace source files and compile. source.zip 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
piotr.karkocha Posted September 6, 2019 Author Share Posted September 6, 2019 (edited) Hi Morbid, i'm just back from a long holiday and wanted to try out the source code. After fixing source file paths i'm left with one last error i don't know how to solve - the Linker can't open file "Unigine_double_x64d.lib". I was looking for the file, but can't find it anywhere. Do you have any idea what could cause this problem? Edited September 6, 2019 by piotr.karkocha Link to comment
morbid Posted September 6, 2019 Share Posted September 6, 2019 This file is located in the SDK/lib folder. I suggest checking "Additional Libraries Directories" in Visual Studio project. You also can compare paths specified in the default vcxproj files with your visual studio project. Thanks. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
piotr.karkocha Posted September 6, 2019 Author Share Posted September 6, 2019 I have already set the paths just as in the default projects, both for the c++ and linker. And there is no such file in my lib directory in the sdk, i just does not exist. Could it be because of me using the entertainment version und you working with the sim version? Link to comment
morbid Posted September 6, 2019 Share Posted September 6, 2019 In Entertainment you can build only float precision. Change build preset from double to float. And you should have lib folder inside sdk directory. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
piotr.karkocha Posted September 9, 2019 Author Share Posted September 9, 2019 Yes, there is the lib folder, i just wanted to say there was no unigine_double_x64.lib inside, now i understand what it is for. OK. I have updated ALL the paths, thanks for this hint. I was trying hard but still i cannot build it. Im getting a linker error LNK 2001(NodeHelper.obj), unresolved external symbols at: ""public: virtual class Unigine::WorldBoundSphere const & __cdecl Unigine::NodeExternBase::getWorldBoundSphere(void)" (?getWorldBoundSphere@NodeExternBase@Unigine@@UEAAAEBVWorldBoundSphere@2@XZ)". WidgetManipulator_sample C:\Users\karko\OneDrive\Dokumente\UNIGINE Projects\unigine_project_1\source\NodeHelper.obj 1 ""public: virtual class Unigine::WorldBoundBox const & __cdecl Unigine::NodeExternBase::getWorldBoundBox(void)" (?getWorldBoundBox@NodeExternBase@Unigine@@UEAAAEBVWorldBoundBox@2@XZ)". WidgetManipulator_sample C:\Users\karko\OneDrive\Dokumente\UNIGINE Projects\unigine_project_1\source\NodeHelper.obj 1 Possibly there is still sth missing, maybe some dll. Could it still be because of the fact the project was done with a SIM engine version? Maybe you could post a bulid made on the entertainment version? I just cant figure out how to define the source of the problem. Link to comment
morbid Posted September 9, 2019 Share Posted September 9, 2019 Hello Piotr, Sorry for sending you double precision project, it slipped out of my mind. I've attached a cleaned *.vcxproj file that successfully compiles. You'll need to replace these paths to the SDK to your ones: D:/SDK/sdks/entertainment_windows_2.8.0.1/ D:\SDK\sdks\entertainment_windows_2.8.0.1\ Thanks. WidgetManipulator_sample.zip How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts