I'm a newbie here and have a question about plugin. I plan to write one. In houdini document, it seems only C++ can be used to create a plugin. I wonder if I can use something else (such as python) to write a plugin.
:?
Plugin, C++, and python
13170 6 3- jcz
- Member
- 2 posts
- Joined: April 2011
- Offline
- graham
- Member
- 1906 posts
- Joined: Nov. 2006
- Online
What kind of plugin are you looking to write exactly? The C++ HDK is definitely the most versatile and full featured option. You can create certain Python operators (SOPs, objects, DOP objects and solvers, COP generators and filters) in Houdini but that's not useful for when you want something like a POP or CHOP. You can also integrate Python scripts which can do whatever you want into menus and the shelf as well. With Python, speed could also be an issue.
Graham Thompson, Technical Artist @ Rockstar Games
- jcz
- Member
- 2 posts
- Joined: April 2011
- Offline
Thank you for your prompt reply, graham. The plugin I plan to do should include the following functions.
1. analyzing a sequence of frames in animation;
2. create certain geometric models based on the previous analysis;
3. create a shader for the new generated models.
I think C++ is the right choice for my case.
1. analyzing a sequence of frames in animation;
2. create certain geometric models based on the previous analysis;
3. create a shader for the new generated models.
I think C++ is the right choice for my case.
- dulo
- Member
- 383 posts
- Joined: June 2010
- Offline
One BIG drawback with c++ is that you have to match the exact build and compiler. If you build against build 781 your plugin wont work with build 782.
It seems to be quite impossible to create a plugin which could be sold somehow because you would have to provide hundreds of builds for each combination of plattform, compiler, distribution, build …
with python and inlined c++ you “just” have to match the compiler, which is tedious enough, because it prohibits the usage of prebuild python packages.
when i started developing for houdini i was quite shocked of the inflexibility.
plugins i built for lightwave 7 still work for lightwave 10 for example .. this is something i just can dream of with hdk / houdini ..
It seems to be quite impossible to create a plugin which could be sold somehow because you would have to provide hundreds of builds for each combination of plattform, compiler, distribution, build …
with python and inlined c++ you “just” have to match the compiler, which is tedious enough, because it prohibits the usage of prebuild python packages.
when i started developing for houdini i was quite shocked of the inflexibility.
plugins i built for lightwave 7 still work for lightwave 10 for example .. this is something i just can dream of with hdk / houdini ..
Edited by - April 22, 2011 11:24:33
- cybermax
- Member
- 255 posts
- Joined: Aug. 2009
- Offline
duloYeeh, Its crazy :evil:
One BIG drawback with c++ is that you have to match the exact build and compiler. If you build against build 781 you plugin wount work with build 782.
It seems to quite impossible to create a plugin which could be sold somehow because you would have to provide hundreds of builds for each combination of plattform, compiler, distribution and build …
with python and inlined c++ you “just” have to match the compiler which is tedious enough because it prohibits the usage of prebuild python packages.
when i started developing for houdini i was quite shocked of the inflexibility.
plugins i built for lightwave 7 still work for lightwave 10 for example .. this is something i just can dream of with hdk / houdini ..
You have two options:
1) You can provide source code and users can compile for their version
2) You can hide Your secret code to DLL and provide only basic source code and SDK for your DLL. In DLL you can not use HDK, It can works or It can not works :-(
https://vimeo.com/user3251535 [vimeo.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
- symek
- Member
- 1390 posts
- Joined: July 2005
- Offline
duloHm, I doubt that, afaik compilation doesn't have to match exact build. It simply depends on changes made in Houdini. Once something has changed, old compilation may or may not work, but since Houdini changes a lot, new builds have a good chance to break old compilations of plugins. Also matching compilers is nothing unique for Houdini, isn't it?
One BIG drawback with c++ is that you have to match the exact build and compiler. If you build against build 781 your plugin wont work with build 782.
I agree situation is far from perfect though. I think good compromise for 3rd party vendors is supporting only production builds. Far from perfect, I know.
plugins i built for lightwave 7 still work for lightwave 10 for example .. this is something i just can dream of with hdk / houdini ..
Not a good opinion about LW development progress after all , and again, you also had to match a compiler, just a single one, hadn't you? I'm kidding, stable plugins API is something Houdini could potentially benefit, that for sure.
- dulo
- Member
- 383 posts
- Joined: June 2010
- Offline
SYmek
Hm, I doubt that, afaik compilation doesn't have to match exact build. It simply depends on changes made in Houdini. Once something has changed, old compilation may or may not work, but since Houdini changes a lot, new builds have a good chance to break old compilations of plugins. Also matching compilers is nothing unique for Houdini, isn't it?
Well you just have to look at HOT for example. I never could make a build work which didnt exactly match the Revision. I also think its quite impossible that any plugin from H10 could work in H11.
Its also quite sad that the python distribution on windows is extremly stripped down and hard to extend … they should at least include the PIL ( python image libary ) .. opencv would be great too :-)
-
- Quick Links