diff --git a/CHANGELOG.md b/CHANGELOG.md index 81ce321..2c44a4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## Version 1.5.0 (October 30, 2021) +* Enhancement: Add support for Maya 2022 with Python 3.7. (@artbycrunk in [issues/25](https://github.com/artbycrunk/vscode-maya/issues/25)) + ## Version 1.4.0 (May 01, 2020) * Enhancement: ctrl+shift+o go to symbol support. (@artbycrunk in [issues/11](https://github.com/artbycrunk/vscode-maya/issues/11)) * Enhancement: Outline support for functions and variables (@artbycrunk in [issues/11](https://github.com/artbycrunk/vscode-maya/issues/12)) diff --git a/LICENSE b/LICENSE index d24b112..ed41e15 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018 Savio Fernandes +Copyright (c) 2018-2021 Savio Fernandes Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index ec92408..208f651 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,9 @@ Command | Description You can also select a block of code in the editor and ```Right-click -> Send Code to Maya```, this is based on the current working language (Mel or Python). +## Update for Maya 2022 and above. + + > ![Option for Maya 2022 and above](./images/runner_option.png "Option for Maya 2022 and above") ## Opening the correct ports for Send to Maya Commands. diff --git a/images/runner_option.png b/images/runner_option.png new file mode 100644 index 0000000..a29b576 Binary files /dev/null and b/images/runner_option.png differ diff --git a/package-lock.json b/package-lock.json index d3b4ce4..b19072a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "mayacode", - "version": "1.3.0", + "version": "1.4.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -176,9 +176,9 @@ } }, "diagnostic-channel-publishers": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.3.tgz", - "integrity": "sha512-qIocRYU5TrGUkBlDDxaziAK1+squ8Yf2Ls4HldL3xxb/jzmWO2Enux7CvevNKYmF2kDXZ9HiRqwjPsjk8L+i2Q==" + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/diagnostic-channel-publishers/-/diagnostic-channel-publishers-0.3.5.tgz", + "integrity": "sha512-AOIjw4T7Nxl0G2BoBPhkQ6i7T4bUd9+xvdYizwvG7vVAM1dvr+SDrcUudlmzwH0kbEwdR2V1EcnKT0wAeYLQNQ==" }, "diff": { "version": "4.0.2", @@ -415,9 +415,9 @@ "dev": true }, "vscode-extension-telemetry": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.3.tgz", - "integrity": "sha512-2P4/TrxwMRQJPpcsSpreI7JVftmy+kbatONGVY65x4fJfbaHTBTm6jNgkG0Xifv6Th1o25KvaVZUTjN7VWlxBA==", + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.7.tgz", + "integrity": "sha512-pZuZTHO9OpsrwlerOKotWBRLRYJ53DobYb7aWiRAXjlqkuqE+YJJaP+2WEy8GrLIF1EnitXTDMaTAKsmLQ5ORQ==", "requires": { "applicationinsights": "1.7.4" } diff --git a/package.json b/package.json index 981115e..f9dcded 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "mayacode", "displayName": "MayaCode", "description": "A Visual Studio Code extension with support for coding for Maya.", - "version": "1.4.0", + "version": "1.5.0", "publisher": "saviof", "author": { "name": "Savio Fernandes" @@ -51,7 +51,7 @@ "vscode-test": "^1.3.0" }, "dependencies": { - "vscode-extension-telemetry": "^0.1.3" + "vscode-extension-telemetry": "^0.1.7" }, "contributes": { "languages": [ @@ -114,6 +114,11 @@ "default": "localhost", "description": "The hostname of the machine which has a maya instance running." }, + "mayacode.runner.latest": { + "type": "boolean", + "default": true, + "description": "Run for Maya 2022 and above" + }, "mayacode.telemetry": { "type": "boolean", "default": true @@ -159,4 +164,4 @@ ] } } -} \ No newline at end of file +} diff --git a/src/extension.ts b/src/extension.ts index ca166ea..5b5f6e0 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -289,7 +289,11 @@ export function activate(context: vscode.ExtensionContext) { text = "# -*- coding: utf-8 -*-\n" + text; nativePath = path.join(os.tmpdir(), "MayaCode.py"); posixPath = nativePath.replace(/\\/g, "/"); - cmd = `python("execfile('${posixPath}')")`; + if(config.get('runner.latest')){ + cmd = `python("exec(open('${posixPath}').read())")`; + }else{ + cmd = `python("execfile('${posixPath}')")`; + } } if (type == 'mel') { @@ -315,6 +319,7 @@ export function activate(context: vscode.ExtensionContext) { function send(text: string, type: string) { let success: boolean = socket_mel.write(text + '\n'); + // let success: boolean = socket_mel.write(text + '\n', "utf8"); Logger.info(text); if (success){ let successMsg = `Sent ${type} code to Maya...`;