Skip to content

Commit

Permalink
Merge pull request #94 from dictoon/master
Browse files Browse the repository at this point in the history
Add presets, templates to .mod, rename aetemplate
  • Loading branch information
dictoon authored Nov 28, 2017
2 parents 8857e26 + dde6f7b commit d63eb32
Show file tree
Hide file tree
Showing 14 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
Empty file added prefs/shelves/.gitkeep
Empty file.
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 d63eb32

Please sign in to comment.