Commit Graph

47594 Commits

Author SHA1 Message Date
Tamito Kajiyama
7ae0c936fa Fix for a crash in curvature calculation due to a WVertex with no associated edges.
(TODO: identify the reason why such a strange WVertex is generated.)
Problem report by Vicente Carro with a .blend for reproducing the issue.  Thanks a lot!
2013-01-26 18:53:16 +00:00
Sergej Reich
c84383301c Fix [#34005] blender will close immediately in debug mode on deleting objects
Was silly mistake from rigidbody merge, base was used after it's been
freed.

Now don't free base in BKE_scene_base_remove() and rename it to
BKE_scene_base_unlink().
2013-01-26 17:38:45 +00:00
Nicholas Bishop
7e49a39acd Check for deletion before moving vert in dyntopo collapse edge
Fixes [#33964] Dyntopo crash with edge collapse + undo
projects.blender.org/tracker/?func=detail&aid=33964&group_id=9&atid=498
2013-01-26 17:19:21 +00:00
Sergej Reich
4245a107cf Revert r54058, caused crash when adding paritcles in particle edit mode
MEM_recallocN() doesn't allocate memory when used on a null pointer.

Just revert commit since there is no real benefit to using
MEM_recallocN() in this case.
2013-01-26 12:30:44 +00:00
Joshua Leung
44060daacf Porting over hotkeys for adding rigidbody objects (from original branch)
* Ctrl-R          = Add Active
* Ctrl-Shift-R = Add Passive
* Ctrl-Alt-R    = Remove
2013-01-26 05:34:06 +00:00
Joshua Leung
4f565d48fb Motion Path calculations for objects now takes rigidbodies sim effects into
account
2013-01-26 05:28:58 +00:00
Dalai Felinto
27eeb89bd9 real fix for Logic Bricks UI smart controller (#33746)
previous commit (54102) actually reintroduces an old bug where Blender sigfaults when
the sensor and controllers are not from the active object.

The real fix for report #33746 is to clear the "object" property after the operator ran.
I'm not sure why when I call the operator from command line the property is cleared, but not
when I called it from C. Either way all should be working now.
2013-01-26 03:30:21 +00:00
Dalai Felinto
a8644deeef bugfix for 33746 Unable to add Controller to objects correctly
(live from the global game jam Vancouver ;)
2013-01-26 02:46:07 +00:00
Bastien Montagne
f2a1a795cf Fix [#33997] Units Scale in Metric mode displays wrong face area.
Also now display nice "area" units (maybe using "length" units was a perf matter, but anyway, you can't have more than a few tens of values displayed at a time, after that they become unreadable). Easy to undo anyway if we really want to keep ugly "10m" as area display!
2013-01-25 21:21:38 +00:00
Ton Roosendaal
cb19149762 Small tweak: Allow DPI for UI to go up 144, exactly double size of 72.
That makes all default icons draw in full unfiltered 32x32 pixel glory!
2013-01-25 15:44:22 +00:00
Brecht Van Lommel
08bc601aa5 Fix warnings about undefined _POSIX_C_SOURCE with gcc 4.2 on Mac. 2013-01-25 13:51:49 +00:00
Ton Roosendaal
13a4ad1a62 Bugfix #33989
Transparent region drawing and blend broke by commit 53919 5 days ago.
This commit reverts the change.

The claim in previous commit "edited code for readability" is quite
disputable :) The error is hard to notice even.

I also like to emphasize that people should check with owners for code
before committing changes! Cleaning code is first a job for maintainers.
2013-01-25 10:17:06 +00:00
Monique Dewanchand
d4e5dc00f2 Increasing dilate erode number of steps. 2013-01-25 09:57:17 +00:00
Monique Dewanchand
5d385b9a9a committed patch [#33972] dilate/erode optimization
this patch optimizes the dilate/erode step method (hopefully without any functional change),
making its speed not depend on the distance anymore.

Couldn't detect funtional changes so committing. Haven't tested for speed gain.

 * credits to erwin94 David M
2013-01-25 09:47:28 +00:00
Tamito Kajiyama
7f721d06aa Fix for no copy constructor in the Python wrapper of StrokeAttribute. 2013-01-25 07:31:29 +00:00
Sergej Reich
204ec89bff rigidbody: Improve add/remove operators
Now all add/remove operators for rigid body objects and constraints
automatically add objects to the appropriate groups and create groups if they
don't exist yet.

This makes handling rigid bodies easier but doesn't take away functionality.
If users want to handle groups manually they just need to create them before
adding any objects.

The previous behaviour was confusing and was even considered to be a bug since
clicking on rigid body in the physics tab seemed to do nothing.
2013-01-25 06:26:38 +00:00
Sergej Reich
5c8a978d1f scons: Add missing WITH_BULLET define
Fixes [#33980] Ridid Body crashes when changing Collision shape with playback
as well as several other rigid body bugs wtih scons.
2013-01-25 05:02:36 +00:00
Campbell Barton
c411cde415 header cleanup, include BLI before BKE, also use bool for ntreeShaderExecTree 2013-01-24 21:57:13 +00:00
Sv. Lockal
7539009d5b Do not redefine math functions for floats if compiler complies with C99 or POSIX.1-2001
This is useful for gcc which does not define sqrtf/powf/... functions with preprocessor and therefore always used sqrt/pow/...
Float functions are generally 20-50% faster than their equivalents for double type.
2013-01-24 20:54:12 +00:00
Ton Roosendaal
ca7b277c12 Disabled commit that was rendering Blender Internal for Cycles nodes.
Apparently Material nodes allow a mix of Cycles and BI Materials. Nifty!
I should read more docs, like this cool tutorial:
http://urchn.org/post/combining-blender-internal-and-cycles-in-one-render
2013-01-24 19:31:44 +00:00
Ton Roosendaal
a97757c156 Logic mistake in previous commit, broke node materials for Internal render.
Stupid!
2013-01-24 18:56:04 +00:00
Sergey Sharybin
da4028d4a8 Fix #33953: blender crash after few steps with .exr image in compositor
Issue was caused by FILE multilayer ImBuf sharing buffers with render
result, and SEQUENCE multilayer ImBufs duplicating buffers. Which is
nice by it's own. But, changing image source wouldn't remove any loaded
image buffers, meaning if you've got loaded FILE multilayers they'll
likely became invalid.

That behavior of handling multilayers on changing source was done as
a fix for #24976, which is now actually not needed (removing check
for multilayer doesn't change behavior at all).

Just to be sure added check to RNA, so signal wouldn't be fired if
source wasn't actually changed form a menu.
2013-01-24 17:21:22 +00:00
Brecht Van Lommel
623f3b3e3a Fix/workaround for cycles crash when enabling it for preview renders.
Problem is that preview render database is being used, but the new datablock
function still uses G.main, and the mesh was being added to one database but
(attempted to be) removed from another. The proper fix would get rid of the
globals here, will look into that later.
2013-01-24 16:20:43 +00:00
Ton Roosendaal
b12a019948 Usability
- Cycles materials now render in Blender Internal too, skipping the nodes.
  Not very useful, but at least things then show up on renders and in
  previews.

- Node editor: if wrong shader nodes are in a tree, they draw with thene
  color RED ALERT headers now. (Switching render engine will show it).
2013-01-24 16:11:07 +00:00
Campbell Barton
1da7d7d1a0 use bool for new code. 2013-01-24 14:48:08 +00:00
Campbell Barton
5c9d1ec080 fix for mesh-cache modifier deform-integration used with axis-flipping would fail. 2013-01-24 14:36:02 +00:00
Sergey Sharybin
4d50d3ac43 Tiles highlight shall work fine with border render now
Before it was some offset from actual tile pixels.
2013-01-24 13:55:04 +00:00
Sergey Sharybin
7803b51b42 Fixed for strict compiler flags 2013-01-24 13:43:37 +00:00
Ton Roosendaal
f93d6758b7 New 'X' icon in search buttons sometimes overlapped text, needs extra space. 2013-01-24 13:02:00 +00:00
Campbell Barton
9513c03619 fix for setting RegionView3D.view_matrix 2013-01-24 11:54:11 +00:00
Bastien Montagne
6146110270 Final memory fix for bpy.app.translations (not really a leak, but unfreed memory at end of program - I thought addons were unregistered at quit time...). 2013-01-24 11:38:17 +00:00
Campbell Barton
66bf63d7af use inline functions for subsurf MVert,MEdge mesh array functions, also some include cleanup for scons/cmake. 2013-01-24 11:28:26 +00:00
Ton Roosendaal
9592cade86 Armature rigging:
Added more clear warning print for cases when a Proxy cannot be resolved.
2013-01-24 11:21:40 +00:00
Campbell Barton
8a60c7dc7d fix for missing initialization of vert data in ccgDM_copyFinalVertArray 2013-01-24 09:36:22 +00:00
Sergey Sharybin
6510367c38 Fix #33975: Crash when reloading texture
Two issues in texture_changed:
- Missing NULL check for material (slot could be empty)
- Materials could be linked to object, added special check for this
2013-01-24 08:49:48 +00:00
Campbell Barton
69900035b3 fix for G,G causing vertex slide in UV/Image window, also comment unused defines/enums. 2013-01-24 08:49:40 +00:00
Sergey Sharybin
59a187b338 Fix threading issues of viewport rendering when using movies/generated images
Issue was caused by the fact that guarded allocator is not thread-safe and
generated images/movies could allocate memory when loading pixels to Cycles.

Currently solved by switching memory allocator to using mutex lock (the same
as sued for jobs) when viewport rendering is used.

Nicer solution would be to make guarded allocator thread-safe by using atomic
operations and lock-free lists, but that's more serious change.
2013-01-24 08:14:20 +00:00
Sergey Sharybin
5e739ddae2 Added some code which helps troubleshooting issues caused by
non-threadsafe usage of guarded allocator.

Also added small chunk of code to check consistency of begin/end
threaded malloc.

All this additional checks are commented and wouldn't affect on
builds, however found them helpful to troubleshoot issues so
decided to commit it to SVN.
2013-01-24 08:14:05 +00:00
Campbell Barton
c65c1958bd code cleanup: minor edits to mesh-cache formatting. 2013-01-24 05:54:17 +00:00
Nicholas Bishop
0e2a6178c2 Remove dynamic-topology flag from mesh when entering sculpt mode
This will be enabled if the file was saved with dynamic topology on,
but we don't automatically re-enter dynamic-topology mode when loading
a file so remove the flag.

Fixes bug [#33956]
projects.blender.org/tracker/?func=detail&aid=33956&group_id=9&atid=498
2013-01-24 04:33:29 +00:00
Campbell Barton
296f91c4cc add 'deform - integrate' option to mesh-cache,
This means the deformation on the input to the modifier can be re-applied ontop of the mesh cache.

In practice this is most useful for using corrective shape-keys with mesh-cache.
2013-01-24 04:02:30 +00:00
Sergej Reich
5489d5c2b5 rigidbody: Fix [#33971] Bullet Physics crash + patch
BKE_rigidbody_aftertrans_update() can be called before rigid body is
validated so check before updating physics_object.

Thanks to Antony Riakiotakis (psy-fi) for the initial patch.
2013-01-24 03:49:30 +00:00
Joshua Leung
aea3545973 Bugfix [#33974] Bone roll flips 180 degrees when extruding bones vertically
For example, if you're making a chain of bones (e.g. for a spine) by extruding
the tip joint of an initial bone, the bone rolls would be: 0 (for the initial
bone), 180, -180, 180, -180, etc. This has the undesirable effect of causing
B-Bones to twist to match the roll values at the other end of the bone.

The fix here seems to improve the situation in this case: bone roll values don't
flip or change anymore (in fact, the bone axes stay perfectly aligned now, as
they should). It also doesn't seem to cause any problems in other common cases I
checked.
2013-01-24 02:52:03 +00:00
Campbell Barton
936b82802a add bullet define & include for scons makesrna, also move meshcache utils into own file. 2013-01-24 02:14:39 +00:00
Campbell Barton
dccec5727e replace calloc + memcpy with recalloc. 2013-01-24 00:46:51 +00:00
Campbell Barton
c24777ee9e style cleanup 2013-01-23 23:42:18 +00:00
Campbell Barton
9ff704db39 style cleanup: bake 2013-01-23 23:28:22 +00:00
Brecht Van Lommel
327b17b26f Fix #31338: python enum properties can now specify icons for items, in the following
order: (identifier, name, description, icon, unique number)

This also works without the icon still, for compatibility.
2013-01-23 21:55:11 +00:00
Brecht Van Lommel
555ae1f4b0 Fix #33896: particle add brush with radius 1 would give duplicated and NaN hairs. 2013-01-23 19:40:52 +00:00
Stuart Broadfoot
976c6b7b6e Cycles Hair: Multiple vertex colours and UV coordinates
Added export of multiple UV coordinates and vertex colour attributes.

A debugging option to export the strands without using the cache has also been removed.
2013-01-23 17:15:45 +00:00