Commit Graph

138 Commits

Author SHA1 Message Date
ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +00:00
e3944f5bfa Divide by 3 instead of multiplying by variations of 0.333
Fixes small precision problems.
2013-02-14 17:35:43 +00:00
fdfa5910b5 Fix #34040: Moving Normal Node with enabled Cycles Material Preview crashes
Issue was caused by couple of circumstances:

- Normal Map node requires tesselated faces to compute tangent space
- All temporary meshes needed for Cycles export were adding to G.main
- Undo pushes would temporary set meshes tessfaces to NULL
- Moving node will cause undo push and tree re-evaluate fr preview

All this leads to threading conflict between preview render and undo
system.

Solved it in  way that all temporary meshes are adding to that exact
Main which was passed to Cycles via BlendData. This required couple
of mechanic changes like adding extra parameter to *_add() functions
and adding some *_ex() functions to make it possible RNA adds objects
to Main passed to new() RNA function.

This was tricky to pass Main to RNA function and IMO that's not so
nice to pass main to function, so ended up with such decision:

- Object.to_mesh() will add temp mesh to G.main
- Added Main.meshes.new_from_object() which does the same as to_mesh,
  but adds temporary mesh to specified Main.

So now all temporary meshes needed for preview render would be added
to preview_main which does not conflict with undo pushes.

Viewport render shall not be an issue because object sync happens from
main thread in this case.

It could be some issues with final render, but that's not so much
likely to happen, so shall be fine.

Thanks to Brecht for review!
2013-02-05 12:46:15 +00:00
496c3e4f8f Fix #34070: set origin operator did not work for lattice objects. 2013-02-01 15:17:39 +00:00
7730ddb3d6 code cleanup:
- free_dverts -> BKE_defvert_array_free
- copy_dverts -> BKE_defvert_array_copy

