private bool ConfigureSimV2Hair() { var materialRefs = new List <MaterialAlphaSnapshot>(GetScalpMaterialReferences(_hair)); if (materialRefs.Count != 0) { _materialRefs = materialRefs; } var hairMaterial = _hair.GetComponentInChildren <MeshRenderer>()?.material; if (hairMaterial == null) { return(false); } _hairMaterial = hairMaterial; _hairShaderProperty = "_StandWidth"; if (!_hairMaterial.HasProperty(_hairShaderProperty)) { SuperController.LogError($"Hair {_hair.displayName} does not have shader property {_hairShaderProperty}"); } _hairShaderHiddenValue = 0f; _hairShaderOriginalValue = _hairMaterial.GetFloat(_hairShaderProperty); return(true); }
private bool ConfigureSimV2Hair() { var materialRefs = new List <MaterialAlphaSnapshot>(GetScalpMaterialReferences(_hair)); if (materialRefs.Count != 0) { _materialRefs = materialRefs; } var hairMaterial = _hair.GetComponentInChildren <MeshRenderer>()?.material; if (hairMaterial == null) { return(false); } _hairMaterial = hairMaterial; _hairShaderProperty = "_StandWidth"; _hairShaderHiddenValue = 0f; _hairShaderOriginalValue = _hairMaterial.GetFloat(_hairShaderProperty); return(true); }
private int ConfigureSimV2Hair(DAZHairGroup hair) { var materialRefs = new List <MaterialReference>(GetScalpMaterialReferences(hair)); if (materialRefs.Count != 0) { _materialRefs = materialRefs; } var hairMaterial = hair.GetComponentInChildren <MeshRenderer>()?.material; if (hairMaterial == null) { return(HandlerConfigurationResult.TryAgainLater); } _hairMaterial = hairMaterial; _hairShaderProperty = "_StandWidth"; _hairShaderHiddenValue = 0f; _hairShaderOriginalValue = _hairMaterial.GetFloat(_hairShaderProperty); return(HandlerConfigurationResult.Success); }