Commit Graph

1920 Commits

Author SHA1 Message Date
cdc4037f0d bmesh: BM_verts_in_face was using bmesh operator flag which is no longer ensured to be available,
use internal apiflag instead, Thanks to Nicholas Bishop for spotting.

also quiet some warnings.
2012-11-19 00:54:55 +00:00
eb1fccd8a5 BGE: The Step Height for a character physics controller is now set to 0.01, which means that Step Height can no longer be 0, which causes issues such as those noted in issue #33221, "KX_CharacterWrapper inconsistencies and error," reported by Angus Hollands (agoose77). I've also added a do_versions() fix that will give objects with 0 Step Height sane defaults. This means old files will now work better with character physics. 2012-11-18 20:56:50 +00:00
5c6f6301b0 Image thread safe improvements
This commit makes BKE_image_acquire_ibuf referencing result, which means once
some area requested for image buffer, it'll be guaranteed this buffer wouldn't
be freed by image signal.

To de-reference buffer BKE_image_release_ibuf should now always be used.

To make referencing working correct we can not rely on result of
image_get_ibuf_threadsafe called outside from thread lock. This is so because
we need to guarantee getting image buffer from list of loaded buffers and it's
referencing happens atomic. Without lock here it is possible that between call
of image_get_ibuf_threadsafe and referencing the buffer IMA_SIGNAL_FREE would
be called. Image signal handling too is blocking now to prevent such a
situation.

Threads are locking by spinlock, which are faster than mutexes. There were some
slowdown reports in the past about render slowdown when using OSX on Xeon CPU.
It shouldn't happen with spin locks, but more tests on different hardware would
be really welcome. So far can not see speed regressions on own computers.

This commit also removes BKE_image_get_ibuf, because it was not so intuitive
when get_ibuf and acquire_ibuf should be used.

Thanks to Ton and Brecht for discussion/review :)
2012-11-15 15:59:58 +00:00
026e29a042 simple optimization for library loading, just reduce pointer indirection and use unsigned int's, gives up to 2x overall speedup for loading some libraries. 2012-11-10 02:38:16 +00:00
73d83fd99b Affine tracker do_versions were missed for objects tracs
Run this code again, so files from 2.63 would be opened correct now.
2012-11-07 11:32:57 +00:00
c557f6f0b6 Subversion bump for render tiles, motion tracking fallback option and collisions. 2012-11-05 08:41:38 +00:00
759ea40787 Render engines: replace number of x/y tiles with tile size
Now tile size is setting up explicitly instead of using number of tiles.

This allows better control over GPU performance, where having tiles aligned
to specific size makes lots of sense.

Still to come: need to update startup.blend  to make tiles size 64x64.
2012-11-05 08:05:14 +00:00
3bd7816c75 Camera Tracking: allow fallback to reprojection resection by user demand
This fixes some "regressions" introduced in rev50781 which lead to much
worse solution in some cases. Now it's possible to bring old behavior back.

Perhaps it's more like temporal solution for time being smarter solution is
found. But finding such a solution isn't so fast, so let's bring manual
control over reprojection usage.

But anyway, imo it's now nice to have a structure which could be used to
pass different settings to the solver.
2012-11-05 08:04:27 +00:00
4fe8e5e364 Ton's last do_versions commit got rid of do_versions code for collision masks. Adding it back in so collision in the BGE work again. 2012-11-04 00:37:45 +00:00
e02b23b81a Render API: shader script node for custom shaders.
* Shader script node added, which stores either a link to a text datablock or
  file on disk, and has functions to add and remove sockets.
* Callback RenderEngine.update_script_node(self, node) added for render engines
  to compile the shader and update the node with new sockets.

