Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/DynamoDS/Dynamo
Browse files Browse the repository at this point in the history
  • Loading branch information
zeusongit committed Sep 5, 2024
2 parents a8a6e03 + c4901a4 commit 85e2d6e
Show file tree
Hide file tree
Showing 42 changed files with 64,859 additions and 279 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@DYNAMO v.3.3.0 © 2024 Autodesk, Inc. All rights reserved.
@DYNAMO v.3.4.0 © 2024 Autodesk, Inc. All rights reserved.
Dynamo License

Those portions created by Ian are provided with the following copyright:
Expand Down
287 changes: 144 additions & 143 deletions doc/distrib/License.rtf

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion doc/distrib/NodeHelpFiles/DSCore.List.IndexOf.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## In Depth
`List.IndexOf` returns the index location of a given element in a list. If the given element isn’t found in the list or its data type does not match the list element (for example, the input is a double and the list element is a string), `List.IndexOf` returns -1.
`List.IndexOf` returns the index location of a given element in a list. If the given element isn’t found in the list or its data type does not match the list element (for example, the input is a double and the list element is a string), `List.IndexOf` returns null.

Note that this node returns only the first index, even if the element appears multiple times on the list. To return multiple indices, use `List.AllIndicesOf` instead.
___
Expand Down
6 changes: 3 additions & 3 deletions src/AssemblySharedInfoGenerator/AssemblySharedInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// associated with an assembly.
[assembly: AssemblyCompany("Autodesk, Inc")]
[assembly: AssemblyProduct("Dynamo")]
[assembly: AssemblyCopyright("Copyright © Autodesk, Inc 2024")]
[assembly: AssemblyCopyright("Copyright © Autodesk, Inc 2024")]
[assembly: AssemblyTrademark("")]

//In order to begin building localizable applications, set
Expand Down Expand Up @@ -45,7 +45,7 @@
// to distinguish one build from another. AssemblyFileVersion is specified
// in AssemblyVersionInfo.cs so that it can be easily incremented by the
// automated build process.
[assembly: AssemblyVersion("3.3.0.5104")]
[assembly: AssemblyVersion("3.4.0.6124")]


// By default, the "Product version" shown in the file properties window is
Expand All @@ -64,4 +64,4 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("3.3.0.5104")]
[assembly: AssemblyFileVersion("3.4.0.6124")]
2 changes: 1 addition & 1 deletion src/AssemblySharedInfoGenerator/AssemblySharedInfo.tt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyFileVersion("<#= this.MajorVersion #>.<#= this.MinorVersion #>.<#= this.BuildNumber #>.<#= this.RevisionNumber #>")]
<#+
int MajorVersion = 3;
int MinorVersion = 3;
int MinorVersion = 4;
int BuildNumber = 0;
// The datetime baseline we choose using this algorithm will affect build number and all nuget packages uploaded
// Please only change when major or minor version got incremented
Expand Down
4 changes: 2 additions & 2 deletions src/Config/upiconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<upi_attribute name='id' value='DYN'/>
<upi_element name='level'>
<upi_attribute name='name' value='release'/>
<upi_attribute name='id' value='3.3.0'/>
<upi_attribute name='id' value='3.4.0'/>
<upi_element name='level'>
<upi_attribute name='name' value='master'/>
<upi_attribute name='id' value='Win64'/>
<upi_element name='level'>
<upi_attribute name='name' value='build'/>
<upi_attribute name='id' value='3.3.0' />
<upi_attribute name='id' value='3.4.0' />
</upi_element>
</upi_element>
</upi_element>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@
overflow: hidden;
display: flex;
justify-content: center;
width: auto;
width: auto;
background-color: #ffffff;
}

