additional requirements:
Note that the persistent install link above includes links and instructions for installing the rsx plugins.
Note: may require
VC++ runtime 2008 sp1 (2010)
from Microsoft. Get it if the plugins do not install.
Installation:
- Reset the Default Context if any toolbars have been modified
- if unofficial updates is installed skip to step 8
- install the persistent base if not already installed
- install the rsx plugins if not already installed
- install the global function set
- install the JSON function set
- install the Hierarchy scripts
- drag the node into the link editor
- delete the node from the scene after install is complete
- unzip the web folder to:
- workspace only version of trueSpace -
C:\trueSpace761Std\web
- full version of trueSpace - C:\trueSpace761\tS\web
- When run for the very first time it may ask for firewall permissions - this does not need access to the local network, so feel free to answer this question in any way you like.
If you allow access then other devices can be used to display the pages.
Older installation video can be found here: https://youtu.be/OC3Xx6a0_AU - note that this video was made for the color picker and does not show the installation of the second rsx plugin and does not mention the persistent script requirement.
Usage:
Right click the toolbar button to open the options panel.
- Click the toolbar button, www, to start the server and open the options panel.
- On the first run Windows will ask about firewall permissions.
If you allow it then you can open the Web UI from other devices using the pc's ip address.
- Choose a Scene View version with the radio buttons
- Press the corresponding Open button to start the web server and open the default web browser to the desired page
The Interval and Port number values cannot be set while the server is running.
- Enable Statistics - use to update statistics display mesh and matrix values. Statistics panel
- Interval - smaller value makes the web server more responsive. Will ignore values less than 10 ms.
Values greater than 400 will result in slow responsiveness.
The Interval cannot be set after starting the server.
- Open buttons will open the default web browser to the indicated page.
- Scene View cannot be run at the same time as Scene View 2
- Port Number - If you get an error that the port number is being used
close the process that is using the port or select another value for the port. The Port Number cannot be set after starting the server.
- IP_Address - shows the IP address of the computer which can be used to open the pages from another device like a second PC or tablet.
The first address in the list is the most likely one to use
An index page will open with the 4 options for the Web UI pages.
Web based color picker using a modified version of a JavaScript color picker created by John Dyer. It uses the Mongoose embedded web server, AngularJS for the other ui elements and a combination of rsx plugin and script nodes to communicate with trueSpace. It works with Firefox, Edge and Chrome web browsers. Internet Explorer(IE) does not work as well and older versions of IE won't work at all. Colors update in real time and it has 8 slots for color swatches. The swatches can also be loaded from the image based node color picker.
Web based scene view provides a tree based view into the scene. It has controls for selection, visibility, grouping and link editor controls and it displays skeleton and parenting hierarchies. The scene view presents a simplified view by only showing a subset of the scene nodes. When it encounters a renderable item it does not dig any deeper.
Web based scene view v2 is an enhanced version of the original web ui scene view.
Web based layers provides a layer system for workspace. It is based on the Workspace Layers 3 scripts.
This version enables the use of unlimited number of layers and does not clear or eat away the undo history.
It uses an internal panel to display the web page. This is only compatible with the latest versions of windows with internet explorer installed. The page can also be opened with an external web browser.
Usage:
WatchdogControl:
The WatchdogControl node when active is called by the web server at regular intervals.
It reads from an internal list of commands and runs them.
The command list is a JSON string with a format like so:
{"list":[{"command":"Project/Space 3D/One"},{"command":"Project/Space 3D/Two"}]}
The original idea was for scripts to automatically register themselves with the control,
so they could check their inputs for changes without the limitations of the built in Watchdog node,
which tends to go dormant and is only 100% reliable when it is visible in the link editor.
The built in script function, OnPostLoad, is not aware of the rest of tS structure and code base so the automatic registration idea is on hold if or until a workaround is found.
The control will deactivate itself if the data is empty
The control will remove any command nodes that don't exist from it's data object list.
There is a Queue Function Set that can be used to transfer or store data, WatchdogData object.
MarkerDimensions.RsObj is a sample object showing it's use.
The sample also demonstrates capturing a marker mesh as a dimension object.
Delete the resulting _Measurements object between runs.
It works with the control by:
- Saves the state of the WatchdogControl
- Sets the data: {"list":[{"command":"Project/Space 3D/MarkerDimensions/shift-c key press"}]}
- Activates the WatchdogControl
- It will run the command: "Project/Space 3D/MarkerDimensions/shift-c key press" at regular intervals
- When Shift-C or Esc are pressed it will restore the WatchdogControl to it's previous state
The check for the keypress, "RsTool.GetAsyncKeyState", cannot be run inside a looping script because
in this sample code the primitive tool takes over.
Notes:
- Works with the unSelectable script to lock nodes from selection - after selection it deselects the marked nodes
- Dev note: AngularJS used in scene view and color pages does not work with the trueSpace http control.
- layers works with the panel http control when using newer versions of windows
- Scene View 2 does not work in WindowsXP
Dev Notes
- Clintons3dView_src.zip - c++ source code
- uses the mongoose embedded web server v5.2
- plugin reads/writes WebDataOut and WebDataIn on the compute node
- TSevent connector is for scripts to make "events" for the web ui. It is used to update color swatch changes from the color picker node.
- The plugin responds to selection changes, connector value changes which is used to update the object info node and node rename events.
- It responds to web ui changes via a windows timer.
The same timer is used to throttle the connector value change events.
Uses WM_TImer message, SetTimer, KillTimer and MESSAGE_HANDLER(WM_TIMER, OnTimer) callback.
Test shows that the timer interval value is not being used by the windows timer. Don't know what value it is using.
- The JSON Function Set has the json2.js library inside of it for converting between objects and strings. Strings are passed through the web server and javascript objects are created from those strings.
- The Scene View v2 uses the Vue js 3 framework, options style
-
The scene view uses:
- The color picker is a modified version of John Dyers color picker. Copyright (c) 2007 John Dyer (http://johndyer.name)
- The old scene view and color picker both use the AngularJS v1 framework
- The Layers system uses vanilla javascript with the color control taken from the Spectrum color picker -
https://bgrins.github.io/spectrum/
December 22, 2023
- added null icons to the scene view
- layers AddToLayer updated from UU version
- update installer toolbar resets
March 23, 2023
- rsx plugin updated for use with the new statistics scripts
January 9, 2023
- fixed: rename event of Scene View 2 was not connected and was not working for the scene node
January 6, 2023
- fix camera and spotlight show and hide layers
- new test for view plugin install so works with system loaded style of UU9
- works with the dimensions script objects
- fix bug when protect curve color was stopping lock and visibility updates when adding or removing from layers
- protect curve color expanded to include dimension graphic color
- removed ReconnectAllObjectHiderNodes - new show/hide does not disconnect
September 20, 2022
- more strict check for busy port number
- fixed for UU9
- default port 8090
- open buttons will only work if the web server is running (if answer "no" to port in use won't open)
- Sept 21 - minor changes
September 11, 2022
- add index page for external devices
- add ip address for external devices
September 10, 2022
- scene view fixes in web.zip
- note links dialog overlapping the save, cancl, delete buttons
- added a timeout so can run the same command twice if a set time has run out - before too strict and unable to run anything twice
- options - made Parent-Child and Joint Hierarchy options update the tree when changed - also stopped errors
- fixed random problem with drag and drop were a refresh message was sent instead of the do drop message
September 8, 2022
- fix bug caused by new que based server methods, a single ui can receive the same message more than once,
this caused the scene view 2 expand icons to fail
- the other 3: scene view, color and layers all have the same fix though they may be ok without the fix
September 7, 2022
- new rsx plugin version v1638409
- web ui's don't interfere with each other
- delete node in tS updates layers and scene view 2
- delete in scene view 2 updates layers
- select in layers updates scene view 2
- hide/show/lock/unlock in layers updates scene view 2
- start with pre-existing layers node will update it's data instead of just reading it -
this only works in web page view, panel display would require manual refresh button press
- add object to layer will update scene view 2 to catch visibility and locking changes
- improved error for conflicting port numbers - shows the program that is using the port
- fixed scene view 2 options button to not show the title
- new WatchdogController node - for the future
September 3, 2022
- scene view 2 fix bug when note deleted from inside tS
- expand to selection was only working with scene objects - fixed, also auto open to root level if needed
- removed ctrl for drag and drop copy option, now uses the Hierarchy scripts option panel
- scene view responds to selection changes from layers, hide/show from layers and lock and unlock from layers
- open scene view/scene view 2 buttons only work if radio button is set to match
- web panel opens with web server startup
August 8, 2022
- new scene view version 2
- hide and show functions compatible with new upcoming UU
- new port number control
- favicon
- root folder is "web" instead of tS main folder
July 30, 2022
- new rsx plugin version v1638408
- compatible with upcoming scene view v2
November 8, 2021
June 15, 2021
- some small changes to the web folder
May 28, 2021
- updated panel from trueBlue
April 22, 2021
- window opens to a small size
- will give warning if the TCP port is being used by another process
April 18, 2021
- added new Workspace Layers v4
January 15, 2021
- works with new NURBS objects
- added buttons to open the webui pages in the default browser
- change name "Remove from group" to "Explode 3D Group"
- update installer with new reset toolbars list
September 30, 2020
- installer opens the toolbar before installation
- support for new widget based style of selection locking
- unlocking will remove the locking node - old change from other locking scripts
July 2, 2020
- make show and hide functions compatible with the new unofficial updates
July 1, 2020
- button checks that the plugin is installed and loaded before running
- installer clears recent file list
February 24, 2018
- persistent install v2 compatible
- compatible with new batch installer
January 18, 2018
- persistent install
- bug fix - now only opens the window once
- update object count and object selection count on stat node
- better scrolling for big scenes
October 28 2017
- selection locks processing
- increased max interval to 1000
- plugin v.1638405
October 23 2017
- uses WM_TIMER to control polling instead of a command node loop
- does not destory the undo stack - no command node loop
- removed the check boxes for polling and selection active from the window
- much improved performance - Display does not flash on an old single core 1.7Ghz laptop with GeForce Go 6800
- rsx plugin version v.1638404
September 8, 2016: rsx version v.1638403 - fix crash on close web dialog, less time spent inside the server code along with a proper pause node gives better performance
September 2, 2014: Added scene view and right click for loop interval control