Error: line 1: NameError: file <mayaconsoleline> 50: name '__file__' not defined

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello i keep getting this code error when insert this python code I got from school, to help me switch my Adam rig from FK to IK from its hand controller.
Error: line 1: NameError: file <maya console> line 50: name '__file__' is not defined #
Here is the instruction from school I was given:
1. open maya 2017
2. open adam_puppet_v50.1.ma
3.open script editor
4.clear all
5." source script", switch file to type to "python files" and find "ml_utilities.py.
hit enter
6. clear all
7."source script" find "ml_puppet.py" and hit enter
8. You should now be able to switch from FK to IK by right_clicking on either Hand and selecting " Toggle to IK" or Toggle to FK"
I'm using Maya 2019, I put the scripts in the maya 2019 folder directory so I don't know what is the problem