Maya: License was not obtained, the solutions


For some reasons, e.g. the computer suddenly powered off during maya activation, or you killed maya in brute force during the activation, you are likely to encounter this error: “License was not obtained ….”

image

No matter you uninstall, reinstall any times, the same problem persists. One of, though not 100% working solution for most cases, is to delete the corrupted licensing data out of your computer. Here is how:

Continue reading “Maya: License was not obtained, the solutions”

Rhino C# Development (V) : Create and dock Rhino Panels side-by-side


In my previous blog Rhino C# Development (III) : Add Winform UI to Rhino, I demonstrated how to create a dock bar with Winform User controls in Rhino3D.

In this blog I am to demonstrate how to use a similar approach to create Rhino panels, and then dock the panels side-by-side. Rhino panels, are tabbed containers where collection of controls can be hosted, as shown below.

tabbedpanel-001.png

To create such a panel, in Visual Studio, add a user control in the plugin project. If you don’t know how to create such a plugin project, refer to my previous blogs for details.

In this example, a UserControl called GeometryPanel is inserted into the project, and a few simple winform controls are added for illustrative purposes. Add a Guid attribute to the UserControl, as shown below.
 image

[System.Runtime.InteropServices.Guid(0b0c3a6e-7efb-47c9-b2e3-7d92788a9f74)]
public class MyPanelCommand : Command
{
    public MyPanelCommand()
    {
        Instance = this;
    }
}

Continue reading “Rhino C# Development (V) : Create and dock Rhino Panels side-by-side”

Rhino C# Development (IV) :Using new RhinoCommon API to develop Rhino3D .net plugins


Rhino3D has changed its .net plugin development implementation. Although you can still use the Rhino.NET SDK to create Rhino plug-ins with the same capabilities as Rhino C++ SDK developers, however, Rhino.NET will NOT be available in Rhino 6. Rhino3D instead prefers using RhinoCommon if possible, and RhinoCommon is the new .NET plug-in SDK for Rhino 5+.

To see how to use the old Rhino.net approaches in Rhino3D plugin development, refer to my previous blogs:

  • Rhino C# Development (I) : Get Visual Studio Wizard ready
  • Rhino C# Development (II) : HelloRhino
  • Rhino C# Development (III) : Add Winform UI to Rhino


    In this blog, I am going to show how to use the new RhinoCommon API to develop .net plugins for Rhino3D.

    • Download the new RhinoCommon Plug-in SDK:

      Project wizards for plug-ins and commands are ready for Visual Studio 2010, 2012 and 2013, both in C# and Vb.Net, and including in Ultimate, Professional, Premium, C# Express, Vb Express and Windows Desktop Express where available.

      Same as installing from VS ‘Extension Manager’. After installing the wizards with the Extensions Manager, when you create a new project in Visual Studio, set the Framework to 4.0 or above in order to see the Rhino plug-in in the list.

    image

  • Continue reading “Rhino C# Development (IV) :Using new RhinoCommon API to develop Rhino3D .net plugins”

    Get the boundary of a mesh: the algorithm and C# implementation


    Given a mesh, we might occasionally want to filter those internal vertices and keeps only the outline or silhouettes. But how to do that? The problem came to my mind several years ago, when the Department of Mechanical Engineering I was serving need to drive a laser cutter to trim some shapes. So I decided to refresh my mind and use it in my current project in text morphing.

    So the input might be some triangulated mesh, and the output is the silhouettes, as shown below.

    image  image

    Continue reading “Get the boundary of a mesh: the algorithm and C# implementation”

    Getting maya path programmatically: Python and C# Code


    In automating maya to do some custom job, the maya installation folder is usually needed. Though one can hard code this as, for example, path=”C:\\Program Files\\Autodesk\\Maya2014\\”, this is not the best way as users may not install maya to the default directory.

    To extract the maya installation folder, one can use registry in windows platform, as shown below:

    image

    Given this fact, it is not very hard to get the maya root folder, either in Python or C#:

    Continue reading “Getting maya path programmatically: Python and C# Code”