cables-gl / cables_docs

cables documentation docs.cables.gl
https://cables.gl/docs/docs
44 stars 14 forks source link

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

Open TobyKLight opened 3 days ago

TobyKLight commented 3 days 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 3 days ago

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

TobyKLight commented 2 days 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 1 day 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!