Closed xixixao closed 1 year ago
@xixixao
The defaults can be found in the blender source
It is difficult to handle because fake-bpy-module will not check the source. If you send the patch to the Blender itself to add the default value to the document, fake-bpy-module can parse these values. I think below document is useful for the reference. https://docs.blender.org/api/current/bpy.ops.object.html#bpy.ops.object.add This API document has the default value, so we can handle it.
@xixixao
This code generates the doc itself. This file parse the bmesh_opdefines.c to generate rst file, so we need to parse source code directly.
The defaults can be found in the blender source
Could you share your idea if you have an idea to get the default value from blender source? Is default value definitely 0 or false? If all default values are 0 or false, we can handle it easily from fake-bpy-module.
@nutti https://developer.blender.org/D16400 adds the defaults to the docs
@xixixao
Great! I think fixing to the official is better idea.
@nutti How did you get someone from Blender to review your diffs? I've tried the devtalk forum and blender.chat but didn't get any traction on the diff so far.
@xixixao
I'm not sure when Blender developer reviews the patch. (My other patch reviews are also stopped, so we need to wait patiently.) Your action (devtalk forum and blender.chat) seems correct when the review is stopped.
The patch is now merged to the official repo. Thanks for your help @xixixao !
Description
All
bmesh.ops
take one required argument and all other arguments have defaults. This is not specified in the docs in type signatures but maybe we could special case it? The defaults can be found in the blender source (usually it's a 0, false, but for example for matrices it's Identity).Are you willing to contribute about this feature. (Yes/No)
Yes, with some guidance
Screenshots [Optional]
Not having this leads to incorrect type errors: