protected override void ValueChanged(MyGuiControlBase sender)
        {
            base.ValueChanged(sender);

            MyModel model    = m_model;
            var     material = model.GetMeshList()[m_currentSelectedMeshItem].Material;

            material.DiffuseColor      = m_diffuseColor.GetColor();
            material.SpecularPower     = m_specularPower.Value;
            material.SpecularIntensity = m_specularIntensity.Value;

            VRageRender.MyRenderProxy.UpdateModelProperties(
                VRageRender.MyRenderProxy.RENDER_ID_UNASSIGNED,
                0,
                model.AssetName,
                m_currentSelectedMeshItem,
                null,
                null,
                sender == m_diffuseColor ? material.DiffuseColor : (Color?)null,
                material.SpecularPower,
                material.SpecularIntensity,
                null);

            if (m_currentSelectedVoxelItem != -1)
            {
                VRageRender.MyRenderProxy.UpdateVoxelMaterialProperties(
                    (byte)m_currentSelectedVoxelItem,
                    m_specularPower.Value,
                    m_specularIntensity.Value);
            }
        }
 void OnChangeColor(MyGuiControlColor obj)
 {
     foreach (var item in TargetBlocks)
     {
         Setter(item, obj.GetColor());
     }
 }
        protected override void ValueChanged(MyGuiControlBase sender)
        {
            base.ValueChanged(sender);

            if (!m_canUpdate)
            {
                return;
            }

            m_selectedVoxelMaterial.InitialScale       = m_sliderInitialScale.Value;
            m_selectedVoxelMaterial.ScaleMultiplier    = m_sliderScaleMultiplier.Value;
            m_selectedVoxelMaterial.InitialDistance    = m_sliderInitialDistance.Value;
            m_selectedVoxelMaterial.DistanceMultiplier = m_sliderDistanceMultiplier.Value;

            m_selectedVoxelMaterial.Far1Scale    = m_sliderFar1Scale.Value;
            m_selectedVoxelMaterial.Far1Distance = m_sliderFar1Distance.Value;
            m_selectedVoxelMaterial.Far2Scale    = m_sliderFar2Scale.Value;
            m_selectedVoxelMaterial.Far2Distance = m_sliderFar2Distance.Value;
            m_selectedVoxelMaterial.Far3Scale    = m_sliderFar3Scale.Value;
            m_selectedVoxelMaterial.Far3Distance = m_sliderFar3Distance.Value;
            m_selectedVoxelMaterial.Far3Color    = m_colorFar3.GetColor();

            m_selectedVoxelMaterial.ExtensionDetailScale = m_sliderExtScale.Value / 1000.0f;

            MyDefinitionManager.Static.UpdateVoxelMaterial(m_selectedVoxelMaterial);
        }