|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
static void CheckOutFile(bool VSCEnabled, Material mat) |
|
|
|
{ |
|
|
|
if (VSCEnabled) |
|
|
|
{ |
|
|
|
UnityEditor.VersionControl.Task task = UnityEditor.VersionControl.Provider.Checkout(mat, UnityEditor.VersionControl.CheckoutMode.Both); |
|
|
|
|
|
|
|
if (!task.success) |
|
|
|
{ |
|
|
|
Debug.Log(task.text + " " + task.resultCode); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
[MenuItem("HDRenderPipeline/Update/Update SSS profile indices")] |
|
|
|
static void UpdateSSSProfileIndices() |
|
|
|
{ |
|
|
|
|
|
|
string.Format("{0} / {1} materials SSS updated.", i, length), |
|
|
|
i / (float)(length - 1)); |
|
|
|
|
|
|
|
bool VSCEnabled = (UnityEditor.VersionControl.Provider.enabled && UnityEditor.VersionControl.Provider.isActive); |
|
|
|
|
|
|
|
if (mat.shader.name == "HDRenderPipeline/LitTessellation" || |
|
|
|
mat.shader.name == "HDRenderPipeline/Lit") |
|
|
|
{ |
|
|
|
|
|
|
CheckOutFile(VSCEnabled, mat); |
|
|
|
} |
|
|
|
} |
|
|
|
else if ( mat.shader.name == "HDRenderPipeline/LayeredLit" || |
|
|
|
else if (mat.shader.name == "HDRenderPipeline/LayeredLit" || |
|
|
|
CheckOutFile(VSCEnabled, mat); |
|
|
|
|
|
|
|
|
|
|
|
for (int x = 0; x < numLayer; ++x) |
|
|
|
{ |
|
|
|
int ivalue = mat.GetInt("_SubsurfaceProfile" + x); |
|
|
|