Skip to content

Instantly share code, notes, and snippets.

@pingortle
Created April 5, 2013 02:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pingortle/5316233 to your computer and use it in GitHub Desktop.
Save pingortle/5316233 to your computer and use it in GitHub Desktop.
Bug fixes for Engine Nine 1.6 as suggested by yufeih.
/// Sets the mask textures of the material group.
/// </summary>
public static void SetMaskTextures(MaterialGroup materialGroup, System.Collections.IList value)
{
if (value == null)
throw new ArgumentNullException("value");
AttachablePropertyServices.SetProperty(materialGroup, MaskTexturesProperty, value);
MaterialPartCollection materialParts = materialGroup.MaterialParts as MaterialPartCollection;
if (materialGroup != null && materialParts != null)
materialParts.Bind(materialGroup);
}
/// <summary>
/// Sets the mask texture scale of the material group.
/// </summary>
public static void SetMaskTextureScale(MaterialGroup materialGroup, Vector2 value)
{
AttachablePropertyServices.SetProperty(materialGroup, MaskTextureScaleProperty, value);
MaterialPartCollection materialParts = materialGroup.MaterialParts as MaterialPartCollection;
if (materialGroup != null && materialParts != null)
materialParts.Bind(materialGroup);
}
@pingortle
Copy link
Author

It works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment