Commit Graph

37517 Commits

Author SHA1 Message Date
Campbell Barton
d9960dba31 fix own regression in 2.66 [#34610] Text editor: Syntax highlighting freezes 2013-03-12 08:46:12 +00:00
Sergey Sharybin
e84153a91c Fix compilation error after recent changes to strict gcc flags
Dudes, please try building blender with all default features
before doing such a commits. It helps just a lot when bisecting
issues later.

Also solved const qualifier discard happens in recent monofont
commit.
2013-03-12 08:24:36 +00:00
Sergey Sharybin
9c0eecbf10 Fix #34599: Mask nodes stop working if output is later piped through HSV node
Issue was caused by the fix for #33650 which changed way to check whether
operation resolution is set or not from checking dimensions are zero to
setResolution was ever called.

Such change lead to conflict with MixBase operation (used for Mix node) which
uses temporary zero resolution to check whether input socket resolution is
known. This leads to zero resolution setting to that branch of tree. After this
resolution will never set to it's actual value.

For now solved by changing logic how MixBase operation detects resolution.
Namely instead of using trick with temporary zero resolution and calling
determineResolution for all inputs, and then call base class's method to
determine resolution just once again, check whether input socket is connected
and if so use it's resolution.

Shall not be regressions for real-life trees, but keeping an eye on this and
doing more tests is for sure welcome.
2013-03-12 08:24:30 +00:00
Irie Shinsuke
5792e77239 Patch [#34373] Use i18n monospace font in Text editor and Python console
This patch allows Blender to display i18n monospace font in the text
editor and the Python interactive console. Wide characters that occupy
multiple columns such as CJK characters can be displayed correctly.
Furthermore, wrapping, selection, suggestion, cursor drawing, and
syntax highlighting should work.

Also fixes a bug [#34543]: In Text Editor false color in comment on cyrillic

To estimate how many columns each character occupies, this patch uses
wcwidth.c written by Markus Kuhn and distributed under MIT-style license:

  http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c

wcwidth.c is stored in extern/wcwidth and used as a static library.

This patch adds new API to blenfont, blenlib and blenkernel:

BLF_get_unifont_mono()
BLF_free_unifont_mono()
BLF_draw_mono()
BLI_wcwidth()
BLI_wcswidth()
BLI_str_utf8_char_width()
BLI_str_utf8_char_width_safe()
txt_utf8_offset_to_column()
txt_utf8_column_to_offset()
2013-03-12 07:25:53 +00:00
Campbell Barton
763d4b2394 ruler: disable rotate with ruler drawing, was drawing too pixelated and hard to read. 2013-03-12 06:25:06 +00:00
Campbell Barton
8661e820f9 bmesh: dissolve, avoid unnecessary loop in test_extra_verts(), also minor code cleanup. 2013-03-12 05:48:30 +00:00
Campbell Barton
539d7d460d bmesh: maintain active face when dissolving. 2013-03-12 05:36:43 +00:00
Campbell Barton
660be3da39 use gcc warning -Wredundant-decls, exposes some odd/duplicate declarations which have been removed. 2013-03-11 20:27:38 +00:00
Thomas Dinges
8560b141eb Fix for [#34598] Modifier-Icon in Outliner does not appear
* OBJECT_OT_make_links_scene did only trigger an 3D View update which was insufficient for Outliner (modifiers for example) and also some parts inside the Properties Editor (Mesh Data, Material Data).
2013-03-11 19:50:11 +00:00
Antony Riakiotakis
42b9c68534 Minor cleanup: We always use colour correction now for float buffers. Get rid of flag variable. 2013-03-11 18:40:43 +00:00
Antony Riakiotakis
0a3382c8e0 Fix #34589. There was no space conversion being done between layers in
different colour space when using the clone brush.
2013-03-11 18:11:07 +00:00
Campbell Barton
e6dcf9504e code cleanup:
- move recursive bone/parent check into ED_armature.h
- remove unused vars
- use const for paint vector args.
2013-03-11 16:23:33 +00:00
Gaia Clary
1672ac25ca Ouliner: Added recursive select of (visible) bones (Edit- and Object-mode) 2013-03-11 16:02:16 +00:00
Bastien Montagne
f09f2d1c31 Fix more UI i18n issues (reported by Leon Cheung). 2013-03-11 15:01:03 +00:00
Bastien Montagne
5b53a17bfb Colormanagement: Fix issue with colorspaces' description too short, and reduce usage of magic numbers. 2013-03-11 11:15:05 +00:00
Sergey Sharybin
28857e8c9e Fix #34511: Invalid Audio/Video codec combination produces hung filehandle 2013-03-11 11:09:57 +00:00
Bastien Montagne
4daef64986 Fix more UI i18n issues (reported by Leon Cheung and Lockal).
We have a glicth with colormanagement's spaces descriptions, though, looks like they are clamped at 64 chars (see raw space), will see that later, if it’s solvable.
2013-03-11 09:06:49 +00:00
Campbell Barton
34f3dc43e7 code cleanup: pep8 & minor changes 2013-03-11 02:19:58 +00:00
Antony Riakiotakis
722ada58fc Jitter: Change UI. Now use lock icon to indicate relative jitter, tied
to brush size, and unlock icon to indicate absolute jitter untied to
brush size, in screen pixels. Also relative jitter now has soft UI limit
of 2.0 and a hard limit of 1000 times the size of the brush. Should be
enough for the most vivid imaginations...I hope!
2013-03-11 01:46:22 +00:00
Antony Riakiotakis
38feedcaac Feature request for all paint systems that support it: Jittering in
absolute coordinates. This allows an artist to lower the brush radius
while keeping the spread of the brush constant. A toggle under the
jitter slider provides the option to switch between relative/absolute.
2013-03-10 20:05:18 +00:00
Miika Hamalainen
5a981db3ec Fix [#34561]: Possible smoke crash if smoke flow had lower density than adaptive domain "threshold". 2013-03-10 19:12:40 +00:00
Miika Hamalainen
0c93ef3ba9 Fix: Vertex weight color calculation tried to use NULL pointer when called through DM_update_weight_mcol(). (Introduced in r55062.) 2013-03-10 19:10:20 +00:00
Antony Riakiotakis
623902ac51 Fix: stroke spacing fails in image editor, we need to account for
zooming because spacing used to happen in unscaled screen space
2013-03-10 18:46:31 +00:00
Antony Riakiotakis
ca5f7b778c More cruft remove for 2d painting. Remove functions from brush interface
that were in fact 2d painting specific. Also remove old stroke managing
function completely.
2013-03-10 18:05:13 +00:00
Brecht Van Lommel
5186e3393c Fix scons build error after recent commit, missing include. 2013-03-10 17:52:29 +00:00
Bastien Montagne
6da449b86c More UI message i18n fixes and improvements...
Fix for keyingsets tips, and make them (and a few others) findable by i18n messages extracting code (for some reasons, their bl_rna.description are void???).
2013-03-10 17:42:08 +00:00
Antony Riakiotakis
4760e002dd Texpaint refactor complete!
* Projection painting files reside in paint_image_proj.c
* 2d projection files reside in paint_image_2d.c
* Common operator/paint operation code resides in paint_image.c

All old code layout is out. Phew...Now we can at least concentrate on
each system separately when debugging this beast. We could even separate
the paint structs for 2d/projective more easily should we choose to do
so.
2013-03-10 17:40:55 +00:00
Gaia Clary
98cafc9538 Added menu entry for recursive hierarchy selec in outliner 2013-03-10 17:19:03 +00:00
Bastien Montagne
874b692e80 More UI message i18n fixes and improvements...
Rendering messages are now translatable.
2013-03-10 16:55:01 +00:00
Brecht Van Lommel
9fe858264c OpenGL: more work on fixed function lighting implementation as GLSL.
* Rename functions and move to own header.
* Add wrapper functions for glLight.
* Auto detect if we can use faster code for solid lighting.
* Various fixes for textured draw mode.
2013-03-10 15:38:23 +00:00
Bastien Montagne
f57398568a More UI message i18n fixes and improvements... 2013-03-10 14:57:19 +00:00
Campbell Barton
98fbbe4297 use crosshair cursor for the ruler. 2013-03-10 14:44:16 +00:00
Ton Roosendaal
af16cd804c Bugfix #34365
Tiny tweak.

Dragging option (cursor change) for region dividers in editors was having an 
un-even sensitivity hotspot. This conflicted with header buttons for example,
where the hotspot and bottons overlapped.

Now the hotspot is around the region-edge evenly.
2013-03-10 14:30:24 +00:00
Bastien Montagne
ea341574cb Rigid body UI: add translation to materials' names (density collection). 2013-03-10 13:37:14 +00:00
Campbell Barton
08ce2fe2da fix for error loading ruler info back from greasepencil. 2013-03-10 12:06:24 +00:00
Campbell Barton
f22153d711 ruler:
- initial ruler point snaps by default now.
- header text drawing was delayed until the first point was added.
2013-03-10 11:51:58 +00:00
Antony Riakiotakis
2fb4d84de7 Fix #34562, leftover from own coordinate conversion refactoring. Also
avoid extraneous OpenGL state chage.
2013-03-10 11:37:27 +00:00
Campbell Barton
90fe87128f ruler:
- show header text for keyshortcuts.
- add Ctrl+C to copy the active ruler value.
2013-03-10 11:30:21 +00:00
Campbell Barton
f98fa5ec2d code cleanup: use '%.*d' with string formatting for variable length number. 2013-03-10 11:02:21 +00:00
Campbell Barton
bb6255b829 Improvements to addon-prefs key search suggested by Yang Niren.
- add accent_grave.
- strip the search string.
- add numpad numbers (currently these match regular numbers).

also remove unneeded forward declarations in path_util.c
2013-03-10 07:18:43 +00:00
Campbell Barton
83fe8e549e patch [#34586] Variable typo in glaDrawPixelsTexScaled
from Andre D (andred)

xzoom was used where yzoom was meant to be used. Caused issues when xzoom and yzoom were not the same value.
2013-03-10 07:01:52 +00:00
Campbell Barton
02ecd9f842 code cleanup:
- remove unused block from before blender was opensourced (BKE_library_make_local)
  noticed by Lawrence D'Oliveiro (ldo)
- remove text_idbutton() unused function.
- test_idbutton(name) was taking (name + 2), then checking 2 bytes before the pointer, this is error prone so better just take the name including the ID prefix.
2013-03-10 06:40:19 +00:00
Campbell Barton
f9f7070336 add STREQ macro (commonly used macro like CLAMP, MAX2, STRINGIFY). Use for some areas of the python api, bmesh. 2013-03-10 06:18:03 +00:00
Campbell Barton
f99be71850 patch [#34103] check_for_dupid2.patch
from Lawrence D'Oliveiro (ldo)

check_for_dupid comments:
- correct comment about in_use array
- note name-truncation code will never be executed
---

Added asserts to ensure comments are correct - ideasman42.
2013-03-10 05:58:09 +00:00
Campbell Barton
7d585ed475 patch [#34103] check_for_dupid.patch
from Lawrence D'Oliveiro (ldo)

- more comments
- more uses of bool type
- define symbol for length of in_use array in check_for_dupid
2013-03-10 05:46:24 +00:00
Campbell Barton
7485724160 style cleanup: whitespace 2013-03-10 05:19:29 +00:00
Campbell Barton
2022567116 patch [#34103] path_util_split_name_num.patch
from Lawrence D'Oliveiro (ldo)

Simplify implementation of BLI_split_name_num

- With some changes of my own to avoid second call to strlen()
2013-03-10 05:11:18 +00:00
Campbell Barton
14bbde0441 patch [#34103] path_util_cleanup_path.patch
from Lawrence D'Oliveiro

Improve implementation of BLI_cleanup_path, including making it behave as documented.

"/../home/me" would become "home/me" rather then "/home/me"

Also remove redundant BLI_strncpy()
2013-03-10 04:43:15 +00:00
Antony Riakiotakis
cb99456350 * Cleanup: collapse unneeded paint 2d function to the caller. Also, new
code now does not use painter_2d_paint at all. Made sure the approprate
variables of painter_2d are still initialized (They may be refactored to
become part of the ImagePaintState struct)

* Enable pressure control for new code path in texture paint. This revealed a bug, also present in blender 2.66: Size pressure is broken.
This was pretty interesting for me because it indicates that we could support
dynamic size in texture paint: (See anchored brushes)
2013-03-10 02:30:53 +00:00
Antony Riakiotakis
948b92ae8c Time to start reaping the benefits of code unification. Support for
pressure spacing across all paint systems (was supported only for
texture painting earlier). Also, switch paint code to use the new code
path from now on. No shift-Lclick required anymore.
2013-03-10 00:58:09 +00:00
Campbell Barton
347e2b6cb0 code cleanup: make bmesh var names more consistent 2013-03-09 17:12:24 +00:00
Campbell Barton
06b3d4f7bb code cleanup:
- use BM_ITER_* macros in more places.
- avoid sign int conversion when calling EDBM_backbuf_check()
2013-03-09 16:19:07 +00:00
Campbell Barton
2ff48c019d minor edits to r55134 (recursive outliner select).
- loop over scene bases rather then looping over all objects, then looking up bases.
- shuffle checks so slow ones are last.
- rather then having own behavior for recursive select, do the regular operation,
  then apply the result recursively afterwards.
2013-03-09 15:51:36 +00:00
Campbell Barton
2433404e4b add inline function mul_project_m4_v3_zfac() to get the z-depth value from a vector & mat4x4 2013-03-09 15:39:24 +00:00
Ton Roosendaal
85f15bb0ed Blender Anim player fixes:
- RGBA images (without alpha) now don't draw with alpha blending enabled
- Checkerboard backdrop for alpha images now shows on size of image
- Window always clears now, in very dark grey (so you can see black)
- On resizing window, the aspect of image is being kept, keeping the
  image always visible within the window frame
- Image now centers OK. 
- On pause, playback now halts (it was drawing same image all the time)
2013-03-09 14:57:06 +00:00
Campbell Barton
c56b39c0e4 bmesh operator 'contextual_create' wasn't flagging single faces that were created (caused glitch in some cases with recent create-select functionality). 2013-03-09 14:42:10 +00:00
Campbell Barton
6a59f71d04 bmesh: face creation from a single selected vertex/edge, now extends the selection along wire/boundary edges and makes a face.
Selection is specifically so you can continuously fill in holes by tapping the Fkey.

Similar functionality to the F2 addon, however the mouse location isn't used.
2013-03-09 14:14:20 +00:00
Sergey Sharybin
964cead5b1 Fix for recent compo border commit
Viewer operations shall be aware of border as well, otherwise
CPU would be busy for a while full compo isn't done for just
a small preview image in a node.
2013-03-09 13:44:09 +00:00
Gaia Clary
b2397db100 Outliner: Added recursive select/deselect (CTRL+LMB) and extend (CTRL+SHIFT+LMB) 2013-03-09 13:13:04 +00:00
Campbell Barton
7961147a59 code cleanup: was using var named 'in' for output. 2013-03-09 11:55:12 +00:00
Campbell Barton
abd1748e48 code cleanup: move runtime var zfac out of RegionView3D. rename initgrabz() -> ED_view3d_calc_zfac() and have it return the zfac to use. 2013-03-09 11:40:42 +00:00
Sergey Sharybin
e2ddd832dc Use poroper release for images buffers acquired from an Image ID
when drawing viewport background images.
2013-03-09 11:18:01 +00:00
Sergey Sharybin
90fbab33f8 Fix #34574: Empty Movie Clip Editor crash on select 2013-03-09 10:52:43 +00:00
Campbell Barton
4a01ba4ba5 ruler3d: replace ED_view3d_cursor3d_position() with lower level function view3d_get_view_aligned_coordinate() 2013-03-09 10:28:28 +00:00
Campbell Barton
35b9fcb871 comment unused BLI_move() function, also fixed error where it would delete the file even if renaming failed.
- found when testing recursive_operation().
2013-03-09 09:52:38 +00:00
Campbell Barton
edf4855a38 patch [#34103] fileops_recursive_operation.patch
from Lawrence D'Oliveiro (ldo)

Fix potential memory leaks in recursive_operation while simplifying cleanup logic.
2013-03-09 09:38:27 +00:00
Gaia Clary
f8f3647f6a Added Recursive select/deselect to outliner (CTRL+LMB) 2013-03-09 07:17:35 +00:00
Campbell Barton
4b5c8da9ac remove unneeded string formatting for bli_adddirstrings(), noted by Lawrence D'Oliveiro. 2013-03-09 06:26:46 +00:00
Campbell Barton
221a383366 use 'bool' for BLI_/BKE_ functions. 2013-03-09 05:35:49 +00:00
Campbell Barton
ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +00:00
Campbell Barton
9e1ead1940 expose obrel_is_recursive_child in BKE_object.h and rename to BKE_object_is_child_recursive() 2013-03-09 03:34:01 +00:00
Campbell Barton
d695d7c2ff code cleanup: use bool's for snapping functions. 2013-03-08 18:28:26 +00:00
Campbell Barton
743f464f75 changes to ruler
- click-drag adds a ruler if there are none.
- pressing enter stores the ruler for re-use when activating again (saves as a grease-pencil layer).
- add to toolbar.
2013-03-08 18:17:12 +00:00
Campbell Barton
b16f24c944 add delete key for removing active ruler. 2013-03-08 16:53:00 +00:00
Bastien Montagne
589a73a43f Fix to BLF_pgettext, which was returning "" when passed NULL msgid... Never noticed any problem, but it looks it could produce strange UI issues (like deactivated buttons), and it was not consistent anyway!
Thanks to S. Lockal for spotting the issue and providing a patch.
2013-03-08 15:34:23 +00:00
Campbell Barton
f9b50facd7 add ruler snapping vert/edge/face (Holding Ctrl) 2013-03-08 15:15:14 +00:00
Campbell Barton
f43153dd93 avoid floating point exceptions in snapObjects(), was attempting to scale up FLT_MAX. 2013-03-08 15:10:57 +00:00
Ton Roosendaal
616a00950e Feature request:
Blender's anim player (blender -a) now allows drop of image or movie file.
It then restarts itself completely (close window, open new).
2013-03-08 13:03:04 +00:00
Joshua Leung
181ac91d6d Applying similar optimisations as r.55092 for Animation Data 2013-03-08 10:59:43 +00:00
Campbell Barton
6fd187e4df code cleanup: 0 --> NULL 2013-03-08 06:32:00 +00:00
Campbell Barton
1d5b7bc1f7 fix for typo in skin modifier that resulted in incorrect vertex weights. 2013-03-08 04:31:21 +00:00
Campbell Barton
c36f20a7d2 style cleanup 2013-03-08 04:00:06 +00:00
Joshua Leung
ff336aca02 Bugfix [#34560] Wrong angle for text in Horizontal mode of Properties space
Rotation angle for text was still in degrees not radians
2013-03-08 03:42:16 +00:00
Campbell Barton
b9554c86dc fix null pointer dereference in BM_edge_is_contiguous() (own code). 2013-03-08 03:07:32 +00:00
Joshua Leung
d9ec7e2354 [#34541] Sketching bones created bones with 0 radius for envelope
This commit is just a stopgap measure (i.e. it fixes the symptoms but not the
real underlying cause) of this bug. For some reason, iter->size is nearly always
an "effectively zero but not truly zero" value. Hence, the envelope sizes would
get adjusted, but would be scaled to an impossibly small value (taken from
iter->size).

From my investigations so far, iter->size is mostly either set to (or left as)
0, except in a rare case when dealing with volume snapping, when the values
somehow get propagated there from various intermediate data points. But, that
almost never works either.
2013-03-08 02:23:43 +00:00
Joshua Leung
bed8efb8e8 Improving warnings when keyframing fails for IKEY over a button
Now, instead of silently failing, an error message saying that the property
cannot be animated is displayed
2013-03-08 02:15:08 +00:00
Joshua Leung
7f7f32d768 Bugfixes: [#34394] and [#31843] Visual Keying not working for bones
Big thanks to Josef Meier (jomeier) for finding the fix!

It turns out that this was a case of variable shadowing that had been overlooked
and compilers were not warning about.
2013-03-07 23:28:23 +00:00
Sergej Reich
8db7a34167 math: Use len_v3() instead of normalize_v3() for area calculation
We only need the length, avoids unnecessary calculations.
2013-03-07 19:16:02 +00:00
Ton Roosendaal
8e474517db GPencil feature request:
Allow layers to be moved up and down, so you can control drawing order nicer.
2013-03-07 18:01:10 +00:00
Sergej Reich
643b0be4cb bullet: Update to current svn, r2636
Apply patches in patches directory, remove patches that were applied
upstream.
If you made changes without adding a patch, please check.

Fixes [#32233] exporting bullet format results in corrupt files.
2013-03-07 17:53:16 +00:00
Sergej Reich
46d32c89f6 Fix warnings in stubs.c 2013-03-07 17:52:51 +00:00
Sergej Reich
8e2a3e3863 Fix building with blenderplayer 2013-03-07 17:52:48 +00:00
Sergey Sharybin
557b893dfd Border for compositor viewer node feature
This adds border option to compositor, which affects on
a backdrop and viewer nodes, which is useful for faster
previews and tweaks.

Final compositing still happens for the whole frame, but
if it'll be needed it's not so difficult to support it
as well.

To use border there's Ctrl-B shortcut in the compositor
editor, which i used to define region you want to restrict
compositing to. There's also "Viewer Border" option in
the N-panel in case you'll want to disable border
compositing.

Some areas could be cleaned a bit, like ideally it shall
not be viewer image clearing in viewer_border_update RNA
callback, but currently it's not so much clear how to
make it the same fast as simple memset and glue it
somehow to compositor. Will think of nicer solution a
bit later.
2013-03-07 17:47:30 +00:00
Ton Roosendaal
a134d9ed51 Speedup for Grease Pencil animators.
Saving and loading gpencil was using different order for the individual list items.
On a 120 Mb gpencil project (yes, animators!) loading time went down from 1 minute 
to a second or two.

Note that this to have effect, you need to save once.

Developer note: check this commit, it uses a new writelist function. You can 
speedup stuff tremendously with keeping saved and read data in sync.
2013-03-07 16:57:53 +00:00
Campbell Barton
e93068ad78 ruler arc draw clamps to line length and simplify projection. 2013-03-07 16:12:36 +00:00
Antony Riakiotakis
41bf595c5f Texture paint refactoring commit
This is as close as I can get to keeping the old code intact. After this
commit, I will have to change existing code paths, making testing of
functionality harder.

Changes:

* Keep only projective texturing code in paint_image_proj.c
* Move 2D code to paint_image_2d.c. This needed the introduction of
allocation/cleanup functions for the relevant structures.
* Common code interface for both modes stays in paint_image.c (which
still includes all old code, system should work as it did with the
exception of non-projective 3D paint mode) and is made public. This is
not a lot of code, only rectangle invalidation and undo system.
* Changed the naming in the new code slightly: imapaint_ prefixed functions refer to
common functions used by both systems, paint_2d_ prefixed to 2d
painting. There will be an interface for the projection painting as
well. Probably there is some leftover naming conversions to do.

TODO:

* Move operator init/exec/modal to common interface file
* Get rid of old BKE_brush_painter_paint, now brush_painter_2d_paint.
All code uses stroke system for the stroke management
* Write space pressure management for the paint stroke system (for other
systems to access as well :) )
* Move texture paint tablet presssure exception code for old bugs to
stroke system (makes me wonder...aren't other systems also influenced by
these pressure issues?) or up in the function hierarchy inside texture
paint. This code is still not there so users with tablets may notice
some issues.
* possibly change other systems to pre-multiply pressure with the
relevant influenced attributes in the stroke function. This could get
tricky though and it's possible that it could backfire.
2013-03-07 12:11:38 +00:00
Campbell Barton
28b9abe3eb ruler/protractor for 3d viewport (apart of 3d printing features). work-in-progress.
- activate from spacebar search (3D Ruler) 
- ctrl-click adds new rulers
- clicking in the middle of a ruler, turns into protractor, dragging out of view snaps back to ruler.
2013-03-07 11:53:11 +00:00
Gaia Clary
172d624598 Collada fixed Collada ID name for exported animation curves 2013-03-07 10:26:04 +00:00
Campbell Barton
a816b0b3d2 avoid calling glGetFloatv() twice when UI_RB_ALPHA is enabled with uiRoundBox() 2013-03-07 06:46:50 +00:00
Campbell Barton
dfa8540cdf use bool for rna funcs. 2013-03-07 02:44:55 +00:00