

def testPassThrough(self):
    sphere = IECore.SpherePrimitive()
    input = GafferSceneTest.CompoundObjectSource()
    input['in'].setValue(IECore.CompoundObject({
        'bound': IECore.Box3fData(sphere.bound()),
        'children': {
            'groupA': {
                'bound': IECore.Box3fData(sphere.bound()),
                'children': {
                    'sphereAA': {
                        'bound': IECore.Box3fData(sphere.bound()),
                        'object': sphere,
                    },
                    'sphereAB': {
                        'bound': IECore.Box3fData(sphere.bound()),
                        'object': sphere,
                    },
                },
            },
            'groupB': {
                'bound': IECore.Box3fData(sphere.bound()),
                'children': {
                    'sphereBA': {
                        'bound': IECore.Box3fData(sphere.bound()),
                        'object': sphere,
                    },
                    'sphereBB': {
                        'bound': IECore.Box3fData(sphere.bound()),
                        'object': sphere,
                    },
                },
            },
        },
    }))
    isolate = GafferScene.Isolate()
    isolate['in'].setInput(input['out'])
    self.assertSceneValid(input['out'])
    self.assertSceneValid(isolate['out'])
    self.assertScenesEqual(input['out'], isolate['out'])
    self.assertSceneHashesEqual(input['out'], isolate['out'])
    self.assertTrue(input['out'].object('/groupA/sphereAA', _copy=False).isSame(isolate['out'].object('/groupA/sphereAA', _copy=False)))
    filter = GafferScene.PathFilter()
    filter['paths'].setValue(IECore.StringVectorData(['/*']))
    isolate['filter'].setInput(filter['out'])
    isolate['enabled'].setValue(False)
    filter.assertScenesEqual(input['out'], isolate['out'])
    self.assertSceneHashesEqual(input['out'], isolate['out'])
    self.assertTrue(input['out'].object('/groupA/sphereAA', _copy=False).isSame(isolate['out'].object('/groupA/sphereAA', _copy=False)))

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferSceneTest/IsolateTest.py IsolateTest.testPassThrough/VarMisuse@379/565 `self`->`filter`