2
$\begingroup$

I'm currently adding functionality to a Python script for working with custom normals, and I will share the updated script for other Blender users when I'm done.

I'm aware that there are several other Python scripts available with some similar functionality, and I was wondering if it is possible for two scripts to conflict with each other in any way. For example, if my script contains an operator called 'mesh.face_weighted_normals' and another script also contains an operator with the same name, will this cause errors for users with both scripts enabled?

Are there any other kinds of conflicts, and are there guidelines for naming publicly exposed parts of custom scripts to avoid causing problems for users? Should I prefix the operator and/or class names in my script with something to help avoid conflicts?

$\endgroup$
1

1 Answer 1

2
$\begingroup$

Yes, two add-ons defining the same operator will “conflict” - in that the latest registering one will override any previous registration. The same goes for other registrable classes (panels, menus, UILists, etc.).

Note that add-ons can even override Blender's own operators, menus etc. that way (though this is totally not recommended).

Prefixing classes' IDs with something related to your add-on is the best way to go.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .