Skip to content

Commit

Permalink
add support for maya 2022
Browse files Browse the repository at this point in the history
  • Loading branch information
artbycrunk committed Oct 29, 2021
1 parent 5da7807 commit d20441e
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 12 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Binary file added images/runner_option.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -51,7 +51,7 @@
"vscode-test": "^1.3.0"
},
"dependencies": {
"vscode-extension-telemetry": "^0.1.3"
"vscode-extension-telemetry": "^0.1.7"
},
"contributes": {
"languages": [
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -159,4 +164,4 @@
]
}
}
}
}
7 changes: 6 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -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...`;
Expand Down

0 comments on commit d20441e

Please sign in to comment.