public void read(JmeImporter im) throws IOException { InputCapsule ic = im.getCapsule(this); name = ic.readString("name", null); worldBound = (BoundingVolume) ic.readSavable("world_bound", null); cullHint = ic.readEnum("cull_mode", CullHint.class, CullHint.Inherit); batchHint = ic.readEnum("batch_hint", BatchHint.class, BatchHint.Inherit); queueBucket = ic.readEnum("queue", RenderQueue.Bucket.class, RenderQueue.Bucket.Inherit); shadowMode = ic.readEnum("shadow_mode", ShadowMode.class, ShadowMode.Inherit); localTransform = (Transform) ic.readSavable("transform", Transform.IDENTITY); localLights = (LightList) ic.readSavable("lights", null); localLights.setOwner(this); // changed for backward compatibility with j3o files generated before the // AnimControl/SkeletonControl split // the AnimControl creates the SkeletonControl for old files and add it to the spatial. // The SkeletonControl must be the last in the stack so we add the list of all other control // before it. // When backward compatibility won't be needed anymore this can be replaced by : // controls = ic.readSavableArrayList("controlsList", null)); controls.addAll(0, ic.readSavableArrayList("controlsList", null)); userData = (HashMap<String, Savable>) ic.readStringSavableMap("user_data", null); }
public void read(JmeImporter im) throws IOException { InputCapsule ic = im.getCapsule(this); numSamples = ic.readInt("numSamples", 0); filters = ic.readSavableArrayList("filters", null); for (Filter filter : filters) { filter.setProcessor(this); setFilterState(filter, filter.isEnabled()); } assetManager = im.getAssetManager(); }