cables-gl / cables_docs

cables documentation docs.cables.gl
https://cables.gl/docs/docs
45 stars 16 forks source link

Cloning a patch creates unique versions of some subpatch ops #857

Open TobyKLight opened 2 months ago

TobyKLight commented 2 months ago

Describe the bug On cloning a patch some subpatch ops are made into new copies appended with a number. Hence breaking intended reuse of code. Now if you change one not all copies will change. In my main dev patch this is distributing up to 5 new copies of an op around the place.

image The correct T_I op

image The mysterious T_I2 created when the patch was cloned.

How To Reproduce

  1. Open this patch https://cables.gl/edit/P6XCso
  2. Check in both the MySubpatchOps, notice they both contain the same op T_I
  3. Clone the patch
  4. Now check in both the MySubpatchOps, one of them has made a new copy of the T_I op and appended a 2 to the name (So it's T_I2).

In case that doesn't work here is one I cloned earlier https://cables.gl/edit/nciDso

Platform

TobyKLight commented 2 months ago

This bug would also be a lot easier to clean up if there was a 'Replace Op' function.

TobyKLight commented 2 months ago

Workaround: There is a replace op function! You can find it command palette (ctrl P) and search 'replace'. Note you need the full name of the op 'op.blabla.opname'

steam0r commented 2 months ago

the initial bug is fixed on dev.cables.gl, cloning your example patch now results in T_I in both places.

thanks for providing this simple example, helped a lot in reproducing this!

as i guess your actual scenarios are more complex, i would be happy if you could give this another testrun...i tested a few scenarios, but you never know...thanks!

TobyKLight commented 1 month ago

Ok finally got around to trying it on a complex patch on dev. Indeed seems to be fixed, thankyou

steam0r commented 3 weeks ago

this is now on cables.gl!