Pymel - addAttr, attribute ends up in wrong category



So I’m creating sets in maya and adding attributes regarding export settings to it.

Like this:

import pymel.core as pm
pubSet = pm.sets(name = "publishSet")

pm.addAttr(pubSet, longName='MainSettings', numberOfChildren=6, attributeType='compound' )
pm.addAttr(pubSet, longName='ExportThis', at='bool', h= False, k=False, parent='MainSettings')
pm.addAttr(pubSet, longName="AssetName", dt="string", parent ='MainSettings')

The it works fine in Maya as long as I dont have Arnold loaded, then all the new attributes end up under “Extra Attributes”. If Mtoa is loaded all my new attributes end up under the Arnold>Extra Attributes roll-out, see image.

Is it possible to set a different root/parent to force the attributes to end up in the correct place?

Regards, Martin