Because its a compound array attribute
list_attr = cmds.listAttr("miDefaultOptions.stringOptions", multi=True)
for each_attr in list_attr:
if str(each_attr).endswith("value"):
attr_bld = "miDefaultOptions.%s" % each_attr
arrt_val = cmds.getAttr(attr_bld)
print arrt_val
well these are all the regular processes but the unified sampling is not a
parameter on the miDefaultOptions node it comes as a sting options and i
kind of figured that the way to query that value is
getAttr("miDefaultOptions.stringOptions[28].value")
if i do a listAttr miDefaultOptions that does
You can also use listAttr to get all the available attrs from a node
On Sunday, August 18, 2013, Christopher Stewart wrote:
> Most setting changes will be reflected in the script editor's output. So:
>
> setAttr "miDefaultOptions.maxSamples" 2;
>
> could become:
>
> import maya.cmds as cmds
> cmd
Most setting changes will be reflected in the script editor's output. So:
setAttr "miDefaultOptions.maxSamples" 2;
could become:
import maya.cmds as cmds
cmds.setAttr('miDefaultOptions.maxSamples', 2)
The Python syntax is often very similar and easy to convert.
You could use the "getAttr" comm