- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi there,
I am learning to source code from external files.
That's a default path for custom scripts:
...\Documents\maya\2022\Scripts\
However, I am grouping some of them in here:
...\Documents\maya\2022\Scripts\Sourced\
Having to navigate to another folder causes some challenges I try to understand.
I.e. Joe's script is run by calling a function named rapidPlace() inside the code.
I renamed *.py file to "JoeWu_RapidPlace_266", placed in the "Sourced" directory now I'm trying to run it using this script:
from Sourced import JoeWu_RapidPlace_266
rapidPlace()
Result:
# Error: NameError: file <maya console> line 10: name 'rapidPlace' is not defined #
Even without renaming python files, I still can't make them work from the "Sourced" folder.
Some similar scripts do work, but only once and then;
# Error: TypeError: file <maya console> line 12: 'module' object is not callable #
This is the case with SpeedCut, which I call using this script;
from Sourced import JoeWu_SpeedCut
JoeWu_SpeedCut()
Is it apparent what mistake am I making?
Cheers,
DS
Solved! Go to Solution.