Getting only user-defined parms

   588   0   1
User Avatar
Member
2 posts
Joined: July 2020
Offline
Hey all,

I've been looking into getting a list of user-defined parms, however, I get many more attributes than I should be.

In the following example, I've simply created a "file" SOP, and added a single spare parm. "my_float".

When I run the following, I get a huge list of other parameters, most of which I didn't add:

spares = []
for parm in node.parms():
    if parm.isSpare():
        spares.append(parm)



output ( saved to yaml ):
/obj/file1:
  inputs: []
  node_type: Object/geo
  parms:
    native:
      bank:
        type: bank
        value: 0.0
      caching:
        type: caching
        value: 1
      childcomp:
        type: childcomp
        value: 0
      constraints_on:
        type: constraints_on
        value: 0
      constraints_path:
        type: constraints_path
        value: ''
      dcolorb:
        type: dcolor
        value: 1.0
      dcolorg:
        type: dcolor
        value: 1.0
      dcolorr:
        type: dcolor
        value: 1.0
      display:
        type: display
        value: 1
      keeppos:
        type: keeppos
        value: 0
      lookatpath:
        type: lookatpath
        value: ''
      lookup:
        type: lookup
        value: 'on'
      lookupobjpath:
        type: lookupobjpath
        value: ''
      pathobjpath:
        type: pathobjpath
        value: ''
      pathorient:
        type: pathorient
        value: 1
      picking:
        type: picking
        value: 1
      pickscript:
        type: pickscript
        value: ''
      pos:
        type: pos
        value: 0.0
      pre_xform:
        type: pre_xform
        value: 0
      prx:
        type: pr
        value: 0.0
      pry:
        type: pr
        value: 0.0
      prz:
        type: pr
        value: 0.0
      px:
        type: p
        value: 0.0
      py:
        type: p
        value: 0.0
      pz:
        type: p
        value: 0.0
      rOrd:
        type: rOrd
        value: 0
      roll:
        type: roll
        value: 0.0
      rx:
        type: r
        value: 0.0
      ry:
        type: r
        value: 0.0
      rz:
        type: r
        value: 0.0
      scale:
        type: scale
        value: 1.0
      shop_materialopts:
        type: shop_materialopts
        value: 0
      shop_materialpath:
        type: shop_materialpath
        value: ''
      stdswitcher1:
        type: stdswitcher
        value: 0
      sx:
        type: s
        value: 1.0
      sy:
        type: s
        value: 1.0
      sz:
        type: s
        value: 1.0
      tdisplay:
        type: tdisplay
        value: 0
      tx:
        type: t
        value: 0.0
      ty:
        type: t
        value: 0.0
      tz:
        type: t
        value: 0.0
      uparmtype:
        type: uparmtype
        value: 1
      upx:
        type: up
        value: 0.0
      upy:
        type: up
        value: 1.0
      upz:
        type: up
        value: 0.0
      use_dcolor:
        type: use_dcolor
        value: 0
      vport_displayassubdiv:
        type: vport_displayassubdiv
        value: 0
      vport_onionskin:
        type: vport_onionskin
        value: 0
      vport_shadeopen:
        type: vport_shadeopen
        value: 0
      xOrd:
        type: xOrd
        value: 0
    user_defined:
      categories:
        type: categories
        value: ''
      folder01:
        type: folder0
        value: 0
      geo_accelattribute:
        type: geo_accelattribute
        value: accel
      geo_velocityblur:
        type: geo_velocityblur
....

Any idea why isSpare()is returning these other parameters? Ideally, I am collecting ALL the parms, and simply putting them into 2 categories. nativeand user_defined, so any help in getting the proper filter would help.

Thanks
-s
Edited by speters - July 26, 2021 13:18:54
  • Quick Links