also move the functions from BKE_mesh into BKE_deform
2012-12-28 09:06:48 +00:00
a6bee579e9 move pbvh into BKE, it used many BKE bad level includes.
now blenlib/BLI doesn't depend on any blenkern/BKE functions,
there are still some bad level includes but these are only to access G.background and the blender version define.
2012-12-15 15:59:25 +00:00
21a9fa9089 move bpath module from BLI to BKE, it was making many bad level calls into BKE. 2012-12-15 15:31:50 +00:00
7c699a217a define the size of matrix args for both rows/cols. 2012-12-11 14:29:01 +00:00
23baf8c9c3 code cleanup: check defgroup_name_index() return value != -1, rather then checking >= 0.
also remove unused bmesh decimator code.
2012-10-22 17:19:05 +00:00
da9394f596 code cleanup: define sizes of vectors for function args and use C style comments 2012-10-15 09:11:17 +00:00
e8872a8ea2 style cleanup: if(); 2012-10-07 09:48:59 +00:00
7a71f58af3 fixes for NULL checks, remove some redundant checks and add some in that have been removed by accident as code has been updated. 2012-09-14 06:17:14 +00:00
250cdd5e52 code cleanup: remove commented includes - mostly from 2.4x 2012-07-18 23:07:07 +00:00
f5f25b81e8 style cleanup:
also fix for building ghost test and fix double free in one of the tests
2012-06-17 09:58:26 +00:00
b33f0ef0e3 style cleanup 2012-05-27 19:40:36 +00:00
40b7b9655a fix for regression in curve modifier (own fault) 2012-05-22 09:00:34 +00:00
af3e348430 code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars. 2012-05-19 13:28:19 +00:00
305d341ec2 code cleanup: use vector math function minmax_v3v3_v3() and other minor vector function edits. 2012-05-13 11:05:52 +00:00
318b44fe5d Refactor of modifiers' apply function: now use a single bit-flag parameter to pass options, instead of having one parameter per boolean flag (i.e. replaces current useRenderParams and isFinalCalc by a single ModifierApplyFlag flag. ModifierApplyFlag is an enum defined in BKE_modifier.h). This way we won't anymore have to edit all modifier files when e.g. adding a new control flag!
Should have no effect over modifier behavior.
2012-05-09 15:00:26 +00:00
3ef11693f5 Style cleanup: displist module 2012-05-07 06:58:03 +00:00
c93d7a193a style cleanup: BKE_*.c files which deal with library functions 2012-05-06 15:15:33 +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
e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
950ed69297 code cleanup:
- replace inline face UV center calc.
- use const float[3] for mesh and uv functions.
- remove unused define
2012-04-28 08:29:20 +00:00
94b8b8913e rename lattice influence to strength from r45144 (other deform modifiers call it strength too) 2012-03-26 00:42:21 +00:00
aede928bdc Patch: [#30652] Influence slider for Lattice Modifier
* This patch adds a influence slider for the lattice modifier, which affects the strength of the deformation. 

Patch by Patrick Boelens (senshi), thanks a lot!
2012-03-25 22:14:21 +00:00
69e6894b15 style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:18:31 +00:00
95670e03a0 style cleanup / comment formatting for bli/bke/bmesh 2012-03-03 20:19:11 +00:00
53fece44cf style cleanup for blenkernel, no functional changes. 2012-02-23 02:17:50 +00:00
ac07669900 remove old code and use macro for latt_bp() function 2012-01-31 21:56:22 +00:00
2050ab09a5 calc_curve_deform was using axis range of 1-6, but other parts of the code use 0-5. (confusion here casued an error in the code).
make calc_curve_deform use 0-5 too, only minor changes needed.
2012-01-31 21:32:06 +00:00
888187fa8c fix incorrect neg axis check for the curve deform modifier's boundbox. 2012-01-31 21:20:30 +00:00
820bb6e148 fix [#30037] Curve Modifier doesn't work within -X -Y -Z translation in such cases?
the curve modifier was applying the offet between the mesh and the curve object twice.
for positive axis it was (offset+offser), for neg axis (offset-offset) --- giving no offset,
in both cases not very useful.
2012-01-31 21:06:52 +00:00
199efda34e fix inconsistancy with curve deform bounds being set differently when vertex groups were used. 2012-01-31 20:48:48 +00:00
8a0a0e3a74 minor cleanup made while looking into bug report (having vector size in comments is silly, may as well have in declaration) 2012-01-31 20:38:03 +00:00
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
3fdc28b736 add a new object member to store the dsize, since with my recent commit broke forward compatibility. now the new values are copied into 'dscale' and existing ones remain.
this is annoying since now we have dsize and dscale, will look into a way to deprecate struct members next.
2011-12-04 03:35:54 +00:00
9b2df014d2 fix [#29459] Crash making a linked object group local
was an error with make-local refactor & path updating.
2011-11-30 00:32:13 +00:00
bb8fe0bf4a minor edits
- remove unneeded type check from convert grease pencil operator.
- correct some error prints & use __func__.
- make copy_libblock take an ID* argument rather than void*.
2011-11-07 04:36:37 +00:00
33accdb725 use (const char*) rather than (char*) where possible.
also removed some unused function definitons.
2011-11-05 11:04:28 +00:00
e3f03d72b6 added path traversal flag - BPATH_TRAVERSE_SKIP_MULTIFILE,
so path manipulation functions dont run multiple times on the same path in the case of sequence strips where the one directory is used as the base for many images.
2011-11-01 06:26:55 +00:00
f7d5cea669 use path remapping for all make local functions, patch from Alex Fraser with changes. 2011-10-27 05:34:39 +00:00
a267f9ba4e edits ontop of Alex's patch from r41292.
pass main rather than use G.main when naming from -> to relative paths.
2011-10-26 21:22:35 +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
bc40f11093 header cleanup (no functional changes) 2011-10-10 09:38:02 +00:00
9b5800bcd7 fixed "rather then" -> "rather than" typos all over the place 2011-05-28 13:11:24 +00:00
e4cc1c3f2c fix [#27178] Material links lost when making mesh data local
- making local object data - Curve/Mesh/MBall lost references to linked materials.
- joining a linked mesh object into a local one lost the link.

As well as these reported bugs, checked all local functions for consistency/correctness and found other cases which would also fail.
- making local metaball didn't ensure unique ID name.
- make_local_armature() was missing check for object users - main body of code would never run.
- local particles didn't set the dupli-group or textures to extern.

checked all local functions for consistency/correctness.
2011-04-26 07:17:21 +00:00
20d3022076 following on from last commit r36263.
copying metaball, lattice and armature datablocks while in editmode could segfault when they were freed, NULL these pointers on copy.
2011-04-21 09:38:09 +00:00
70162a4abd fix [#26682] Accessing weight sometimes crashes blender
also replace object type check from vgroup_edit_lattice() with an assert since all callers check for lattice type.
2011-03-30 02:59:32 +00:00