Hi,
just a thought if a button was added to Max's Moi custom ui that opened the location of nod files
and by clicking on the required nod file it would open nodeditor and load automatically.
Here is some info to this question I got from Microsoft Copilot but its beyond me.
If MoI3D had a feature like that, it would indeed make working with NodeEditor much more streamlined! While MoI3D does not natively support this functionality out of the box, we can create a custom script to achieve a similar effect. Here’s a general approach on how you could set this up:
Create a Custom Command:
You need to create a custom command in MoI3D to open the NodeEditor and load a specific .nod file.
JavaScript for Custom Command:
Write a JavaScript file to handle the opening of the NodeEditor and loading of the .nod file.
Here’s an example JavaScript code snippet to give you an idea:
// Define the custom command
moi.command.addCommand('OpenNodeFile', function() {
// Open file dialog to select a .nod file
var filePicker = moi.ui.createFilePicker();
filePicker.caption = 'Select Node File';
filePicker.filter = 'Node Files (*.nod)|*.nod';
if (filePicker.showOpen()) {
var selectedFile = filePicker.fileName;
// Check if NodeEditor is loaded
if (!moi.ui.createPanel('nodeeditor')) {
moi.ui.alert('NodeEditor is not installed or not loaded.');
return;
}
// Load the selected .nod file into the NodeEditor
moi.command.execCommand('loadnod', selectedFile);
}
});
// Register the custom command
moi.commandList.registerCommand('OpenNodeFile', moi.command.OpenNodeFile);
Add Command to MoI3D:
Save the JavaScript file in the MoI3D commands directory.
Add a shortcut or button in the MoI3D UI to execute this custom command.
Use the Command:
When you execute this command, a file dialog will open, allowing you to select a .nod file. The script then loads the selected file into the NodeEditor.
Please note that you need to have the NodeEditor installed and properly configured in MoI3D for this to work. This custom command is a starting point and may need adjustments based on your specific setup and requirements.
Cheers
Barry
|