L3DT users' wiki
Large 3D terrain generator

Differences

This shows you the differences between two versions of the page.

scripts:getdesignmaplayer [2013/08/22 00:09]
127.0.0.1 external edit
scripts:getdesignmaplayer [2017/08/31 06:57] (current)
Line 1: Line 1:
-====== Scripts > GetDesignMapLayer ======+====== Scripts > DM_GetLayer ======
  
 ^  Description | A script to extract a layer from the design map, so that it may be separately viewed, edited, exported, etc. | ^  Description | A script to extract a layer from the design map, so that it may be separately viewed, edited, exported, etc. |
 ^  Author | [[user>Aaron]] | ^  Author | [[user>Aaron]] |
 ^  Created | 2010/05/24  | ^  Created | 2010/05/24  |
 +^  Updated | 2016/05/12  |
 ^  Requires | L3DT v2.9 beta 2 or later | ^  Requires | L3DT v2.9 beta 2 or later |
-^  Download | {{:scripts:getdesignmaplayer.zs|GetDesignMapLayer.zs}} | +^  Download | {{:scripts:DM_GetLayer.zs|DM_GetLayer.zs}} |
-<html><!--^  Updated | 2010/05/24  |--></html>+
  
 ===== Script contents ===== ===== Script contents =====
  
 <code> <code>
 +// Author:  A. Torpy
 +// Updated: 16 May 2016
 +
 hvar hDM hvar hDM
 set hDM <GetMap "DM"> set hDM <GetMap "DM">
Line 17: Line 20:
 // allow user to select layer // allow user to select layer
 combosel CS combosel CS
-combosel.InitCS &CS "Altitude|PeakNoise|FracNoise|Cliffs|Erosion|Lakes|Climate|SpecType|SpecParam|" "Altitude"+combosel.Init &CS "Altitude|PeakNoise|FracNoise|Cliffs|Erosion|Lakes|Climate|SpecType|SpecParam|" "Altitude" NULL
 if <not <EditUI &CS "Select DM layer">> if <not <EditUI &CS "Select DM layer">>
   return 0   return 0
Line 28: Line 31:
 string PaletteName string PaletteName
 set PaletteName "Greyscale" set PaletteName "Greyscale"
-set LayerName <combosel.GetCurSel &CS>+set LayerName <combosel.GetCurSelA &CS>
 if <iseq 0 <strcmp LayerName "Altitude">> if <iseq 0 <strcmp LayerName "Altitude">>
   set LayerID 0   set LayerID 0
Line 62: Line 65:
 set hLayer <GetMap MapName> set hLayer <GetMap MapName>
 if <not hLayer> if <not hLayer>
-  set hLayer <project.CreateMapH MapName>+  set hLayer <project.CreateMap MapName>
 endif endif
 assert hLayer "Can neither get nor create map layer!" assert hLayer "Can neither get nor create map layer!"
Line 75: Line 78:
 // set the display palette // set the display palette
 hvar hSettings hvar hSettings
-set hSettings <project.GetSettingsListH>+set hSettings <project.GetSettingsList>
 if hSettings if hSettings
   hvar hStr   hvar hStr
Line 86: Line 89:
 </code> </code>
  
-===== Comments ===== 
- 
-None. 
 
scripts/getdesignmaplayer.1377130162.txt.gz · Last modified: 2017/08/31 07:05 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki