Commit Graph

27376 Commits

Author SHA1 Message Date
Campbell Barton
4558d45d46 WM_OT_path_open was failing with non utf8 paths. 2010-12-17 05:12:36 +00:00
Campbell Barton
5c621bd7f5 cmake was complaining when there was no libs skipped. 2010-12-17 04:41:48 +00:00
Dalai Felinto
61a7c8d4ae BGE Font: increasing the limit of the text object to 140 2010-12-17 02:45:17 +00:00
Nicholas Bishop
b51d86d977 Fixed bug reported by Reuben Martin:
Undoing in sculpt mode with drawing mode not set to solid didn't
redraw correctly.

Problem was that the non-PBVH VBOs need to be remade in that case.
2010-12-17 01:40:47 +00:00
Guillermo S. Romero
a140fdcbdb SVN maintenance. 2010-12-16 23:24:25 +00:00
Campbell Barton
6afe713d57 script to generate qtcreator project files, advantage is they include all source which is nicer for refactoring. 2010-12-16 21:32:56 +00:00
Campbell Barton
eecfc0fbb2 bugfix [#25208] randomize transform doesn't work on objects with keyframes
Surprising this wasnt noticed in a much more obvious case:
 - Key Location, Move, Rotate, Undo-Rotate >> Resets to keyed location as well.

This was happening because DAG_on_load_update() was called on read_undosave(), flagging 'ob->adt->recalc |= ADT_RECALC_ANIM;'

Fix by adding an option to DAG_on_load_update(), not to recalculate time flags.
2010-12-16 19:26:54 +00:00
Guillermo S. Romero
fef0549ea5 SVN maintenance.
Plus some typo fixes in comments.
2010-12-16 19:05:47 +00:00
Ton Roosendaal
fdcfca54e0 Annoyance fix:
Using scrollwheel on properties window halted when it was over
a list-button. Now it disables handling wheel events when you use
scrollwheel outside of lists first.

Implementation note: UI event handlers have priority over other
keymaps. That's OK. In this case it's simple conflict, for which
no design solution exists... wouldn't know how to do this nicer!
Code is nice local and can be improved when we look into other
conflicts...
2010-12-16 18:58:22 +00:00
Campbell Barton
b978bf39e3 fix for error in testing C/C++ flags 2010-12-16 17:54:00 +00:00
Ton Roosendaal
e836d2a169 Bugfix, irc report
After using loop-cut with multiple edges, transform widget
disappeared. Reason was a variable being set in function
not being called on cancelled operators. Now it's in Posttrans()
2010-12-16 17:19:24 +00:00
Janne Karhu
f7c60cab96 Fix for [#25202] Blender crashes when opening smoke simulations made with Blender 2.55.1 r33530
* Since r33398 smoke only uses one pointcache, but old versions want two caches so save new files with a fake second pointcache.
2010-12-16 16:09:23 +00:00
Brecht Van Lommel
0a7853478f Workaround #22856: defocus node with OpenMP could crash on Mac, just disabled
OpenMP now in that case, since it's only an optimization.
2010-12-16 14:49:50 +00:00
Ton Roosendaal
919d341321 Bugfix #24976 revisited
Multi-layer images: clicking on the "Source" popup freed all memory
for multilayers, even when choosing the same "File" entry again.
Now it should work :)
2010-12-16 13:43:20 +00:00
Ton Roosendaal
4e26b4ec38 Bugfix #22794
Panorama render is now border-render safe.
2010-12-16 12:49:48 +00:00
Campbell Barton
566bda734a last commit to fix warnings didnt set them at all, not it works as it should.
also made cmakes output a lot quieter, messages can be uncommented for debugging or added back if other devs need this for some reason.
2010-12-16 12:48:30 +00:00
Ton Roosendaal
d3070ad9ac Bugfix #23658
Render: Alpha calculated for ray-traced transparency could overflow beyond 1.0.
Gets clamped now.
2010-12-16 11:31:04 +00:00
Dalai Felinto
0890b80ed9 Patch:[#25163] BGE support for Blender Font objects - unicode support
Problem/Bug:
------------
There were no way to have proper unicode characters (e.g. Japanese) in Blender Game Engine. Now we can :)
You can see a sample here: http://blog.mikepan.com/multi-language-support-in-blender/

Functionality Explanation:
--------------------------
This patch converts the Blender Font Objects to a new BGE type: KX_FontObject
This object inherits KX_GameObject.cpp and has the following properties:
- text (the text of the object)
- size (taken from the Blender object, usually is 1.0)
- resolution (1.0 by default, maybe not really needed, but at least for debugging/the time being it's nice to have) 

The way we deal with linked objects is different than Blender. In Blender the text and size are a property of the Text databock. Therefore linked objects necessarily share the same text (and size, although the size of the object datablock affects that too). In BGE they are stored and accessed per object. Without that it would be problematic to have addObject adding texts that don't share the same data.

Known problems/limitations/ToDo:
--------------------------------
1) support for packed font and the <builtin>
2) figure why some fonts are displayed in a different size in 3DView/BGE (BLF)
3) investigate some glitches I see some times
4) support for multiline
5) support for more Blender Font Object options (text aligment, text boxes, ...)

[1] Diego (bdiego) evantually will help on that. For the time being we are using the "default" (ui) font to replace the <builtin>.
[2] but not all of them. I need to cross check who is calculating the size/dpi in/correctly - Blender or BLF. (e.g. fonts that work well - MS Gothic)
[3] I think this may be related to the resolution we are drawing the font
[4] It can't/will not be handled inside BFL. So the way I see it is to implement a mini text library/api that works as a middlelayer between the drawing step and BLF. 
    So instead of:
      BLF_draw(fontid, (char *)text, strlen(text));
    We would do:
      MAGIC_ROUTINE_IM_NOT_BLF_draw(fontir, (char *)text, styleflag, width, height);
[5] don't hold your breath ... but if someone wants to have fun in the holidays the (4) and (5) are part of the same problem.

Code Explanation:
-----------------
The patch should be simple to read. They are three may parts:
1) BL_BlenderDataConversion.cpp:: converts the OB_FONT object into a KX_FontObject.cpp and store it in the KX_Scene->m_fonts
2) KetsjiEngine.cpp::RenderFonts:: loop through the texts and call their internal drawing routine.
3) KX_FontObject.cpp::
  a) constructor: load the font of the object, and store other values.
  b) DrawText: calculate the aspect for the given size (sounds hacky but this is how blf works) and call the render routine in RenderTools
4) KX_BlenderGL.cpp (called from rendertools) ::BL_print_game_line:: Draws the text. Using the BLF API

*) In order to handle visibility of the object added with AddObject I'm adding to the m_scene.m_fonts list only the Fonts in a visible layer - unlike Cameras and Lamps where all the objects are added.

