Commit Graph

57 Commits

Author SHA1 Message Date
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
Nathan Letwory
8a68326f81 COLLADA: Better import and export of cameras. 2010-09-28 08:01:20 +00:00
979b06f739 Merge -c 31610 (<instance_node> support) from COLLADA branch into trunk. 2010-09-04 19:27:04 +00:00
0753766a57 Fix for the fix. 2010-08-01 16:38:30 +00:00
4e031236d5 Compile fix for recent changes. Function needed 1 more argument.
Chingiz can you please check?
2010-08-01 16:35:27 +00:00
f3cca3e192 2.5: more G.main changes. 2010-08-01 12:57:01 +00:00
5b9059e2bd Compile fix for changes in "filldisplist" function. 2010-06-23 17:40:17 +00:00
a545998c84 Merge -c 29009,29081,29189 from COLLADA branch into trunk. 2010-06-03 17:41:33 +00:00
93f420b666 correct typo's 2010-04-25 15:24:18 +00:00
d15c7a2eae Merge -c 28147 from COLLADA branch into trunk. 2010-04-12 15:32:59 +00:00
1c031d968b Merge -c 28089 from COLLADA branch into trunk. 2010-04-08 11:57:23 +00:00
ea7fdb55a3 Compile fix to collada after ED_object_apply_obmat() was removed.
Arystanbek, please feel free to fix if it's not ok :)
2010-04-06 02:05:02 +00:00
35c0e5052a Merge -c 28014 from COLLADA branch into trunk. 2010-04-05 15:47:57 +00:00
f87f5d67ed Merge -c 27903 from COLLADA branch into trunk. 2010-03-31 15:04:46 +00:00
b356eb6a8b image re-project now uses offscreen render function and has input for render size.
unrelated changes that ended up being more trouble to commit separate...

- removed BLI_split_dirfile(), was nasty, occasionaly modifying the source string, it could create directories and used the $CWD in some cases. was only used in 2 places in filesel.c, if this gives problems can address without bringing back this function.
  renamed BLI_split_dirfile_basic --> BLI_split_dirfile

- view3d_operator_needs_opengl was being called for offscreen render when it wasnt needed.
2010-03-08 20:08:04 +00:00
b3d41ac144 Merge -c 26897,26932 from COLLADA branch into trunk. 2010-02-15 16:18:21 +00:00
b43f107195 Merge -c 26848 from COLLADA branch into trunk. 2010-02-12 20:32:36 +00:00
1f863d0122 COLLADA branch: merge from trunk -r 25745:26429.
scons+vc build crashes on Blender start when BF_COLLADA is on, don't know why this happens.

Merging from trunk to get working vc project files, then will try to debug and locate the problem.
2010-01-30 14:12:51 +00:00
e307f6c6a0 rename defgroup functions to be more consistant.
* no functional changes *
2010-01-26 13:50:17 +00:00
6695334377 COLLADA branch: patch for importer from Sergey I. Sharybin to build against OpenCollada at revision 721. Thanks Sergey!
People who want to build this branch will need update their OpenCollada.

On Linux OpenCollada builds without patching. As usual I updated the build doc: http://wiki.blender.org/index.php/User:Kazanbas/Building_Collada_Branch#Building_the_COLLADA_GSoC_branch

A small change will be necessary in cmake and scons options on Mac and Windows: OpenCollada's libBuffer was renamed to libbuffer.
2010-01-23 17:33:40 +00:00
1bca8389dd Merge from trunk -r 25003:25745. 2010-01-05 19:21:59 +00:00
0a0d43a926 Merge -c 25001,25310,25311,25638,25746 from COLLADA branch into trunk. 2010-01-05 17:42:01 +00:00
06d548bd6f COLLADA branch: bone anim export works. Export-import roundtrip is possible.
Importer now takes mesh bind position into account.

TODO: read/write object-level anim on armatures and fix memleaks.
2010-01-05 16:07:10 +00:00
18eb6d9827 COLLADA branch: fixed a small bug in bone anim import code. 2009-12-31 14:31:42 +00:00
ca16488e81 MSVC 9 compile fixes and cleanups
* added renamed files in revision 25337
* renamed BLI_util.h -> BLI_path_util.h for consistency
* cleanup of #includes: removed BLI_blenlib.h in favour of direct includes of the needed headerfiles in a few places.
* removed debug print in sequencer.c
* added missing include in blenkernel/blender.c -> bad dependency, needs to be fixed still
2009-12-13 17:46:30 +00:00
92b4316708 Merge from COLLADA branch into trunk of -c 24572 (cmake and scons for OpenCollada @ 675, Linux) and 25001 (bone animation import). See corresponding log entries for more detail. 2009-11-29 19:16:52 +00:00
71a2cc3222 Merge from trunk -r 24758:25003. 2009-11-29 18:54:37 +00:00
ead79e535d COLLADA branch: bone animation import works!
Here's the doc describing how it works: http://wiki.blender.org/index.php/User:Kazanbas/Collada_Animation_Import

Here's a video showing it at work: http://vimeo.com/7877617
2009-11-29 14:38:50 +00:00
b40307df16 add access to bone add/remove from rna. eg.
bone = arm.edit_bones.new("SomeBone")
 arm.edit_bones.remove(bone)

regify (WIP)
2009-11-25 11:05:11 +00:00
284f66acf7 Fix for last commit, forgot to update collada. 2009-11-24 12:35:06 +00:00