Skip to content

Commit

Permalink
Add presets, templates to .mod, rename aetemplate
Browse files Browse the repository at this point in the history
The module generating script was missing the bundled attr presets and
the custom AETemplates required for our custom nodes, without which Maya
kind of randomizes the I/Os in the node editor. Added this, plus icons
location via XBMLANGPATH, and MAYA_SHELF_PATH for the future custom
shelf.
  • Loading branch information
luisbarrancos committed Nov 28, 2017
1 parent 8857e26 commit b3d1e76
Show file tree
Hide file tree
Showing 13 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions deploy/appleseed-maya.package.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ def do_generate_module_file(self, maya_platform_id):
f.write("PATH +:= bin\n")
f.write("PYTHONPATH +:= scripts\n")
f.write("APPLESEED_SEARCHPATH +:= shaders\n")
f.write("MAYA_PRESET_PATH +:= presets\n")
f.write("MAYA_CUSTOM_TEMPLATE_PATH +:= scripts/appleseedMaya/AETemplates\n")
f.write("MAYA_SHELF_PATH +:= prefs/shelves\n")
f.write("XBMLANGPATH +:= icons/%B\n")

def copy_binaries(self):
bin_dir = os.path.join(self.settings.package_output_path, "bin")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def meshAlphaMapCreateNew(node, attr):

def __meshAlphaCreateNewPyCmd(self, attr):
(nodeName, attrName) = attr.split('.')
thisClass = 'appleseedMaya.aetemplate.AEappleseedNodeTemplate'
thisClass = 'appleseedMaya.AETemplates.AEappleseedNodeTemplate'
return "%s.meshAlphaMapCreateNew('%s', '%s')" % (thisClass, nodeName, attrName)

def meshAlphaMapNew(self, attr):
Expand Down
8 changes: 4 additions & 4 deletions scripts/appleseedMaya/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import maya.OpenMaya as om

# appleseedMaya imports.
from aetemplate import appleseedAETemplateCallback
from AETemplates import appleseedAETemplateCallback
from hypershadeCallbacks import *
from logger import logger
from menu import createMenu, deleteMenu
Expand Down Expand Up @@ -115,14 +115,14 @@ def register():
hook="AETemplateCustomContent",
owner="appleseed")

# Manually load templates in aetemplate folder.
templatesDir = os.path.join(thisDir, "aetemplate")
# Manually load templates in AETemplates folder.
templatesDir = os.path.join(thisDir, "AETemplates")
logger.debug("Registering AETemplates in %s" % templatesDir)
for file in os.listdir(templatesDir):
if fnmatch.fnmatch(file, '*template.py'):
templateModule = file.replace(".py", "")
logger.debug("Registering AE template %s" % templateModule)
mel.eval('python("import appleseedMaya.aetemplate.%s")' % templateModule)
mel.eval('python("import appleseedMaya.AETemplates.%s")' % templateModule)

# Hypershade callbacks
asHypershadeCallbacks = [
Expand Down

0 comments on commit b3d1e76

Please sign in to comment.