Commit Graph

42454 Commits

Author SHA1 Message Date
Campbell Barton
50650e28ea Events: support for buttons 6 & 7 (some trackballs have these) X11 only
Patch by Marcus von Appen

Note: this patch makes ISMOUSE accept INBETWEEN_MOUSEMOVE as a mouse
event where before it didnt.
2014-01-12 00:40:23 +11:00
Campbell Barton
1a0c5eb83a Events: Use INBETWEEN_MOUSEMOVE for inactive windows too. 2014-01-12 00:30:16 +11:00
Bastien Montagne
8952f58375 Add tangent space computation/access from RNA (i.e. python).
This simply mimics code used for loopnormals, to enable py scripts to generate and access (temporary)
a tangent 3D vector and bitangent sign for each loop. Together with the split normals, this allow
to recreate a complete tangent space for normal mapping (bitangent = bitangent_sign * cross(normal, tangent)).

Expects all faces to be tri or quads.

Reviewed By: Brecht, campbellbarton

Differential Revision: https://developer.blender.org/D185
2014-01-11 11:51:19 +01:00
Campbell Barton
274b2590fb Image API: add frame argument to gl_load(), gl_touch()
patch D103 by Krantz Geoffroy
2014-01-11 21:25:20 +11:00
Campbell Barton
c2508b6e1b Fix T38150: correct fix this time
also use fixed size lists for list creation.
2014-01-11 21:03:21 +11:00
Brecht Van Lommel
9e1ca28589 Fix T38149: crash adding metaball with zero radius.
This incorrectly use abs(), that's for integers, not floats.
2014-01-10 20:53:39 +01:00
Brecht Van Lommel
bbab2ecd43 Fix clang warning for (harmless) use of uninitialized variable. 2014-01-10 19:43:31 +01:00
Lukas Tönne
10b5ad5bae Fix T38142: socket interface 'type' enums are not initialized. These are
not really needed anyway, but need to be adjusted to make use of the
socket value copy methods.
2014-01-10 16:53:20 +01:00
Campbell Barton
ee15db9db5 Fix T38150: BMLayerCollection.items/values docs switched 2014-01-10 22:18:34 +11:00
Lukas Tönne
cc35ad2b3d Fix for random crash in localized node group freeing while tweaking
group default values.

This can happen when using value sliders for node group input values.
The localized copies were setting the "interface_type" runtime pointer
of the original tree to NULL instead of the new tree (which is created
on-the-fly in general). This type is used in RNA update functions
however, the original tree DNA should not be modified there.
2014-01-10 09:37:42 +01:00
Bastien Montagne
18a1e17a20 OpenCollada: Fix error in printf-format (too much arguments). 2014-01-09 20:35:20 +01:00
Bastien Montagne
06d70c7798 Cleanup: mostly, prefer array syntax to pointer arithmetic (keep the later only where it really makes sense). 2014-01-09 20:35:20 +01:00
Bastien Montagne
08eaa8daac Fix T38135: Global start and end point of the curve was set to zero radius & weight, when using 'linked' option.
This was (more or less) OK with hand-drawn strokes, as the number of points made it nearly unoticable, but broke completely with line and poly strokes!

Did this when I implemented linked curve feature because it was easier! Now, convert code always adds a heading and trailing point to the curve,
to get initial/final zero radius. Adds even more complexity to those functions... :/
2014-01-09 20:35:20 +01:00
Bastien Montagne
f12d93919b Grease pencil 'convert to curve' code: some cleanup & refactor. 2014-01-09 20:35:19 +01:00
Bastien Montagne
f1c81a199a Cleanup: Remove tabs in empty lines, use bool when possible instead of int, and mark const values/parameters as such. 2014-01-09 20:35:19 +01:00
Sergey Sharybin
3d10343888 Code cleanup: remove WIP code came from the GSoC branch
DAG node tagging was rather an experiment to make derived render working.
However, it ended up in a whole can of worms and need to be re-considered.
It is likely that regular object update tagging and scene update routines
are to be used for this.

Meanwhile no need to keep extra field in dag node. Would save us the whole
byte of the struct which we can use for other purposes meanwhile.
2014-01-10 01:23:49 +06:00
Sergey Sharybin
492277b4a1 Fix own regression in font->curve conversion
Issue was introduced in a2bf25e and was caused by
do_makeDispListCurveTypes() no longer placing nurbs
to cu->nurb list.

Such an operation isn't thread-safe and proper solution
would require having granular update. For until them
just make object conversion take care of filling cu->nurb
in with splines from font.
2014-01-10 00:36:37 +06:00
Campbell Barton
1914d804cf Fix T38083: submenu arrow is overlayed by menu hotkey 2014-01-10 02:25:49 +11:00
Joshua Leung
0445454f1e Fix T38077: Scaling bones in EditMode drawn using envelope display mode scales joint radii instead
When trying to scale bones in EditMode and the bones were drawn using envelope display mode,
this resulted in the joint radii (i.e. the inner part of envelopes) being adjusted instead.
It turns out that this was due to an old hack that was put in place back in 2.4x (see the
tracker logs for full details of the problem here).

This commit introduces the following fixes:
1) Removed the old hack. Scaling (S) works normally now.
2) Ctrl-Alt-S (i.e. "Scale Envelopes/BBones") is as-is.
   That is, it is used to adjust the size falloff-region around a bone
   (i.e. the "dist" property)
3) Added Alt-S hotkey in EditMode for armatures for adjusting the radii of bones.
   This change just means that the "TFM_BONE_ENVELOPE" mode is now able to be
   accessed from the UI as a tool on its own right (instead of being accessible
   via the old undocumented hack). This tool adjusts the radii of the bone joints,
   which define the actual full-influence region of the envelopes.
2014-01-10 00:48:43 +13:00
Campbell Barton
da6bc87b57 Fix T38138: incorrect API docs 2014-01-09 21:49:11 +11:00
Sergey Sharybin
cc31722a41 Fix T38000: vertex parent crash due to threading issues
Issue is causes by vertex parent modifies original BMesh from
a multiple threads. Ideally this is to be done as a separate
update callback for mesh datablock, but it's not so much simple
now (would need to do some re-arranges to DAG which might conflict
with the work from Ali or will double amount of work we did).

So for now use simple solution with mutex lock.

Based on the patch from Campbell Barton with some fixes to make
changes really thread-safe.

Differential Revision: https://developer.blender.org/D168
2014-01-09 16:33:53 +06:00
Antony Riakiotakis
1ea5c2a8e3 Fix remaining sculpt mode crash using multires modifier, similar cause
to previous sculpt fix (OpenGL access from thread with no context
bound). The fact that this has gone unnoticed so far means that people
are dyntopoing like crazy these days.
2014-01-09 04:28:17 +02:00
Campbell Barton
e47a41e3fc Code Cleanup: style 2014-01-09 11:44:59 +11:00
Brecht Van Lommel
a0dbee6e93 Fix T38016: setting Object.matrix_world does not take bone parents into account. 2014-01-09 00:38:56 +01:00
Brecht Van Lommel
aad731d51c Code cleanup: remove BKE_object_where_is_calc_simul function.
It doesn't make any sense anymore with the current depsgraph and probably was
not useful for a long time, just a leftover from the pre 2.04 game engine.
2014-01-09 00:17:18 +01:00
Brecht Van Lommel
0d57724c64 Fix T38062: normal map baking gave randomly values 127 or 128 in flat areas.
Due to float precision issues it was basically random which of the two was used,
now it's slightly biased towards 128, which is the convention for flat colors.
The small difference between 127 and 128 could give problems with sharp glossy
shaders where it would be visible as seams.
2014-01-08 23:36:11 +01:00
Denis Declara
55f7a4aebc Fix T38104: mathutils.cell_vector() always returns (0,0,0)
Reviewed By: brecht
2014-01-08 23:03:09 +01:00
Brecht Van Lommel
b4644c658b Fix crash cancelling command line render to AVI movie file. 2014-01-08 22:28:29 +01:00
Brecht Van Lommel
7bcb34e59b Fix T38131: node link buttons (like for cycles in material properties) were not
giving correct colors with theme menu colors set to bright values.

Thanks to Denis Declara for finding the cause of this bug.
2014-01-08 20:41:38 +01:00
Brecht Van Lommel
61c9cacbd7 Fix T38074: sequence rendering gave "No camera" warning for other scenes that
didn't need a camera because they use only compositing nodes.
2014-01-08 18:29:16 +01:00
Thomas Beck
fa88c7ffae Fix T38105: Action Editor refresh is missing when a keyframe is inserted in 3D view
When yiz insert a keyframe (on a location keying set f.e.) in the 3D-view and you got an action editor open then the action datablock is  not changed (displaying only the button "new") until you hover the action editor with the mouse.

 Added a handler in the action_header_area_listener to handle this case

