Commit Graph

28539 Commits

Author SHA1 Message Date
Sergey Sharybin
be0be0b1a9 Fix #29970: Crash trying to track disabled marker 2012-01-23 19:32:00 +00:00
Sergey Sharybin
690c77dd7d Fix #29934: New Carve library can't execute boolean operations in some cases
Issue was caused by left boolean operand consist of several intersecting manifolds
which make Carve triangulator confused and which can't be resolved in general case.
Added mesh pre-processing before actual applying boolean operator on it. This
preprocessing applies union operation on intersecting manifolds of the same object
so intersection edge loop with second object wouldn't confuse tesselator and correct
result would be returned.
Detecting of intersecting manifolds is based on AABB intersection check which leads
to some extra union operation called, but it's possible to speed things up from
Carve side so union operation of two not intersecting meshes would work faster.
Additional condition for running union for manifold is this manifolds intersects
AABB of second operand, so mesh topology wouldn't be changed at all in areas
where there's definitely no intersection between operands. It might be improved
so only manifolds which actually intersects second operand would be joined
together, but it'll slow things down a bit and prefer to do it only if it'll
be really a problem.

Additional change is fixed memory leak when boolean operation fails to run -
it was missed "delete" call if exception happens in Carve library.

From side effects of this change might be named boolean operation between
suzanne and another object: suzanne is consist of three intersecting open
manifolds, so this new meshes preprocessing leads to missed eyes in result
because of failure of merging two open manifolds. Don't think making suzanne
work for all setups should really be a goal, it's a bit crappy mesh for CSG
algorithms.
2012-01-23 17:43:41 +00:00
Andrew Hale
74b4fd26d2 In order to maintain consistency with other uses of .remove(), these functions will be removed and reimplemented after the BMesh merge.
The main issue in an implementation of these functions is the need to constantly edit the vertex array and subsequently update the face and edge arrays.
2012-01-23 13:29:29 +00:00
Daniel Salazar
be69b8b4fd modifier Apply as Shape is now Apply as Shape Key. Was confusing some users 2012-01-23 03:13:55 +00:00
Daniel Genrich
37e1285042 Cloth: Add "velocity damping" to damping options. This will help with the "cloth wobbling" problem which accurs quite often when having animated characters with cloth. 2012-01-23 01:35:14 +00:00
Mitchell Stokes
62963525ce Fix for "[#29911] Crash on reading BL_ActionActuator.channelNames"
The crash occurred when an action actuator was attached to a non-armature object because objects that aren't armatures do not have pose data. A NotImplementedError is now raised if someone tries to access any of the following with an action actuator attached to a non-armature object:

BL_ActionActuator.channelNames
BL_ActionActuator.getChannel()
BL_ActionActuator.setChannel()
2012-01-22 23:15:35 +00:00
Thomas Dinges
c499f5120b Ocean Modifier UI fixes:
* Modifier Icon was missing in the outliner
* Fluid icon was used in the rna struct, fixed

Note: Ocean uses the Wave modifier icon atm, if we find a better one, this can be changed.
2012-01-22 22:30:45 +00:00
Mitchell Stokes
686ce92fe8 Committing patch "[#27676] Change window size/resolution in realtime" by me.
Description:
This patch allows the user to change the size of the window (or the resolution in fullscreen mode) using the new bge.render.setWindowSize() method. This only works in the Blenderplayer since it doesn't make a whole lot of sense for the embedded player.
2012-01-22 20:25:25 +00:00
Antony Riakiotakis
359e961a12 restrict stitching of same island uvs to only midpoint, without snapping case 2012-01-22 20:01:33 +00:00
Campbell Barton
008b0e90dd minor edit for operator error macro so it can return different values. 2012-01-22 19:52:41 +00:00
Campbell Barton
ab1600bee5 error in outliner parent patch - was using set string on an enum property. 2012-01-22 18:59:06 +00:00
Bastien Montagne
1a93d88343 Add weight preview to WeightVG modifiers, and first, simple/basic refactor of how modifiers can generate preview.
User side:
* Preview for DynamicPaint should keep the same behavior (for now). Weight preview should be somawhat quicker, though.
* Preview for WeightVG modifiers is only active in WeightPaint mode, and if the affected vgroup is the active one.
* Last active preview modifier in stack wins!

