Problem solved.... Managed to find this
https://github.com/ADN-DevTech/Maya-dx11Shader-Sample/ It seems there is a known issue compiling the DX11Shader plugin. This project fixed my compile problems and I was able to filter out the global FX variables by a new semantic that didn't add the vars to the node. However if anyone is doing this another way I'd be interested. It seems silly to maintain a completely new version of the plugin to simple stop Maya adding all global variables found as plugs. string UIWidget = "None" only hides them in the AETemplate code. So I've added a string AsInternal = "" semantic for now that stops the attrib being added and is only computed in the FX file. Maya doesn't need to know about them, nor do they need to get into FBX. Thanks. On Tue, Jan 13, 2015 at 12:47 PM, thirstydevil <[email protected]> wrote: > Maya's DX11Shader adds a plug for every attribute it finds it the FX > file. This is fine as I hide them with the correct semantic but I can't > get the plugin to ignore them completely and not add the plugs to the > node. The plugs are making their way into the FBX which is messing things > up on our FBX translator for game. One solution is to not output cbuffers > but it would mean more work as we can easily add the sematics to the > attribute. > > For example: > > cbuffer LightInfo { > float4 m_afLightPositionX[ 1 ] < string UIWidget = "None"; >; > float4 m_afLightPositionY[ 1 ] < string UIWidget = "None"; >; > float4 m_afLightPositionZ[ 1 ] < string UIWidget = "None"; >; > float4 m_afLightAttenuationX < string UIWidget = "None"; >; > float4 m_afLightAttenuationY < string UIWidget = "None"; >; > float4 m_afLightAttenuationZ < string UIWidget = "None"; >; > float4 m_afLightColour[ 4*1 ] < string UIWidget = "None"; >; > float4 m_afSpecularMask < string UIWidget = "None"; >; > float4 m_AnisotropicDirection < string UIWidget = "None"; >; > float4 m_vConeMultiplier < string UIWidget = "None"; >; > float4 m_vConeAdder < string UIWidget = "None"; >; > float4 m_vLightDirection1 < string UIWidget = "None"; >; > float4 m_vLightDirection2 < string UIWidget = "None"; >; > float4 m_vLightDirection3 < string UIWidget = "None"; >; > float4 m_vLightDirection4 < string UIWidget = "None"; >; > }; > > I've also got the source code up and running hoping to compile it, but I > can't get it to compile on WIndow7 because of a linker error. Error 7 error > LNK1104: cannot open file 'D3DX11Effects.lib' C:\Program > Files\Autodesk\Maya2014\devkit\plug-ins\dx11Shader\LINK dx11Shader > I have installed the DX11 SDK and setup the correct environment variables > used by the linker. > > Any ideas? > > Thanks > > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/a2d6e240-8a24-4087-9d65-adf52b52e7ca%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/a2d6e240-8a24-4087-9d65-adf52b52e7ca%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- *David Moulder* Technical Animator / Artist [email protected] *Professional Profile <http://uk.linkedin.com/pub/david-moulder/1/b12/b5a>* Mobile: +44 (0)7814033242 See who we know in common <http://www.linkedin.com/e/wwk/5748982/?hs=false&tok=3tztwkse1silw1>Want a signature like this? <http://www.linkedin.com/e/sig/5748982/?hs=false&tok=3pwLU9-mBsilw1> -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABD4PkTcv-1t-tC%2BkDxHxxd_jRp6qRz79dgDmdWu3OsbDeJd5Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
