editor icon indicating copy to clipboard operation
editor copied to clipboard

Be able to copy component values from one Entity to another

Open yaustar opened this issue 4 years ago • 14 comments

Related to https://github.com/playcanvas/editor/issues/30

It would make iteration of entities a lot quickly, especially around the transforms and UI elements.

yaustar avatar Nov 10 '20 11:11 yaustar

I believe generally copying inspector values/blocks would be an amazing addition. One of most common repetitive task is when artists want to apply Box Projection cubemap values onto multiple materials. The workflow is rather painful.

Maksims avatar Nov 10 '20 12:11 Maksims

An extension to this would be to copy any attribute and paste into another of the same type. Maybe as a right click option on the label?

image

May need some design?

yaustar avatar Apr 09 '21 14:04 yaustar

Related to: https://github.com/playcanvas/editor/issues/30

yaustar avatar Apr 09 '21 15:04 yaustar

Context menu on the label - seem reasonable and easy to use. Also, it can show what type of value you are copying. And would enable/disable "Paste" button based on copied data.

Ensure copy/paste uses native system clipboard, that way copying values between projects would be a possibility. If it could be JSON.stringify/parse based, with validation - that would be even better, as it would allow you to simply copy vec3, and in the clipboard, it would be [ 0, 1, 2 ], which can be pasted back, also used together with code.

There is already information about what type of a field it is. Copying would be of value of course, with nothing to do with UI (like in select fields).

Here are some mockups:

vec3

string

Maksims avatar Apr 09 '21 15:04 Maksims

Coming from a Unity background, I think we should copy position/rotation/scale directly. Maybe individual one like your screenshots (the more options the better), but having options in inspector is more readable: index

alamboley avatar Apr 11 '21 14:04 alamboley

Side note: I would also like to see the reset option as a context option

yaustar avatar Apr 11 '21 14:04 yaustar

Partial feature release in v1.19.11 where you can copy and paste components from/to entities

yaustar avatar Sep 14 '21 14:09 yaustar

Would be good to replace the Settings Cog icon, with the simple 3 Dots button commonly used in this context, as this is not a setting, but the additional menu.

Maksims avatar Sep 15 '21 10:09 Maksims

Or a hamburger? 🍔

willeastcott avatar Sep 15 '21 11:09 willeastcott

We could use the down arrow icon that we use else where: image

I don' t think we use either the hamburger or 3 dots in the Editor UI

yaustar avatar Sep 15 '21 13:09 yaustar

Another option would be to allow the context menu on the left side of inspector panel, on labels. This would be the same for labels on fields like vec3, or other properties, and on components as well.

Maksims avatar Sep 15 '21 22:09 Maksims

An example from a customer that I just spoke to wanted to copy a JSON array entry from one script to another

(ie https://developer.playcanvas.com/en/user-manual/scripting/script-attributes/#json-attribute)

And also with material properties/channels. image

yaustar avatar Feb 27 '23 12:02 yaustar

Hey chaps, just wondering if this feature is still on the radar?

Copying an entity's position and rotation onto another entity seems to be a basic feature which I often miss during development. Currently we are copying 6 floats across per entity for this result which is very frictional. Also (while I'm at it 😉 ) some form of Unity's 'move entity into camera view' would be amazing.

All that said, hope you are taking some well earned time off over the festive season, and many thanks for your exceptional talent and support during 2023. 🥇 ❤️

Mann1ng avatar Jan 03 '24 08:01 Mann1ng

@Mann1ng Thanks for bumping this - it's not currently on our dev schedule but I'll keep it in mind for the next round of roadmap updates.

willeastcott avatar Jan 04 '24 18:01 willeastcott