If more commands are added, I expect there will be a conflict in command names.
Is there any naming convention to avoid this?
Since the command name uses the class name, it is not likely to be able to use “CompanyName.ProjectName.FunctionName”, so…
Hi @ft-lab! We don’t currently have any guidelines for naming of commands. You actually can use full module paths to execute a command and that’s the best practice if you’re concerned about name conflicts.
Also, you can check for existing commands to avoid conflicts when you’re naming your commands. Load the “Commands Utils” extension and use the “Search commands” button in the “Commands” window.
The commands were designed few years ago and we agree their pattern is not adequate anymore for the growing number of 3rd party extension makers.
For the new Actions API ( due in 104 ) we change the pattern where the unique identifier is Ext_id & Name
meaning you only have to worry about unique names in your extensions
We are starting a refactor of Command to enable the same pattern, hope we can do by 104 but we also want to continue to support all the legacy names for that release to enable a smooth transition.
for now, you can either use the pattern above or something simpler like ft.lab.some_name we also don’t recommend you include Command at the end as this is redundant those are already called from the omni.kit.command
Currently I am exploring Extension, and I consider its existence quite important, as I also do undo implementation with this command function.
After I learned of the existence of this omni.kit.commands, I have tried to implement command/undo as a generic function(common and easy to use) as much as possible.
Commands Utils should also be in Code, certainly in the latest version we just shipped yesterday as it match more closerly what is in Create in at least in the packages
we agree that command are essencial to build good expereince with undo/redo and we will modernize them a little
with the Actions (104) you will also be able to expose your command to menu and Hotkey very easily