You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the upcoming change to blender 2.8, and the breakages this will cause, I think it is a good time to also change/tidy blender's API.
The Problems
There is a mix of conventions: camelCase, MostlyCaps, snake_case and so on.
There are deprecated functions like KX_GameObject.position (which has been deprecated since, oh, 2.4x or so). Some are not marked as deprecated, such as bge.constraints.setGravity
There are constants of all types in bge.logic. Some could be moved into bge.texture, or bge.events, or the classes they are specific to.
Some parameters are spread out, like ik_min_x, ik_min_y, ik_min_z. These could be combined into a single ikMin parameter.
Lots of linked getters and setters. These could be condensed into properties. One example is vert.getRGBA and vert.setRGBA
The Solution
I have built up a massive list of proposed API changes in a google docs spreadsheet. Things in yellow are things that I want feedback on.
I propose five steps:
Get approval for proposed changes
Remove deprecated functions
Replace naming conventions (eg some_variable into someVariable)
Collapse split up variables (eg x, y, z into position or normal)
Collapse split up getters/setters
As mentioned in IRC, I am willing to do the monkey work in renaming, but first would like to get approval on the massive spreadsheet.
The text was updated successfully, but these errors were encountered:
Why is this KX_SCA not just SCA
Some actuator access to KX data instead of only SCA data.
is3D --> is3d
This is right as in the camel case rules acronyms are words.
In KX_VertexProxy``uv and uv2 can be removed and replaced by vert.uvs[i].
setGravitycan be removed as it do implicitly and obscurely scene.gravity = .
About function in modules, never forget that python can't define getter/setter in modules, it's what we have only functions (excepted object as keyboardand mouse whose are not getter/setter)
I'm not sure to keep in futur the functions we use to define the python API, but at least cleaning it will allow to reduce the work at conversion.
With the upcoming change to blender 2.8, and the breakages this will cause, I think it is a good time to also change/tidy blender's API.
The Problems
The Solution
I have built up a massive list of proposed API changes in a google docs spreadsheet. Things in yellow are things that I want feedback on.
I propose five steps:
As mentioned in IRC, I am willing to do the monkey work in renaming, but first would like to get approval on the massive spreadsheet.
The text was updated successfully, but these errors were encountered: