• 给朋友写的批量渲染工具


    (
    ---- 2013.9.08 
    ----裴永超编写
    ----实现简单文件批量渲染
    __ini__ = gt_max_namespace .gt_cl_hp_ini()
    __max__ = gt_max_namespace.gt_cl_hp_maxfile()
    __dotoutin__ = gt_max_namespace.gt_cl_hp_dateoutin()
    __ca__ = gt_max_namespace.gt_cl_hp_camera()
    __file__ =gt_max_namespace.gt_cl_hp_fileiooutin()
    
    ----gt_p_wencong_tools 就是结构的名称 
    wencong =__dotoutin__.fileintwo   ((getdllforpath 4 )+"\wencong\gt_p_wencong_tools")
    
    
    Rollout  gt_gyd   "批量渲染工具"
    (
    	local gydtoto = "HDGC"
    	edittext  edtText  "传入max 文件路径"  fieldWidth: 350  LabelOnTop:true 
    	edittext  edtTex1   "传入渲染输出路径"  fieldWidth: 350  LabelOnTop:true 
    	button  btnStatrReader  "开始渲染"  80  height: 50 
    	struct   gyd (
    		fn pathChecked pathp  = (
    			return  (__dotoutin__.getfileonof  pathp ) 
    		),
    		fn getFile pathp = (
    			---保证路径存在
    			conmax =#()
    			if (getFiles (pathp+"\*.max")).count > 0 then(
    				conmax = getFiles (pathp+"\*.max")	
    			)
    			return conmax 
    		)
    		
    	
    	)
    	fn btnStatrReaderOnPressed   = (
    		opp = gyd()
    		if (opp.pathChecked (edtText.text) and opp.pathChecked (edtTex1.text)) then (
    			conmax = opp.getFile (edtText.text) 
    			if conmax.count >0 then (
    				for maxfilessss  in  conmax do (
    					__max__.lmax   maxfilessss 
    					maxnames = getFilenameFile  maxfilename 
    					conCamere = __ca__.getSenceCamera()
    					 if conCamere.count > 0 then (
    						ioo= 0
    						for each in conCamere do (
    							ioo+=1 
    							 xu = __dotoutin__.NuberSort ioo
    							saveName = edtTex1.text +"\"+each.name +"_"+maxnames+xu  +".png"
    							wencong.render_p  saveName    each.node    #{2}
    						)	
    					)else continue 
    					
    				)
    			)
    		)
    	)
    	on btnStatrReader pressed do (
    		btnStatrReaderOnPressed()
    	)
    	
    	
    	
    	
    )
    CreateDialog gt_gyd 370  300
    	
    	
    )
    

      

  • 相关阅读:
    C#关机代码实例详解
    如何设计通用的网站模板
    C# XML解析方式实例解析1
    ASP.NET配置错误页面浅析
    几种常用的C#排序方法简介
    简述C# XML解析方法的特点及应用
    请不要相信
    浅谈ASP.NET Forms验证
    设计友好的错误信息页面
    详解.NET中容易混淆的委托与接口
  • 原文地址:https://www.cnblogs.com/gaitian00/p/3309950.html
Copyright © 2020-2023  润新知