When you copy and past a parameter in a function it would be nice if it would give you the option to rename or enumerate the pasted parameter. Currently, if you copy and paste a parameter in the same function it only gives you the option to replace or omit.
The only workaround is to rename the existing parameter after copying it and then paste the parameter. The new parameter basically becomes the original parameter and that seems overcomplicated.
Edit:
As suggested by insein, a duplicate menu item would also be an excellent way to be able to copy parameters. It would be consistent with other menus and methods to duplicate things like objects, scenes and extensions.
It’s something that I expect to be there. It might not be the most used feature but it would be a time saver when needed and would provide overall consistency.
Normally, when items are duplicated, apps will automatically enumerate items that conflict. That happens in most other parts of the app.
My last need for it was when making an action that took the points of an object. I added a parameter name Point1 as an object point and added a description. I tried to copy and past it but as shown in my original post. It wouldn’t let me. I only had the option to omit or replace.
There are other times when I might use something with both X and Y parameters where it would be simplier to setup the parameter once and just duplicate it and make a couple of minor changes.
Could we consider a third option in the dialog that would say “Paste with a suffix” ?
And all the parameters with conflicts would be created with the name Point2SpeedX2, etc. ?
I’m unsure of the best way to implement it. I think duplicate might be more consistent but I also think when something is pasted it would be good to givie the user an option to add the copied parameter under a new name.
The parameter paste method is the only place that seems to ask what you want to do when a item already exists. Every other copy /paste that I tested don’t use an omit or replace dialog box. The others all seem to either paste a new item or automatically enumerate the new item. Maybe that dialog should be removed. It would streamline things and make it consistent.
Almost every popup menu that has copy and paste also has duplicate. The exception seems to be behaviors, parameters, prefab and events.
Anywhere you can copy and paste it enumerates the pasted item. Honestly, I would prefer both a duplicate and the same paste enumerate method.
@davy do you see reasons that should prevent us from removing this dialog?
Indeed that’s the only place where we have such a dialog for a paste action.
For behaviors and effects, it allows to copy all of them to update several objects. It’s kind of a workaround until they can be declared on groups.
For properties and parameters, it’s probably less useful, but it could still allow to update parameters of similar functions or properties of similar behaviors.
But the feature request is about a “duplicate” action, so I don’t see why this dialog should be removed.
Because @Keith_1357 made a good point: this is the only place where when you copy something and there is a conflict on the name, we do nothing. Almost everywhere else, the item is pasted with a increment in the name.
So we could make it more consistent.
But the easier is to add a context menu option to duplicate the parameter.