.resizable--img {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ public partial class DocumentationBrowserView : UserControl, IDisposable

internal string WebBrowserUserDataFolder { get; set; }
internal string FallbackDirectoryName { get; set; }
//This folder will be used to store images and dyn files previosuly located in /rootDirectory/en-US/fallback_docs so we don't need to copy all those files per each language
internal static readonly string SharedDocsDirectoryName = "NodeHelpSharedDocs";

//Path in which the virtual folder for loading images will be created
internal string VirtualFolderPath { get; set; }
Expand Down Expand Up @@ -140,7 +138,7 @@ async void InitializeAsync()
//if the node is not from a package, then set the virtual host path to the shared docs folder.
else if (viewModel.Link != null && !viewModel.IsOwnedByPackage)
{
VirtualFolderPath = Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).DirectoryName, SharedDocsDirectoryName);
VirtualFolderPath = Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).DirectoryName, Configuration.Configurations.DynamoNodeHelpDocs);
}
//unclear what would cause this.
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ private string DynamoGraphFromMDFilePath(string path, bool IsOwnedByPackage)
{

var sharedDocsLocation = Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).DirectoryName,
DocumentationBrowserView.SharedDocsDirectoryName);
Configuration.Configurations.DynamoNodeHelpDocs);
return Path.Combine(sharedDocsLocation, Path.GetFileNameWithoutExtension(path)) + ".dyn";
}
else
Expand Down
5 changes: 5 additions & 0 deletions src/DynamoCore/Configuration/Configurations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public class Configurations
/// </summary>
public static readonly string DynamoAsString = "Dynamo";

/// <summary>
/// Const string for Dynamo Node Help Docs
/// </summary>
public static readonly string DynamoNodeHelpDocs = "NodeHelpSharedDocs";

#endregion

#region Usage Reporting Error Message
Expand Down
18 changes: 9 additions & 9 deletions src/DynamoCore/Graph/Annotations/AnnotationModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,15 @@ public IEnumerable<ModelBase> Nodes
}
}

// First remove all pins from the input
var valuesWithoutPins = value
.Where(x => !(x is ConnectorPinModel));

// then recalculate which pins belongs to the
// group and add them to the nodes collection
var pinModels = GetPinsFromNodes(value.OfType<NodeModel>());
nodes = valuesWithoutPins.Concat(pinModels)
.ToHashSet<ModelBase>();
// First separate all pins from the input
var pinModels = value.OfType<ConnectorPinModel>().ToList();
var valuesWithoutPins = value.Except(pinModels);

// then recalculate which pins belong to the group based on the nodes
var pinsFromNodes = GetPinsFromNodes(valuesWithoutPins.OfType<NodeModel>());

// Combine all
nodes = valuesWithoutPins.Concat(pinModels).Concat(pinsFromNodes).ToHashSet<ModelBase>();

