Copyright (c) 2024
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Compatibility
-
2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012
Operating Systems
History
Created: | 11/30/2014 |
Last Modified: | 04/26/2021 |
File Size: | 26.9 KB |
Keywords
Bugs (2 reported) Help make this item even better. Your bug reports are appreciated!
Date | Priority | Title | Status |
---|---|---|---|
11/14/2018 | medium | The frame will jump back to the 0 frame everytime. | Pending |
08/30/2016 | medium | Activate command error | Closed |
Bugs
Activate command error
Status | closed |
---|---|
Priority | medium |
Date | 08/30/2016 |
Submitted by | Oliver Kirchhoff |
A would like to try this script, but when I push the hotkey I got an error message:
// Error: Line 2.67: Cannot find file "UsershamuDocumentsmaya2016scriptsokPushy.mel" for source statement.
I'm using PC maya 2016 sp1
my Runtime Command:
if (startsWith(`whatIs okPushyActivate`, "Mel") != true) {
source "\Users\hamu\Documents\maya\2016\scripts\okPushy.mel";
}
okPushyActivate();
I don't know what am I doing wrong :/
Comments on this bug:
-
Oliver Kirchhoff said about 8 years ago:
The path in your source command is wrong. It should be something like this: source “c:\\Users\\hamu\\Documents\\maya\\2016\\scripts\\okPushy.mel”; The backslash is a string escape character. You have to use two backslashes to get one backslash character. The first is the escape, the second is the value for the escape. That is only valid for Windows OS. Mac and Linux use slashes to separate the folders. That is more reliable. -
creativeHamu said about 8 years ago:
Thank you for your help and patience! I fixed the wrong line in my hotkey editor like this: if (startsWith(`whatIs okPushyActivate`, "Mel") != true) { source "c:\\Users\\hamu\\Documents\\maya\\2016\\scripts\\okPushy.mel"; } okPushyActivate(); What I got now: // Error: "c:\Users\hamu\Documents\maya\2016\scripts\okPushy.mel" line 1.3: Syntax error // Sorry I make you a headache :/ -
Oliver Kirchhoff said about 8 years ago:
no worries! It's good that finally a user with Windows is testing that thing. Unfortunately I have only a Mac at home and Linux at work. Both use the Unix notation for folder structures. Seems like something is still not right with that source command and it's Windows folder structure notation... Now the simplest solution might be for you to get rid of the first three lines and just leave the line okPushyActivate(); in there. The reason why this might still work is because you saved the script in the standard script folder of Maya. It should be sourced already when Maya is booting. Test that, might work. Still like to know what the correct notation for folder in Windows is. Just so I can update the installation infos of the script page here at CreativeCrash. According to Maya's help about the source command in MEL the correct notation would have been: source "c:/Users/hamu/Documents/maya/2016/scripts/okPushy.mel"; So, forward-slashes instead of back-slashes. Can you try and let me know? Cheers, Oliver -
Oliver Kirchhoff said about 8 years ago:
Any success? Is forward-slashes correct for windows? -
roobot said about 8 years ago:
hi there, Firstly thanks for this script - looks to be a very useful addition to Mayas toolset :) Just as a note to previous comments I got this to work in Windows by first copying the full script code into the script editor and hitting return to run it. after that the 'okPushyActivate();' command seemed to work. On a new open of Maya I couldnt get the script to source (like above got that line 1.3 syntax error on .mel script) , but copying the fiull script into the editor again and it works. So dont know if that helps sorry! -
Oliver Kirchhoff said about 8 years ago:
yes, the issue here is the source command. Windows might need a different notation of the path. After looking at the online documentation for Maya in Windows at Autodesk's website, my best guess is you got to use single forward slashes. source "c:/Users/hamu/Documents/maya/2016/scripts/okPushy.mel"; -
beveraii said about 6 years ago:
I had the same syntax error and it turns out the script has an encoding error. Needs to be switched to ansi/ascii encoding.
Post a comment:
Report a bug
Related Items:
-
Automatic Hand Rigger 1.0.0 for Maya (maya script)
$30.00 (USD) -
FULL - 130 scripts for Modeling,UV + video tutorials for each 1.1.0 for Maya (maya script)
$40.00 (USD) -
Merge Meshes 1.0.0 for Maya (maya script)
$20.00 (USD) -
Hydrangeas and roses in a vase 3D Model
$18.00 (USD) -
Space fighter with ion cannon 3D Model
$25.00 (USD) -
Camera lens SCIFI Technology Scene 3D Model
$20.00 (USD)