Commit Graph

86 Commits

Author SHA1 Message Date
3311164b24 Math lib: matrix multiplication order fix for two functions that were
inconsistent with similar functions & math notation:

mul_m4_m4m4(R, B, A) => mult_m4_m4m4(R, A, B)
mul_m3_m3m4(R, B, A) => mult_m3_m3m4(R, A, B)

For branch maintainers, it should be relatively simple to fix things manually,
it's also possible run this script after merging to do automatic replacement:
http://www.pasteall.org/27459/python
2011-12-16 19:53:12 +00:00
647447db58 Code refactoring: split lamp functions from object.c into new lamp.c. 2011-11-05 13:11:49 +00:00
9884129117 Code refactoring: split camera functions from object.c into new camera.c. 2011-11-05 13:00:39 +00:00
4ea816837d Configurable sensor size:
- Added support of variable size sensor width and height.
- Added presets for most common cameras, also new presets can be defined by user.
- Added option to control which dimension (vertical or horizontal) of sensor
  size defines FOV. Old behavior of automatic FOV calculation is also kept.
- Renderer, viewport, game engine and collada importer/exporter should
  deal fine with this changes. Other exporters would be updated soon.
2011-11-04 14:36:06 +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
ef218c75ed - add convenience functions BLI_split_dir_part / BLI_split_file_part, which just call BLI_split_dirfile().
- add a fixed value for bprogdir (the dir of bprogname), since it was being used for resource lookups.
2011-10-21 02:13:36 +00:00
317b649bb2 fix for buffer overrun with BLI_split_dirfile(...), was simple to do since many places don't check for filename lengyj of 79 chars which is the limit for the file selector.
Add max dir and file length args.
2011-10-15 03:56:05 +00:00
a20bcb4613 clear up some warnings. 2011-09-22 14:42:29 +00:00
d4898f9c40 use macros RAD2DEG & DEG2RAD rather then multiplying by 180.0/M_PI or M_PI/180.0 2011-09-17 09:43:51 +00:00
Nathan Letwory
6e9ff495eb Add parser error handler.
OpenCOLLADA is a validating parser, so is pretty strict about document form. The added error handler will print out any errors the parser finds. A pop-up will be shown too, advising the user to check the console for the error log.
2011-09-05 20:41:58 +00:00
a6d9a5a972 Code cleanup: warning fixes. 2011-09-05 19:27:21 +00:00
Nathan Letwory
5c5b9cf4d7 Remove NULL-checks, as they might cause infinite loops while reading a DAE containing unsupported data, i.e. <lines> geometry. 2011-09-04 22:14:28 +00:00
e86e922f5b Armature importer code cleanup. 2011-08-17 18:29:01 +00:00
f04fb5b6ea Finalizing. 2011-08-16 16:03:37 +00:00
cc3b9aa467 blender extra parameter animation import ( on hold ); 2011-08-14 16:15:41 +00:00
40e36975ef Blender profile leaf bone tip import. 2011-07-26 18:28:07 +00:00
1e0e0ff5c4 Blender profile for leaf_bone tip. (untested). 2011-07-24 20:27:27 +00:00
c22f26d203 Material Hardness Animation Import Complete. 2011-07-23 20:49:26 +00:00
2fb7dbd60c Material Specular Hardness Animation import (ongoing) 2011-07-18 19:32:51 +00:00
6c88a16b3a Camera lens animation Identifying 2011-07-06 18:09:36 +00:00
a632091176 Light Animation Identification. 2011-07-03 11:07:34 +00:00
207911bdb3 Merge with trunk r37677 2011-06-20 22:55:18 +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
81f5679ff5 Fix [#26821] Import Collada: instance_node still incorrectly handled
reported by David Roy
patch submitted by Camillo Dell'mour
2011-06-20 10:50:17 +00:00
Nathan Letwory
201052a3ff Apply Patch [#27454] Add simple Transparency texture import for COLLADA
submitted by Steffen Ohrendorf.
2011-06-20 10:28:37 +00:00
adb81a0351 Fixed Armature Import Without Skin controllers. Armatures and animations get imported. Some inaccuracy remains with bone transforms. 2011-06-19 07:43:43 +00:00
28f0d96bea 2011-06-19 04:20:43 +00:00
6aa524f357 AnimationExporter - Quaternion to euler conversion ( in progress )
AnimationImporter 
- Action group assignment to bones
- Revert to conversion of angles from deg to rad.
2011-06-16 15:04:37 +00:00
f3f3bcc45e New Animation Import system. Only Mesh object animation import support implemented for now. 2011-06-14 20:42:01 +00:00
Nathan Letwory
0af94b45e4 Fix [#27463] COLLADA light quadratic attenuation exported wrong?
Reported by Pelle Johnsen
Fix falloff import. Point light and Spot light always were set to inverse quad, instead of choosing the proper one based on imported values.

The
2011-06-13 15:07:36 +00:00
Nathan Letwory
2b79378f81 COLLADA lights:
* simplify export and import, now that we have blender profiles for lights. The vanilla import is now more in line with the specs. If a blender profile is found, skip normal import, use the profile data instead.
* multiply energy into color rgb export (common profile).
* recalc distance taking metrics in account
2011-03-30 10:51:01 +00:00
Nathan Letwory
bd9854e7d1 Import light blender profile if it exists. 2011-03-28 09:31:44 +00:00
Nathan Letwory
32abf5eca8 Add ExtraTags class for handling tags inside an extra block. 2011-03-25 11:07:57 +00:00
Nathan Letwory
c5c4b31d6b Mostly formatting commit, small elaboration in extra handling API (take pointer to importer). 2011-03-25 09:52:36 +00:00
Nathan Letwory
3c45a2d298 COLLADA: supporting barebone class for <extra> support (incomplete). 2011-03-23 14:25:35 +00:00
Nathan Letwory
e1a44e9ae6 COLLADA: small tweaks to directional light import. 2011-03-21 09:50:30 +00:00
Nathan Letwory
3e8c838a99 Fix [#26012] Import Collada: instance_node incorrectly handled
Reported by David Roy

When <instance_node>s where read, their transformation matrix got overwritten with the transform matrix
of their own node, not taking into account the parent node transformation. Instead of doing
that we now get the parent node transformation matrix and apply it to its own, and prevent
caller from overwriting this new transformation matrix.
2011-03-09 14:16:21 +00:00
Nathan Letwory
caf9fb6cce doxygen: blender/collada tagged. 2011-02-27 20:30:35 +00:00
867fc4b463 enforce string limits (reported by pedantic checking tools & some developers).
mostly replace strcpy with BLI_strncpy and multiple strcat's with a BLI_snprintf().
also fix possible crash if CWD isnt available.
2011-02-13 03:21:27 +00:00
Nathan Letwory
7769c00385 First step towards having a 2-pass reading of COLLADA .dae files. 2011-01-28 12:56:30 +00:00
8f21a43535 split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
2011-01-07 18:36:47 +00:00
f90a2123ee no functional change: only check against OB_RECALC_ALL but don't use for assignment.
Makes adding new flags give ambiguous results and also makes it less easy to tell whats intended.
In some places it looks like OB_RECALC_TIME should be left out too.
2010-12-17 15:51:42 +00:00
Nathan Letwory
100d611ce5 Apply patch [#25224] Refactor COLLADA DocumentImporter
Submitted by Martijn Berger.

Make DocumentImporter class the actual IWriter implementation and move prototype to the header.
Group together functions that we should move out of the class.

No functional changes.
2010-12-14 21:46:03 +00:00
Nathan Letwory
12afa64de9 Fix [#24592] COLLADA imports only one special node per type per node
Reported and patched by Martijn Berger
2010-11-16 23:18:17 +00:00
dba1904f65 bugfix [#24518] Blender wont compile with -Wall -Werror and COLLADA support
fix included in report from Martijn Berger (mberger)
made some small changes.

- use ints rather then unsigned long for printing, values are not likely to be very large.
- CMake remove strict flags from collada build dir since I had warnings in the collada headers.
- added xml2 to collada libraries else I couldnt get collada building.
2010-11-03 22:44:39 +00:00
Nathan Letwory
17085e967e Fix COLLADA import after recent API cleanups by Campbell. 2010-10-15 14:56:31 +00:00
Nathan Letwory
097a926d94 Fix [#24201] COLLADA Exporter: Light source energy incorrect
lamp->energy and lamp->distance are now taken in account by calculating
the constant, linear and quadratic attenuations based on this.

The import tries to do the reverse.

Note: this will work only properly for lamps that have att1 and att2 set to
1.0 or 0.0, other lamptypes won't import correctly again.
2010-10-14 09:40:56 +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
82209cdc86 Reorganisation of COLLADA import code. Classes have been split into their own files.
No functional changes.

Where necessary extern "C" {} blocks have been added.
2010-10-05 00:05:14 +00:00
Nathan Letwory
99ebe229f6 Fix [#21084] Collada messing up geometry on import and renaming uvlayers
Reported by Michael Williamson

Add support to write the uvlayer name as found in <bind_vertex_input> semantic attribute (Blender
exports in this one too, so reimport goes ok now).

I have created a patch for OpenCOLLADA to be applied against r769, which is needed
for this fix to work: http://code.google.com/p/opencollada/issues/detail?id=117

The Windows OpenCOLLADA updated builds (r769+patches) will be committed after this.

Note: This means that linux and osx users will have to patch OpenCOLLADA themselves, until
it's committed (or in case of OSX the libs updated in lib/darwinXXX).
2010-10-01 19:46:42 +00:00