blender-staging.git
6 years agoFix state losses for recursive outliner trees (e.g. datablocks editor)
Sv. Lockal [Fri, 23 Aug 2013 20:35:00 +0000 (20:35 +0000)]
Fix state losses for recursive outliner trees (e.g. datablocks editor)

In previous optimization in outliner I assumed that order in treehash was not important.
But testing outliner in datablocks mode revealed a problem: when user expands multiple recursive levels and then closes any element, it always closed the top level of recursion.
Now it should work fine with recursive trees.
Now treehash contains groups of elements indexed by (id,nr,type). Adding an element with the same (id,nr,type) results in appending it to existing group. No duplicates are possible in treehash.
This commit should also make lookups a little bit faster, because searching in small arrays by "used" is faster than searching in hashtable with duplicates by "id,nr,type,used".

6 years agoFix compile in Visual Studio 2008:
Andrea Weikert [Fri, 23 Aug 2013 18:02:23 +0000 (18:02 +0000)]
Fix compile in Visual Studio 2008:
* isfinite is not defined, in Blender code we use 'finite' instead

6 years agoUI layout: Fix the fact that children layouts were implicitely inconditionnaly aligne...
Bastien Montagne [Fri, 23 Aug 2013 16:53:37 +0000 (16:53 +0000)]
UI layout: Fix the fact that children layouts were implicitely inconditionnaly aligned when the parent was. E.g.in

col = layout.column(True)
row = col.row(False)

Items in row would be 'aligned' in the same group as those in col. Now to get this happening, you have to set row as aligned as well.

Please note that fixes for py UI scripts will follow in another commit.

Also fixed labels of RNA pointers searchboxes, which were missing the colon!

6 years agopatch to add backkbacks for game engine start/end,
Campbell Barton [Fri, 23 Aug 2013 15:45:18 +0000 (15:45 +0000)]
patch to add backkbacks for game engine start/end,
by sjoerd_de_vries

6 years agoFix for an obscure bpy_types bug: When attempting to define __setattr__ in a metaclas...
Lukas Toenne [Fri, 23 Aug 2013 15:39:25 +0000 (15:39 +0000)]
Fix for an obscure bpy_types bug: When attempting to define __setattr__ in a metaclass based on RNAMetaPropGroup, the base class' __setattr__ method can not be called, since python prohibits setattr on
builtin classes. This was done in Python 2.3 to prevent changes to the 'object' type definition and similar issues. As explained by Guido van Rossum in the following mail, the python check will look for
the *closest* base class, which fails for RNAMetaPropGroup because its first base is RNAMeta, which is in turn a subclass of 'type'.

http://code.activestate.com/lists/python-dev/34489/

The easiest and safest way to prevent this issue therefore seems to be
to swap the base class order for RNAMetaPropGroup, so that StructMetaPropGroup is the first base, which has a perfectly valid setattr implementation.

6 years agosimplify dist_to_plane_v3 and add dist_squared_to_plane_v3
Campbell Barton [Fri, 23 Aug 2013 15:19:20 +0000 (15:19 +0000)]
simplify dist_to_plane_v3 and add dist_squared_to_plane_v3

