I thought the same thing at first. I first tested what the farm does when I intentionally don’t provide the plug-in. As expected, it errs out with absolutely no frames (not even black).
I still haven’t gotten my example file to run locally using the command-line but I thought I’d take advantage of the log files from the farm and made a python script to add plugins. I placed the .mll/.so files in the “scenes” directory for the test.
import os
currentScene = os.path.abspath(cmds.file(q=True, sn=True))
polyPlug = os.path.join(os.path.dirname(currentScene), 'fePolyPrimitives2016.so')
curvesPlug = os.path.join(os.path.dirname(currentScene), 'feCurvePrimitives2016.so')
os.environ['MAYA_PLUG_IN_PATH'] = polyPlug + os.pathsep + curvesPlug + os.pathsep + os.environ['MAYA_PLUG_IN_PATH']
cmds.loadPlugin(polyPlug)
cmds.loadPlugin(curvesPlug)
I then used MEL to wrap the command so that I could place it in the Pre render MEL:
python "import os; currentScene = os.path.abspath(cmds.file(q=True, sn=True)); polyPlug = os.path.join(os.path.dirname(currentScene), 'fePolyPrimitives2016.so'); curvesPlug = os.path.join(os.path.dirname(currentScene), 'feCurvePrimitives2016.so'); os.environ['MAYA_PLUG_IN_PATH'] = polyPlug + os.pathsep + curvesPlug + os.pathsep + os.environ['MAYA_PLUG_IN_PATH']; cmds.loadPlugin(polyPlug); cmds.loadPlugin(curvesPlug)"
Here’s an example output of the farm:
Log File:
/home/csadmin/storage is not a mountpoint
/home/csadmin/storage is a mountpoint
-----------------------------------------------------------------------------------------------------------
Setting Environment Variables...
PROJ_PATH=/home/csadmin/storage/302405
PROJPATH=/home/csadmin/storage/302405
-----------------------------------------------------------------------------------------------------------
Rendering plugin_load_pre_render_003.ma from project...
/usr/autodesk/maya2016/bin/Render -s 1 -e 1 -of jpg -proj /home/csadmin/storage/302405/ -rd /tmp/farm/Job_302405 /home/csadmin/storage/302405/scenes/plugin_load_pre_render_003.ma
Starting "/usr/autodesk/maya2016/bin/maya"
Error: file: /home/csadmin/storage/302405/scenes/plugin_load_pre_render_003.ma line 6: RuntimeError: file line 1: Plug-in, "fePolyPrimitives", was not found on MAYA_PLUG_IN_PATH.
Warning: file: /home/csadmin/storage/302405/scenes/plugin_load_pre_render_003.ma line 119: Unrecognized node type 'makeFePolyStar'; preserving node information during this session.
Warning: line 1: Errors have occurred while reading this scene that may result in data loss.
File read in 0.96 seconds.
Result: /home/csadmin/storage/302405/scenes/plugin_load_pre_render_003.ma
Total Elapsed Time Since Start Of Maya (hh:mm:ss): 00:00:09
====================================
Resource Usage At Start Of Rendering
====================================
2 Page faults
223.457 Mb Max resident size
0.000 Mb Peak total size(Estimated)
0.000 Mb Peak arena size
====================================
61.145 Mb Heap
====================================
Rendering using 16 render processes.
A default light has been created, modify defaultRenderGlobals.enableDefaultLight to change this behavior.
Automatic near/far clipping values: 0.1, 1.5332e+08.
Starting Rendering /tmp/farm/Job_302405/plugin_load_pre_render_003.0001.jpg.
Constructing shading groups
Warning: line 0: TrenderPolyShape::sample: mesh 'fePolyStarShape' delivered an empty surface.
Rendering current frame.
Frame triangle count: 0
====================================
Resource Usage At End Of Frame
====================================
264.297 Mb Max resident size
0.000 Mb Peak total size(Estimated)
0.000 Mb Peak arena size
====================================
61.233 Mb Heap
====================================
Postprocessing rendering result.
Time For Tessellation (hh:mm:ss): 00:00:00
Time For Shadow Map (hh:mm:ss): 00:00:00
Time For Post Process (hh:mm:ss): 00:00:00
Time For Frame Render (hh:mm:ss): 00:00:00
Finished Rendering /tmp/farm/Job_302405/plugin_load_pre_render_003.0001.jpg.
------------------------------------------------------------
====================================
Resource Usage At End Of Rendering
====================================
0.000 Mb Peak total size(Estimated)
0.000 Mb Peak arena size
====================================
61.180 Mb Heap
====================================
Total Time For Render (hh:mm:ss): 00:00:00
Total Elapsed Time For Maya (hh:mm:ss): 00:00:09
Scene /home/csadmin/storage/302405/scenes/plugin_load_pre_render_003.ma completed.
-----------------------------------------------------------------------------------------------------------
Frame copied successfully to render attempt 1.
-----------------------------------------------------------------------------------------------------------
The error comes up pretty early on - “Plug-in, “fePolyPrimitives”, was not found on MAYA_PLUG_IN_PATH”, even though I actually had sourced that plugin properly using the Python command. The frame rendered black, rather than nothing when I didn’t include the plugin, so I can infer that the node is finding and sourcing the plugin that I provided.
That error is strange but I thought “why not” and added just the string “fePolyPrimitives” to os.environ[‘MAYA_PLUG_IN_PATH’] but the error persists. The log files were enlightening but I’ll do a few more experiments locally and see if I can get a working example