From 773faf8e47d3b59132b7964f26bbcffe0acf4f4e Mon Sep 17 00:00:00 2001 From: leekunhee Date: Mon, 11 Jul 2016 14:58:03 +0900 Subject: [PATCH 1/2] update for Maya 2016, Ubuntu 14.04 --- mel/deviceConnector.mel | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mel/deviceConnector.mel b/mel/deviceConnector.mel index 753f347..9cc4077 100644 --- a/mel/deviceConnector.mel +++ b/mel/deviceConnector.mel @@ -99,9 +99,9 @@ proc createDeviceAttributes(string $devaceName, float $attrScale) string $devAttribLs[] = `listInputDeviceAxes $devaceName`; // List all available device Axes - translation, rotation etc. print($devAttribLs); int $devLocCount = `size($devAttribLs)`/2; // Divide by 2 to get number of locators that we need (our server sends only X and Y axes - px and py) - int $counter = 1; + int $counter = 0; - for($counter = 1; $counter <= $devLocCount; $counter++) // Loop for creating and naming locators. If locator exists, do nothing. + for($counter = 0; $counter < $devLocCount; $counter++) // Loop for creating and naming locators. If locator exists, do nothing. { if(`objExists ("devLoc_" + $counter)`) print("Object devLoc_" + $counter + " exists - nothing to do.\n"); else @@ -109,12 +109,12 @@ proc createDeviceAttributes(string $devaceName, float $attrScale) print("devLoc_" + $counter + " created.\n"); spaceLocator -name ("devLoc_" + $counter); } - attachDeviceAttr -d $devaceName -axis ("px" + $counter) ("devLoc_" + $counter + ".translateX"); // Attaching axes to locator X attribute. - attachDeviceAttr -d $devaceName -axis ("py" + $counter) ("devLoc_" + $counter + ".translateY"); // Attaching axes to locator Y attribute. - setAttrMapping -d $devaceName -axis ("px" + $counter) -attribute ("devLoc_" + $counter + ".translateX") -scale $attrScale; // Scale attribute X - setAttrMapping -d $devaceName -axis ("py" + $counter) -attribute ("devLoc_" + $counter + ".translateY") -scale $attrScale; // Scale attribute Y + attachDeviceAttr -d $devaceName -axis ("p" + $counter + "_x") ("devLoc_" + $counter + ".translateX"); // Attaching axes to locator X attribute. + attachDeviceAttr -d $devaceName -axis ("p" + $counter + "_y") ("devLoc_" + $counter + ".translateY"); // Attaching axes to locator Y attribute. + setAttrMapping -d $devaceName -axis ("p" + $counter + "_x") -attribute ("devLoc_" + $counter + ".translateX") -scale $attrScale; // Scale attribute X + setAttrMapping -d $devaceName -axis ("p" + $counter + "_y") -attribute ("devLoc_" + $counter + ".translateY") -scale $attrScale; // Scale attribute Y // SCALE is important, because in many cases server can send huge values. //FaceCap server send point position in pixel position (higher resolution = higher values) } -} \ No newline at end of file +} From fcab556d2d82f87b3f26ad018a2c66fa690282f8 Mon Sep 17 00:00:00 2001 From: leekunhee Date: Mon, 11 Jul 2016 14:59:02 +0900 Subject: [PATCH 2/2] update for Maya 2016, Ubuntu 14.04 --- FC_maya.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FC_maya.h b/FC_maya.h index 781bd8a..8d6d0de 100644 --- a/FC_maya.h +++ b/FC_maya.h @@ -15,7 +15,7 @@ //taken from Maya SDK static char program[80]; -static char *server_name = program; +static char *server_name = "program"; static CapChannel px[MAX_MARKERS],py[MAX_MARKERS]; static void get_data(void); static int create_channels(void);