if (nodes != null && nodes.Any())
{
Expand Down
1 change: 1 addition & 0 deletions src/DynamoCore/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3000,6 +3000,7 @@ static readonly Dynamo.Configuration.Configurations.CBNMaxPortNameLength -> int
static readonly Dynamo.Configuration.Configurations.CodeBlockOutputPortHeightInPixels -> double
static readonly Dynamo.Configuration.Configurations.DoubleSliderTextBoxWidth -> double
static readonly Dynamo.Configuration.Configurations.DynamoAsString -> string
static readonly Dynamo.Configuration.Configurations.DynamoNodeHelpDocs -> string
static readonly Dynamo.Configuration.Configurations.ExtensionsSideBarTabMinWidth -> int
static readonly Dynamo.Configuration.Configurations.FallbackUiCulture -> string
static readonly Dynamo.Configuration.Configurations.FilePathAttribName -> string
Expand Down
18 changes: 18 additions & 0 deletions src/DynamoCore/Utilities/LuceneSearchUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using Lucene.Net.Search;
using Lucene.Net.Store;
using Lucene.Net.Util;
using Newtonsoft.Json;

namespace Dynamo.Utilities
{
Expand Down Expand Up @@ -223,6 +224,23 @@ internal Document InitializeIndexDocumentForPackages()
return d;
}

/// <summary>
/// Remove all the current indexed node info and update it with the new ones passed as parameter
/// </summary>
/// <param name="nodeList">list of nodes to be indexed</param>
internal void UpdateIndexedNodesInfo(List<NodeSearchElement> nodeList)
{
if(nodeList.Any())
{
writer.DeleteAll();
foreach(var node in nodeList)
{
var iDoc = InitializeIndexDocumentForNodes();
AddNodeTypeToSearchIndex(node, iDoc);
}
}
}

// TODO:
// isLast option is used for the last value set in the document, and it will fetch all the other field not set for the document and add them with an empty string.
// isTextField is used when the value need to be tokenized(broken down into pieces), whereas StringTextFields are tokenized.
Expand Down
41 changes: 39 additions & 2 deletions src/DynamoCoreWpf/Controls/StartPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public class StartPageViewModel : ViewModelBase
List<StartPageListItem> references = new List<StartPageListItem>();
List<StartPageListItem> contributeLinks = new List<StartPageListItem>();
string sampleFolderPath = null;
string sampleDatasetsPath = null;

// Dynamic lists that update views on the fly.
ObservableCollection<SampleFileEntry> sampleFiles = null;
Expand Down Expand Up @@ -228,7 +229,7 @@ internal void WalkDirectoryTree(System.IO.DirectoryInfo root, SampleFileEntry ro
//Make sure the folder's name is not "backup"
if (!directory.Name.Equals(Configurations.BackupFolderName))
{
// Resursive call for each subdirectory.
// Recursive call for each subdirectory.
SampleFileEntry sampleFileEntry =
new SampleFileEntry(directory.Name, directory.FullName);
WalkDirectoryTree(directory, sampleFileEntry);
Expand All @@ -248,6 +249,7 @@ internal void WalkDirectoryTree(System.IO.DirectoryInfo root, SampleFileEntry ro
if (sampleFolderPath == null)
{
sampleFolderPath = Path.GetDirectoryName(file.FullName);
SetSampleDatasetsPath();
}

// Add each file under the root directory property list.
Expand All @@ -270,6 +272,37 @@ internal void WalkDirectoryTree(System.IO.DirectoryInfo root, SampleFileEntry ro
}
}

/// <summary>
/// Sets the sampleDatasetsPath based on the value of sampleFolderPath
/// </summary>
private void SetSampleDatasetsPath()
{
try
{
var directoryInfo = new DirectoryInfo(sampleFolderPath);

// Traverse the directory tree upwards to locate the "samples" folder
while (directoryInfo != null && directoryInfo.Name != "samples")
{
directoryInfo = directoryInfo.Parent;
}

if (directoryInfo != null && directoryInfo.Name == "samples")
{
var datasetsPath = Path.Combine(directoryInfo.FullName, "Data");

if (Directory.Exists(datasetsPath))
{
sampleDatasetsPath = datasetsPath;
}
}
}
catch (Exception ex)
{
DynamoViewModel.Model.Logger.Log("Error loading Dataset folder: " + ex.Message);
}
}

internal void HandleListItemClicked(StartPageListItem clicked)
{
if (clicked != null)
Expand Down Expand Up @@ -298,6 +331,11 @@ public string SampleFolderPath
get { return this.sampleFolderPath; }
}

public string SampleDatasetsPath
{
get { return this.sampleDatasetsPath; }
}

#region Public Class Properties (Static Lists)

public IEnumerable<StartPageListItem> FileOperations
Expand Down Expand Up @@ -529,7 +567,6 @@ private void HandleExternalUrl(StartPageListItem item)
DynamoViewModel.Model.Logger.Log("Error deserializing dynamo graph file: " + ex.StackTrace);
return (null, null, null, null);
}

}

#endregion
Expand Down
8 changes: 7 additions & 1 deletion src/DynamoCoreWpf/DynamoCoreWpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

<Target Name="NpmRunBuildHomePage" BeforeTargets="BeforeBuild">
<PropertyGroup>
<PackageVersion>1.0.17</PackageVersion>
<PackageVersion>1.0.18</PackageVersion>
<PackageName>DynamoHome</PackageName>
</PropertyGroup>
<Exec Command="$(PowerShellCommand) -ExecutionPolicy ByPass -Command echo ($(SolutionDir)\pkgexist.ps1 $(PackageName) $(PackageVersion))" ConsoleToMSBuild="true">
Expand Down Expand Up @@ -101,14 +101,17 @@
<None Remove="UI\Images\checkmark_16px.png" />
<None Remove="UI\Images\close_16px.png" />
<None Remove="UI\Images\caret_drop_down.png" />
<None Remove="UI\Images\error_48px.png" />
<None Remove="UI\Images\file-generic-16px.png" />
<None Remove="UI\Images\finished_checkmark_30px.png" />
<None Remove="UI\Images\folder-generic-16px.png" />
<None Remove="UI\Images\help-16px.png" />
<None Remove="UI\Images\info_48px.png" />
<None Remove="UI\Images\NodeStates\package-64px.png" />
<None Remove="UI\Images\PackageManager\empty-state-first-use-light-gray.png" />
<None Remove="UI\Images\search_icon_20px.png" />
<None Remove="UI\Images\TitleBarButtons\close-darktheme-disabled-16px.png" />
<None Remove="UI\Images\warning_48px.png" />
<None Remove="UI\Prompts\PortPropertiesEditPrompt.xaml" />
<None Remove="Views\Core\CustomColorPicker.xaml" />
<None Remove="Views\Core\GeometryScalingPopup.xaml" />
Expand Down Expand Up @@ -1016,10 +1019,12 @@
<ItemGroup>
<Resource Include="UI\Images\closetab_normal.png" />
<Resource Include="UI\Images\dynamonotext.png" />
<Resource Include="UI\Images\error_48px.png" />
<Resource Include="UI\Images\file-generic-16px.png" />
<Resource Include="UI\Images\finished_checkmark_30px.png" />
<Resource Include="UI\Images\folder-generic-16px.png" />
<Resource Include="UI\Images\help-16px.png" />
<Resource Include="UI\Images\info_48px.png" />
<Resource Include="UI\Images\maximize_16px_blue.png" />
<Resource Include="UI\Images\minimize_16px_blue.png" />
<Resource Include="UI\Images\minus_16px_blue.png" />
Expand Down Expand Up @@ -1051,6 +1056,7 @@
<Resource Include="UI\Images\TitleBarButtons\restore-lighttheme-hover-16px.png" />
<Resource Include="UI\Images\warning_16px.png" />
<Resource Include="UI\Images\font-size.png" />
<Resource Include="UI\Images\warning_48px.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="UI\Images\whiteclosetab.png" />
Expand Down
27 changes: 27 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.Designer.cs

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

11 changes: 11 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -4010,4 +4010,15 @@ To make this file into a new template, save it to a different folder, then move
<data name="PartialRenderFailureTitle" xml:space="preserve">
<value>Background Preview had an issue</value>
</data>
<data name="DynamoViewDebugMenuDumpData" xml:space="preserve">
<value>_Dump Data</value>
<comment>Debug menu | Dump data options</comment>
</data>
<data name="DynamoViewDebugMenuDumpNodeHelpData" xml:space="preserve">
<value>_Dump Node Help Data</value>
<comment>Debug menu | Dump all node help data like hash mapping</comment>
</data>
<data name="NodeHelpIsDumped" xml:space="preserve">
<value>Node Help Data is dumped to \"{0}\".</value>
</data>
</root>
11 changes: 11 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -3997,4 +3997,15 @@ To make this file into a new template, save it to a different folder, then move
<data name="PartialRenderFailureTitle" xml:space="preserve">
<value>Background Preview had an issue</value>
</data>
<data name="DynamoViewDebugMenuDumpData" xml:space="preserve">
<value>_Dump Data</value>
<comment>Debug menu | Dump data options</comment>
</data>
<data name="DynamoViewDebugMenuDumpNodeHelpData" xml:space="preserve">
<value>_Dump Node Help Data</value>
<comment>Debug menu | Dump all node help data like hash mapping</comment>
</data>
<data name="NodeHelpIsDumped" xml:space="preserve">
<value>Node Help Data is dumped to \"{0}\".</value>
</data>
</root>
Loading

0 comments on commit 85e2d6e

Please sign in to comment.