Commit Graph

53 Commits

Author SHA1 Message Date
10004d4a42 fixed: [#32240] Collada import when nodes share geometry but not material 2012-08-12 17:13:07 +00:00
b96c622015 style cleanup 2012-08-11 22:12:32 +00:00
32478997ec style cleanup 2012-06-27 18:29:47 +00:00
2e8a2f7668 style cleanup 2012-06-12 22:05:33 +00:00
2c05190374 fix [#31320] Collada now supports import/export of loose edges (edges not attached to faces) 2012-05-16 11:21:03 +00:00
3ef11693f5 Style cleanup: displist module 2012-05-07 06:58:03 +00:00
c91cee2bb9 code cleanup: naming - BKE_mesh_* 2012-05-05 21:28:12 +00:00
1dccd4c98a code cleanup: naming - pose/armature/image
also use ..._find_name(..., name) rather then ..._find_named(..., name) --- both were used.
2012-05-05 16:03:57 +00:00
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
b075765edd Fix #31258: collada now selects newly added objects after import. 2012-05-03 21:32:49 +00:00
959a717d91 Fix #31250, #31248: wrong vertex normals after transform apply, collada import,
sculpt shape key switch. All cases that called this function needed parameter
only_face_normals set to false, so changed it now.

Also fixed wrong user count for imported mesh from collada and simplified
previous fix for tesselated faces to polygons conversion.
2012-05-02 23:36:34 +00:00
66581e903c Fix #31176: Collada model shows weird textures in editmode
Issue with multimaterial meshes and mface to mpoly conversion being before assignment of materials (which is done on meshobject instancing?).
Added explicit bmesh conversion to MeshImporter which is called from DocumentImporter::import.
2012-05-02 16:18:20 +00:00
9fe1fe0aa8 bmesh py api:
add mtexpoly image access
2012-05-01 06:50:43 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
5b88712ff9 move debug flag into its own global var (G.debug), split up debug options.
--debug
  --debug-ffmpeg
  --debug-python
  --debug-events
  --debug-wm

This makes debug output easier to read - event debug prints would flood output too much before.

For convenience:
  --debug-all turns all debug flags on (works as --debug did before).

also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
2012-03-31 00:59:17 +00:00
07065b27b8 style cleanup 2012-03-28 05:03:24 +00:00
f83a93e454 bmesh todo, unlikly but possible - entering editmode with faces and no polys.
rather then printing a warning and failing - convert them to polys.
2012-03-27 01:28:25 +00:00
b8a71efeba style cleanup: follow style guide for/with/if spacing 2012-03-24 07:52:14 +00:00
ab4a2aaf4a style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:38:07 +00:00
1148344f46 fix #30440, Collada import: no faces/uv after bmesh merge
Seems too simple, just missing call to convert_mfaces_to_mpolys.
2012-03-06 19:50:07 +00:00
dc68210c7e misc changes from trunk (avoid confusion since these were not intentional differences) 2012-02-19 18:41:30 +00:00
d6deca4e9d Fix #30230, Crash after importing collada file
On collada import a -1 layer_index from CustomData_get_layer_index (CD_MTFACE) was used.
This then managed to overwrite last mface's data with uv-set's name so at least it gave a clue where to look for :]
2012-02-19 17:55:09 +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
50ca81154e svn merge ^/trunk/blender -r42973:42991 2011-12-30 09:23:06 +00:00
6d965f4493 style edits for function declarations 2011-12-30 07:55:15 +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
f5d5de0d8a fix for compiling collada by nico_ga 2011-10-28 06:12:00 +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
274b9c8fb8 whitespace cleanup 2011-09-25 12:31:21 +00:00
13dfd82997 changes for materials to treat them as shorts not int/chars (since they are stored as shorts intermally)
- converting nurbs to mesh was casting the material to unsigned char.
- subsurf was casting to char, then int -> short in a loop.
- have material functions take & return shorts.
2011-09-20 06:25:15 +00:00
Nathan Letwory
cc1c8268f7 Left debug print accidently enabled. 2011-09-05 15:03:31 +00:00
Nathan Letwory
1cada203bc [#27884] Collada import: materials mismatch when 2 instance_geometry reference the same material
Reported by David Roy

Multi-materials used on different meshes would get ignored (resulting in white faces in textured view).
2011-09-04 14:31:23 +00:00
Nathan Letwory
cbc812b757 Fix [#28322] COLLADA imports messed up UVs
Reported by Chad Gleason

Imported index order could put mface->v4==0. We already know amount of verts, so use that instead.
2011-09-04 01:13:44 +00:00
Nathan Letwory
1764f2135d Some whitespace changes 2011-09-04 00:15:59 +00:00
Nathan Letwory
5b4bffba52 [#27854] Collada import doesn't handle UVW mapping
Reported by David Roy
Patch by Brecht van Lommel

UV import code wasn't taking possible stride into account (always assuming stride==2), thus reading UV coords totally wrong.
2011-07-06 21:37:31 +00:00
Nathan Letwory
d278637337 Fix [#26912] [Collada] Screw up with names/ids on import
Reported by Valeriy Firsov

Use the node name if it exists, fall back to id otherwise.
2011-06-20 12:43:10 +00:00
Nathan Letwory
dbe7488c43 Fix [#27474] Blender crashes on collada import if input_set is missing
reported by Rebin Cornelius.

This needs patch from upstream report http://code.google.com/p/opencollada/issues/list?thanks=164 applied to OpenCOLLADA. lib/windows/collada and lib/win64/collada have already been updated. Ensures we don't read past array boundaries.
2011-06-20 09:34:35 +00:00
Nathan Letwory
3f9bbde4a6 Fix [#26037] Import Collada crashes Blender
Submitted by David Roy

Multiple nodes can reference the same geometry, and specify the same materials. This lead
to the import code overwriting material mappings of faces in a destructive way. Instead of
just writing the material bindings always we now keep book of what geometry+material mapping
we've already handled.
2011-03-09 01:13:28 +00:00
Nathan Letwory
94b5fd6eb9 Skip materials that are invalid. 2011-03-08 20:41:43 +00:00
Nathan Letwory
3d05311d3c Apply [#26383] Triangle fans support for COLLADA importer
Submitted by Alexey Zakharov

This patch adds support to Blender for reading geometry data that's
represented as triangle fans.
2011-03-08 13:26:41 +00:00
Nathan Letwory
caf9fb6cce doxygen: blender/collada tagged. 2011-02-27 20:30:35 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
0a4eb24ca0 fix for building with opencollada 833 on linux. 2011-02-12 06:25:04 +00:00
Nathan Letwory
71cb745941 Commit to cope with API changes in OpenCOLLADA (latest for Windows right now r827). 2011-01-27 19:39:06 +00:00
Nathan Letwory
044e31b89c Fix [#25319] COLLADA import segfaults on maya model
Reported by Michael Williamson
Fixed by Jeroen Bakker

Wrong UV index was being used.
2010-12-21 09:41:02 +00:00
Nathan Letwory
17f37dcecc Apply [#25297] Fix for [#23765]
Bug reported by alarionfirn
Patch submitted by Jeroen Bakker

It took the read the N+N of the uv-layer, it should be the Nth uv layer.
2010-12-19 20:40:52 +00:00
Nathan Letwory
d420d09da9 Fix compiling for MingW too. 2010-10-09 21:31:32 +00:00
Nathan Letwory
f72eef5de7 COLLADA
Import unit_settings to scene.

Note: I use here RNA to do this, and I think I might slowly work on replacing low-level DNA usage with RNA where possible.
2010-10-09 21:17:14 +00:00
Nathan Letwory
e161c22dc2 Assorted GCC fixes for OpenCOLLADA support 2010-10-06 12:04:56 +00:00