6 years agoFix [#36538] Discontinuity (Euler) Filter - never ends - (deadlock?)
Bastien Montagne [Fri, 23 Aug 2013 15:17:54 +0000 (15:17 +0000)]
Fix [#36538] Discontinuity (Euler) Filter - never ends - (deadlock?)

Code could enter in an infinite loop when curve value was an odd multiple of PI (i.e. 180°)...

Current code was also factorized and got rid of fabs calls! ;)

6 years agomath api edits - replace point-normal form for a plane with dist_to_plane_v3()
Campbell Barton [Fri, 23 Aug 2013 14:37:22 +0000 (14:37 +0000)]
math api edits - replace point-normal form for a plane with dist_to_plane_v3()
also correct python mathutils api, was missing vector checks.

6 years agoCycles: more code refactoring to rename things internally as well. Also change
Brecht Van Lommel [Fri, 23 Aug 2013 14:34:34 +0000 (14:34 +0000)]
Cycles: more code refactoring to rename things internally as well. Also change
property name back so we keep compatibility.

6 years agoCycles: change Progressive sampling option in UI to an enum of "Path Tracing"
Brecht Van Lommel [Fri, 23 Aug 2013 14:08:40 +0000 (14:08 +0000)]
Cycles: change Progressive sampling option in UI to an enum of "Path Tracing"
and "Branched Path Tracing", to try to make it more clear that this is not
related to progressive refinement, non-progressive was always a bad name anyway.

6 years agoFix clang compile warning.
Brecht Van Lommel [Fri, 23 Aug 2013 14:08:39 +0000 (14:08 +0000)]
Fix clang compile warning.

6 years agonew mesh bisect had a problem not selecting faces with fill option in face mode.
Campbell Barton [Fri, 23 Aug 2013 14:07:22 +0000 (14:07 +0000)]
new mesh bisect had a problem not selecting faces with fill option in face mode.

6 years agofix error in recently added symmetrize rewrite, verts already on the aligned to the...
Campbell Barton [Fri, 23 Aug 2013 13:27:44 +0000 (13:27 +0000)]
fix error in recently added symmetrize rewrite, verts already on the aligned to the mirror-plane would not be welded.

6 years agofix leak in BM_face_split() with multires if the split failed.
Campbell Barton [Fri, 23 Aug 2013 13:00:43 +0000 (13:00 +0000)]
fix leak in BM_face_split() with multires if the split failed.
also remove redundant normal copy.

only triangulate the mesh if its needed when enabling dyntopo.

6 years agoCode cleanup / Cycles:
Thomas Dinges [Fri, 23 Aug 2013 12:19:35 +0000 (12:19 +0000)]
Code cleanup / Cycles:
* Some style tweaks for hair code.

6 years agonew mesh bisect tool, available in the mesh menu.
Campbell Barton [Fri, 23 Aug 2013 11:46:08 +0000 (11:46 +0000)]
new mesh bisect tool, available in the mesh menu.
cuts the mesh in half based on the cursor location and the viewport,
optionally supports filling the cut area (with uvs. vcols, etc),
and removing geometry on either side of the cut.

6 years agoCycles / Sampling UI:
Thomas Dinges [Fri, 23 Aug 2013 11:39:48 +0000 (11:39 +0000)]
Cycles / Sampling UI:
* Do not show Total Samples print for Progressive, when Square Samples are disabled. In this case it's obvious even without the print. :)

6 years agocorrect error in recent commit triangle-fill-dissolve, need to check if the edges...
Campbell Barton [Fri, 23 Aug 2013 11:28:33 +0000 (11:28 +0000)]
correct error in recent commit triangle-fill-dissolve, need to check if the edges face is removed (happens in rare cases).

6 years ago* Compile fix for r59395, 'move bmesh tools into their own include'.
Thomas Dinges [Fri, 23 Aug 2013 11:16:52 +0000 (11:16 +0000)]
* Compile fix for r59395, 'move bmesh tools into their own include'.

6 years ago_another_ fix for recently added bisect operator, looping over mixed geometry could...
Campbell Barton [Fri, 23 Aug 2013 11:11:59 +0000 (11:11 +0000)]
_another_ fix for recently added bisect operator, looping over mixed geometry could read freed memory when vertices were removed.

6 years agoadd dissolve option to triangle fill operator, running dissolve after scanfill isn...
Campbell Barton [Fri, 23 Aug 2013 11:10:46 +0000 (11:10 +0000)]
add dissolve option to triangle fill operator, running dissolve after scanfill isn't so simple because of errors if one edge can't merge.

6 years agofix for error in recetly added bisect operator, in rare cases it could attempt to...
Campbell Barton [Fri, 23 Aug 2013 10:19:58 +0000 (10:19 +0000)]
fix for error in recetly added bisect operator, in rare cases it could attempt to remove vertices twice.

6 years agooptiona for bmesh triangle fill operator to take a normal argument
Campbell Barton [Fri, 23 Aug 2013 10:12:09 +0000 (10:12 +0000)]
optiona for bmesh triangle fill operator to take a normal argument

6 years agoset function args in BLI_math_rotation as const where possible.
Campbell Barton [Fri, 23 Aug 2013 09:46:11 +0000 (09:46 +0000)]
set function args in BLI_math_rotation as const where possible.

6 years agoTracking cleanup
Sergey Sharybin [Fri, 23 Aug 2013 09:40:42 +0000 (09:40 +0000)]
Tracking cleanup

- Collapse plane track panels by default
- Hide 3D markers when in mask edit mode
- Remove alpha from mask layers list

Discussed with Sebastian and Roman.

6 years agoTracking Python API improvements
Sergey Sharybin [Fri, 23 Aug 2013 09:10:23 +0000 (09:10 +0000)]
Tracking Python API improvements

- Solved issue with changing marker's frame number
  for tracks which doesn't belong to camera object.

- Support find_frame, insert_frame and delete_frame
  functions for plane markers.

6 years agoFix #36535: Color difference when saving image
Sergey Sharybin [Fri, 23 Aug 2013 08:27:01 +0000 (08:27 +0000)]
Fix #36535: Color difference when saving image

Issue was caused by precision loss in alpha under code.
Now it might be slower a bit, but it's as precise as it
could be. At least i hope so :)

