( parameter, data, parameterList )
| 321 | |
| 322 | @staticmethod |
| 323 | def _grabClassParameter( parameter, data, parameterList ) : |
| 324 | |
| 325 | c = parameter.getClass( True ) |
| 326 | |
| 327 | data["_className_"] = IECore.StringData( c[1] ) |
| 328 | data["_classVersion_"] = IECore.IntData( c[2] ) |
| 329 | data["_classSearchPaths_"] = IECore.StringData( c[3] ) |
| 330 | |
| 331 | classNameFilter = "*" |
| 332 | try : |
| 333 | classNameFilter = parameter.userData()["UI"]["classNameFilter"].value |
| 334 | except : |
| 335 | pass |
| 336 | data["_classNameFilter_"] = IECore.StringData( classNameFilter ) |
| 337 | |
| 338 | data["_classValue_"] = IECore.CompoundObject() |
| 339 | |
| 340 | if c[0] : |
| 341 | |
| 342 | # Some classes may have no parameters, if they have been |
| 343 | # specifically included in the parameter list, then we |
| 344 | # want to save their instance specification anyway. |
| 345 | if len( c[0].parameters() ) : |
| 346 | |
| 347 | BasicPreset._grabHierarchy( |
| 348 | data["_classValue_"], |
| 349 | c[0].parameters(), |
| 350 | parameterList, |
| 351 | ) |
| 352 | |
| 353 | elif parameterList : |
| 354 | |
| 355 | for p in parameterList: |
| 356 | if parameter.isSame( p ) : |
| 357 | data["_noPrune_"] = IECore.BoolData( True ) |
| 358 | |
| 359 | else : |
| 360 | |
| 361 | data["_noPrune_"] = IECore.BoolData( True ) |
| 362 | |
| 363 | |
| 364 | @staticmethod |
no test coverage detected