update source code

This commit is contained in:
indigo 2025-12-29 09:24:43 +08:00
parent 531726bd70
commit 7d25bb8f2f
2 changed files with 10 additions and 7 deletions

View File

@ -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";

View File

@ -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)
# 輸入:影片路徑