If non-obvious, some technical note about what the cause of the bug was and
how it was solved.
2014-01-08 17:57:33 +01:00
Brecht Van Lommel
09d6ad6142 Fix T38108: blender freeze in remembering operator properties. 2014-01-08 17:54:49 +01:00
Campbell Barton
cdeb3c3922 Fix for incorrect use of abs() in intersect_sphere_sphere_2d 2014-01-09 03:15:59 +11:00
Bastien Montagne
d5c9b509ec Fix issues with float precision in numinput, like 'R 123' who would show additional 'noise' digits.
Expose float precision helper in UI_interface.h API, so that numinput can use this helper as numbuttons already do.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D186
2014-01-08 17:05:05 +01:00
Campbell Barton
8305fd8841 Code Cleanup: style edits to bevel and remove unneeded boundvert_rep_face call 2014-01-09 00:50:32 +11:00
Howard Trickey
49aa701645 Add profile control parameter to Bevel.
Parameter controls concavity / convexity.
    <.25 means: concave inward
    .25 means: straight slanted
    >.25 means: concave outward
    .5 means: circular (the default)
    1 means: straight along original sides
For now, there is a hard lower limit of .15
because more work is needed to get decent
results in the range below that.

The profile is actually a superellipse, and the
parameter is 1/4 of the exponent in the implicit equation
for a superellipse, except at the extreme values of 0 and 1.
2014-01-08 07:40:01 -05:00
Campbell Barton
2dba2e72b7 Code Cleanup: de-duplicate text pasting which only used the first line 2014-01-08 17:39:12 +11:00
Campbell Barton
3fbd63c52e Text3d: improve error checking when pasting from files 2014-01-08 16:14:19 +11:00
Campbell Barton
4529fe9010 Fix for RE_engine_begin_result using a NULL pointer 2014-01-08 15:43:49 +11:00
Campbell Barton
8aaf4aaae8 Sequencer: prevent unknown scopes from crashing 2014-01-08 15:40:55 +11:00
Campbell Barton
b243b4fe40 Fix for inorrect use of BLI_utf8_invalid_strip, add assert to prevent it happening again. 2014-01-08 14:46:06 +11:00
Sergej Reich
3739f53a6e Fix T38112: Rigid Body can't be created for objects with linked mesh
Make poll function for rigid body add operators less strict.
2014-01-08 03:29:12 +01:00
Bastien Montagne
7647a2b751 Much better solution for negate/inverse in numinput.
Previous one was way over complicated, and did not worked with units!
2014-01-07 22:23:03 +01:00
Bastien Montagne
ab2bb94f6b Fix a small glitch with string generated by numinput, they could cut multi-bytes utf8 chars (like the '°' of angle values), now call BLI_utf8_invalid_strip() to prevent this. 2014-01-07 20:56:45 +01:00
Campbell Barton
d490e686f0 Fix T38100: laplacian smooth crash 2014-01-08 03:56:43 +11:00
Thomas Dinges
d2fd8c75b0 UI / Nodes: Revert Slider for "Value" node, this is no percentage nor a 0-1 range. 2014-01-07 16:35:52 +01:00
Lukas Tönne
e23bcbbb6d Fix for crash in anim render: The callbacks in bMovieHandle are expected
to exist and accessed without prior NULL checks (with exception of
get_next_frame and get_movie_path). The callbacks are not reliably
initialized however if none of the video formats is enabled (AVI being
the default). Added stub functions now that ensure access to
bMovieHandle callbacks is safe and doesn't crash.
2014-01-07 15:18:37 +01:00
Brecht Van Lommel
01df756bd1 Cycles Volume Render: scattering support.
This is done by adding a Volume Scatter node. In many cases you will want to
add together a Volume Absorption and Volume Scatter node with the same color
and density to get the expected results.

This should work with branched path tracing, mixing closures, overlapping
volumes, etc. However there's still various optimizations needed for sampling.
The main missing thing from the volume branch is the equiangular sampling for
homogeneous volumes.

The heterogeneous scattering code was arranged such that we can use a single
stratified random number for distance sampling, which gives less noise than
pseudo random numbers for each step. For volumes where the color is textured
there still seems to be something off, needs to be investigated.
2014-01-07 15:03:41 +01:00
Campbell Barton
b174e7b0b8 Fix for error in own recent commit 2014-01-08 00:57:58 +11:00
Bastien Montagne
e87095fa5d Cleanup: silence warnings. 2014-01-07 14:53:32 +01:00