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

sync8.x #663

Merged
merged 8 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions src/dotnet/RDK/groundplane.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

using System;
using System.Diagnostics;
using Rhino.Runtime;
using Rhino.Runtime.InteropWrappers;

#pragma warning disable 1591
Expand Down
340 changes: 260 additions & 80 deletions src/dotnet/RDK/rdk_content.cs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/dotnet/RDK/rdk_decals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ public uint TextureRenderCRC(TextureRenderHashFlags rh, LinearWorkflow lw)
/// Get the texture render hash for the referenced texture using the specified CrcRenderHashFlags.
/// </summary>
/// <since>8.0</since>
/// <deprecated>8.5</deprecated>
[CLSCompliant(false)]
[Obsolete("Do not use")]
public uint TextureRenderHash(CrcRenderHashFlags flags)
Expand All @@ -188,6 +189,7 @@ public uint TextureRenderHash(CrcRenderHashFlags flags)
/// and linear workflow.
/// </summary>
/// <since>8.0</since>
/// <deprecated>8.5</deprecated>
[CLSCompliant(false)]
[Obsolete("Do not use")]
public uint TextureRenderHash(CrcRenderHashFlags flags, LinearWorkflow lw)
Expand Down Expand Up @@ -461,6 +463,7 @@ internal static List<NamedValue> ConvertToNamedValueList(IntPtr parms) // [MARKE
/// <param name="uvOut">the UV on the texture that the color point was read from.</param>
/// <returns>true if the given point hits the decal, else false.</returns>
/// <since>5.10</since>
/// <deprecated>8.5</deprecated>
[Obsolete("Incredibly slow call")]
public bool TryGetColor(Rhino.Geometry.Point3d point, Rhino.Geometry.Vector3d normal, ref Rhino.Display.Color4f colInOut, ref Rhino.Geometry.Point2d uvOut)
{
Expand Down
195 changes: 189 additions & 6 deletions src/dotnet/RDK/rdk_pep.cs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/dotnet/RDK/safeframe.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

using Rhino.Runtime;
using System;

namespace Rhino.Render
Expand Down
1 change: 1 addition & 0 deletions src/dotnet/RDK/sun.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

using System;
using System.Diagnostics;
using Rhino.Runtime;

#if RHINO_SDK
using Rhino.UI.Controls;
Expand Down
1 change: 1 addition & 0 deletions src/dotnet/UI/Localization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ internal static void SetHooks()
}
internal delegate void SetCurrentLanguageIdDelegate(int localeId);
internal static readonly SetCurrentLanguageIdDelegate g_set_current_language_id = SetCurrentLanguageId;
[MonoPInvokeCallback(typeof(SetCurrentLanguageIdDelegate))]
private static void SetCurrentLanguageId(int localeId)
{
g_language_id = localeId;
Expand Down
29 changes: 25 additions & 4 deletions src/dotnet/UnsafeNativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ internal static extern void CRhinoRenderPlugIn_SetRdkCallbacks(
Rhino.PlugIns.RenderPlugIn.RenderSettingsSectionsCallback renderSettingsSections,
Rhino.PlugIns.RenderPlugIn.PlugInIconCallback pluginiconcallback,
Rhino.PlugIns.RenderPlugIn.InitialChannelToDisplayCallback initialChannelToDisplay,
Rhino.PlugIns.RenderPlugIn.PlugInTextureNeedsBakingCallback pluginTextureNeedsBakingCallback,
Rhino.PlugIns.RenderPlugIn.PlugInIsTextureSupportedCallback pluginIsTextureSupportedCallback,
Rhino.PlugIns.RenderPlugIn.CustomChannelNameCallback customChannelName
);

Expand Down Expand Up @@ -340,6 +340,9 @@ Rhino.Commands.SelCommand.SelSubObjectCallback selSubObjectCb
[DllImport(Import.lib, CallingConvention = CallingConvention.Cdecl)]
internal static extern void CRhinoEventWatcher_SetLinetypeTableEventCallback(Rhino.RhinoDoc.RhinoTableCallback cb, Rhino.Runtime.HostUtils.ReportCallback reportCallback);

[DllImport(Import.lib, CallingConvention = CallingConvention.Cdecl)]
internal static extern void CRhinoEventWatcher_SetHatchPatternTableEventCallback(Rhino.RhinoDoc.RhinoTableCallback cb, Rhino.Runtime.HostUtils.ReportCallback reportCallback);

[DllImport(Import.lib, CallingConvention = CallingConvention.Cdecl)]
internal static extern void CRhinoEventWatcher_SetDimStyleTableEventCallback(Rhino.RhinoDoc.RhinoTableCallback cb, Rhino.Runtime.HostUtils.ReportCallback reportCallback);

Expand Down Expand Up @@ -379,6 +382,12 @@ internal static extern uint CRhinoDoc_AddCustomUndoEvent(uint docSerialNumber, [
[DllImport(Import.lib, CallingConvention = CallingConvention.Cdecl)]
internal static extern void CRhinoEventWatcher_SetDetailEventCallback(Rhino.Display.RhinoPageView.PageViewCallback cb);

[DllImport(Import.lib, CallingConvention = CallingConvention.Cdecl)]
internal static extern void CRhinoEventWatcher_SetViewEnableDrawingCallback(Rhino.Display.RhinoView.ViewEnableDrawingCallback cb);

[DllImport(Import.lib, CallingConvention = CallingConvention.Cdecl)]
internal static extern void CRhinoEventWatcher_SetPageViewPropertiesCallback(Rhino.Display.RhinoPageView.PageViewPropertiesCallback cb);

[DllImport(Import.lib, CallingConvention = CallingConvention.Cdecl)]
internal static extern void CRhinoEventWatcher_SetDisplayModeChangedEventCallback(Rhino.Display.DisplayPipeline.DisplayModeChangedCallback cb);

Expand All @@ -389,7 +398,10 @@ internal static extern uint CRhinoDoc_AddCustomUndoEvent(uint docSerialNumber, [
internal static extern void CRhinoEventWatcher_SetOnIdleCallback(Rhino.RhinoApp.RhCmnEmptyCallback cb);

[DllImport(Import.lib, CallingConvention = CallingConvention.Cdecl)]
internal static extern void CRhinoEventWatcher_SetTransformObjectsCallback(Rhino.RhinoDoc.RhinoTransformObjectsCallback cb);
internal static extern void CRhinoEventWatcher_SetBeforeTransformObjectsCallback(Rhino.RhinoDoc.RhinoBeforeTransformObjectsCallback cb);

[DllImport(Import.lib, CallingConvention = CallingConvention.Cdecl)]
internal static extern void CRhinoEventWatcher_SetAfterTransformObjectsCallback(Rhino.RhinoDoc.RhinoAfterTransformObjectsCallback cb);

[DllImport(Import.lib, CallingConvention = CallingConvention.Cdecl)]
internal static extern void CRhinoEventWatcher_SetOnMainLoopCallback(Rhino.RhinoApp.RhCmnEmptyCallback cb);
Expand Down Expand Up @@ -846,6 +858,13 @@ internal static extern void Rdk_CRdkCmnPostEffectJob_SetCallbacks(
Rhino.RDK.Delegates.EXECUTE_POST_EFFECT_JOB execute
);

// CmnPostEffectExecutionControl
[DllImport(Import.librdk, CallingConvention = CallingConvention.Cdecl)]
internal static extern void Rdk_CRdkCmnPostEffectExecutionControl_SetCallbacks(
Rhino.RDK.Delegates.POST_EFFECT_EXECUTION_CONTROL_PROC__DELETE_THIS delete,
Rhino.RDK.Delegates.POST_EFFECT_EXECUTION_CONTROL_PROC__READY_TO_EXECUTE ready_to_execute
);

//CmnTask
[DllImport(Import.librdk, CallingConvention = CallingConvention.Cdecl)]
internal static extern void Rdk_Task_SetCallbacks(
Expand Down Expand Up @@ -1452,7 +1471,8 @@ internal static extern void RhCmnObjectManagerNodeProperty_SetCallbacks(
Rhino.ObjectManager.ObjectManagerNodeQuickAccessProperty.NodePropertyDisplayNameDelegate delegateDisplayName,
Rhino.ObjectManager.ObjectManagerNodeQuickAccessProperty.NodePropertyParameterNameDelegate delegateParameterName,
Rhino.ObjectManager.ObjectManagerNodeQuickAccessProperty.NodePropertyImageDelegate delegateImage,
Rhino.ObjectManager.ObjectManagerNodeQuickAccessProperty.NodePropertyEditableDelegate delegateEditable
Rhino.ObjectManager.ObjectManagerNodeQuickAccessProperty.NodePropertyEditableDelegate delegateEditable,
Rhino.ObjectManager.ObjectManagerNodeQuickAccessProperty.NodePropertyTypeDelegate delegateParameterType
);

[DllImport(Import.lib, CallingConvention = CallingConvention.Cdecl)]
Expand All @@ -1468,7 +1488,8 @@ internal static extern void RhCmnObjectManagerNodeCommand_SetCallbacks(
Rhino.ObjectManager.ObjectManagerNodeCommand.NodeCommandIsDefaultDelegate delegateIsDefault,
Rhino.ObjectManager.ObjectManagerNodeCommand.NodeCommandIsEnabledDelegate delegateIsEnabled,
Rhino.ObjectManager.ObjectManagerNodeCommand.NodeCommandIsRadioButtonDelegate delegateIsRadioButton,
Rhino.ObjectManager.ObjectManagerNodeCommand.NodeCommandSupportsMultipleSelectionDelegate delegateMultipleSupport
Rhino.ObjectManager.ObjectManagerNodeCommand.NodeCommandSupportsMultipleSelectionDelegate delegateMultipleSupport,
Rhino.ObjectManager.ObjectManagerNodeCommand.NodeCommandMenuOrderDelegate delegateMenuOrder
);

internal delegate void ConstraintAddRemProc(uint docSerial, IntPtr Constraints, IntPtr Constraint);
Expand Down
Loading
Loading