@zipit thanks a lot, but based on c++ docs made this (seems there are just more checking):
def GetDDescription(self, node, description, flags) :
data = node.GetDataInstance()
if data is None or not description.LoadDescription(node.GetType()): return False
singleID = description.GetSingleDescID()
paramID = c4d.DescID(c4d.DescLevel(c4d.TESTPLUGIN_OFFSET))
if ( singleID is None or paramID.IsPartOf(singleID)[0] ):
bc = description.GetParameterI(paramID)
if (bc):
if data.GetLong(c4d.TESTPLUGIN_MODE) == TESTPLUGIN_MODE_DISTANCE: bc.SetLong(c4d.DESC_UNIT, c4d.DESC_UNIT_METER)
else: bc.SetLong(c4d.DESC_UNIT, c4d.DESC_UNIT_PERCENT)
return (True, flags | c4d.DESCFLAGS_DESC_LOADED)