alfarok / dynamoviewport Goto Github PK
View Code? Open in Web Editor NEWA simple view extension for visualizing Dynamo geometry.
License: MIT License
A simple view extension for visualizing Dynamo geometry.
License: MIT License
Viewport should use new Dynamo extension panel API instead of relying on xaml naming conventions
Currently there is an API breaking change between DynamoCore versions 2.2 and 2.3 as the library xaml column naming was changed, as developers now have the option to use the extensions panel. The band-aid solution was just to simply update the naming but this also means building master will now result in a package that will not run in DynamoCore versions prior to 2.3 breaking 2.X compatibility. If Viewport ever makes it to the package manager this needs to be addressed.
More details can be found in #15 as the update to the new naming convention was made at this time.
When a new instance of viewport is launched through the Dynamo UI all render package data should be read, translated, and displayed in the viewer. Currently, this only happens after a new RUN or when additional changes are made in the graph forcing a new execution.
Until WebGL can be used in Dynamo without having to have a custom built we should use the canvas renderer if WebGL cannot be loaded. This would allow Dynamo 2.0 users to use the plugin immediately without any additional modifications.
Dynamo 1.3 should be able to run WebGL as it still uses the old library. I believe CEF would have to be included in the extension for this to work. I previously created a 1.3 branch that doesn't include any of the 2.0 API changes. This requires some testing.
When toggling previews on and off I have noticed geometry sometimes remains or gets linked with another node. This leads me to believe the association between nodes and the container used to store each nodes geometry classified by the nodes GUID is getting out of sync. Need further research into the issue.
Create sample Zero-Touch nodes that inject javascript into the render loop.
Example:
public static void MoveP2P(object geometry, point a, point b, double time)
{
// injects string into local CEF browser scene
}
Example: ..\src\ViewportViewExtension\ViewportViewExtension\..
To avoid the many CEF conflicts I want to experiment with deploying the viewExtension as an Electron app instead.
Possibly using Electron.NET
https://github.com/ElectronNET/Electron.NET
Hi! I'm just beginning to work with Dynamo Extensions and I would need to use ChromiumWebBrowser in order to show certain information about the nodes of the system.
Since your project is super complete and uses a structure that it's really similar to what I want to do, I cloned your DynamoViewport by following the instructions.
It worked perfectly, the first time I downloaded it, but after doing some tests (to learn how it worked) I decided to remove the repository and clone it again. I haven't managed to make it work again since then: the grid showes in the view disappears for just a couple of seconds but then disappears, not allowing me to use the extension...
Do you know what the problem could be? Thank you very much!
๐
Copy ViewportViewExtension.dll from C:\..\REPO_LOCATION\DynamoViewport\src\ViewportViewExtension\ViewportViewExtension\bin\x64\DebugOrRelease
to C:\REPO_LOCATION\Dynamo\bin\AnyCPU\Debug
Copy Viewport_ViewExtensionDefinition.xml from C:\..\REPO_LOCATION\DynamoViewport\src\ViewportViewExtension\ViewportViewExtension\Viewport_ViewExtensionDefinition.xml
to C:\REPO_LOCATION\Dynamo\bin\AnyCPU\Debug
Love the idea! I was trying to get something very similar to work with Cromely and React. Although I don't get exactly the way you send the tasks to be executed from the front-end!
This is actually a very interesting solution that should be further developed.
Dynamo 1.3 should be able to run WebGL OOTB as it still uses the old library. I believe CEF would have to be included in the extension for this to work. I previously created a 1.3 branch that doesn't include any of the 2.0 API changes. This requires some additional testing.
Currently, when a user modifies the Hide/Show
Shader
or Wireframe
bottons view the Viewport Controls
menu the visibility settings will be reset to the default when the next render update in invoked.
Hi @alfarok,
Thanks again for all the help in the previous issue. I have been working with the Viewport this week and It is a very useful tool to create quick videos with our geometry in a very clean way. Please have a look to the last video I have done.
I am wondering if there is an easy way to tweak the code and see the commands bar of the CEF browser to change more parameters. I would love to only rotate around the z axis in some cases.
Have a good day and trust you keep safe.
Regards,
Sergio
This is an issue with Librarie and not Viewport. The current alternative is to exclusively use in-canvas search and minimize the left-hand Dynamo library window prior to launching.
Viewport testing should be included with the project solution.
For now 3 try/catch statements prevent this error from firing. It seems most apparent on the last case update
when a toggling of geometry happens. It could be due to an overlap of event firing. I think when a IsVisible event is triggered additional workspace events fire but the behavior is not consistent on show/hide. See this comment for more details and convoluted logic:
Example try/catch:
Old syncing issue:
hi,
I keep getting the error listed below when I click on Launch Viewport. Any thoughts on how to get around it?
Not allowed to load local resource: file:///C:/Users/lucia/AppData/Roaming/Dynamo/Dynamo%20Core/2.8/packages/Viewport/extra/index.html
For Viewport to be installed and run after the initial Dynamo startup the Dynamo Package Path must be retrieved from the loaded params instead of the startup params. Failure to do so will results in the Viewport not loading correctly and will require a restart of Dynamo. The default package path was recently added to the loaded params in a Dynamo PR.
Changes should be implemented in ViewportViewExtension.cs
Hi Keith,
Congratulations for creating this fantastic functionality. I heart about it in the Hackathon of London 2019 and I wanted to test it, It looks really cool in Youtube to play with the geometry while orbiting. I have installed Revit 2020 and Dynamo 2.2.1.5291, together with Dynamo Core 2.2.1.5175 and also DynamoSandbox 2.0.2 and DynamoSandbox 2.4.0.
I followed your steps to clone the Repo and paste it in the different package folders, but nothing is showing when running Dynamo in any version.
If I could be put in the right direction, it will be really appreciated.
Thanks in advance.
Bests,
Sergio
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.