Thanks to Thomas, Lukas and Dalai for the implementation.
2012-11-03 14:32:26 +00:00
db8b7fcabb style cleanup and correct own invalid comment. 2012-10-31 11:45:41 +00:00
12ed0c64bc make use customdata typeoffset more, add an assert to ensure its to date. 2012-10-31 09:50:24 +00:00
00acdb6292 remove CD_POLYINDEX customdata layer:
reported as [#29376] BMESH_TODO: remove tessface CD_ORIGINDEX layer

for a single mesh there could be 3 origindex mappings stored, one on the polygons and 2 on the tessfaces.
(CD_POLYINDEX and CD_ORIGINDEX).

as Andrew suggests, now tessfaces (which are really a cache of polygons), using origindex to point to polygons on
the same derived mesh, and polygons only store the original index values.
2012-10-30 19:20:17 +00:00
21eb1735d6 Two fixes:
- Added versioning for reading old files with logic saved
- Added two more 'alt backspace' options, for copyright and registered trademark.
  (also 'tm' but it's not in our default font)
2012-10-30 17:36:00 +00:00
3bf9bb3b13 BGE: Adding support for Bullet's collision masks. Each object now has a collision mask and a collision group. Object A and object B collide if object A's groups is in object B's mask and object B's group is in object A's mask. In other words, the group defines what the object is (collision wise) and the group defines what the object can collide with.
The majority of this patch was provided by Kupoman with some edits from me and heavy testing by z0r.
2012-10-30 15:44:16 +00:00
Lukas Toenne
9c2eaad7aa Fix #32982, Segault when trying to show a node material.
This was caused by incomplete pointer mapping of the node->internal_links list in r51630, my bad. In intermediate revisions this could lead to corrupted .blend data. This patch adds a do_versions check to remove such bad links. The correct internal_links list will get restored on node update.
2012-10-27 11:56:21 +00:00
aeba4950c3 style cleanup 2012-10-27 10:42:28 +00:00
c9dade4fe0 Big i18n commit: add "reports" from bmesh/readfile/tracking/dynapaint (and a few others), and another bunch of UI messages tweaks/fixes, as well as some BKE_report()<->BKE_reportf()... 2012-10-26 17:32:50 +00:00
3b7dee7cba fix for another error reported in [#26712], use count failing with 3 levels of linking. 2012-10-26 05:33:06 +00:00
f30ab48dac fix [#26712] Particle group instance 'Use Count' value gets reset on file-load. 2012-10-26 05:22:24 +00:00
Lukas Toenne
09ed97afc5 Internal node links are now cached in a per-node list, instead of being generated as a transient list that is returned from the callback and had to be freed by the caller. These internal links are used for muted nodes, disconnect operators and reroute nodes, to effectively replace the node with direct input-to-output links.
Storing this list in the node has the advantage of requiring far fewer calls to the potentially expensive internal_connect callback. This was called on every node redraw ...

Also it will allow Cycles to properly use the internal links for muted nodes, which ensures consistent behavior. The previous method was not applicable in Cycles because transient list return values are not supported well in the RNA and particularly the C++ API implementation.
2012-10-25 16:49:06 +00:00
85d9ba5cbb Fix issue after commit 50282: float texture painting non-color data textures did
not do correct partial updates, now it remembers if the opengl texture is a
non-color data texture or not and takes that into account for the update.

Also includes some renaming ncd => is_data for consistency with color space
terminology used elsewhere.
2012-10-25 15:25:28 +00:00
1298357581 Fix #32964: IK constraint had a "Target" option, which actually is an internal
flag that shouldn't have been exposed in the user interface. Also avoided many
calls to pchan.is_in_ik_chain in UI script, it's somewhat slow.
2012-10-24 22:36:06 +00:00
2dbc6e56b4 set default value of defocus maxblur when this is unset during reading. 2012-10-24 16:00:27 +00:00
Lukas Toenne
9599c2a02b Fix for direct_link of local ID data blocks (node trees in material/lamp/world/scene/texture). These data blocks also need to link the id properties group in their ID base, otherwise custom properties stored in such local node trees will lead to dangling pointers on file load. 2012-10-23 12:38:47 +00:00
15b561ea41 Fix related to #32933: UV unwrap had 0.0 margin by default in .blend files,
change it now to 0.001 in existing files.
2012-10-22 18:48:50 +00:00
ddc2dbc2a4 style cleanup 2012-10-22 08:15:51 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
bc8f602601 style cleanup 2012-10-20 18:46:57 +00:00
9f8070d047 code cleanup:
- define array sizes for functions that take vectors.
- quiet some -Wshadow warnings.
- some copy/paste error in readfile.c made it set the same particle recalc flag twice.
2012-10-20 08:02:18 +00:00
f72f1dca6c More UI messages fixes and tweaks, BKE_report<->BKE_reportf, and stuff to translate... 2012-10-19 16:43:10 +00:00
Lukas Toenne
45dc9794c1 Fix #32856, Crash in compositor due to deprecated node socket flag in old files.
Bit flag 5 has apparently been used for another purpose in old versions, then deprecated and was actually removed from DNA (this should never be done), then later it got reused for SOCK_DYNAMIC. Now a one-time check to clean up these flags is done in do_versions.
2012-10-17 10:49:42 +00:00
9be4c94204 Cycles: non-camera viewport render border support
This makes it possible to do a border render inside a viewport even
when not looking through the camera.

Render border could be defined by Ctrl-B shortcut (works for both
camera render border and viewport render border).

Camera render border could still be defined using Shift-B (so no
muscule memory would be broken). Currently used a special flag of
operator to do this, otherwise you'll need to either two operators
with different poll callback or it could go into conflict with a
border zoom,

Border render of a viewport could be enabled/disabled in View
panel using "Render Border" option.
2012-10-16 11:57:46 +00:00
8e01b8959e style cleanup 2012-10-14 13:08:19 +00:00
b50fc8ac68 More UI messages fixes.
Also forgot to translate reports' titles, and change some usages of BKE_reportf to simple BKE_report, when the former is not needed!
2012-10-13 15:44:50 +00:00
cb634b9100 Google Summer of Code project: "Smoke Simulator Improvements & Fire".
Documentation & Test blend files:
------------------
http://wiki.blender.org/index.php/User:MiikaH/GSoC-2012-Smoke-Simulator-Improvements

Credits:
------------------
Miika Hamalainen (MiikaH): Student / Main programmer

Daniel Genrich (Genscher): Mentor / Programmer of merged patches from Smoke2 branch
Google: For Google Summer of Code 2012
2012-10-10 13:18:07 +00:00
33f35647e9 Motion Tracking: move keyframe settings to per-tracking object settings 2012-10-09 10:33:18 +00:00
35f0ded377 fix for logical errors
- range check on hair_velocity_smoothing() was off by one.
- cloth sim parm's are used before NULL check in readfile.c
2012-10-07 10:01:54 +00:00
fedc8e1722 Cycles: add "From Dupli" option for texture coordinate node. This gets the
Generated and UV coordinates from the duplicator of instance instead of the
object itself.

This was used in e.g. Big Buck Bunny for texturing instanced feathers with
a UV map on the bird. Many files changed, mainly to do some refactoring to
get rid of G.rendering global in duplilist code.
2012-10-04 21:40:39 +00:00
d8144ef0f5 style cleanup: comment blocks 2012-10-04 13:26:15 +00:00
f609d0f22e code cleanup: remove USE_BMESH_FORWARD_COMPAT - this was added to load bmesh in pre-bmesh blender version, remove MODSTACK_DEBUG, was never used. 2012-10-04 09:12:08 +00:00
0ef61bb816 Correction to commit rev48866 -- convert_tface_mt must happen before BKE_mesh_do_versions_convert_mfaces_to_mpolys
Discovered when were looking into crystal_cube.blend from our regression files
collection. Now it should look the same as in 2.62 release. 2.63 release wouldn't
work correct for this file because of wrong mtface->material conversion after
bmesh merge.
2012-10-03 12:07:29 +00:00
98698753b1 Fix #32742: Motion path calculation on linked armatures locks up Blender
Issue was happening when linking armature object and making proxy and was
caused by not copying visualization settings in BKE_pose_copy_data.

This lead to deadlocks in motion path drawing code.

After discussion with Campbell decided it is crucial fix since it fixes
bug appearing in really common scenario of using armatures.
2012-10-03 08:51:05 +00:00
7d1da8b60a fix for unlikely crash if smoke collision data couldn't be read. (pointer was used before doing NULL check) 2012-10-01 15:26:48 +00:00
818b2e81da missed these last commit 2012-09-30 10:45:37 +00:00
368e502dba demote library linking errors from ERROR's to warnings, since errors will throw a python exception and stop the script when loading a blend file by calling a python operator. 2012-09-30 10:38:12 +00:00
aa49ca25d5 incorrect spelling in comments 2012-09-26 20:05:38 +00:00
acb4a03934 remove sticky customdata layers as well as sticky mtex flag 2012-09-23 10:25:22 +00:00
3d1cdfbb38 remove sticky coords from blender and the internal render engine. 2012-09-21 11:37:51 +00:00
f9467d28b9 remove sticky coordinates from blender, this was missing from the UI since 2.49.
TODO - drop support from the renderer still.
2012-09-21 11:19:16 +00:00