Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Component copy behaviour

See original GitHub issue

Implement explicit copy behaviour

>>> c1 = Cube(size=10)
>>> c2 = c1.copy()
>>> from copy import copy
>>> c3 = copy(c1)

Both methods create objects independent of the original; changes to c1 do not effect its copies.

Assembly component copies would be nested.

Question Is there a way to intelligently copy a Component before its been built, so that the original, and the copy are only built once… Initial implementation, probably avoid the tricks; keep it simple stupid (KISS principal)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

fragmuffincommented, May 25, 2018

@gntech yep!, that’s a good argument! I love it 😉

gntechcommented, May 25, 2018

And my opinion is that there should be no different behaviour for Parts vs Assembly.

  • A shallow copy for an assembly will recursively perform shallow copy on the included parts.
  • A deepcopy of an assembly will recursively perform deepcopy of the included parts.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Fusion 360 - Copied Component Behaviour - YouTube
A short video showing how copied components behave and how to manage them.If you have found this video useful and would like to...
Read more >
copy components in hierarcy - editor script - Unity Forum
This script copies colliders, rigidbodies, scripts, animations, and character joints from an object hierarcy to an other hierarchy.
Read more >
Customizing Copy Behavior - Visual Studio - Microsoft Learn
Customizing Copy Behavior · Applies to: · Enable or disable copy, cut, and paste. · Copy links to the same target. · Rapidly...
Read more >
What is the correct way to copy a component? - Stack Overflow
Considering that variable-to-variable copy is a beginner way, I am looking for a solution that can copy any component using the Generic method....
Read more >
Create a `copy` `paste` behaviour component · Issue #12 · zambezi ...
Some components, like the WIP grid highlight component need to understand copy + paste; a bespoke solution is being "organically" grown on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found