Commit Graph

150 Commits

Author SHA1 Message Date
46eef60d93 Cleanup: Internal degrees removal.
This patch changes most of the reamining degrees usage in internal code into radians.
I let a few which I know off asside, for reasons explained below - and I'm not sure to have found out all of them.

WARNING: this introduces forward incompatibility, which means files saved from this version won't open 100% correctly
         in previous versions (a few angle properties would use radians values as degrees...).

Details:
- Data:
-- Lamp.spotsize: Game engine exposed this setting in degrees, to not break the API here I kept it as such
                  (using getter/setter functions), still using radians internally.
-- Mesh.smoothresh: Didn't touch to this one, as we will hopefully replace it completely by loop normals currently in dev.

- Modifiers:
-- EdgeSplitModifierData.split_angle, BevelModifierData.bevel_angle: Done.

- Postprocessing:
-- WipeVars.angle (sequencer's effect), NodeBokehImage.angle, NodeBoxMask.rotation, NodeEllipseMask.rotation: Done.

- BGE:
-- bConstraintActuator: Orientation type done (the minloc[0] & maxloc[0] cases). Did not touch to 'limit location' type,
                        it can also limit rotation, but it exposes through RNA the same limit_min/limit_max, which hence
                        can be either distance or angle values, depending on the mode. Will leave this to BGE team.
-- bSoundActuator.cone_outer_angle_3d, bSoundActuator.cone_inner_angle_3d: Done (note I kept degrees in BGE itself,
                                                                           as it seems this is the expected value here...).
-- bRadarSensor.angle: Done.

Reviewers: brecht, campbellbarton, sergey, gaiaclary, dfelinto, moguri, jbakker, lukastoenne, howardt

Reviewed By: brecht, campbellbarton, sergey, gaiaclary, moguri, jbakker, lukastoenne, howardt
Thanks to all!

Differential Revision: http://developer.blender.org/D59
2013-12-03 20:35:45 +01:00
69e9927b6c Cleanup: remove deprecated old Lamp.shadspotsize from code.
Was not used anymore, except in Collada import/export, but without any conversion code.
Suggested by Brecht in comments of D59.
2013-12-01 11:25:11 +01:00
aa8488421f style cleanup: whitespace & odd indentation 2013-09-21 10:46:58 +00:00
Nathan Letwory
76aa5dfb70 Apply patch [#36601].
Submitted by Saurabh Wankhade (sauraedron).

This patch adds camera shift and dof export and import in a Blender profile.
2013-09-05 06:58:27 +00:00
f7169cd47d fix: [#36148] Collada instance nodes are not scaled properly during import 2013-07-30 12:18:24 +00:00
a5cc8f2c92 Collada: Optimize Scale to scene. Only need to scale the root objects of a hierarchy 2013-07-29 22:15:04 +00:00
1a3a252e06 Collada: Import now always rotates input to match blender's Z_UP axis 2013-07-29 21:51:53 +00:00
61cb92f701 fix: #36122 Collada import - Keyframes offset after recording and playing 2013-07-15 11:01:23 +00:00
e353593b30 fix: #36060 Collada Import: animated armature+mesh problem 2013-07-14 17:21:12 +00:00
4507dd9a7e Removed unused paramter from ArmatureImporter:add_joint() 2013-07-14 16:24:42 +00:00
f5033303e1 fix: #34823 Collada: nodes exporting world matrices 2013-07-14 00:34:21 +00:00
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
cd60848dd0 Fix collada module build for visual studio 2012.
Patch #35153 by Jurgen Herrmann.
2013-04-29 19:15:53 +00:00
be701b6278 Collada: Added support for ngon export/import and added triangulate option to export 2013-03-02 15:58:13 +00:00
4f3ca854e1 Fix various warnings with clang build, and adjust cmake clang warnings flags
to include a few more that gcc is using too.
2013-02-26 21:58:06 +00:00
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
7337c2d4c2 fix #34049: Collada importer doesn't import armature. Added some comments to the program code for better understanding. 2013-02-20 00:13:34 +00:00
134537b65b fix #34049: Collada importer doesn't import armature. Added support for 'rootless' armature similar to Maya. 2013-02-20 00:06:31 +00:00
ee64cbaf39 fix #34284 Collada: update problem for vertex weights directly after import. 2013-02-17 18:33:10 +00:00
8a20930c71 Collada: Fixed import of textures with path settings relative to main import file 2013-02-13 16:00:46 +00:00
3dfd736d45 Fix: Collada Import of armatures only added the root bone 2013-02-11 20:21:10 +00:00
22dbb675c1 Fix #33437 Collada: Added scale matching for Scene imports. 2013-02-10 22:14:56 +00:00
942ad6d9cd style cleanup 2013-02-10 17:06:05 +00:00
f34d1d5585 [#33437](partial fix) Collada: importing a scene changes units. Added an option to disable unit settings during import. 2013-02-09 16:19:30 +00:00
e3488af838 fixed: [#34080] import of COLLADA breaks on '#' in filepath 2013-02-09 00:23:59 +00:00
deeeaed3d8 [#33955] Collada Model Import Hangs Blender. Optimized Object import for better performance. Added logging messages 2013-02-08 19:52:02 +00:00
fdd18c7a07 fixed collada import for objects which have NO children 2013-02-08 12:23:36 +00:00
286d67b714 fix null pointer issue when child nodes reference to unknown/invalid mesh 2013-02-08 00:28:58 +00:00
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
69993c5d40 style cleanup: spaces -> tabs 2013-02-04 00:18:09 +00:00
6baf63c83b Fix some warnings in the collade code, but did not fix two because they seem
to indicate bugs, left a comment about those.
2013-02-01 15:17:51 +00:00
c263753d17 Added gsoc-2012 collada improvements from bratwurst branch 2013-01-21 13:45:49 +00:00
08cea96ab0 Alpha premul pipeline cleanup
This assumptions are now made:
- Internally float buffers are always linear alpha-premul colors
- Readers should worry about delivering float buffers with that
  assumptions.
- There's an input image setting to say whether it's stored with
  straight/premul alpha on the disk.
- Byte buffers are now assumed have straight alpha, readers should
  deliver straight alpha.

Some implementation details:

- Removed scene's color unpremultiply setting, which was very
  much confusing and was wrong for default settings.
  Now all renderers assumes to deliver premultiplied alpha.

- IMB_buffer_byte_from_float will now linearize alpha when
  converting from buffer.

- Sequencer's effects were changed to assume bytes have got
  straight alpha. Most of effects will work with bytes still,
  however for glow it was more tricky to avoid data loss, so
  there's a commented out glow implementation which converts
  byte buffer to floats first, operates on floats and returns
  bytes back. It's slower and not sure if it should actually
  be used -- who're using glow on alpha anyway?

- Sequencer modifiers should also be working nice with straight
  bytes now.

- GLSL preview will predivide float textures to make nice shading,
  shading with byte textures worked nice (GLSL was assuming straight
  alpha).

- Blender Internal will set alpha=1 to the whole sky. The same
  happens in Cycles and there's no way to avoid this -- sky is
  neither straight nor premul and doesn't fit color pipeline well.

- Straight alpha mode for render result was also eliminated.

- Conversion to correct alpha need to be done before linearizing
  float buffer.

- TIFF will now load and save files with proper alpha mode setting
  in file meta data header.

- Remove Use Alpha from texture mapping and replaced with image
  datablock setting.

  Behaves much more predictable and clear from code point of view
  and solves possible regressions when non-premultiplied images were
  used as textures with ignoring alpha channel.
2012-12-31 13:52:13 +00:00
b867f9f17e style cleanup: comments & spelling 2012-11-18 01:22:31 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
d8144ef0f5 style cleanup: comment blocks 2012-10-04 13:26:15 +00:00
aa49ca25d5 incorrect spelling in comments 2012-09-26 20:05:38 +00:00
aaafa0c2fe code cleanup: move file string defines into BLI_path_utils.h, BKE_utildefines is now unused but keep incase we want to add defines there later. 2012-09-03 22:04:14 +00:00
192935eb04 fix:32348 Collada yfov to xfov conversion fo camera settings 2012-09-03 17:54:04 +00:00
10004d4a42 fixed: [#32240] Collada import when nodes share geometry but not material 2012-08-12 17:13:07 +00:00
aff4c781eb COLLADA: #29058 Fixed crash when illegal reference to non existing camera object is found. And report a warning to the console) 2012-08-05 10:23:34 +00:00
9090340175 COLLADA: fix for #32251. This seems to be compliant to the Collada 1.4.1 specification. 2012-08-04 22:18:56 +00:00
664c95d1eb code cleanup: collada
- when bubble sorting names - dont convert to str::string just to compare strings
- use BLI_linklist_index() to check if an item is in the list
- quiet some warnings
2012-06-16 09:16:24 +00:00
2e8a2f7668 style cleanup 2012-06-12 22:05:33 +00:00
36ed4818e5 patch #31794 Collada: make exporter more robust, now uses BKE_object_relational_superset() 2012-06-12 21:25:29 +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
34b18fcbc1 code cleanup: BKE_ naming, also make bpy.data.images.load() always load a new image. (not use existing one) 2012-05-05 14:52:04 +00:00
299ff91ea1 code cleanup: BKE_scene api naming.
also stop numpy from being found in /usr/include with cmake.
2012-05-05 14:33:36 +00:00
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
084fedd03a code cleanup: brush/camera naming 2012-05-05 00:58:22 +00:00