Commit Graph

232 Commits

Author SHA1 Message Date
5adcf774ba Fix #30045: mesh.uv_textures.new() not returning correct layer when a layer with
the requested name already exists.
2012-02-01 18:25:13 +00:00
c8037fb56a svn merge ^/trunk/blender -r43530:43554 2012-01-20 12:34:00 +00:00
8817aaef3e - Fix for commit 43551 which caused a linking error in blenderplayer.
- Minor clean up for commit 43551.
2012-01-20 05:11:42 +00:00
62ac943e31 - Added functions to remove mesh vertices, edges and faces. These functions remove a specified number of elements from the end of their respective arrays. For example, removing two vertices removes the last two vertices of the mesh.
- Minor fixes to descriptions of add edge and add face functions.
2012-01-20 02:10:09 +00:00
bc745a32d3 argument to mesh_recalcTesselation to skip copying normals from polygons. 2012-01-19 17:51:52 +00:00
705f23064e svn merge ^/trunk/blender -r43294:43338 2012-01-13 01:39:57 +00:00
f66f33cefc rename RNA_property_is_set() --> RNA_struct_property_is_set() in preperation to add a second version of the function which takes the property rather then its name. 2012-01-11 16:32: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
2b2c1007f6 rename normal calc functions.
comparing bmesh to trunk, mesh_calc_normals() in bmesh is a much more comprehensive function, calculating mpoly,mface normals, where trunk only calculated vertex normals.

renamed:
* mesh_calc_normals() --> mesh_calc_normals_mapping_ex
* mesh_calc_tessface_normals --> mesh_calc_normals_tessface() - only calculates normals from tessface
* added mesh_calc_normals() - only calculates normals from poltys

this way we can have mesh_calc_normals() remain fast for parts of the code which only need vertex normals to be updated.

only refactor, no func changes- didnt replace mesh_calc_normals_mapping_ex() with mesh_calc_normals() anywhere yet.
2012-01-06 00:08:37 +00:00
c0eec8f379 svn merge ^/trunk/blender -r43062:43085 2012-01-03 02:16:52 +00:00
1e18da32fb replace:
CTX_data_pointer_get_type(C, "object", &RNA_Object).data
with api call:
  ED_object_context(C)

... since getting the context object is such a common operation.
2012-01-02 17:15:24 +00:00
26db98293f Quiet annoying warning:
Warning! Tesselation uvs or vcol data got out of sync, "had to reset!

This would happen on every editmode edit with UV's and wasn't too reassuring that blender was handling uvs/vcols correctly.

From looking into the problem I found that creating the undo mesh would act as if it was tessellating the existing mesh each time and complain that the data was out of sync, when infact the mesh was just created and being filled in.

Also, allocating uv and vcol customdata arrats for tessfaces isn't needed for undo mesh, so save some memory and dont allocate these in the first place.
2011-12-06 09:28:25 +00:00
f07df7287e manual sync with trunk - pulling in changes where the issues are not bmesh spesific
- some merges added lines in multiple times
- removed some NULL checks that were only in bmesh
- enable cycles by default (was disabled because it used not to work)
- make formatting match
2011-12-04 23:13:28 +00:00
22a1ad61f9 svn merge ^/trunk/blender -r42372:42416 2011-12-04 18:39:19 +00:00
937c5494c4 A (hopefully last) bunch of fixes and tweaks to UI label and messages (found while translating in french). 2011-12-04 17:36:13 +00:00
89e390f28f Dynamic paint vertex color output now works with bmesh.
3D view preview still doesn't work because the used CD_WEIGHT_MCOL data layer isn't yet generated properly during poly tessellation.
2011-11-30 20:41:13 +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
9089d72f06 Various typo cleanups, remove unnecessary code etc, found during recent work and separated to a cleanup change 2011-11-20 16:21:13 +00:00
1038c76c55 Add access to UVs from python, patch python unwrap scripts to work wtih ngons 2011-11-17 05:03:07 +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
c0934795cb bmesh compiles again after dynamic paint merge 2011-11-11 11:20:46 +00:00
92d35b74e7 svn merge -r41722:41723 ^/trunk/blender 2011-11-11 06:25:45 +00:00
685041d53a svn merge -r41650:41655 ^/trunk/blender --- cycles merge, this wont copile, still need to manually update some funcs 2011-11-10 03:05:11 +00:00
1b4a54ad73 Merge with trunk r41701 2011-11-09 15:46:53 +00:00
28ee0f9218 Texturing: texture and 3d view draw type changes, these should only have any
effect for a render engine using new shading nodes. In short:

* No longer uses images assigned to faces in the uv layer, rather the active
  image texture node is what is edited/painted/drawn.
* Textured draw type now shows the active image texture node, with solid
  lighting.
* Material draw mode shows GLSL shader of a simplified material node tree,
  using solid lighting.
* Textures for modifiers, brushes, etc, are now available from a dropdown in
  the texture tab in the properties editor. These do not use new shading nodes
  yet.

http://wiki.blender.org/index.php/Dev:2.6/Source/Render/TextureWorkflow
2011-11-08 13:07:16 +00:00
e48d7f4c11 Fix for #29087: Meshs with non-planar polys added from py scripts show boundaries between tesselated triangles of a single poly 2011-10-30 01:14:50 +00:00
46ae692710 Merge with trunk r41342 2011-10-28 17:00:53 +00:00
15e6d6cd75 svn merge ^/trunk/blender -r41226:41227 . 2011-10-24 12:43:08 +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
f3c8f3d663 Build bug fix, and bug fix for smooth shading on meshes added by python scripts 2011-10-14 02:30:58 +00:00
d62338578b Fix 28493: Meshes added with many addons revert to only verts on entry to edit mode 2011-10-09 16:59:48 +00:00
ea4b3fee1f svn merge ^/trunk/blender -r40389:r40390 2011-09-23 07:17:07 +00:00
14475d07cd svn merge -r40295:40367 ^/trunk/blender 2011-09-21 17:15:54 +00:00
15cb47bf91 Merge with trunk r40409 2011-09-20 17:51:04 +00:00
84d06f252e tag & comment unused vars with /* UNUSED */ 2011-09-20 08:48:48 +00:00
f157a543c6 /blender/editors: Removed final points in UI strings and messages.
Plus a few cuts in very long lines…
2011-09-19 12:26:20 +00:00
2448f8caa9 code cleanup - commant/remove unused vars and reduce scope. 2011-09-07 06:49:20 +00:00
b62b9f16b8 ability to create polygons and loops from python (low level mesh creation access, not nice api but functional).
updated:
  mesh.from_pydata(vert, edge, polys)
... so it can take polygons rather then faces, this is much better suited for scripter access.
2011-09-01 09:11:00 +00:00
8394f65d4a Dynamic Paint:
* Object velocity can now be used to determine brush influence and color.
* Brushes can now be set to "smudge" existing paint.
* Added new operators to easily add and remove surface output mesh data layers from Dynamic Paint ui.
* Fixed drip effect algorithm to work properly on forces pointing towards surface.
* Adjusted drip effect speed.
* Drip effect can now use canvas velocity and acceleration to influence drip direction.
* Fixed texture mapping for material enabled brushes.
* "Object Center" type brushes can now use "material color" as well.
* Improved surface partitioning grid generation algorithm.
* Fixed possible invalid brush collision detection when OpenMP enabled.
* Fixed incorrect random sized particle displace/wave influence.
* Fixed "Object Center" brush color ramp falloff.
* Fixed invalid zero alpha sampling when rendering vertex colors.
* Lots of smaller tweaking.
2011-08-03 18:31:48 +00:00
a4cd1ba8e5 fixed meshes added via python api have no faces 2011-08-01 11:53:55 +00:00
e392ee3319 clobbered bmesh code by accident from commit r38660, reverted and apply changes from trunk merge -r37500:37600 2011-07-25 09:53:36 +00:00
aaf7dae5f1 Code cleanup: remove unused shaded draw mode code. 2011-06-15 10:17:06 +00:00
da9d559f36 Fix #27176: Creating a new UV layer in edit mode fails to copy previous one
Implemented copying data from active MTFACE layer to newly created.
Also, fixed the same bug with vertex colors layer.
2011-04-27 08:35:03 +00:00
Nathan Letwory
95100afc12 doxygen: blender/editors tagged. 2011-02-27 20:29:51 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
5aa72b8726 BKE_mesh_validate() now corrects invalid meshes (optionally), added access for python so it can correct for bad imported geometry - mesh.validate(). 2011-02-09 15:13:20 +00:00