昵称:烦夫子
 类别:界面/平面设计师
 
                    
				年龄:39
 现所在地:北京
			
				主页浏览总数:24540
 总积分:89
 文章数:88
				作品数:70
			
开放源码:
//图层控制
CRhinoCommand::result CCommandmylayertab::RunCommand( const CRhinoCommandContext& context )
{
 CRhinoApp& pApp = ::RhinoApp();
 CRhinoDoc *pDoc = pApp.ActiveDoc();
 CRhinoLayerTable& layer_table = pDoc->m_layer_table;
 const CRhinoLayer& layer = layer_table.CurrentLayer();
 const CRhinoMaterial& layer_material = layer.LayerMaterial();
 ON_Color ly_color = layer.Color();
 int ly_index = layer.LayerIndex();
 ON_wString ly_name = layer.LayerName();
 ON_LineStyle ly_style = layer.LineStyle();
 ON::layer_mode ly_mode = layer.Mode();
    int ly_model_index = layer.ModelIndex();
    ON_Color ly_new_color = RGB(0,0,255);
 ON_Layer mylayer;
 mylayer.SetColor(ly_new_color);
 mylayer.SetLayerName("back");
 mylayer.SetVisible(false);
    int my_ly_index = mylayer.LayerIndex();
 layer_table.AddLayer(mylayer);
 layer_table.SetCurrentLayerIndex(my_ly_index,false);
  return CRhinoCommand::success;
}
//
// END mylayertab command