Acknowledgements:
----------------
Thanks Benoit for the review and adjustment suggestions.
Thanks Diego for the BFL expertise, patches and support (Latin community ftw)
Thanks my boss for letting me do part of this patch during work time. Good thing we are starting a project in a partnership with a Japanese Foundation and eventual will need unicode in BGE :) for more details on that - www.nereusprogram.org - let's call it the main sponsor of this "bug feature" ;)
2010-12-16 10:25:41 +00:00
Campbell Barton
ed4e7271f1 CMake now tests warnings are supported, GCC 4.0 wasn't working because of unsupported warnings.
this can work for other compilers too, currently intel and gcc use this.
2010-12-16 09:55:35 +00:00
Campbell Barton
ee05792a7b missed this file before (de-duplicating enum). 2010-12-16 09:51:55 +00:00
Campbell Barton
6d2019074f - fix [#25246] export default scene to X3D crashes exporter, own fault but also made sure all colors are now clamped and noticed 3D text was not being exported.
- de-duplicated 'object_type_items' enum, text was known as TEXT in one, FONT in another.
2010-12-16 05:02:15 +00:00
Nicholas Bishop
e15f34b35f Fixed bug [#22634] sculpting/multires and wireframe display mode glitches
Added a call to flush sculpting face grid changes out to ccgsubsurf's
other data (in particular, to edge grids)

Hopefully correct fix this time :)
2010-12-16 03:39:51 +00:00
Dalai Felinto
3ae56ea1b3 small tweak, moving /* put compatibility code here until next subversion bump */ {} to a distinct (right) place
when doing a version bump, please remember to do that.
2010-12-15 22:46:43 +00:00
Sergey Sharybin
143573f507 Fix #25241: Wordwrap memory leak /w Undo
Looks like drawcache shouldn't be freed when restoring screen because spaces
aren't freeing and could still use caches.
2010-12-15 21:25:54 +00:00
Ton Roosendaal
a6855c9c21 Bugfix #25235
Image Editor: paint mode, use clone image, always showed.
Now it hides clone when paint is disabled.
2010-12-15 19:21:02 +00:00
Ton Roosendaal
97b0e17577 Bugfix #25243
Pressing Enter twice on enum-menus or pulldowns sent an 'OK execute'
with illegal values (no menu item active). Caused crashes too.
2010-12-15 19:10:42 +00:00
Ton Roosendaal
29d2e53463 Bugfix, own collection
Using RMB on menus to change hotkeys was broken.
- the input button was on a weird place outside menu, assign
  would close pulldown, so you had to reopen to check
- ESC didn't close the button, but assigned ESC as hotkey.
  This key is a protected key, and always should be escaping.
- Worst bug: if you used this on a 'user keymap' it removed
  all entries from the map...
2010-12-15 18:09:25 +00:00
Campbell Barton
7e10a9e6ce ensure pasted graph keys are always selected. 2010-12-15 17:36:08 +00:00
Janne Karhu
6b2b56c35e Fix for [#25218] No smoke is emitted when particle system starts and ends on same frame
* Depsgraph wasn't updated properly for smoke flow collision object dependencies.
* Smoke also wasn't properly using the actual emission frame of the flow particles.
* There was a lot of bloated logic in some parts of particle code so this fix turned into a small scale cleanup operation.
** As a result particle updating and cache usage should be a bit more stable too.
2010-12-15 17:05:34 +00:00
Campbell Barton
2c55dd96ad missing check for keyframe paste, was crashing when no keyframes to paste into. 2010-12-15 16:57:56 +00:00
Campbell Barton
0a3902bb55 change the cursor bounds to only use the Area if the mouse is outside the region or the region is not a WINDOW type. 2010-12-15 16:46:59 +00:00
Ton Roosendaal
bc64d8dcd8 Bugfix, irc report:
Stamp info was calling log10 on zero, when end-frame was zero.
Caused crash! Thanks Sergey for report.
2010-12-15 16:15:52 +00:00
Campbell Barton
ee09aeb498 dont transform hidden handles in the graph editor. 2010-12-15 16:07:49 +00:00
Campbell Barton
53adab9870 Minor annoyance with graph editor selection:
Selecting graph keys would toggle channel selection if shift was held.
this was annoying when selecting 2+ unselected keys to have the channel change color each click.
Now set the channel based on the selection state of the point, as long as points are being selected the channel will stay selected too.
2010-12-15 15:59:10 +00:00
Ton Roosendaal
9129750787 Bugfix #25231
File Window: text clipping was tiny bit too narrow. It was also
clipping text twice even ;)
2010-12-15 15:56:06 +00:00
Ton Roosendaal
95f205ed5c Bugfix 21333
"Continuous grab": the boundary is now set to Area (editor), making it work
for operators started in other regions (like toolbar, or in quad view case)
2010-12-15 15:28:03 +00:00
Ton Roosendaal
0efdb860f1 Bugfix #22982
Displace modifier: mapping "Global" didn't set a dependency entry.
Fix provided by the reporter himself, thanks Jacob F!
2010-12-15 13:08:34 +00:00
Daniel Salazar
dbbd12d760 Randomize Transform op: Scale Even wasn't really working with objects
with an asymmetric starting scale. Handling of starting scale
values of 0 needs improvement, ie: default for delta transform
2010-12-15 10:59:45 +00:00
Campbell Barton
35fa581403 BKE_assert(), only prints the error unless cmake define WITH_ASSERT_ABORT is enabled and it will call abort().
made this option advanced so people don't enable along with other features.
2010-12-15 10:22:26 +00:00
Daniel Salazar
eac46088e5 Randomize Transform operator:
Added support for working on delta transformations instead of plain
transform. this should help the fact that you cant randomize animated
objects (still need to check into that)

Removed minimun scale since it was not well done, need a stronger
version of this
2010-12-15 08:21:58 +00:00
Campbell Barton
dbd3081895 fix for annoyance found when looking into bug [#25226].
Changing the edge crease median value often wouldn't result in the median value entered because of clamping from 0-1.
Now the median crease is applied by scaling the values up/down.

also add some simple checks to speed up updates,
- don't move verts or recalculate normals if only crease changes.
- don't apply crease changes if location is being edited.
2010-12-15 07:15:51 +00:00
Campbell Barton
46ce8cdf58 replace debug popup function with call to generic function WM_operator_props_dialog_popup(). 2010-12-15 06:12:16 +00:00
Campbell Barton
97aa2287fa access bpy.app.debug_value, G.rt internally 2010-12-15 06:03:45 +00:00
Campbell Barton
eb8458b064 Centralized operator UI drawing into a new function uiLayoutOperatorButs(),
Operator drawing calls were duplicated in file selector panel, redo panels, redo & dialog popups.

note, uiDefAutoButsRNA's column's argument was misleading, renamed to label_align.
2010-12-15 05:42:23 +00:00
Campbell Barton
acd7b81c2d bugfix [#25230] Quick extrude Ctrl-LMB : wrong behaviour of 'RotateSource' option.
Problem is is with operator redo which click-extrude exposed.

Check if redo operator can run, otherwise lock the UI and add a label that the operator doesn't support redo.
This is clunky but IMHO better then failing silently and leaving the user confused.

- Merged redo functions into ED_undo_operator_repeat(), code was duplicated in a few places.
- added WM_operator_repeat_check to check if WM_operator_repeat() can run, avoids an undo call when redo work.

Unrelated changes
- GHOST_SystemWin32.cpp set to utf8 encoding.
- cmake_consistency_check.py now checks source files are utf8.
2010-12-15 04:06:19 +00:00
Nicholas Bishop
ff6e631c86 Fixed bug #23042, Sculpting + Multires + Noise texture tears mesh
Noise texture moved the edges of multires grids different, causing
tears in the mesh. Fixed with a call to re-stitch grids (but only done
if the brush texture is set to noise)
2010-12-15 03:53:56 +00:00
Campbell Barton
32e6f862e9 remove unused args. 2010-12-15 02:09:35 +00:00
Matt Ebb
f2d843ed2b Exposed mesh edit 'select similar' threshold as operator property, must have been missed before. 2010-12-15 00:56:15 +00:00
Nathan Letwory
100d611ce5 Apply patch [#25224] Refactor COLLADA DocumentImporter
Submitted by Martijn Berger.

Make DocumentImporter class the actual IWriter implementation and move prototype to the header.
Group together functions that we should move out of the class.

No functional changes.
2010-12-14 21:46:03 +00:00
Ton Roosendaal
7775a1a798 Bugfix #21724
Graph Editor: "make selected channels visible" VKEY didn't 
make unselected channels invisble.

What is left is that the active channel remains visible still.
Not sure if that's by design, for Joshua to answer.
2010-12-14 19:25:49 +00:00