L3DT users' wiki
Large 3D terrain generator

Scripts > re-calculate texture area

Description A script to re-calculate a rectangular area of the texture map.
Author Aaron
Created 2010/05/24
Requires L3DT v2.9 beta 2 or later.
Download Re-calculate texture area.zs

Script contents

hvar hTX
set hTX <GetMap "TX">
assert hTX "Cannot get texture map!"

assert <map.GetWidth hTX> "Texture map is not initialised!"

// initiailise the settings
int ls.left ls.right ls.top ls.bottom
set ls.left 0
set ls.bottom 0
set ls.top 0
set ls.right 0

// edit settings UI, and exit if cancelled
assert <EditUI &ls "Set texture calculation area"> "Calculation aborted"

// store a backup
L3DTio_Backup.ExtBackupMap "TX" "Re-calculate TX area" 0 "view.ShowMap \"TX\""

// copy settings into a global list
hvar hList
set hList <var.Create varlist "TXarea">
var.CopyValue hList &ls

// run the calculation in a thread
calcman.RunCalcScript "calc.TX.GenMapArea TXarea.left TXarea.bottom TXarea.right TXarea.top\nview.ShowMap \"TX\"\nvar.Delete TXarea"

Comments

None.

 
scripts/re-calculate_texture_area.txt · Last modified: 2017/08/31 06:10 (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