Unknown properties can't be assigned to
Closed this issue · 2 comments
Terrain.SmoothGrid
/ Terrain.MaterialColors
example:
local roblox = require("@lune/roblox")
local Instance = roblox.Instance
local Color3 = roblox.Color3
local game = Instance.new("DataModel")
local workspace = game:GetService("Workspace")
workspace.Terrain.SmoothGrid = roblox.readModelFile("TerrainRegion.rbxm")[1].SmoothGrid
workspace.Terrain.MaterialColors = "![CDATA[AAAAAAAAAIAAP39rf2Y/ilY+j35fi21PZmxvZbDqw8faiVpHOi4kHh4lZlw76JxKc3trhHtagcLgc4RKxr21zq2UlJSM]]"
roblox.writePlaceFile("test.rbxl", game)
Errors: SmoothGrid is not a valid member of TerrainRegion
As Filip mentioned earlier in the thread, I do think the known ReflectionDatabase in rbx-dom should be respected for direct property get/set, as in traditional behavior in the engine, this is the case. Unless directly intentional, I think we want to prevent unexpected data loss when possible.
What if similarly to Remodel, Lune's roblox
package had a few methods for directly getting/setting 'raw' properties? (Also a method for getting all pre-assigned properties on the object would be helpful!)
The SmoothGrid
property not being readable should be fixed in the latest version since rbx-dom
internals had some major improvements and now contain more properties in the database than it did before.
I'm going to close this issue and make a new one for reflection database access since this was more of a property-specific bug type of thing