| 143 | } |
| 144 | |
| 145 | void FoliageType::Serialize(SerializeStream& stream, const void* otherObj) |
| 146 | { |
| 147 | SERIALIZE_GET_OTHER_OBJ(FoliageType); |
| 148 | |
| 149 | SERIALIZE(Model); |
| 150 | |
| 151 | const Function<bool(const ModelInstanceEntry&)> IsValidMaterial = [](const ModelInstanceEntry& e) -> bool |
| 152 | { |
| 153 | return e.Material; |
| 154 | }; |
| 155 | if (ArrayExtensions::Any(Entries, IsValidMaterial)) |
| 156 | { |
| 157 | stream.JKEY("Materials"); |
| 158 | stream.StartArray(); |
| 159 | for (auto& e : Entries) |
| 160 | stream.Guid(e.Material.GetID()); |
| 161 | stream.EndArray(); |
| 162 | } |
| 163 | |
| 164 | SERIALIZE(CullDistance); |
| 165 | SERIALIZE(CullDistanceRandomRange); |
| 166 | SERIALIZE(ScaleInLightmap); |
| 167 | SERIALIZE_MEMBER(DrawModes, _drawModes); |
| 168 | SERIALIZE(ShadowsMode); |
| 169 | SERIALIZE_BIT(ReceiveDecals); |
| 170 | SERIALIZE_BIT(UseDensityScaling); |
| 171 | SERIALIZE(DensityScalingScale); |
| 172 | |
| 173 | SERIALIZE(PaintDensity); |
| 174 | SERIALIZE(PaintRadius); |
| 175 | SERIALIZE(PaintGroundSlopeAngleMin); |
| 176 | SERIALIZE(PaintGroundSlopeAngleMax); |
| 177 | SERIALIZE(PaintScaling); |
| 178 | SERIALIZE(PaintScaleMin); |
| 179 | SERIALIZE(PaintScaleMax); |
| 180 | |
| 181 | SERIALIZE(PlacementOffsetY); |
| 182 | SERIALIZE(PlacementRandomPitchAngle); |
| 183 | SERIALIZE(PlacementRandomRollAngle); |
| 184 | SERIALIZE_BIT(PlacementAlignToNormal); |
| 185 | SERIALIZE_BIT(PlacementRandomYaw); |
| 186 | } |
| 187 | |
| 188 | void FoliageType::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) |
| 189 | { |
nothing calls this directly
no test coverage detected