Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code snippet to automatically set UV Edge to true
#1
Hi

With Curvy Splines 8, multiple issues with the extended UV coordinates, set via the Meta CG Options script. All those issues are listed in the release notes.
One of these issues is:
[FIXED] When there is a change of Material ID at a specific CP, its "UV Edge" is overridden to true

For those relaying on that old behavior, you will have to set "UV Edge" to true for all the CPs with a change of Material ID.

Her is a code snippet that does that here:
Code:
        foreach (CurvySplineSegment cp in spline.ControlPointsList)
        {
            var metaCgOptions =  cp.GetMetadata<MetaCGOptions>();
            if (metaCgOptions)
            {
                if (metaCgOptions.HasDifferentMaterial)
                    metaCgOptions.UVEdge = true;
            }
        }
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Permission to publish custom CGModule source code? Apelsin 6 9,523 09-15-2022, 08:53 PM
Last Post: Josaf Tom
  Follow-Up are automatically changed to be "No Follow-Up" Chanon 2 92 06-19-2022, 04:24 AM
Last Post: Chanon
  Import/Export, Spline from code Mos Def 4 875 02-14-2022, 11:42 AM
Last Post: _Aka_
  Updating old movement code Maltakreuz 3 2,408 08-18-2020, 04:49 PM
Last Post: _Aka_

Forum Jump: