Commit Graph

203 Commits

Author SHA1 Message Date
543fb27fd0 support for 'origspace' data layer - used for hair on subsurf mesh.
currently only works for 3/4 sided faces.
2012-02-05 11:30:26 +00:00
c7e8af13d4 remove cellalloc, from my tests jemalloc beats cellalloc, so we better just use a better malloc replacement.
See Details:

http://wiki.blender.org/index.php/User:Ideasman42/BMeshBranchReview#Update_43694
2012-01-25 20:18:12 +00:00
a7b0a11811 svn merge ^/trunk/blender -r43278:43294 2012-01-11 15:04:54 +00:00
51bada696f Longer names support for all ID and other object names
This commit extends limit of ID and objects to 64 (it means 63 meaning
characters and 1 for zero-terminator). CustomData layers names are also
extended.
Changed DNA structures and all places where length constants were hardcoded.

All names which are "generating" from ID block should be limited by MAX_ID_NAME-2,
all non-id names now has got own define called MAX_NAME which should be used all
over for non-id names to make further name migration stuff easier.

All name fields in DNA now have comment with constant which corresponds to
hardcoded numeric value which should make it easier to further update this
limits or even switch to non-hardcoded values in DNA.

Special thanks to Campbell who helped figuring out some issues and helped a lot
in finding all cases where hardcoded valued were still used in code.

Both of forwards and backwards compatibility is stored with blender versions newer
than January 5, 2011. Older versions had issue with placing null-terminator to
DNA strings on file load which will lead to some unpredictable behavior or even
crashes.
2012-01-11 08:51:06 +00:00
a95407752a svn merge ^/trunk/blender -r42967:42973 2011-12-29 12:17:45 +00:00
e63cb930ae use math functions for customdata interpolation funcs 2011-12-29 11:18:12 +00:00
974c161b50 minor edits 2011-12-28 13:24:49 +00:00
1f02209957 enable USE_BMESH_FORWARD_COMPAT and merge in some customdata functions 2011-12-28 13:23:59 +00:00
312b080397 initial merge of bmesh customdata layer code into trunk, ifdef'd out for now with USE_BMESH_FORWARD_COMPAT. 2011-12-28 13:15:17 +00:00
df9aafa8bc sync customdata layers up with trunk. existing bmesh files will crash on load but this is unavoidable. 2011-12-28 13:11:46 +00:00
ff2eb8d72f svn merge ^/trunk/blender -r42914:42918 2011-12-28 10:27:25 +00:00
2e92b14bc6 copy BLI_edgehash changes from bmesh branch, main change is use of mempool. 2011-12-28 10:20:37 +00:00
5d46acd59f minor edits and correcton to assert 2011-12-28 09:14:09 +00:00
337d397d09 merge in customdata changes from BMesh - biggest change is caching the layer index values in a typemap. 2011-12-28 09:11:11 +00:00
8de51d3736 reduce size of typemap, and minor changes to sync with trunk 2011-12-28 08:33:19 +00:00
2cd5436a81 svn merge ^/trunk/blender -r42839:42871 2011-12-25 21:31:19 +00:00
ddcf56366d change customdata mask from an 'unsigned int' to an 'u_int64_t', since BMesh branch has run out of bits 2011-12-23 20:30:23 +00:00
2457d4f5ab svn merge ^/trunk/blender -r42680:42722 2011-12-19 10:40:48 +00:00
90ef435145 Fix a bug in CustomData_duplicate_referenced_layer(_named) functions: MEM_dupallocN does not work with complex layers like CD_MDEFORMVERT ones, so rather use copy func when available. 2011-12-19 08:26:53 +00:00
ad96dacbc5 style edit only - move parenthesis onto second line of function definition (in keeping with most of blenders code)
also split some long lines in own code.
2011-12-17 00:52:36 +00:00
cead1e1977 added mesh_calc_normals_ex() which is mesh_calc_normals() with an option to skip recalculating the vertex normals (only calculate poly/face normals instead).
also removed unneeded allocation of face normals.

otherwise no functional change.
2011-12-06 22:55:41 +00:00
56da69fd03 Fix for [#29467] Selection of active vertex color layer doesn't work
Need to push active layer indices from loops & polys to faces again after tesselations
2011-12-01 09:49:27 +00:00
f28fd56f8f svn merge ^/trunk/blender -r42095:42116 2011-11-24 05:33:22 +00:00
2345efc6c5 Patch #29336: renaming UV (Texture) Layer to UV Map in the user interface,
by Gaia Clary.

Rationale: the name was confusing and not always used consistently, and this
map itself is not something that can be layered, rather the map can be used
as texture coordinates in some layered setup.

The original intent was to indicate this contained more than just UV's, but
the game engine settings have already been moved out, and apparently users
didn't really get this from the name anyway.
2011-11-23 17:25:25 +00:00
f850e76e04 remove assert & make warning print more helpful 2011-11-23 16:39:07 +00:00
8c03c3a630 Improve checking for getting layer "n" of a layer type and skip zero-length allocations for Bmesh layers 2011-11-20 16:19:56 +00:00
3ed866d2fc svn merge -r41926:41932 ^/trunk/blender 2011-11-16 19:57:20 +00:00
3dcc9aef96 merge mempool changes from bmesh (adds mempool iterator). 2011-11-16 19:31:42 +00:00
e59ab6486f svn merge -r41751:41779 ^/trunk/blender 2011-11-15 02:05:32 +00:00
2266c7fc1c Add CD_POLYINDEX layer to reduce need for retesselations 2011-11-13 15:13:59 +00:00
e84c0980a3 correct indentation and some whitespace edits (no functional changes) 2011-11-11 13:09:14 +00:00
92d35b74e7 svn merge -r41722:41723 ^/trunk/blender 2011-11-11 06:25:45 +00:00
b0a21add8a replace bmesh specific macros with math functions, also some pedantic formatting edits. 2011-11-07 09:02:10 +00:00
83cef039af Fix a minor bug with incorrect ordering of arguments to customdata api 2011-10-31 00:10:51 +00:00
46ae692710 Merge with trunk r41342 2011-10-28 17:00:53 +00:00
dbe1c4277a Fix "[#29036] Crash on solidify" and a few misc subsurf and derived mesh bugs that were blocking correct functionality of "apply modifier to editcage" when you have a subsurf + solidify modifier on the stack 2011-10-27 12:17:02 +00:00
cfb435e8a5 Fix 28960: if BM_free_data_layer[_n] removed the last layer, we didn't clear data->pool and instead kept it pointing to the pool that gets freed at the end of update_data_blocks 2011-10-26 13:24:58 +00:00
15e6d6cd75 svn merge ^/trunk/blender -r41226:41227 . 2011-10-24 12:43:08 +00:00
ad1d3dd30f svn merge ^/trunk/blender -r41175:41200 --- will need to apply fix after 2011-10-24 07:56:42 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
d4541fd891 Merge with trunk r41197 2011-10-22 16:43:23 +00:00
74017cb020 header cleanup and typo's 2011-10-22 01:53:35 +00:00
4e118bb22f svn merge ^/trunk/blender -r40890:40950 2011-10-14 01:35:20 +00:00
8be3249537 Merge with trunk r40991 2011-10-13 21:43:02 +00:00
8bf78d7f56 Dynamic Paint:
* Fix: Wave "timescale" also changed simulation behavior. Now different timescale values will lead to nearly identical results, just slower or faster.
* Added "Displace Factor" setting for vertex displace surfaces. You can use it to adjust final displace strength or use negative values to paint bumps.
* Added clamp/map value to wave image sequence output settings.
* RNA description tweaking.
* General code tweaking.
2011-10-13 20:00:22 +00:00
bc40f11093 header cleanup (no functional changes) 2011-10-10 09:38:02 +00:00
aa6d7ebd14 svn merge ^/trunk/blender -r40720:40872 2011-10-09 07:31:15 +00:00
21eb8b92a0 use newly added ID_BLEND_PATH() in more places. 2011-10-08 11:11:54 +00:00
a13f94865a svn merge ^/trunk/blender -r40371:40372 2011-09-23 05:59:37 +00:00
Dalai Felinto
b263aefb0e TexFace to Material Settings big patch
Summary:
========
The idea here is to move the texface options into the material panel.
For images with the change please visit:
http://code.blender.org/index.php/2011/09/bge-material-texface-changes

1 - Some of the legacy problems 2.49 and 2.5x has with the texface system:
==========================================================================
1.1) Shadow, Bilboard and Halo are mutual exclusive (in the code), yet you can
select a face to be more than one mode.
1.2) Sort only works for blend Alpha yet it's an option regardless of the
Transparency Blend you pick.
1.3) Shared doesn't affect anything in BGE.
1.4) ObColor only works for Text objects (old bitmap texts) when using Texture
Face Materials. (not address yet, I so far ignored obcolor)

2 - Notes:
============
2.1) Now "Use Face Textures" in material Option panel will work in Multitexture
even if there is no texture channel.

2.2) In FaceTexture mode it will use TexFace all the time, even if you don't
check the "Use Texture Face" option in the UI. It's a matter of decision, since
the code for either way is there. I decided by the solution that makes the
creation of a material fast - in this mode the user doesn't need to mess with
textures or this "Use Texture Face" option at all. I'm not strong in my opinion
here. But I think if we don't have this then what is the point of the Texture
Face mode?

2.3) I kept references for tface only when we need the image, UV or the tiling
setting. It should help later when/if we split the Image and UV layers from the
tface struct  (Campbell and Brecht proposal).

3 - Changes in a Nutshell:
==========================
3.1) "Texture Face" panel (in the Mesh/Object Data panel) no longer exists. Those settings are all part of the material properties, visible when Game Render is set.

3.2) "Texture Face" Shading mode (in the Render panel) is now called “Single Texture”, it needs a material for special settings (e.g. Billboard, Alpha Sort, …).

3.3) New options in the Material Panel
* Shadeless option in the Material panel is now supported for all three Shading modes.
* Physics is now toggleable, this is the old Collision option.
* Two Side (on) is now called Back Culling (off).
* Alpha Sort is one of the Alpha options, together (and mutually exclusive) to Alpha Blend, Alpha Clip, Add and Opaque (i.e. solid).
* Shadow, Billboard and Halo are grouped in the “Face Orientation” property.
* "Face Textures" and "Face Textures Alpha" (under Options) can be used for all but GLSL shading mode (to be supported in GLSL eventually).
* The backend in the game engine is still the same as before. The only changes are in the interface and in the way you need to think your materials. The bottomline is: It’s no longer possible to share materials between faces that do not share the same game properties.

4 - Acknowledgment:
==================
Mike Pan for the design discussions, and testing along the whole development process.
Vitor Balbio for the first hands-on code with the interface changes. That helped me a lot to push me into work on that.
Benoit Bolsee and Brecht van Lommel for patch review (* no one reviewed the whole patch, or the latest iteractions, so I still hold liability for any problems).
Blender artists that gave feedback and helped testing the patch.

Patch review and original documentation can be found here:
http://wiki.blender.org/index.php/User:Dfelinto/TexFace
http://codereview.appspot.com/4289041/
2011-09-19 19:55:59 +00:00