Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-03-17, 05:48 PM   #1
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 431
[7.3] MaskTexture affects multiple unrelated textures

I'm using an XML template for my action buttons that contains this MaskTexture object:
Lua Code:
  1. <!-- icon texture -->
  2. <Texture name="$parentIcon" parentKey="icon" file="Interface\ICONS\Ability_BossFelOrcs_Necromancer_Red" desaturated="true"/>
  3.  
  4. <!-- icon mask -->
  5. <MaskTexture name="$parentIconMask" parentKey="Mask" file="Interface\AddOns\ConsolePort\Textures\Button\Mask" hWrapMode="CLAMPTOBLACKADDITIVE" vWrapMode="CLAMPTOBLACKADDITIVE">
  6.     <Anchors>
  7.         <Anchor point="TOPLEFT"/>
  8.         <Anchor point="BOTTOMRIGHT"/>
  9.     </Anchors>
  10.     <MaskedTextures>
  11.         <MaskedTexture childKey="icon"/>
  12.     </MaskedTextures>
  13. </MaskTexture>

This template is used to create button clusters of 4, where 3/4 buttons should have a different mask texture set to them, depending on their orientation.
This is done using 12 different mask textures (since rotation by texture coords doesn't seem to work). Compiled into one image below:



By setting the new texture to the mask in Lua like so:
Lua Code:
  1. button.Mask:SetTexture(newMask)
... I was hoping that this would allow me to change the mask for each button individually.

This is where this strange bug happens, where updating the texture for one mask affects other masks inherited from the same template. This might be related to the fact that these buttons are all created at the same time, and it ends up incorrectly linking one mask to multiple icons instead of linking each individual mask to each individual icon.
Likewise, creating masks in pure Lua and setting child keys manually causes the same problems.

Where the end result is supposed to look something like this:


...it instead ends up looking like this:


As you can see in this screenshot, all L1L2 buttons oriented to the left have the correct mask, one single L2 button has the correct mask (these two masks are the only 2/12 textures that are even present in this screenshot). Everything else is wrong.

I've confirmed that the code to handle all this is correct by dumping mask:GetTexture() for different buttons, which indeed returns the correct texture paths.
Here's a video of this issue in action when the orientation of a cluster is updated.
__________________

Last edited by MunkDev : 08-03-17 at 06:52 PM.
  Reply With Quote
 

WoWInterface » PTR » PTR UI Bugs » [7.3] MaskTexture affects multiple unrelated textures


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off