Commit Graph

73 Commits

Author SHA1 Message Date
Gaia Clary 4b891b40c2 Fix: Collada Importer did not import the Blender Profile information correctly when multiple objects are bound to same armature. This caused Bone tails to be placed wrong. 2016-09-24 01:06:32 +02:00
Campbell Barton 8343518272 Cleanup: comment blocks 2016-07-15 02:39:45 +10:00
Campbell Barton aef72125da Correction for MSVC 2016-07-02 20:22:07 +10:00
Campbell Barton 9f5621bb4a Cleanup: comment blocks 2016-07-02 10:08:33 +10:00
Campbell Barton 0a026033ae BMesh: make toolflags optional
Saves 8 bytes per vert/edge/face.
Gives overall ~20-25% memory saving for dyntopo sculpting
and modifiers that use BMesh.
2016-07-01 19:29:22 +10:00
Gaia Clary cd4d80fac6 added missing include 2016-05-29 01:38:14 +02:00
Gaia Clary af185e1154 fixed some incompatible definitions (to make this work also on linux) 2016-05-29 01:30:20 +02:00
Gaia Clary 5366900ace Added support for non numeric bone layer labels (could happen when importing from other tools)
Differential Revision: https://developer.blender.org/D2037
2016-05-29 00:37:46 +02:00
Gaia Clary 8e26111020 Collada: Adding support for bone roll and bone layers
Differential Revision: https://developer.blender.org/D2034
2016-05-28 19:22:06 +02:00
Gaia Clary 1346482d23 moved is_leaf_bone() to collada utils for reuse in exporter and importer 2016-05-26 18:22:36 +02:00
Bastien Montagne 467e12514e Fix broken Collada from rBrB6d0cae56e84306ed. 2016-04-29 16:56:20 +02:00
Bastien Montagne 3fcf535d2e Split id->flag in two, persistent flags and runtime tags.
This is purely internal sanitizing/cleanup, no change in behavior is expected at all.

This change was also needed because we were getting short on ID flags, and
future enhancement of 'user_one' ID behavior requires two new ones.

id->flag remains for persistent data (fakeuser only, so far!), this also allows us
100% backward & forward compatibility.

New id->tag is used for most flags. Though written in .blend files, its content
is cleared at read time.

Note that .blend file version was bumped, so that we can clear runtimeflags from
old .blends, important in case we add new persistent flags in future.

Also, behavior of tags (either status ones, or whether they need to be cleared before/after use)
has been added as comments to their declaration.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D1683
2015-12-27 12:00:33 +01:00
Campbell Barton 1adc196723 Correct error in recent commit 2015-11-06 01:56:29 +11:00
Gaia Clary 0e00072ff0 fix:T44856 reverted triangluation back to bmesh ( apparently broken by commit rB51f33 ) 2015-05-27 13:19:40 +02:00
Gaia Clary 51f33a2e55 collada:custom normals generated by normals modifier have not been exported correctly. Also triangulating during export did not work. 2015-05-06 17:03:38 +02:00
Campbell Barton fdc5f9c0a8 Add name argument to data creation API calls
Was adding then renaming, unnecessarily.
2015-05-04 16:01:20 +10:00
Sergey Sharybin a1a7317f6b Add argument to DM_to_mesh() function to take ownership over the DM
The idea is pretty simple: instead of making temporary copy of all the
related custom data layers just pass the ownership from the DM to the
mesh.

This is really handy in cases when you've got DM which you need to
convert to Mesh datablock and wouldn't need that DM after conversion
anyway.

