It’s the 5th day I’m struggling with the code to understand what to put where, trying to translate it to match the VVVV OpenNiSkeleton Node structure, but no luck.
The cs example linked above uses a public class called “Hand” along side the main class “Main Windows” (that in VVVV I think could be the main class “public class OpenNIHandsNode” under the namespace VVVV.Nodes)
That class refers to “: ViewModelBase” and I can’t find which namespace to use lo let the code find it.
hi robe, just had a quick look at your kinect.rar and i’m not sure that’s a good point to get started. it uses wpf for the gui (so you’ll have to learn that before going any further). this ViewModelBase class you’re refering to is in Dlls/GalaSoft.MvvmLight.WPF4.dll. probably contains some custom classes for wpf, i don’t think it has anything todo with kinect. this hand class probably inherits from it in order to serve as the model in wpf’s model-view-presenter pattern. this just means it will fire events everytime a hand object changes so the user interface gets notfified and can update itself. but like i said, you’ll need to learn wpf a little in order to understand it fully (i’m not an expert in this either).
now to your plugin:
i see you copied the relevant code parts from the kinect sample but forgot to declare some members, like AvailableHands. i didn’t try to compile you’re code, but there’re probably more such errors. how did you write this code? with our code editor? maybe that’s not the best idea, because we lack a proper debugger. use sharp develop 3.2.1 for example and open up the project file with it. but before you open it, make sure you set the environment variable VVVV45 to point to your vvvv installation, so references can be found. then try to compile it. you’ll propbably get errors, if you can’t solve them on your own report back here. i can help you to at least get started, no clue about the kinect stuff though.
Thanks a lot Elias. I’m doing everything you suggested.
I was using Microsoft Visual c# and if I set VVVV45 as environment variable and went crazy in the prefs I couldn’t find VVVV.Core, VVVV.Utils etc. So I switched to the VVVV internal code editor and ““debugging”” pressing CTRL+S… :-C
Now I’m going to install SharpDevelop, I see the newer version 4.0 in the download section.
I’m not a # programmer, really I’m not a programmer (except some stupid maya mel things), but I’m really motivated to start learning.
Probably this isn’t the simpler project to start, but I want to try.
I’ll keep you update on my improvement
visual studio should work too, but never tried it. so to keep the errors you can make to a minimum try sd 3.2.1 (not 4, it works with 4 too, but there are some additional steps necessary).
the environment variable VVVV45 pointing to your beta25 installation is set via windows, not in the preferences of sharp develop for example.
if the environment variable is set, open up the csproj file, press F4 (properties pad) and if you click on the referenced assemblies (like VVVV.PluginInterfaces) it should show the correct path. see attached screenshot.
after this is set, switch to project properties -> debugger and set vvvv.exe as startup program (see 2nd screenshot).
set a breakpoint in the constructor of your plugin, and start debugging (by pressing F5). vvvv should start up and you can drag the compiled dll (located under <project_dir>/bin/Debug) on your patch. the application should stop at your breakpoint.
as an alternative it is also possible to use our code editor together with a debugger. start vvvv, start SD, open up the project file, set the breakpoint, go to vvvv, open up project explorer, open the project file in vvvv (either by opening up the code editor or right clicking in project explorer), switch to debug in project explorer (so your dll is compiled with symbols by vvvv) and again the application should stop at the breakpoint set in SD. i’m not sure if SD or the code editor will refresh the code if you edit the code in the other application, but can try.
well but i recommend the first option to get you started.
well we fixed this error for the upcoming release. to get rid of it you need to set some arguments.
you can safely ignore those warnings. if you don’t want them to appear in the compile output either disable them in the project settings or in the code (see this).
see nodes-and-paths to set up vvvv in a way that some test patch + your plugin is loaded at startup if ctrl+o is too annoying for you ;)