diff --git a/src/Video2ARKit/scripts/AEVideo2ARKitTemplate.mel b/src/Video2ARKit/scripts/AEVideo2ARKitTemplate.mel index 08e7e26..388bf3e 100644 --- a/src/Video2ARKit/scripts/AEVideo2ARKitTemplate.mel +++ b/src/Video2ARKit/scripts/AEVideo2ARKitTemplate.mel @@ -47,7 +47,7 @@ global proc AEadjustInputType(string $attr) setAttr $attr $value; } -global AEVideoPathNew(string $attr) +global proc AEVideoPathNew(string $attr) { setUITemplate -pst attributeEditorTemplate; textFieldButtonGrp -l "Video Path" a2VAEVideoPath; @@ -61,26 +61,26 @@ global AEVideoPathNew(string $attr) } -global AEVideoPathReplace(string $attr) +global proc AEVideoPathReplace(string $attr) { string $value = `getAttr $attr`; textFieldButtonGrp -e -tx $value a2VAEVideoPath; } -global AEVideoPathBrowse(string $attr) +global proc AEVideoPathBrowse(string $attr) { string $value = `getAttr $attr`; string $currentDir = `dirname $value`; string $videoFilters = "MP4 Files (*.mp4);;MOV Files (*.mov);;AVI Files (*.avi);;MPEG Files (*.mpg);;All Files (*.*)"; string $result[] = `fileDialog2 -caption "Select Video File" -fileMode 1 -fileFilter $videoFilters -selectFileFilter "MP4 Files" -dialogStyle 2` - + if($result){ textFieldButtonGrp -e -tx $result[0] a2VAEVideoPath; setAttr $attr $result[0] -type "string"; } } -global AEAdjustVideoPath(string $attr) +global proc AEAdjustVideoPath(string $attr) { string $value = `textFieldButtonGrp -q -tx a2VAEVideoPath`; setAttr $attr $value; @@ -110,7 +110,10 @@ global proc AEVideo2ARKitTemplate(string $nodeName) editorTemplate -callCustom "AEInputDeviceNew" "AEInputDeviceReplace" $nodeName; - editorTemplate -addControl "videoPath"; + //editorTemplate -addControl "videoPath"; + editorTemplate -callCustom "AEVideoPathNew" + "AEVideoPathReplace" + $nodeName; editorTemplate -addControl "networkUrl"; editorTemplate -addControl "networkPort"; editorTemplate -addControl "modelPath"; diff --git a/src/Video2ARKit/scripts/V2A/Video2ARKitNode.py b/src/Video2ARKit/scripts/V2A/Video2ARKitNode.py index eb21840..53a06cb 100644 --- a/src/Video2ARKit/scripts/V2A/Video2ARKitNode.py +++ b/src/Video2ARKit/scripts/V2A/Video2ARKitNode.py @@ -120,7 +120,7 @@ class Video2ARKitNode(om.MPxNode): Video2ARKitNode.aNetworkUrl = tAttr.create("networkUrl", "nu", om.MFnData.kString) om.MPxNode.addAttribute(Video2ARKitNode.aNetworkUrl) - Video2ARKitNode.aNetworkPort = nAttr.create("networkPort", "np", om.MFnNumericData.kInt, 8080) + Video2ARKitNode.aNetworkPort = nAttr.create("networkPort", "np", om.MFnNumericData.kInt, 39539) om.MPxNode.addAttribute(Video2ARKitNode.aNetworkPort) # 輸入:影片路徑