6 years agoedits to new symmetrize tool
Campbell Barton [Fri, 23 Aug 2013 05:32:43 +0000 (05:32 +0000)]
edits to new symmetrize tool
- snap axis-aligned verts to the center.
- expose the threshold for detecting if a vertex is on the axis.

6 years agomodify closest_to_plane_v3 not to use point-normal form.
Campbell Barton [Fri, 23 Aug 2013 05:15:12 +0000 (05:15 +0000)]
modify closest_to_plane_v3 not to use point-normal form.

6 years agomove bmesh tools into their own include,
Campbell Barton [Fri, 23 Aug 2013 04:22:07 +0000 (04:22 +0000)]
move bmesh tools into their own include,
changes to tool args would rebuild far too many files and these are mainly by modifiers outside of bmesh.

6 years agostyle cleanup: pep8
Campbell Barton [Fri, 23 Aug 2013 04:04:46 +0000 (04:04 +0000)]
style cleanup: pep8

6 years agoCycles / Sampling UI:
Thomas Dinges [Thu, 22 Aug 2013 19:57:56 +0000 (19:57 +0000)]
Cycles / Sampling UI:
* Add a "Total Samples" info at the bottom of the panel.
This makes understanding the Non-Progressive integrator easier, as it displays how many samples are used for the different ray types.

* Rename Squared Samples to Square samples, to indicate that the action is not already done. The new Total Samples info should make this easier to understand now as well. Also added back for Progressive integrator, for consistency.

Screenshot:
http://www.pasteall.org/pic/show.php?id=57980

6 years agocorrect own error in r59365, reported as [#36536] Extrusion detaches faces
Campbell Barton [Thu, 22 Aug 2013 18:52:34 +0000 (18:52 +0000)]
correct own error in r59365, reported as [#36536] Extrusion detaches faces

6 years agoreplace symmetrize code with calls to bmesh operators.
Campbell Barton [Thu, 22 Aug 2013 18:02:36 +0000 (18:02 +0000)]
replace symmetrize code with calls to bmesh operators.
calls: bisect, duplicate, scale, flip, weld.

resolves report [#36475] Symmetrise does not keep uv/weight

also fixes issues with faces that cross the axis more then once.

6 years agonew bmesh operator bisect_plane, cuts a mesh in half, takes a user defined plane...
Campbell Barton [Thu, 22 Aug 2013 17:56:08 +0000 (17:56 +0000)]
new bmesh operator bisect_plane, cuts a mesh in half, takes a user defined plane as an argument, handles concave ngons which need multiple cuts.

6 years agobmesh duplicate operator: add vertmap output slot.
Campbell Barton [Thu, 22 Aug 2013 17:32:41 +0000 (17:32 +0000)]
bmesh duplicate operator: add vertmap output slot.

6 years agoadd utility functions for dealing with planes
Campbell Barton [Thu, 22 Aug 2013 15:30:24 +0000 (15:30 +0000)]
add utility functions for dealing with planes
- plane_point_side_v3(), a bit like line_point_side_v2()
- isect_point_planes_v3(), moved from paint_hide.c

functions to convert between point/normal pairs.
- plane_from_point_normal_v3()
- plane_to_point_normal_v3()

6 years agoAutomatically re-generate png icon files from svg ones (CMake only for now)... Expect...
Bastien Montagne [Thu, 22 Aug 2013 13:51:00 +0000 (13:51 +0000)]
Automatically re-generate png icon files from svg ones (CMake only for now)... Expects Inkscape program.

6 years agoHad not been updated after last edit to prvicons.svg file (r53004)...
Bastien Montagne [Thu, 22 Aug 2013 13:48:22 +0000 (13:48 +0000)]
Had not been updated after last edit to prvicons.svg file (r53004)...

6 years agoFix [#36534] Errors in install_deps.sh script when running on Arch Linux
Bastien Montagne [Thu, 22 Aug 2013 06:05:40 +0000 (06:05 +0000)]
Fix [#36534] Errors in install_deps.sh script when running on Arch Linux

Patch provided by Darren Beck, thanks!

6 years agominor internal change: isect_point_poly_v2 was assigning a value past the array bounds,
Campbell Barton [Wed, 21 Aug 2013 23:33:50 +0000 (23:33 +0000)]
minor internal change: isect_point_poly_v2 was assigning a value past the array bounds,
not that bad since it wasn't read but this isnt good practice and its simple to avoid.

6 years agostyle cleanup: pep8, also use float literals when comparing floats and pass tuples...
Campbell Barton [Wed, 21 Aug 2013 23:19:01 +0000 (23:19 +0000)]
style cleanup: pep8, also use float literals when comparing floats and pass tuples to mathutils.Vector() rather then list.

6 years agoFix [#36530] Texture tab refreshing problem
Bastien Montagne [Wed, 21 Aug 2013 21:35:45 +0000 (21:35 +0000)]
Fix [#36530] Texture tab refreshing problem

That was not really a bug (code working as expected), but the way tex context was handled was a bit raw, now it is much smarter:
* Default fallback context (when current one is no more valid) will now choose "most specific" ones first (i.e. material/lamp/particules before world and "others").
* When using that default fallback context, previous one is stored and we try to revive it later, if possible. Thus e.g. object[mat tex ctxt] -> empty[default world ctxt] -> object[mat tex ctxt] is now working as expected.
* However, when user explicitely or implicitely (through e.g. going to Material context...) sets a tex context, previous one is not stored, so that only default fallback context switch may later automatically revive a previous (presumably user-set) context.

6 years agoTemporary fix for gaps in strokes when objects are behind the lines.
Tamito Kajiyama [Wed, 21 Aug 2013 21:20:51 +0000 (21:20 +0000)]
Temporary fix for gaps in strokes when objects are behind the lines.
Problem report by Light BWK through personal communications, thanks a lot!

Apparently there is something wrong in the way how edges are chained to
create strokes.  For some unknown reason, strokes may contain a very small
line segment that proceeds in the opposite direction (e.g., downward
even when adjacent stroke segments proceed upward), resulting in the
reported visual artefact.

This revision is intended to address the reported issue in most cases.
The present solution is not a proper fix of the issue.  Another code
update with better understanding of the real cause is due in the future
work.

6 years agoset nonnull args for BLI_qsort_r
Campbell Barton [Wed, 21 Aug 2013 20:45:51 +0000 (20:45 +0000)]
set nonnull args for BLI_qsort_r

6 years agoghash/edgehash flag wasn't being initialized for new hashes. also init vars in same...
Campbell Barton [Wed, 21 Aug 2013 20:21:42 +0000 (20:21 +0000)]
ghash/edgehash flag wasn't being initialized for new hashes. also init vars in same order for ghash/edgehash.

6 years agorename recently added BLI_ghash_assign() -> BLI_ghash_reinsert()
Campbell Barton [Wed, 21 Aug 2013 16:06:03 +0000 (16:06 +0000)]
rename recently added BLI_ghash_assign() -> BLI_ghash_reinsert()

6 years agofix for bad mistake in recently added BM_face_create_verts functiofix for bad mistake...
Campbell Barton [Wed, 21 Aug 2013 16:00:53 +0000 (16:00 +0000)]
fix for bad mistake in recently added BM_face_create_verts functiofix for bad mistake in recently added BM_face_create_verts functionn

6 years agoScultping: Growing the pbvh node container should use malloc instead of
Antony Riakiotakis [Wed, 21 Aug 2013 15:21:56 +0000 (15:21 +0000)]
Scultping: Growing the pbvh node container should use malloc instead of
calloc. Since we copy the first 1/1.3 part of the new array from the
existing nodes, only the rest 0.3/1.3 should be initialized to zero.
This should in theory cut down the times of occasional hangs with
dyntopo, since my guess is that it is caused by dynamic reallocations.
Maybe a linked list structure would help here? This is a bigger change
though, leaving as is for now.

Also, minor cleanup, delete duplicate ghash deletion and remove unneeded
commented code.

6 years agocode cleanup: bmesh duplicate functions
Campbell Barton [Wed, 21 Aug 2013 14:35:51 +0000 (14:35 +0000)]
code cleanup: bmesh duplicate functions
- avoid using an iterator when stepping around an edges radial loop.
- use naming constant with the rest of the bmesh operators.

6 years agoCopying of nurbs shall happen after converting font to curves
Sergey Sharybin [Wed, 21 Aug 2013 13:13:48 +0000 (13:13 +0000)]
Copying of nurbs shall happen after converting font to curves

Otherwise changing font settings wouldn't apply instantly.

6 years agoFix #36453: scaling faces with individual origins would permanently turn of
Brecht Van Lommel [Wed, 21 Aug 2013 12:20:40 +0000 (12:20 +0000)]
Fix #36453: scaling faces with individual origins would permanently turn of
proportional editing because this combination doesn't work, but it should
be only temporary.

6 years agoFix #36526: SSS + hair crash after recent changes.
Brecht Van Lommel [Wed, 21 Aug 2013 12:20:38 +0000 (12:20 +0000)]
Fix #36526: SSS + hair crash after recent changes.

6 years agoFix #36499: proportional edit circle was drawing behind objects in some cases,
Brecht Van Lommel [Wed, 21 Aug 2013 12:20:31 +0000 (12:20 +0000)]
Fix #36499: proportional edit circle was drawing behind objects in some cases,
now it always draws in front to ensure the circle is visible.

6 years agomesh duplication was doing a loop & hash lookup for every loop corner, when there...
Campbell Barton [Wed, 21 Aug 2013 11:27:18 +0000 (11:27 +0000)]
mesh duplication was doing a loop & hash lookup for every loop corner, when there is no need since the faces are aligned.
was also initializing and stepping an iterator for no reason.

6 years agocorrect error in recent commit (face customdata)
Campbell Barton [Wed, 21 Aug 2013 11:09:50 +0000 (11:09 +0000)]
correct error in recent commit (face customdata)

6 years agoClear cyclic flag if we didn't copy the whole mask spline
Sergey Sharybin [Wed, 21 Aug 2013 10:17:55 +0000 (10:17 +0000)]
Clear cyclic flag if we didn't copy the whole mask spline

6 years agoDuplicate operator for masks
Sergey Sharybin [Wed, 21 Aug 2013 10:12:42 +0000 (10:12 +0000)]
Duplicate operator for masks

Topic says it all :)

Jut implemented operator to duplicate mask points
and segments between them (exactly the same behavior
as Curve object duplication in edit mode).

Does not copy animation, but that's tricky and likely
not needed anyway.

6 years agoNeed to set new curve's disp to NULL when duplicating.
Sergey Sharybin [Wed, 21 Aug 2013 09:43:22 +0000 (09:43 +0000)]
Need to set new curve's disp to NULL when duplicating.

6 years agobmesh api cleanup, face creation args now accept an example face (as with vertex...
Campbell Barton [Wed, 21 Aug 2013 07:51:47 +0000 (07:51 +0000)]
bmesh api cleanup, face creation args now accept an example face (as with vertex and edge),
also replace BM_face_create_quad_tri_v with BM_face_create_verts

6 years agoPartial revert of recenr cu->disp merge commit
Sergey Sharybin [Wed, 21 Aug 2013 07:40:19 +0000 (07:40 +0000)]
Partial revert of recenr cu->disp merge commit

That ended up in tricky code trying to mimic depsgraph
branch behavior API-wise preserving texspace and bound
box calculation compatible with previous releases.

So for now bring cu->disp back to the trunk but keep
texpsace and boundbox APIs the same as in the branch.

This keeps texpsapce and boundbox behavior fully compatible
with previous releases and still makes API the same as
for meshes.

6 years agouse BM_CREATE_NOP arg rather then zero, with pointer and bool args in either side...
Campbell Barton [Wed, 21 Aug 2013 05:39:46 +0000 (05:39 +0000)]
use BM_CREATE_NOP arg rather then zero, with pointer and bool args in either side in some cases it gets a bit confusing.
also correct edge-rotate where bool->flag conversion worked by accident.

6 years agobmesh api:
Campbell Barton [Wed, 21 Aug 2013 05:20:57 +0000 (05:20 +0000)]
bmesh api:
- use heap for BM_face_create_ngon_vcloud allocations.
- replace BM_face_create_ngon_verts with more efficient BM_face_create_verts

6 years agofix own regression [#36443] Vertex to UV index doesn't match with 2.68a
Campbell Barton [Wed, 21 Aug 2013 05:11:11 +0000 (05:11 +0000)]
fix own  regression [#36443] Vertex to UV index doesn't match with 2.68a

add BM_face_create_verts wrapper for BM_face_create which creates its own edge array.

6 years agocorrect NULL pointer dereference with recent displist changes.
Campbell Barton [Wed, 21 Aug 2013 02:30:19 +0000 (02:30 +0000)]
correct NULL pointer dereference with recent displist changes.

6 years agostyle cleanup: also use ARRAY_HAS_ITEM macro for mempool check
Campbell Barton [Wed, 21 Aug 2013 02:29:13 +0000 (02:29 +0000)]
style cleanup: also use ARRAY_HAS_ITEM macro for mempool check

6 years agoImage Editor: implement FKey to call 'View All' with 'fit_view'
Dalai Felinto [Tue, 20 Aug 2013 23:40:46 +0000 (23:40 +0000)]
Image Editor: implement FKey to call 'View All' with 'fit_view'
This mimics the behaviour we have in the Clip Editor.

I personally would prefer if we had no border once in fullscreen
(current border is 5 pixels).

I will consult Sergey Sharybin first to see if we can change that in the clip editor as well (though there I
believe the border is useful - the bottom of the editor is used to indicate 'tracked' frames.

6 years agobugfix: fit_view property was saved in CLIP_OT_view_all operator
Dalai Felinto [Tue, 20 Aug 2013 23:23:17 +0000 (23:23 +0000)]
bugfix: fit_view property was saved in CLIP_OT_view_all operator
before that if you pressed 'F', fit_view would be True every time (e.g.,
even if you pressed 'HOME' which is supposed to call the operator
without the fit_view).

I'm not sure why we need a fullscreen without 'fit_view' but anyways,
that's a different issue.

6 years agoFix [#36351] Changing the Frame Rate value doesnt adjust audio strip length.
Bastien Montagne [Tue, 20 Aug 2013 19:50:31 +0000 (19:50 +0000)]
Fix [#36351] Changing the Frame Rate value doesnt adjust audio strip length.

Simply recalc sequence len for audio (and meta!) strips when modifying fps value. Note start, startofs and endofs are also updated, to try to keep final pos and length as consistent as possible.

6 years agofix [#36347] Blender crashes when clicking on 'render' in 'viewport shading'
Campbell Barton [Tue, 20 Aug 2013 18:55:41 +0000 (18:55 +0000)]
fix [#36347] Blender crashes when clicking on 'render' in 'viewport shading'

6 years agoFix compiler warning due to undefined BVH_FUNCTION_FEATURES with patch by Campbell,
Brecht Van Lommel [Tue, 20 Aug 2013 18:25:59 +0000 (18:25 +0000)]
Fix compiler warning due to undefined BVH_FUNCTION_FEATURES with patch by Campbell,
and a coverity warning about use of uninitialized variables with OSL.

6 years agoinset depth wasn't working right with relative offset, also make it work for inset...
Campbell Barton [Tue, 20 Aug 2013 17:38:29 +0000 (17:38 +0000)]
inset depth wasn't working right with relative offset, also make it work for inset individual.

6 years agofix [#36352] Inset individual, uncheck "select outer" selects zero faces
Campbell Barton [Tue, 20 Aug 2013 16:59:04 +0000 (16:59 +0000)]
fix [#36352] Inset individual, uncheck "select outer" selects zero faces

rewrite individual inset not to remove and re-create faces, makes re-selection simpler.

6 years agoadd BLI_memarena_clear function to reset a memarena, keeping the last allocated block...
Campbell Barton [Tue, 20 Aug 2013 16:56:46 +0000 (16:56 +0000)]
add BLI_memarena_clear function to reset a memarena, keeping the last allocated block for more efficient reuse.

6 years agoquiet error installing an addon when the directory already exists (would happen on...
Campbell Barton [Tue, 20 Aug 2013 14:43:01 +0000 (14:43 +0000)]
quiet error installing an addon when the directory already exists (would happen on OSX frequently),
the addon would install but error was misleading.

6 years agopatch [#36503] BGE Python - Radar and Ray sensor wrong AXIS constants wrong defined
Campbell Barton [Tue, 20 Aug 2013 13:13:30 +0000 (13:13 +0000)]
patch [#36503] BGE Python - Radar and Ray sensor wrong AXIS constants wrong defined
from Jorge Bernal (lordloki)

6 years agodisable material index clamping, fbx importer doesn't know the total number of materi...
Campbell Barton [Tue, 20 Aug 2013 12:48:44 +0000 (12:48 +0000)]
disable material index clamping, fbx importer doesn't know the total number of materials when meshes are loading,
also, its possible to have values outside this range by removing materials (though not from the UI)

6 years agoCode cleanup / Cycles:
Thomas Dinges [Tue, 20 Aug 2013 11:22:26 +0000 (11:22 +0000)]
Code cleanup / Cycles:
* Remove unused hair presets enum.

6 years agofix/workaround [#36519] Origin to Center of Mass" failes when faces have an area...
Campbell Barton [Tue, 20 Aug 2013 09:42:18 +0000 (09:42 +0000)]
fix/workaround [#36519] Origin to Center of Mass" failes when faces have an area of zero

6 years agoadd is_finite_v# functions, use bool's
Campbell Barton [Tue, 20 Aug 2013 09:34:52 +0000 (09:34 +0000)]
add is_finite_v# functions, use bool's

6 years agofix incorrect docs [#36518] Vector.rotate() does not return value as documented
Campbell Barton [Tue, 20 Aug 2013 08:41:34 +0000 (08:41 +0000)]
fix incorrect docs [#36518] Vector.rotate() does not return value as documented

6 years agoGet rid of PATH_MAX in Ghost System X11
Sergey Sharybin [Tue, 20 Aug 2013 08:33:04 +0000 (08:33 +0000)]
Get rid of PATH_MAX in Ghost System X11

The reason of this is because PATH_MAX is not guaranteed
to be defined on all platforms and Hurd doesn't define it.

So either we need to support arbitrary long file path or
we need to define own maximum path length.

The rule here would be:

- If it's not big trouble to support arbitrary long paths
  (i.e. in ghost by using std::string instead of char*)
  then arbitrary long path shall be implemented.

- For other cases to use PATH_MAX please include BLI_fileops.h
  which takes care of making sure PATH_MAX is defined.

Additional change: get rid of own changes made yesterday
which were supposed to make storage.c work fine in cases
PATH_MAX is not define, but on the second though it lead
to unneeded complication of the code.

Thanks Campbell for review!

6 years agofix [#36517] You can edit a texture space (Shift-T) of a linked mesh
Campbell Barton [Tue, 20 Aug 2013 06:04:46 +0000 (06:04 +0000)]
fix [#36517] You can edit a texture space (Shift-T) of a linked mesh

also enable other errors to show up which were previously commented.

6 years agoFix GPencil part of [#36101] BSurface Throw an Error When Press "Add Surface"
Bastien Montagne [Mon, 19 Aug 2013 22:46:32 +0000 (22:46 +0000)]
Fix GPencil part of [#36101] BSurface Throw an Error When Press "Add Surface"

gpencil_data_get_active and gpencil_data_get_active_v3d did not have consistent behavior when we had an active object, but not on any visible layer (the first would return the default scene gpd in this case, while the first was still returning active object's one). Now they both return scene's one.

6 years agoFix crash caused by own commit to optimize out curvemapping
Antony Riakiotakis [Mon, 19 Aug 2013 19:41:38 +0000 (19:41 +0000)]
Fix crash caused by own commit to optimize out curvemapping
initialization. In sculpt mode, when using shift-click to switch to the
smooth brush it was possible to ommit initialization of curvemapping for
that brush.

6 years agoMinor optimization for paint systems, initialize the paint curve before
Antony Riakiotakis [Mon, 19 Aug 2013 19:04:39 +0000 (19:04 +0000)]
Minor optimization for paint systems, initialize the paint curve before
the stroke and skip checking for initialization each time we request the
curve value.

6 years agoUsual UI messages fixes...
Bastien Montagne [Mon, 19 Aug 2013 18:37:00 +0000 (18:37 +0000)]
Usual UI messages fixes...

6 years agoFix [#36438] Adding Metaball when unit scale is smaller than 0.01 seemingly hangs...
Bastien Montagne [Mon, 19 Aug 2013 17:58:28 +0000 (17:58 +0000)]
Fix [#36438] Adding Metaball when unit scale is smaller than 0.01 seemingly hangs Blender

Wiresize and rendersize were not handled regarding scene scale, leading to insane precision when working in cm or less...

6 years agoDyntopo:
Antony Riakiotakis [Mon, 19 Aug 2013 17:37:21 +0000 (17:37 +0000)]
Dyntopo:

* Actually check if normal recalculation flags exists and set it when
splitting nodes in dyntopo. Right now, nodes that need GPU buffer update
will always get in the list to get their normals generated, but to avoid
a possible future breakage better do it right now.
* Avoid keeping deleted/removed vertices in vertex-to-node and unique
vertex hashes, since some checks rely on those and may go awry if these
still exist. Also they pollute the hashes, and may hurt performance
somewhat.

6 years agoFix build with GE and WITH_CXX_GUARDEDALLOC enabled…
Bastien Montagne [Mon, 19 Aug 2013 15:02:28 +0000 (15:02 +0000)]
Fix build with GE and WITH_CXX_GUARDEDALLOC enabled…

6 years agocode cleanup: confirm include guards to our convention
Campbell Barton [Mon, 19 Aug 2013 14:40:16 +0000 (14:40 +0000)]
code cleanup: confirm include guards to our convention

6 years agoFix crash happening due to missing ob->curve_cache
Sergey Sharybin [Mon, 19 Aug 2013 14:22:02 +0000 (14:22 +0000)]
Fix crash happening due to missing ob->curve_cache

It's a bit dumb to store render-time bevel list in
object's curve_cache, but that's how blender already
used to work for ages.

Proper fix is suspended for tomorrow :)

6 years agoDyntopo:
Antony Riakiotakis [Mon, 19 Aug 2013 14:08:59 +0000 (14:08 +0000)]
Dyntopo:

Turn off pbvh normal update flag after recalculation, saves
recalculating normals every frame when not stroking the mesh.

For this to work reliably with undo we need to support original normals
in the bm_log (was marked as a TODO already in the code), so that
undoing avoids having invalid normals in the mesh (since we don't update
every frame anymore). This was added in this commit as well.

Also added some (disabled) quite paranoid checks in the bmesh valication
code for dyntopo hoping to catch the real normal update issue. No luck
there yet.

6 years agoApparently sizeof(unsigned) is 4 bytes on both 32 and 64 bit platforms
Sergey Sharybin [Mon, 19 Aug 2013 14:03:44 +0000 (14:03 +0000)]
Apparently sizeof(unsigned) is 4 bytes on both 32 and 64 bit platforms

For now assume sizeof(int) == 4 for all supported platforms, could be
changed in the future.

Added an assert to functions which depends on this this, so we'll
easily notice bad things happening.

6 years agoFix [#36454] 'Tiles' settings in Render/Performance panel don't respect keyframes
Bastien Montagne [Mon, 19 Aug 2013 13:30:17 +0000 (13:30 +0000)]
Fix [#36454] 'Tiles' settings in Render/Performance panel don't respect keyframes

These are not animatable! Note this is the case of most (all?) render settings, maybe we should go over both Cycles and internal ones, there are still quite a bunch of them that are marked as animatable... :/

6 years agoMistake in revious PATH_MAX commit, sorry!
Sergey Sharybin [Mon, 19 Aug 2013 12:04:00 +0000 (12:04 +0000)]
Mistake in revious PATH_MAX commit, sorry!

6 years agoAttempt to fix compilation error of sort.c
Sergey Sharybin [Mon, 19 Aug 2013 11:50:33 +0000 (11:50 +0000)]
Attempt to fix compilation error of sort.c

6 years agoFix compilation error on platforms where PATH_MAX is not defined
Sergey Sharybin [Mon, 19 Aug 2013 11:49:10 +0000 (11:49 +0000)]
Fix compilation error on platforms where PATH_MAX is not defined

6 years agoCode cleanup: use bool instead of BOOL/int
Sergey Sharybin [Mon, 19 Aug 2013 11:37:42 +0000 (11:37 +0000)]
Code cleanup: use bool instead of BOOL/int

6 years agoFix read past end of array when drawing tracking markers keyframes
Sergey Sharybin [Mon, 19 Aug 2013 11:36:29 +0000 (11:36 +0000)]
Fix read past end of array when drawing tracking markers keyframes

Was introduced by plane track merge.