Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headlight bound to Camera LookDirection #10466

Merged
merged 57 commits into from
Mar 19, 2020
Merged
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
3a0b3e3
LibG Binaries Update (#10295)
DynamoEngOps Jan 14, 2020
767577c
Change mechanism to retreive the certificate from assembly (#10301)
saintentropy Jan 16, 2020
df489c8
DYN-2225 - Marshaling Performance optimization - Heap Cleanup (#10026)
saintentropy Jan 18, 2020
f7b71d6
DYN-2289: Fix crash with NodeToCode (#10305)
aparajit-pratap Jan 21, 2020
186499f
Geometry Color Tests More (#10291)
QilongTang Jan 21, 2020
c1a5342
update newly added test (#10313)
QilongTang Jan 22, 2020
6ea9c03
DYN-2286: fix for crash upon unresolved node undo (#10315)
aparajit-pratap Jan 23, 2020
6329c53
DYN-2328 Add test for geometry labeling (#10311)
reddyashish Jan 24, 2020
2ebaf72
First Github Action (#10131)
QilongTang Jan 24, 2020
a2d29ed
Removal of PR trigger for now (#10323)
QilongTang Jan 27, 2020
f04dbb0
Analytics Agreement Workflow Update (#10314)
QilongTang Jan 27, 2020
97cecfd
Add missing resource string (#10329)
QilongTang Jan 28, 2020
01c1ab2
LibG Binaries Update (#10331)
DynamoEngOps Jan 29, 2020
333f55c
Fix the library view display issues introduced by MS WebBrowser (#10316)
CoolStarLee Jan 29, 2020
3430655
[DYN-2382] LibraryViewExtensionMSWebBrowser does not scale correctly …
reddyashish Jan 29, 2020
a90282a
working color change on selection for points.
mjkkirschner Jan 29, 2020
b673edc
Skip GA Client Tear Down Process if NOT Necessary (#10340)
QilongTang Jan 31, 2020
bcc8d47
[Analytics] Update Tracking Conditions (#10345)
QilongTang Jan 31, 2020
91ffc19
PR comment (#10347)
QilongTang Feb 3, 2020
eef2c52
Code improvements: (#10348)
CoolStarLee Feb 3, 2020
cf32f8d
lots of cleanup work to do but this works
mjkkirschner Feb 6, 2020
df13bfd
start adding morecolor tests
mjkkirschner Feb 7, 2020
5884a2f
fix test
mjkkirschner Feb 10, 2020
ff17767
add more tests
mjkkirschner Feb 11, 2020
51588ef
fix watch3d background color converter
mjkkirschner Feb 13, 2020
08963fb
need to move branches - saving work
mjkkirschner Feb 13, 2020
d792353
give up on image comparison tests, will file that as followup, resize…
mjkkirschner Feb 13, 2020
dec8631
break out some util methods
mjkkirschner Feb 13, 2020
d2621f2
Merge branch 'helix-upgrade' into ptLineColors
mjkkirschner Feb 18, 2020
3e5dd95
review comments
mjkkirschner Feb 18, 2020
f7abe13
Merge remote-tracking branch 'origin/ptLineColors' into ptLineColors
mjkkirschner Feb 18, 2020
1915b79
review comment
mjkkirschner Feb 18, 2020
9ed021d
add show line numbers when watermarkLabel is collapsed (#10362)
SHKnudsen Feb 19, 2020
02103a1
Visual Identifier on Optional Inputs (#10361)
SHKnudsen Feb 20, 2020
fe8f4fb
Update README.md (#10387)
mjkkirschner Feb 20, 2020
6f0c4ce
Merge remote-tracking branch 'upstream/helix-upgrade' into meshVertex…
mjkkirschner Feb 20, 2020
89c0038
GA client not launching when terms not agreed (#10407)
QilongTang Feb 24, 2020
7b93efe
Patch 283 (#10421)
saintentropy Mar 1, 2020
c99c118
fix summary
mjkkirschner Mar 1, 2020
8d3c2be
Cover Test for Configuration Folder (#10444)
QilongTang Mar 4, 2020
85a183e
Added a couple of asserts for the properties. (#10437)
QilongTang Mar 4, 2020
20b7651
this is working to link 2 simple shaders - they are just for testing …
mjkkirschner Mar 10, 2020
b3b1da2
Merge remote-tracking branch 'upstream/master' into meshVertexColorsS…
mjkkirschner Mar 10, 2020
c0ab906
Fix for crash while drawing Point manipulator (gizmo) when LibG fails…
aparajit-pratap Mar 11, 2020
530d3b6
update shader names
mjkkirschner Mar 12, 2020
32f8648
fix broken tests dude to bad merge conflict fix
mjkkirschner Mar 12, 2020
0a9cfb4
remove commented out vertex shader code
mjkkirschner Mar 12, 2020
3552aa2
Merge remote-tracking branch 'upstream/master' into helix-upgrade-mas…
mjkkirschner Mar 13, 2020
bcfbc7f
fix bug in shader
mjkkirschner Mar 13, 2020
b41b828
Merge branch 'helix-upgrade-mastermerge' into meshVertexColorsShader
mjkkirschner Mar 13, 2020
b1f1e57
Merge remote-tracking branch 'upstream/helix-upgrade' into meshVertex…
mjkkirschner Mar 13, 2020
e13416c
remove
mjkkirschner Mar 13, 2020
414e590
update comments
mjkkirschner Mar 13, 2020
3ec2dd3
fix binding
mjkkirschner Mar 13, 2020
dc85080
flip normal if back facing tri
mjkkirschner Mar 14, 2020
8d7e6f1
resolve conflicts
mjkkirschner Mar 18, 2020
9205690
make sure compiled shader up to date.
mjkkirschner Mar 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions src/DynamoCoreWpf/DynamoCoreWpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@
<Compile Include="Extensions\ViewStartupParams.cs" />
<Compile Include="Interfaces\ILibraryViewCustomization.cs" />
<Compile Include="Interfaces\LayoutSpecification.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Utilities\CompactBubbleHandler.cs" />
<Compile Include="Interfaces\IShellCom.cs" />
<Compile Include="Rendering\HelixRenderPackage.cs" />
Expand All @@ -175,11 +180,6 @@
<Compile Include="UI\ClassObjectTemplateSelector.cs" />
<Compile Include="UI\DraggedAdorner.cs" />
<Compile Include="UI\HeaderTemplateSelector.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Resources.en-US.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
Expand Down Expand Up @@ -462,8 +462,8 @@
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.en-US.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
Expand Down Expand Up @@ -505,6 +505,8 @@
<None Include="UI\Fonts\OpenSans-SemiboldItalic.ttf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="ViewModels\Watch3D\compiledShaders\psDynamoMesh" />
<None Include="ViewModels\Watch3D\compiledShaders\vsDynamoMesh" />
<Resource Include="UI\Images\cursors.psd" />
<Resource Include="UI\Images\cursors1.psd" />
</ItemGroup>
Expand Down Expand Up @@ -1284,7 +1286,9 @@
<Resource Include="UI\Images\icon-whats-new-small.png" />
<Resource Include="UI\Images\icon-dictionary-small.png" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Folder Include="ViewModels\Watch3D\shaderSource\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="AfterBuild">
<MakeDir Directories="$(OutputPath)\viewExtensions\" />
Expand Down
22 changes: 21 additions & 1 deletion src/DynamoCoreWpf/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="AboutWindowCannotGetVersion" xml:space="preserve">
<value>Could not get version.</value>
<comment>To indicate not abe to get Dynamo version</comment>
Expand Down Expand Up @@ -2221,4 +2220,11 @@ Uninstall the following packages: {0}?</value>
<data name="CrashPromptGithubNewIssueTitle" xml:space="preserve">
<value>Crash report from Dynamo {0}</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="psDynamoMesh" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\ViewModels\Watch3D\compiledShaders\psDynamoMesh;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="vsDynamoMesh" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\ViewModels\Watch3D\compiledShaders\vsDynamoMesh;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>
8 changes: 7 additions & 1 deletion src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1975,7 +1975,6 @@ Do you want to install the latest Dynamo update?</value>
<data name="FolderNotWritableError" xml:space="preserve">
<value>You do not have write permission to {0}.</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="ActionMember" xml:space="preserve">
<value>Action</value>
</data>
Expand Down Expand Up @@ -2221,4 +2220,11 @@ Uninstall the following packages: {0}?</value>
<data name="DynamoViewSettingMenuShowDataReportingDialogTooltip" xml:space="preserve">
<value>Display the dialog for user to pick agreement on data collecting.</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="psDynamoMesh" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\ViewModels\Watch3D\compiledShaders\psDynamoMesh;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="vsDynamoMesh" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\ViewModels\Watch3D\compiledShaders\vsDynamoMesh;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>
112 changes: 32 additions & 80 deletions src/DynamoCoreWpf/ViewModels/Watch3D/AttachedProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,41 +16,16 @@ public static class AttachedProperties

// handles determining color of elementGeometry3Ds when any property is set false
// as the state of other properties must be checked to determine the correct color / material.
private static void OnPropertySetFalse(DependencyObject obj)
private static void OnPoint_Line_PropertySetFalse(DependencyObject obj)
{
if (!(obj is GeometryModel3D && obj.GetType() != typeof(BillboardTextModel3D)))
{
return;
}
//mesh case
var geom = (GeometryModel3D)obj;
var meshGeom = geom as DynamoGeometryModel3D;
if (meshGeom != null)
{

// if selection is not enabled after this property was set false
// then determine transparencey. IE selection state should always override
// the other properties.
if (!GetShowSelected(meshGeom))
{
if (GetIsolationMode(meshGeom))
{
meshGeom.Material = HelixWatch3DViewModel.IsolatedMaterial;
}
else if (GetIsFrozen(meshGeom))
{
meshGeom.Material = HelixWatch3DViewModel.FrozenMaterial;
}
else
{
//TODO handle vertex coloring in all these cases
meshGeom.Material = HelixWatch3DViewModel.WhiteMaterial;
}
}

}

//point or line case
else if (geom is DynamoPointGeometryModel3D || geom is DynamoLineGeometryModel3D)
GeometryModel3D geom = obj as GeometryModel3D;
if (geom is DynamoPointGeometryModel3D || geom is DynamoLineGeometryModel3D)
{
//if selection is not enabled determine if we should reset colors or set transparent colors
if (!GetShowSelected(geom))
Expand Down Expand Up @@ -111,34 +86,10 @@ private static void ShowSelectedPropertyChanged(DependencyObject obj, Dependency
var meshGeom = geom as DynamoGeometryModel3D;
if (meshGeom != null)
{
if ((bool)args.NewValue)
{
//if the item is both selected and isolation mode is on, then we should color the item as normal OR as frozen.
if (GetIsolationMode(meshGeom))
{
//selected, isolated, and frozen.
if (GetIsFrozen(meshGeom))
{
meshGeom.Material = HelixWatch3DViewModel.FrozenMaterial;
}
//selected and isolated so color normal material
//TODO handle vertex colors later.
else
{
meshGeom.Material = HelixWatch3DViewModel.WhiteMaterial;
}
}
//only selected.
else
{
meshGeom.Material = HelixWatch3DViewModel.SelectedMaterial;
}
}
else
{
OnPropertySetFalse(meshGeom);
}
HandleMeshPropertyChange(meshGeom, args);
}

//implementation for lines and points
else if (geom is DynamoPointGeometryModel3D || geom is DynamoLineGeometryModel3D)
{

Expand Down Expand Up @@ -168,7 +119,7 @@ private static void ShowSelectedPropertyChanged(DependencyObject obj, Dependency
}
else
{
OnPropertySetFalse(geom);
OnPoint_Line_PropertySetFalse(geom);
}
}
}
Expand Down Expand Up @@ -245,17 +196,11 @@ private static void IsFrozenPropertyChanged(DependencyObject obj, DependencyProp
{
return;
}
var meshGeom3d = geom as DynamoGeometryModel3D;
if (meshGeom3d != null)
var meshGeom = geom as DynamoGeometryModel3D;
if (meshGeom != null)
{
if ((bool)e.NewValue)
{
meshGeom3d.Material = HelixWatch3DViewModel.FrozenMaterial;
}
else
{
OnPropertySetFalse(meshGeom3d);
}

HandleMeshPropertyChange(meshGeom, e);
}
else if (geom is DynamoPointGeometryModel3D || geom is DynamoLineGeometryModel3D)
{
Expand All @@ -265,7 +210,7 @@ private static void IsFrozenPropertyChanged(DependencyObject obj, DependencyProp
}
else
{
OnPropertySetFalse(geom);
OnPoint_Line_PropertySetFalse(geom);
}
}
}
Expand Down Expand Up @@ -302,19 +247,13 @@ private static void IsolationModePropertyChanged(DependencyObject obj, Dependenc
return;
}
var geom = (GeometryModel3D)obj;
var meshGeom3d = geom as DynamoGeometryModel3D;
if (meshGeom3d != null)
var meshGeom = geom as DynamoGeometryModel3D;
if (meshGeom != null)
{
if ((bool)e.NewValue)
{
meshGeom3d.Material = HelixWatch3DViewModel.IsolatedMaterial;
}
else
{
OnPropertySetFalse(meshGeom3d);
}

meshGeom3d.RequiresPerVertexColoration = true;
HandleMeshPropertyChange(meshGeom, e);
meshGeom.RequiresPerVertexColoration = true;

}
else if (geom is DynamoPointGeometryModel3D || geom is DynamoLineGeometryModel3D)
{
Expand All @@ -324,7 +263,7 @@ private static void IsolationModePropertyChanged(DependencyObject obj, Dependenc
}
else
{
OnPropertySetFalse(geom);
OnPoint_Line_PropertySetFalse(geom);
}
}
}
Expand Down Expand Up @@ -381,6 +320,19 @@ public static bool IsSpecialRenderPackage(DependencyObject element)
//#endregion

#region utils

/// <summary>
/// Sets the property value on the DynamoMeshCore - this makes its way down to our shader and invalidates the render.
/// </summary>
/// <param name="meshGeom"></param>
/// <param name="args"></param>
private static void HandleMeshPropertyChange(DynamoGeometryModel3D meshGeom, DependencyPropertyChangedEventArgs args)
{
if ((meshGeom.SceneNode.RenderCore as DynamoGeometryMeshCore) != null)
{
(meshGeom.SceneNode.RenderCore as DynamoGeometryMeshCore).SetPropertyData(args);
}
}

/// <summary>
/// Sets all colors on Geometry to a single color.
Expand Down
Loading