XPlane2Blender icon indicating copy to clipboard operation
XPlane2Blender copied to clipboard

Custom `Copy To Selected` that intelligently creates nested structures and finds destination properties

Open lehthanis opened this issue 5 years ago • 4 comments

This is a feature request. I sometimes have many multiple buttons/switches/breakers, etc that have VERY similar manipulator and dataref settings applied to them. It'd be really nice to be able to copy the settings of a manipulator or added dataref and paste them to another object within my project. This would make circuit breakers and MFD buttons/Keyboards SO much quicker to work with. This functionality could be applied to other common data blocks I imagine.

lehthanis avatar Aug 25 '19 19:08 lehthanis

I have discovered that Blender itself can copy properties between selected Cubes.

Does this work for you?

https://blender.stackexchange.com/questions/1177/how-do-i-copy-a-property-from-an-active-object-to-selected-objects

It unfortunately requires a right click per property, but, you can copy from 1 to many others, so it still works.

tngreene avatar Aug 29 '19 13:08 tngreene

So, was the above link to blender.stackexchange helpful?

tngreene avatar Sep 16 '19 14:09 tngreene

Sort of. It seems to work for Manipulators, but not for animation datarefs. Though I guess that's probably expected since datarefs are tied to animations and keyframed.

On Mon, Sep 16, 2019 at 10:42 AM tngreene [email protected] wrote:

So, was the above link to blender.stackexchange helpful?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/X-Plane/XPlane2Blender/issues/467?email_source=notifications&email_token=ABAJ3BVPACVDD67T3IVL46TQJ6LPBA5CNFSM4IPJ7T3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6ZMGAI#issuecomment-531809025, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAJ3BQEHMDVC7LT4DHJRBDQJ6LPBANCNFSM4IPJ7T3A .

lehthanis avatar Sep 17 '19 02:09 lehthanis

Actually, it can work. It is just kinda... annoying.

I'm not sure how it is doing this under the hood but based on my testing try this:

  1. Make CubeA and CubeB
  2. Select CubeA and Click Add Dataref. Change Dataref Value to something.

If you try to copy from CubeA's X-Plane Dataref Value to CubeB's X-Plane Dataref Value, you can't! CubeB doesn't have this yet!

  1. Select CubeB and click Add Dataref
  2. Now try copying. It works!

You can repeat this with lots of things like Custom Properties, any collection of stuff I think.

This is, however, very annoying a potential for problems. Add a second dataref to CubeA and see that the values from the 2nd can't be copied. Or suppose, during editing, your indexes got mixed up, where the first index of one doesn't semantically match the first index of another object. Sure they'll copy, but did you want that?

CubeA - Copy To-> CubeB
Dataref Value: my/dataref/wing_l -> my/dataref/wing_r
Dataref Value: test/something -> my/dataref/wing_l
Dataref Value: my/dataref/wing_r -> test/something

I think there is a real needed feature here. Our own Copy To Selected function that makes the collections match and is intelligent about matching things up.

That way if you want to change some Dataref Value across a bunch of objects, you don't have to worry if they have added Datarefs yet or worry about which order they may have added them in. Great idea!

Until then, at least Blender has a feature for it, and if you see another addon that it like this please tell me!

tngreene avatar Sep 18 '19 18:09 tngreene