glTF-Blender-IO icon indicating copy to clipboard operation
glTF-Blender-IO copied to clipboard

Improve consistency of addon's Python API

Open donmccurdy opened this issue 4 years ago • 5 comments

Reported on Twitter, https://twitter.com/mcclure111/status/1233959819767427073, it seems that other I/O addons have some conventions on parameter naming that we've missed: export_selected should be ~~use_selected~~ use_selection , for one. We should fix that, and check if there are others that could be more consistent.

I think I would start with the FBX addon's naming as a guide, since its options and features are most similar to ours.

donmccurdy avatar Mar 01 '20 19:03 donmccurdy

Perhaps keeping the old export_selected supported for a few releases, with a warning, for backward compatibility.

donmccurdy avatar Mar 01 '20 19:03 donmccurdy

I just created #957 to start the discussion, and how backward compatibility can be done

julienduroure avatar Mar 02 '20 15:03 julienduroure

I'd like to keep this open for now - ~~use_selected~~ use_selection is the reported property, but there are likely several others we could check consistent naming for.

donmccurdy avatar Mar 04 '20 19:03 donmccurdy

The options we want to match would be these: https://docs.blender.org/api/current/bpy.ops.export_scene.html. In general, we'd want use_* instead of export_*.

donmccurdy avatar Mar 15 '20 00:03 donmccurdy

Is there still some cases we need to rename here?

julienduroure avatar Mar 13 '22 10:03 julienduroure

Seems we can close this now

julienduroure avatar Oct 06 '22 04:10 julienduroure