David Vierra
3f260ab63e
More work on map editor UI.
...
Displays existing maps and the splits for the imported map. Still can't actually import maps or edit them externally.
2015-07-06 14:47:47 -10:00
David Vierra
fdd30f3f68
Some nonsense to help debug a WTF error
...
AttributeError: 'PySide.QtOpenGL.QGLContext' object has no attribute 'setData'
2015-07-05 13:55:36 -10:00
David Vierra
339a75ec61
Begin working on map item editor
2015-07-05 13:37:50 -10:00
David Vierra
bc2e24aeb5
NBTFormatError is now a kind of LevelFormatError
2015-07-05 12:32:15 -10:00
David Vierra
43c4c3c722
Disable profiling in with_cython.pyx
2015-07-05 11:09:36 -10:00
David Vierra
814237995e
Remove unused var and obsolete comment
2015-07-05 01:42:20 -10:00
David Vierra
dce1495dd5
updateLightsByCoord coerces its coord arrays to ndarray for faster iteration
2015-07-05 01:27:24 -10:00
David Vierra
d1eda07ac1
Platform specific directories now have one module for each platform.
...
Added some notes about install mode and build scripts
sys.executable is no longer used.
Added getSrcFolder for finding the src/ folder of a source checkout.
2015-07-05 00:36:56 -10:00
David Vierra
1e4ae2e688
Experiment with having copyBlocks issue lighting updates only for blocks whose opacity or brightness changed.
...
copyBlocks accepts more values for updateLights
time_relight_manmade has another option to select the scheme of issuing updates
Add some tests results, conclusions, and blabber to time_relight_manmade
2015-07-03 08:06:09 -10:00
David Vierra
12e0ff3a22
setLight doesn't dirty the chunk if no section was found/created.
2015-06-30 19:35:38 -10:00
David Vierra
b5a8148609
Same tweaks for block_copy output
2015-06-30 19:35:02 -10:00
David Vierra
d85a6f9e03
Tweak benchmark output
2015-06-30 19:34:27 -10:00
David Vierra
2509b7e15e
Fix a really stupid bug in the relight benchmark.
2015-06-30 10:50:09 -10:00
David Vierra
d347035139
Try very hard to fix solid blocks getting light values.
...
Caused by overflow of signed char value: 255 opacity treated as -128
2015-06-30 09:34:06 -10:00
David Vierra
4d878c86c1
Odd shaped chunk sections are now forbidden. Begin removing special cases.
...
SchematicFileAdapter tries very hard to present uniformly shaped sections and so should you.
2015-06-30 08:21:20 -10:00
David Vierra
0d59ad9c95
Note negative result with unordered_map
2015-06-30 08:09:54 -10:00
David Vierra
8dabab612c
Disable initialized check for memory views.
2015-06-30 07:46:36 -10:00
David Vierra
cbfe5c91b0
Call stats are now conditionally compiled.
2015-06-30 07:43:06 -10:00
David Vierra
9103c363f8
Disable Cython array bounds checking, assert array shapes in cacheSection
...
An assert is fine here - if any WorldEditor adapters don't validate the array shapes, you lose.
2015-06-30 07:22:14 -10:00
David Vierra
369d5dac71
Cast array indices to unsigned to skip negative index wraparound check
2015-06-30 07:19:57 -10:00
David Vierra
5a8bc5dc8d
Declare RelightCtx as final to omit Cython vtables
2015-06-30 07:16:41 -10:00
David Vierra
2a883ad114
Avoid doing extra map lookups
...
In getSection, return the pointer from the find() iterator if found
In cacheSection, do some flips to get the pointer from the operator[] that finally caches the section
2015-06-30 06:45:51 -10:00
David Vierra
41b6db001d
Extract cacheSection() from getSection()
...
Skips some initializers used only by cacheSection for a good speedup.
2015-06-30 06:02:55 -10:00
David Vierra
c99cde9219
findFadedCells in with_cython.pyx now uses STL containers instead of Python ones
2015-06-29 20:56:42 -10:00
David Vierra
7e18deb438
Add option to output statistics for RelightCtx
2015-06-29 16:16:12 -10:00
David Vierra
5ebfa1c39e
Ignore with_cython outputs
2015-06-29 16:14:11 -10:00
David Vierra
ba83a68fc7
time_relight now relights as many sections as it can in 10 seconds.
2015-06-29 16:13:58 -10:00
David Vierra
eea61a72cb
ObjGraphWidget.showGraph doesn't crash on a failed eval.
2015-06-29 16:06:59 -10:00
David Vierra
6fe415561d
Add cython implementation of lighting update.
...
Relies on direct access to the section arrays provided by chunk sections through the WorldEditor class. Caches section arrays to avoid repeated calls through the Python WorldEditor's getChunk/getSection
Currently does not create new sections.
2015-06-29 03:01:07 -10:00
David Vierra
0f7378ec7f
In time_relight, block coords are signed (duh)
2015-06-29 02:31:17 -10:00
David Vierra
c003ffc666
Add updateLightsInSelection to pure_python.py
2015-06-26 15:14:29 -10:00
David Vierra
ad505ce2e2
Remove unused variable from FillBlocksOperation
2015-06-23 14:13:46 -10:00
David Vierra
9da7b289b2
Begin testing multiple implementations of relight algorithm.
...
Change relight API to have updateLightsByCoord, updateLightsInSelection, updateLightsInSection (incomplete)
Move time_xxx.py files from test/ into bench/
Split time_relight into manmade and natural.
Get time_relight_xxx working again.
Add get/set BlockLight/SkyLight to WorldEditor for pure python relight.
Implement pure python relight. Seems to work right.
2015-06-23 14:13:33 -10:00
David Vierra
987aa3e7c5
Brush shapes are now able to provide options widgets.
...
BrushShape inherits from QObject so it can have signals
BrushShape provides an optionsChanged signal
ShapeWidget for some reason forwards the optionsChanged signal to its client.
Probably because it "owns" the BrushShape instances, which is kind of dumb?
No shapes implement useful options widgets yet
2015-06-18 12:48:51 -10:00
David Vierra
0ae5213f40
Add wrapper for glActiveTexture
...
Use the `alternate` function from OpenGL.extensions to choose the first one from (glActiveTexture, glActiveTextureARB) that is available.
2015-06-18 12:37:10 -10:00
David Vierra
0d9d5626cc
Update heightmap even when lighting is disabled.
2015-06-14 17:09:22 -10:00
David Vierra
cc4d4f5799
Add rendering layer for chunk section edges.
...
Reveals that far too many chunk sections are being created.
Edges have odd diagonals but I'll leave it for now.
2015-06-14 17:09:11 -10:00
David Vierra
ffa4c0a19a
Actually skip over erroring worlds in WorldListModel, for real this time.
...
Fixes #118
2015-06-13 04:15:28 -10:00
David Vierra
60c4026151
Check minor and major versions from GL_VERSION
...
GL_MAJOR_VERSION is only supported on OpenGL 3.0+
Fixes #116
2015-06-12 23:10:40 -10:00
David Vierra
c9076b2c53
Check minor and major versions returned by glGet instead of QGLFormat
...
QGLFormat's values are wrong with Qt 4.8.6 on OS X (QTBUG-40415)
Fixes #115
2015-06-12 04:05:10 -10:00
David Vierra
b1dad4bb63
Log editor commands as they are pushed
2015-06-12 04:02:52 -10:00
David Vierra
33acbaf9be
worldinfo.ui: "Commands" -> "Allow Commands"
2015-06-12 04:02:38 -10:00
David Vierra
33a01de511
Fix edits being added when world info panel is reloaded.
...
Yes, this is what editsDisabled is for.
2015-06-12 04:02:25 -10:00
David Vierra
9db66f1f58
Fix crash with non-standard world generator names, allow custom generator names to be entered.
...
Rename generationTypeCombo to generatorTypeCombo
Change generatorTypeCombo into an editable combo box.
Add generator tag values to combo box items as itemData. Remove GENERATOR_TYPES.
Get generator tag value first as itemData and then as entered text if no itemData is found.
Add unknown generator types from the NBT data to the combo box.
Connect to the combo box's line edit's editingFinished to respond to user-entered generator types.
Fixes #113
2015-06-12 03:51:48 -10:00
David Vierra
474b0f499f
Only import win32api on Windows.
2015-06-11 09:03:02 -10:00
David Vierra
a00a17a224
Remove some noisy loggers
2015-06-09 22:17:02 -10:00
David Vierra
3c56b0f7fd
Add chunkNotPresent to ChunkLoader, WorldView, WorldScene
2015-06-08 01:13:34 -10:00
David Vierra
891bb6db2f
Remove recentDirtyChunks. Change ChunkLoader to respond to revisionChanged instead.
2015-06-08 01:12:59 -10:00
David Vierra
bc50b9c039
Fix undoBackward returning the wrong RevisionChanges
2015-06-08 00:42:22 -10:00
David Vierra
0f7488f88a
Add chunk-shaped selection box
2015-06-08 00:42:21 -10:00