Adverti horiz upsell

okPushy 1.2.2 for Maya (maya script)

push/pull objects and components in perspective camera space

License
Button download
612 Downloads

Compatibility

  • 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012

Operating Systems

  • Linux
  • Mac
  • Windows

History

Created:11/30/2014
Last Modified:04/26/2021
File Size: 12.3 KB

Keywords

context, perspective

Bugs

Activate command error

Statusclosed
Prioritymedium
Date08/30/2016
Submitted byOliver Kirchhoff Oliver Kirchhoff
Hello!

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

    Oliver Kirchhoff said about 10 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

    creativeHamu said about 10 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

    Oliver Kirchhoff said about 10 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

    Oliver Kirchhoff said about 10 years ago:

    Any success? Is forward-slashes correct for windows?
  • Oliver Kirchhoff

    Oliver Kirchhoff said almost 10 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

    beveraii said almost 8 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: