Commit Graph

44257 Commits

Author SHA1 Message Date
Bastien Montagne
a2e55171fe Bunch of fixes for UI messages.
Also generate rigid body constraint types in py bullet code from RNA enum values (simpler than having to sync the code when something is changed here!).

Side note: RNA API about icons still needs to expose icons for enum values, and conversion funcs between icon_name and icon_value!
2013-01-27 18:14:24 +00:00
Ton Roosendaal
2545e832e2 Pack UI:
Oops! So there was an Unpack button, hidden in the Nkey properties of Image window.
This was drawn next to greyed-out buttons, didn't notice it well.

I also now found the unpack() menu in editors/util, and there's an Image unpack op.
Also the RNA api has an unpack!

Will remove the generic unpack op, and add a sound and vfont unpack instead.
2013-01-27 17:20:08 +00:00
Brecht Van Lommel
6cadd2bee3 Fix drivers and shape keys not handling subframes / frame mapping properly.
Change Scene.frame_set so that it ensures subframe in range [0,1[ as Blender
expects, otherwise some things like physics point cache lookups don't get
evaluated properly.
2013-01-27 16:45:00 +00:00
Thomas Dinges
431619e45b Windows compile fix:
* r54117 broke Windows, __func__ not declared.
2013-01-27 15:12:52 +00:00
Ton Roosendaal
1a97efb1ba Very old todo: Packed file UI
- The "ID" buttons (for browse images, for example) now show a Pack icon, for packed
  Images. Using this button allows unpack.

- Pack and unpack operations now give a Info report on what happened.

- Not restored yet: option to set "AutoPack".
2013-01-27 14:28:45 +00:00
Campbell Barton
f0339c642d remove redundant temp pointer assignment in AVI_write_frame. 2013-01-27 12:03:20 +00:00
Campbell Barton
9d36fade8f make MEM_reallocN and MEM_recallocN behave as libc's realloc() - alloc when receiving a NULL value. 2013-01-27 11:20:50 +00:00
Dalai Felinto
236bc27484 Operators name "cleanup"
The operator names all show up in the Search button. As such is nicer if they
can all have the main words capitalized.

e.g. "Snap strips" should be "Snap Strips"
     "Copy to clipboard" should be "Copy to Clipboard"

This was done with a mix of bash tools, regex, and manual work because I'm too rushed into regex :)

+ fix bge stereo eye separation tooltip
2013-01-27 07:23:58 +00:00
Dalai Felinto
4d8104917d BGE bugfix: Material initial object color working in the game
The object color option in the materials always worked, however the initial color of the object
was never passed to the game.

We are now passing it only, only when the object's mesh has a material that has ((shade_flags & OB_COLOR)).
There reason to not always set the object color is probably due to performance (the m_bUseObjectColor
flag in KX_GameObject). This patch still respect that.

Bug report from Mike Pan, as part of our book nitty-gritties review work.
Bugfix during Vancouver Global Game Jam :)
2013-01-26 23:52:55 +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
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
Brecht Van Lommel
38c94e9194 Fix cycles crash that happened with mesh emission and diffuse/glossy ray
visibility disabled on some objects.
2013-01-25 02:00:57 +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
Ton Roosendaal
4477d59b76 Put back minimum window sizes on 320x240.
This didnt work well with making blender areas into windows.

Real fix: check such minimums based on what's in the window itself... or just
make scaling work flawless.
2013-01-24 17:57:38 +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
Campbell Barton
a790c8c6f9 patch [#33969] fix for [#33968] Blenders Custom Project File Generator for QtCreator fails
from Philipp Oeser (lichtwerk)
2013-01-24 08:59:48 +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