public void registerBinding(Trigger trigger, final Spatial spat) {
        if (spat instanceof Geometry) {
            GeometryBinding binding = new GeometryBinding(trigger, (Geometry) spat);
            bindings.add(binding);
            if (isInitialized()) {
                bind(binding);
            }
        } else if (spat instanceof Node) {
            for (Spatial child : ((Node) spat).getChildren()) {
                registerBinding(trigger, child);
            }
        }
    }
Will reload the spatial's materials whenever the trigger is fired
@param trigger the trigger
@param spat the spatial to reload
jme3-core/src/main/java/com/jme3/util/MaterialDebugAppState.java