Note: that modifier preview topic is yet to be further refined, quite raw/incomplete for now.

Dev side:
* In draw code, renamed DRAW_DYNAMIC_PAINT_PREVIEW flag to DRAW_MODIFIERS_PREVIEW
* Removed use of MOD_DPAINT_PREVIEW_READY in DynamicPaint code (seems unecessary, and if it was, should be of more general scope).
* Added eModifierTypeFlag_UsesPreview to ModifierTypeFlag, for modifiers that can generate some preview data.
* Added three new modifier funcs, to handle preview modifiers in draw code / mod stack.
* For weights preview: added the generic DM_update_weight_mcol func, which can update WEIGHT_MCOL layer with either a given array of weights (currently used by DynamicPaint only), or from current active vgroup(s).

So now, draw code is fully generic (i.e. no more modifier-type checking in it). Mod stack code is generic to some extent, but will need more work.
2012-01-22 17:54:23 +00:00
Campbell Barton
df51fd74cf Quiet warnings in text editor 2012-01-22 17:26:56 +00:00
Campbell Barton
cd4123e1db use inline BLI_math functions for dot product and length calculation. 2012-01-22 17:20:37 +00:00
Brecht Van Lommel
27e94f7cbe Fix #29935: missing cycles update/crash when removing world datablock form scene. 2012-01-22 13:56:39 +00:00
Joshua Leung
6e5c763e9b Bugfix for r.43592
A typo (?) meant that enum menus, such as the Set Parent (Ctrl P) menu would get
shown with empty string labels.
2012-01-22 11:59:30 +00:00
Joshua Leung
98fd7c2948 Patch [#27790] Drag and drop parenting in outliner
Submitted by Perry Parks (scuey)

From the patch:
This patch enables drag and drop parenting for objects in the outliner.

Drag and drop is supported for a selection of multiple objects as well. Also,
all of the "special" parenting tasks (armature, curve, lattice) are possible
through the usual parenting context menus. For example, drag a mesh object onto
an armature and you are prompted for using bone envelopes, automatic weights,
etc.

Demonstration on Vimeo: http://vimeo.com/25698606
2012-01-22 10:20:30 +00:00
Bastien Montagne
c8cff5e1c4 Fix a crasher in WeightVG modifiers.
Problem was, if no vertices were ever added to one of the obect's vgroups, there is no CD_DEFORMVERT layer, even though there might be several valid vgroup indices... Odd no one noticed that earlier.

Many thanks to miikah for finding that bug!
2012-01-22 10:14:01 +00:00
Joshua Leung
d8d2dc552a Patch [#28608] Add search match colour to theme settings
Submitted by Shane Ambler (sambler)

From patch description:
As a follow on from #23443 - committed in r40066 I have added the outliner
filter match highlight colour to the theme settings.

Default colour is a light green matching what was originally hard coded.
2012-01-22 06:10:21 +00:00
Mitchell Stokes
57d48d4493 Committing patch "[#29763] Adding an active_events property to SCA_PythonKeyboard and SCA_PythonMouse"
Here is the description:
As the summary says, this patch adds a new event to both SCA_PythonKeyboard and SCA_PythonMouse. This property is similar to the events property that both have, but it only returns events which are not KX_NO_INPUTSTATUS. This moves the "no input" check from Python to C, which gave my input handling code a 2x speed up. Python sucks (performance-wise) with iterating lists and SCA_PythonKeyboard has close to 200 events (I think something like 177, but I don't know for sure).
2012-01-22 05:45:56 +00:00
Joshua Leung
4ec5a9a42c Bugfix [#29869] NLA editor keeps resetting my extrapolation mode every time I
edit a strip in the timeline

Tweaked the behaviour of the overwritting of extrapolation mode so that it is
less destructive when the problems it sets out to fix aren't likely to occur
(namely a top strip blocking everything below it due to extend backwards).
2012-01-22 04:39:33 +00:00
Joshua Leung
7d13619990 Bugfix [#28468] Cannot enter "Tweak mode" on mutiple objects at the same time,
though it initially works

Problem was that in the past it was possible to have multiple strips/tracks
tagged as "active", but now after getting a correct implementation, we can no
longer have that, and thus entering Tweak Mode only works on the last selected
strip.

However this is problematic in cases when you want to tweak the keyframes of
several objects (which may only have a single strip each) in order to get them
to line up with each other. This hack caters for this case (selecting multiple
strips from the same AnimData block is still impossible and insane/illogical and
is not allowed).

This may have implications for some future tools which make assumptions about
certain aspects of NLA state. However, it shouldn't cause too many problems
(hopefully ;)
2012-01-22 04:30:52 +00:00
Campbell Barton
af9ac97b2e fix for own error in recent paint refactor, subtract mode was broken. 2012-01-22 04:30:11 +00:00
Joshua Leung
85f2256bea Bugfix [#29822] Driver's target field doesn't update on Bone rename
This only affected non-object drivers, since the renaming was only getting
called on object-animdata.
2012-01-22 04:12:30 +00:00
Joshua Leung
cfab40b652 Fluidsim - Restoring simulation speed control (ZanQdo request)
This commit restores support for freezing or speeding up physics sims. Animate
the "Speed" parameter under Domain->Time, which controls a multiplier factor for
the rate at which the sim proceeds (i.e. the old "Fac-Tim" setting).

Notes:
* Subversion bumped to 4 to patch up defaults for new value so that old sim
files will still run correctly
* Names/descriptions could do with some tweaking
* Porting this across was not that obvious since quite a bit of stuff had
changed (as in, been cleaned up). However, from tests so far, it seems to work
well.
2012-01-22 03:42:49 +00:00
Campbell Barton
b1667911ef reduce operator lookups in the UI (could do 4 hash lookups per button). 2012-01-22 03:30:07 +00:00
Dalai Felinto
6964b5a6c4 cucumber merge: world scaling + video texture constants
revisions: 38166,38167,38177,38179,38180,38187,38242

To be implemented after merge:
1) add pydocs(rst) for the video texture new defines
2) see if a NodeSetLocalMatrix would fit well

#43439 by kupoman
Changing the worldTransform and localTransform python attributes to use BLI_math to simplify the code

#38242 by kupoman
Adding the constants SOURCE_ERROR, SOURCE_EMPTY, SOURCE_READY, SOURCE_PLAYING, SOURCE_STOPPED to the video texture module. Updates to the documentation will follow after a merge with trunk

#38187 by kupoman
Updates to the documentation to reflect that worldScale is now writable, and added localTransform and worldTransform to KX_GameObject.

#38180 by kupoman
The Transform attribute of KX_GameObject was based on world space data. I converted that one to worldTransform, and added a localTransform for local space transform information.

#38179 by kupoman
Fixed the transform attribute of KX_GameObject's set method to properly deal with negative scaling.

#38177 by kupoman
Updated the transform property on KX_GameObject so that it is now read/write, and added the corresponding set method. Also simplified the get method by calling GetOpenGLMatrix instead of making the matrix myself.

#38167 by kupoman
Adding a read only transform attribute to KX_GameObject that returns a 4x4 matrix representing the object's transformations.

#38166 by kupoman
Adding a worldScale attribute to KX_GameObject. This attribute scales the object independently of its parent's scale.
2012-01-22 03:21:28 +00:00
Campbell Barton
f45a8105ee fix for 'next' being set twice in the for loop from r43588 2012-01-22 00:53:53 +00:00
Dalai Felinto
2139c7080e patch: 'set the right Action Actuator when duplicating an object' by Daniel Macedo
bug and patch not in tracker. little fix by me (replace while loop by for(...;act;...). Thanks Daniel ;)
2012-01-21 23:57:28 +00:00
Campbell Barton
83b1f21cf9 fix for memory leak displaying shortcuts to buttons which use allocated string, also de-duplocate this code which had this error in 2 places.
noticed while testing 1023 length paths.
2012-01-21 22:42:09 +00:00
Campbell Barton
b95beea539 style chang, made mainly because I wanted to be able to add breakpoints to MEM_freeN calls which were on the same line as the if's. 2012-01-21 22:00:40 +00:00
Lukas Toenne
b7fbfdbf56 Fix for missing NULL check in socket default_value free function. Some sockets (currently only cycles shader sockets) don't actually have a default_value pointer. 2012-01-21 16:36:06 +00:00
Campbell Barton
ae771e742b change filepath limit from 240 to 1024 2012-01-21 14:54:53 +00:00
Campbell Barton
7add5e2bac Better api use for paths.
Avoid possibly copy past buffer.
2012-01-21 14:48:07 +00:00
Lukas Toenne
2c9f5f1f7c Added DNA_DEPRECATED attribute to some old data in bNodeSocket. DNA_DEPRECATED is disabled in writefile.c now to allow forward compatibility code writing to deprecated member data. 2012-01-21 11:15:01 +00:00
Campbell Barton
c5d7f8e416 formatting edits (<120 line length), remove invalid 'defaults' keyword arg from docs. 2012-01-21 10:27:24 +00:00
Bastien Montagne
56fae37b2a Fix [#29940] Stretch To constraint breaks scaling in Transform constraint.
Compute of dist between ob/bone and target was quite odd and causing that bug.
2012-01-21 09:41:21 +00:00
Mike Erwin
030649cf37 formatted snapquats table so entries line up, rounded to 7 significant digits (fp32 respects ~6), no functional change 2012-01-21 05:27:25 +00:00
Mike Erwin
e6d81c2c44 tidy up ndof handling code -- whitespace, comments, ndof->rvec[0] to ndof->rx, etc. no functional changes 2012-01-21 03:37:44 +00:00
Campbell Barton
a98a75346c quiet warnings and possible NULL checking crash fix for indentation functions. 2012-01-20 23:03:41 +00:00
Campbell Barton
f08a8c5b15 modify number button copy/paste to work as if you enter the button, select text, type into another button the same value.
This means you can copy/paste units and python expressions.
2012-01-20 22:32:47 +00:00
Campbell Barton
3f1584c758 fix 2 bugs
- box packing wasn't flagging out the right free corner of a vertex in some cases.
- tex_space_curve wasn't counting quad displists properly.
2012-01-20 22:09:30 +00:00
Nicholas Bishop
073ea28d58 Skip subsurf normal allocation/calculation when not needed.
CCGSubsurf has already a function to disable calculation of normals,
but seems it wasn't used. This patch changes subsurf UV and
subsurf_calculate_limit_positions() to not calculate normals, and also
not allocate space for them.

Should be no functional changes, just a small speedup/less memory use
during subdivision for these cases.

Code review link:
http://codereview.appspot.com/5558058/
2012-01-20 19:27:04 +00:00
Antony Riakiotakis
635706b0da Try fixing modifier keys not working correctly for uv sculpting. 2012-01-20 18:03:55 +00:00
Lukas Toenne
bddc01a7e1 Minor fix for socket default value conversion. The switch statement would not break correctly. 2012-01-20 16:13:26 +00:00
Campbell Barton
1726853226 comment some dead assibnment and set dummy values for image profile conversion in case of invalid input. 2012-01-20 15:18:57 +00:00
Campbell Barton
605aa16dd7 quiet warnings for using uninialized color var in ED_image_draw_info(). 2012-01-20 14:33:03 +00:00
Lukas Toenne
0b412e4136 Cleanup of default_value handling in node sockets.
The structs stored in the anonymous void *default_value in bNodeSocket are now handled completely inside node_socket.c. All allocation/freeing/duplicating for this has been replaced by the appropriate calls to generic API functions (declared in NOD_socket.h).

This will make the default value handling more reliable for future node socket code. Group socket copying and value conversion has also been moved into the generic socket API file.
2012-01-20 13:27:54 +00:00
Sergey Sharybin
f0fc8c22bb Fix #27120: Bake to image used for rendering glitch (bake feedback loop)
Detect feedback loop and do not bake to images detected in this loop and show
nice warning message in such cases.

It's a way which wouldn't overcomplicate code trying to duplicate images and so
without real benefit.
2012-01-20 07:43:46 +00:00
Andrew Hale
8817aaef3e - Fix for commit 43551 which caused a linking error in blenderplayer.
- Minor clean up for commit 43551.
2012-01-20 05:11:42 +00:00