Organize asset templates into packages

 
 
 

To organize templates into packages

  1. Create a folder in a directory located on your template search path that has the same name as the package you want to create.

    For example, name the folder "MyStudioPackage" if you want to use "MyStudioPackage" as the package name.

    Important

    Template files to be included in the package must be placed in this folder.

    For example, to include two templates named template1 and template2 in the package called MyStudioPackage, the templates need to be stored in the MyStudioPackage folder. The MyStudioPackage folder is located in a parent folder that is specified in the template search path. In the following example, the parent folder is named “MyTemplates”:

    .../MyTemplates/MyStudioPackage/template1.template
    .../MyTemplates/MyStudioPackage/template2.template
    
  2. In every template to be included in this package, ensure that the package name is specified with a package declaration.

    For example, for template1 and template2 in the MyStudioPackage, each template includes the following package declaration:

    <?xml version='1.0' encoding='UTF-8'?>
    <templates package=MyStudioPackage>
    	<template name='template1'>
    
    <?xml version='1.0' encoding='UTF-8'?>
    <templates package=MyStudioPackage>
    	<template name='template2'>
    

    When these templates are used in Maya, they will be referred to as MyStudioPackage.template1 and MyStudioPackage.template2.

  3. In every template that refers to templates or types defined in this package, ensure that the package name is specified with a <using> statement.
    Note

    Templates created in Maya automatically have the required <using> declaration added:

    <?xml version='1.0' encoding='UTF-8'?>
    <templates>
    	<using package='MyStudioPackage'/>
    	<template name='anotherTemplate'>
    

Related topics