Foe example, render database conversion, exporters and even Modifier
Apply will benefit from this option.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1127
2015-03-13 17:46:55 +05:00
Campbell Barton 617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
Campbell Barton a5606fadbb Code Cleanup: remove object arg to CDDM_from_mesh mesh_create_derived 2013-12-26 08:27:08 +11:00
Gaia Clary 055b65d6ba (Due to a change in function call) Added default triangulation method for Collada exporter 2013-10-29 10:49:44 +00:00
jens verwiebe f9ab1df564 Fix collada compile, too less arguments 2013-10-29 10:13:49 +00:00
Thomas Dinges 9843170f4b * Compile fix for r59395, 'move bmesh tools into their own include'. 2013-08-23 11:16:52 +00:00
Gaia Clary 1a3a252e06 Collada: Import now always rotates input to match blender's Z_UP axis 2013-07-29 21:51:53 +00:00
Campbell Barton 824ec5a388 code cleanup: case & brace placement 2013-07-19 10:40:43 +00:00
Campbell Barton cda5770160 code cleanup: also fix crash in GPU_state_print(). and confine to debug mode builds. 2013-06-13 11:59:28 +00:00
Campbell Barton dfad9b0c09 fix [#35555] Collada: export destroys mesh in some cases
add arguments to calculate normals when converting to bmesh:
  BM_mesh_bm_from_me, DM_to_bmesh

This gives some speedup to undo (which didnt need to re-calculate vertex normals), and array modifier which doesnt need to calculate face normals at all
2013-06-02 23:20:49 +00:00
Campbell Barton ec8d277c64 BLI_math rename functions:
- mult_m4_m4m4 -> mul_m4_m4m4
- mult_m3_m3m4 -> mul_m3_m3m4

these temporary names were used to avoid problems when argument order was switched.
2013-05-26 18:36:25 +00:00
Brecht Van Lommel 62087935ec Fix #35209: cycles generated texture coordinates did not stick to deforming meshes. 2013-05-05 05:56:41 +00:00
Sergey Sharybin 4df0c46f83 Make freestyle use local Main for temporary objects
This means main database is no longer pollutes with
temporary scene and objects needed for freestyle
render.

Actually, there're few of separated temporary mains
now. Ideally it's better to use single one, but it's
not so much trivial to pass it to all classes. Not
so big deal actually.

Required some changes to blender kernel, to make it
possible to add object to a given main, also to
check on mesh materials for objects in given main.
This is all straightforward changes.

As an additional, solved issue with main database
being infinitely polluted with text blocks created
by create_lineset_handler function.

This fixes:
- #35003: Freestyle crashes if user expands objects in FRS1_Scene
- #35012: ctrl+f12 rendering crashes when using Freestyle
2013-04-18 08:58:21 +00:00
Campbell Barton e1a54214bb code cleanup:
- remove unused defines.
- quiet some shadow warnings.
- bevel, ifdef out some asserts that are too common.
- style
2013-03-25 02:41:30 +00:00
Campbell Barton 01e9dae3dc code cleanup 2013-03-18 18:25:05 +00:00
Campbell Barton f2bb536994 code cleanup: also change BKE_blender.h BLENDER_VERSION_CHAR to 'a' so as not to confuse things. 2013-03-05 14:47:49 +00:00
Campbell Barton c6642b8ec8 enable triangulation with collada, disable BLI_STATIC_ASSERT for C++. 2013-03-03 01:24:09 +00:00
Gaia Clary 24437b6171 partial revert of collada triangulation code due to problems on linux 2013-03-02 23:42:03 +00:00
Gaia Clary be701b6278 Collada: Added support for ngon export/import and added triangulate option to export 2013-03-02 15:58:13 +00:00
Brecht Van Lommel 20220d47e3 Dependency Graph: some refactoring which should have no user visible impact
besides performance in some cases.

* DAG_scene_sort is now removed and replaced by DAG_relations_tag_update in
  most cases. This will clear the dependency graph, and only rebuild it right
  before it's needed again when the scene is re-evaluated.

  This is done because DAG_scene_sort is slow when called many times from
  python operators. Further the scene argument is not needed because most
  operations can potentially affect more than the current scene.

* DAG_scene_relations_update will now rebuild the dependency graph if it's not
  there yet, and DAG_scene_relations_rebuild will force a rebuild for the rare
  cases that need it.

* Remove various places where ob->recalc was set manually. This should go
  through DAG_id_tag_update() in nearly all cases instead since this is now
  a fast operation. Also removed DAG_ids_flush_update that goes along with
  such manual tagging of ob->recalc.
2013-02-21 19:33:04 +00:00
Gaia Clary 9fe4dbb9f1 Fix: Collada Import files with X_UP and Y_UP axis where imported with wrong orientation 2013-02-15 15:36:02 +00:00
Gaia Clary 9d6210c0ed Collada Importer: Some code cleanup and optimization of the rescale function 2013-02-11 11:12:44 +00:00
Campbell Barton 2005f7c6c0 style cleanup: also some typos 2013-02-11 00:49:00 +00:00
Gaia Clary 22dbb675c1 Fix #33437 Collada: Added scale matching for Scene imports. 2013-02-10 22:14:56 +00:00
Campbell Barton 942ad6d9cd style cleanup 2013-02-10 17:06:05 +00:00
Gaia Clary e3488af838 fixed: [#34080] import of COLLADA breaks on '#' in filepath 2013-02-09 00:23:59 +00:00
Gaia Clary deeeaed3d8 [#33955] Collada Model Import Hangs Blender. Optimized Object import for better performance. Added logging messages 2013-02-08 19:52:02 +00:00
Thomas Dinges dad053a152 * One more fix for Collada. 2013-02-05 13:16:21 +00:00
Sergey Sharybin 9d02ac41dc Attempt to fix collada compilation after recent commit
I don't have recent collada compiled here atm, so perhaps there're
more issues here.
2013-02-05 13:04:01 +00:00
Bastien Montagne 818a345be3 Silent a bunch of gcc warnings (usually dummy, but noisy!). 2012-12-02 16:01:06 +00:00
Campbell Barton a0f01ef8d8 remove BLI_utildefines from BKE_DerivedMesh.h header 2012-11-01 15:34:38 +00:00
Gaia Clary 10004d4a42 fixed: [#32240] Collada import when nodes share geometry but not material 2012-08-12 17:13:07 +00:00
Campbell Barton 32478997ec style cleanup 2012-06-27 18:29:47 +00:00
Gaia Clary adf3a5e332 Collada: (Export) Added export of surface textures, and control over exported uv layers 2012-06-22 16:16:58 +00:00