Open
Description
Example APIs:
Property | Current API | Short API |
---|---|---|
BaseMaterial3D::albedo_texture |
set_texture(TextureParam::ALBEDO, tex) |
set_albedo_texture(tex) |
BaseMaterial3D::uv1_triplanar |
set_flag(Flags::UV1_USE_TRIPLANAR, true) |
set_uv1_triplanar(true) |
Light3D::light_energy |
set_param(Param::ENERGY, 1.5) |
set_light_energy(1.5) |
The question is to which degree we can automate this. While there is a relation between property and getter/setter names in the JSON, the flag/enum name is missing. We could of course try to use heuristics, but not sure how accurately that would work.
In some cases, enumerators contain the reference in their docs -- but that's not really something we can/should rely on:
Param PARAM_ENERGY = 0
Constant for accessing light_energy.