Using the plugin programmetically (plugin API)

   2680   5   1
User Avatar
Member
571 posts
Joined: May 2017
Offline
I've added documentation on how the plugin can be used programmetically here: https://www.sidefx.com/docs/unity/_plugin_a_p_i.html [www.sidefx.com]

Also added in Houdini build 16.5.612 is a new example (Plugins/HoudiniEngineUnity/Scripts/Examples/HEU_ScriptMeshInputUVLayoutExample.cs) that shows how to create an input node, upload mesh data from selected gameobjects, connect to a new UV Layout node, and generate the output mesh into a new gameobject, or replace the original's mesh and materials. You can build on this example to process meshes in the entire scene which has been requested a few times.
User Avatar
Member
603 posts
Joined: July 2013
Offline
Any chance for some documentation on loading HE in visual studio?
Houdini Indie
Karma/Redshift 3D
User Avatar
Member
571 posts
Joined: May 2017
Offline
For C++ or C#?

There is some info here http://www.sidefx.com/docs/hengine/_h_a_p_i__integration.html [www.sidefx.com]
User Avatar
Member
603 posts
Joined: July 2013
Offline
C#
Houdini Indie
Karma/Redshift 3D
User Avatar
Member
571 posts
Joined: May 2017
Offline
Attached is a sample program to use Houdini Engine API (HAPI) via C# and Visual Studio. Lots of comments in it, especially the header part which describes how to set up in VS.

In summary, you don't need to do any special setup in VS except set platform target to x64. The HAPI libraries are loaded at runtime via DLLImports, which should work as long as the PATH environment is setup, which the sample shows how.

Attachments:
Program.cs (21.6 KB)

User Avatar
Member
603 posts
Joined: July 2013
Offline
Thanks so much for this…I've been waiting for a long time to get something going in C# with HE - just needed a little direction.

Will give you a shout-out when I stand something up with it.

Thanks.
Houdini Indie
Karma/Redshift 3D
  • Quick Links