Commit Graph

2531 Commits

Author SHA1 Message Date
Campbell Barton 3d635c0733 own fix r34446, was incorrect, fixed properly now. 2011-01-22 04:40:15 +00:00
Campbell Barton 99ae4467d2 fix for makesdna error.
ERROR: still 1 structs unknown
*** Unknown structs : 
  PreviewImage
2011-01-22 04:02:54 +00:00
Ton Roosendaal 2e436acff0 Bugfix #25611
Pose Proxy: layer settings only saved the 16 bits for proxy armatures, was
still a short, whilst the other layer settings use ints.
2011-01-20 15:17:02 +00:00
Nicholas Bishop c2a638a81e More fixes for bug [#25649], Image editor paint icon missing until
enter weight paint, hopefully fully fixed this time

* The texture selector for brushes wasn't updating. Seems that preview
  images have two sizes, small (icon) and big, but it was only
  updating if the icon size was set to update. Now both are checked.

* Also changed the previewimage arrays to use the already-existing
  PREVIEW_MIPMAPS define, makes it a little clearer what the arrays
  are for.
2011-01-18 04:08:01 +00:00
Campbell Barton fd448bcfc7 remove/comment unused defines, also zero FileGlobal.filename to quiet valgrind. 2011-01-16 21:12:38 +00:00
Nicholas Bishop c94eefd52b Fixed bug [#25649] Image editor paint icon missing until enter weight
paint

A couple underlying issues:

* Paint icon was looking only at the object mode to determine what the
  "current" mode is, but that gave problems when the object mode was
  anything other than texpaint, but 2D image paint was turned on. Fix
  was to also look at what space is being drawn, and only if it's in
  the 3D view does it look at the ob mode.

* The brushes lists weren't getting filtered correctly in the same
  case where 2D image paint was on but a different object mode is
  enabled. Fixed by changing the brush rna poll to look at the paint
  source, rather than the object mode.
2011-01-16 18:33:08 +00:00
Campbell Barton 86bbab7de5 remove/comment unused defines. 2011-01-15 16:14:57 +00:00
Sergey Sharybin 439140d6ae Todo item #19816: Wave modifier does not affect Curve Paths
Added new option for applyong modifiers on splines' points. This moves
tesselation point and path would be affected by modifiers which are applied on
splines' points.
2011-01-14 16:57:53 +00:00
Campbell Barton 4cc4a73a9e feature request from colin levy, camera lens stamp. 2011-01-13 19:16:35 +00:00
Campbell Barton 792f3b11f9 bugfix [#24774] Lattice modifier+Dupligroup+Texture solid=weird result
new 2.5x code was not passing group recalc flags onto objects within them.
2011-01-12 16:53:27 +00:00
Joshua Leung 56db5f10aa Restoring "Pose Markers"
These were markers which belonged to an action instead of the scene,
and are used by PoseLib to keep track of where poses are.

To restore this, I've made this only available in Action/Shapekey
Editor modes, and only when an action is being shown and the "Show
Pose Markers" option in the Markers menu has been enabled. Other than
that, all the standard marker operators apply now (instead of using a
separate set of special operators).
2011-01-09 23:16:05 +00:00
Janne Karhu 9231ff4160 Viscoelastic springs for sph particle fluids, original patch by Stephen Whitehorn (chickencoop)
* Viscoelastic springs between the fluid particles can simulate all kinds
  of viscous and elastic substances, such as jelly and honey. This is
  achieved by creating springs dynamically between neighboring particles
  and adjusting their rest length based on stretching/compression.
* This nearly completes the currently intended functionality for particle
  fluids. The last missing thing is a surfacing extraction algorithm,
  which is needed for a proper representation of a sph fluid.
* I also cleaned up and renamed some of the fluid parameters to make the
  ui a bit easier to understand.
* One addition to the patch is an option to use "initial rest length" for
  the springs, which uses the lengths between the particles at the time of
  spring creation as the spring rest lengths instead of interaction radius/2.
  This makes the fluid keep it's original shape better (good for very
  viscoelastic materials), but can create large density differences inside
  the fluid (not really physically correct for a fluid).
* Viscoelastic springs are stored in point cache as extra data.
2011-01-09 19:09:41 +00:00
Janne Karhu 1786923afc Replace uint32_t in pointcache code with unsigned int as it's supported in dna
* Not strictly necessary right now, but better for future.
* Struct data (only boids at the moment) is now written as structs (with dna) so they work between 64 and 32 bit machines too.
2011-01-09 18:23:41 +00:00
Janne Karhu e32bbef017 Fix for [#25544] Blender crashes when changing the particles emission amount
* I've getting bad feelings about the point cache index_array for a while (cause for this bug too), so from now on memory cache uses a simple binary search directly on the index data to handle queries to specific data points.
* This is a bit slower than just checking from a dedicated array, but it's much less error prone, uses less memory and makes the code more readable too, so it's not a tough choice.
2011-01-09 07:41:51 +00:00
Campbell Barton 89c9aaaa25 remove references to BKE_utildefines where its not needed.
- move GS() define into DNA_ID.h
- add BLI_utildefines as an automatic include with makesrna generated files.
2011-01-07 19:18:31 +00:00
Janne Karhu a601fd8893 Bug fix: unbaked particle cache was cleared from current frame onwards on file load. 2011-01-07 17:27:27 +00:00
Brecht Van Lommel b9fe5399e8 Revert bump mapping patch for now, backwards compatibility is not good enough,
we may need to preserve the previous method.
2011-01-07 16:55:56 +00:00
Brecht Van Lommel c8e0ca44a3 Improved bump mapping patch by M.G. Kishalmi (lmg) and M.S. Mikkelsen (sparky).
Many thanks to them!

For comparison, see here:
http://kishalmi.servus.at/3D/bumpcode/

Based on algorithm in: Mikkelsen M. S.: Simulation of Wrinkled Surfaces Revisited.
http://jbit.net/~sparky/sfgrad_bump/mm_sfgrad_bump.pdf

This fixes bugs:
#24591: Artefacts/strange normal mapping when anti-aliasing is on
#24735: Error at the Normal function.
#24962: Normals are not calculated correctly if anti-aliasing is off
#25103: Weird artefacts in Normal

This will break render compatibility a bit, but fixing this bugs would have also
done that, so in this case it should be acceptable.

Patch committed with these modifications:
* Bump method Old/3-Tap/5-Tap option in UI, 3-Tap is default
* Only compute normal perturbation vectors when needed
* Fix some middle of block variable definitions for MSVC
2011-01-07 14:42:01 +00:00
Janne Karhu 29efbf8a04 New hair child options:
* Renamed children to "simple" and "interpolated" as this is
  easier to explain and more descriptive than "from particles"
  and "from faces".
* Also shuffled the child ui around a bit to make it clearer.
* Child seed parameter allows to change the seed for children
  independent of the main seed value.
* Long hair mode for interpolated children:
  - Making even haircuts was impossible before as the child
    strand lengths were even, but their root coordinates were
    not similar in relation to the parent strands.
  - The "long hair" option uses the tips of the parent strands
    to calculate the child strand tips.
* Hair parting options:
  - Hair parting can now be calculated dynamically on the fly
    when in 2.49 there was a cumbersome way of using emitter mesh
    seams to define parting lines.
  - For long hair parting can be created by a tip distance/root
    distance threshold. For example setting the minimum threshold
    to 2.0 creates partings between children belonging to parents
    with tip distance of three times the root distance
    ((1+2)*root distance).
  - For short hair the parting thresholds are used as angles
    between the root directions.
* New kink parameters:
  - Kink flatness calculates kink into a shape that would have
    been achieved with an actual curling iron.
  - Kink amplitude clump determines how much the main clump value
    effects the kink amplitude.
  - The beginning of kink is now smoothed to make the hair look
    more natural close to the roots.
* Some bugs fixed along the way too:
  - Child parent's were not determined correctly in some cases.
  - Children didn't always look correct in particle mode.
  - Changing child parameters caused actual particles to be
    recalculated.
* Also cleaned up some deprecated code.

All in all there should be no real changes to how old files look
(except perhaps a bit better!), but the new options should make
hair/fur creation a bit more enjoyable. I'll try to make a video
demonstrating the new stuff shortly.
2011-01-07 11:24:34 +00:00
Campbell Barton 7ad97b04b7 cmake: share the DNA_*.h list definition between makesrna and makesdna 2011-01-07 11:08:47 +00:00
Ton Roosendaal b067a85aa3 Todo item:
Object color option now is incorporated in preview render, and
in display in 3D window.

Note that Object-color is "modulating" the render result, it just
multiplies... which is very limited for practical use. This was
added for Apricot game project. The original meaning however was
to replace diffuse only... so specular and light work still correct.

ALso made header for properties editor start on top, to reflect
default (report in tracker).
2011-01-05 15:10:35 +00:00
Ton Roosendaal 7ec8761250 Fixing bugs in future:
DNA reconstruct now terminates strings, when the new string
in a file is longer than in current definition. This will
enable a safer ID and other name lengthening, keeping at
least some forward compitability.
2011-01-05 10:54:30 +00:00
Sergey Sharybin 64c3ea272e Todo item: linked curve objects behaves incorrect with modifiers
Use object's displists for storing deformed tesselated curve. Was unable to
totally get rid of curve's displist because of how texture space is calculating.
2011-01-05 10:40:38 +00:00
Joshua Leung 09852b9a58 Animation data for lattices is now shown in the Animaton Editors 2011-01-05 00:37:21 +00:00
Sergey Sharybin df29715498 Fix #25483: Brush appearance color
Set special brush flag when inversion stroke was started, not wery nice, but
we can't make better with current events system implementation.
2011-01-04 14:46:29 +00:00
Joshua Leung cdc7d0b85f Grease Pencil Todos: "Sketching Sessions"
Due to popular request and usability considerations, this commit
reintroduces functionality similar to 2.4's "Draw Mode" for Grease
Pencil.

In the toolbar under the Draw/Line/Eraser buttons, you can find the
"Use Sketching Sessions" toggle, which enables this feature. This is a
per-scene setting, and defaults to off, so that the current 2.5
behaviour is still the default (i.e. the Grease Pencil operator will
only do a single stroke at a time).

With this option enabled, drawing with Grease Pencil will enter a
semi-modal state where you can draw multiple strokes without needing
to keep holding the DKEY throughout (though you'll still need to do so
to start the strokes, unless you use some toolbar buttons), while
still being able to manipulate the viewport. Header help-text prints
show the appropriate keybindings (i.e. press ESCKEY or ENTER to end
the sketching session).

Notes:
- To aid maintainability of the 3D-View toolbar code, I've taken the
liberty to factor out the groups of widgets which commonly occur in
most of the toolbars into separate functions (namely "Repeat" and
"Grease Pencil"). Perhaps it might make it slightly harder to newbies
to the toolbar code to grasp, though the physics panels are far worse
;)
- I've reshuffled some code in the Grease Pencil code to separate out
the various states of operation again more clearly, though some more
work is still needed there (TODO)
- There can now be only one Grease Pencil operator running at a time
- Redoing Grease Pencil operations where sketching sessions was
enabled still needs work. Namely, a way of delimiting the set of
points recorded into strokes is still needed (TODO)
- Ultimately, it should be possible to switch tools midway through a
session. Currently sessions are limited to only being able to be used
with a single drawing mode (TODO)
- After ending a drawing session, the titlebar contols may not work on
Windows without manually making the main window lose focus and then
regain (i.e. click on some other window in toolbar, then come back).
This may be related to (bug #25480)
2011-01-04 03:14:01 +00:00
Ton Roosendaal be5f30416b Todo item
Drag/drop now has a User preset for dragging threshold.
Noticed this was set to 3 pixels even, made it 5 as default.
Tablet owners can put it larger too :)

Note: the tweak-threshold (3d win) is 10 pixels now, I think
this needs another preset too, leave this for now.

Also: fixed crash in filewindow: drag .blend icon and drop it.
You can't test anything in Blender or you get a bug :)
2011-01-03 17:00:49 +00:00
Ton Roosendaal 118667c1bf Small feature for debugging pleasure:
The svn revision nr is saved in Blender file header now.
Can only be retrieved with running blender -d now.
2011-01-02 13:33:32 +00:00
Janne Karhu a6a2512f47 Pointcache code cleanup and disk cache compression options:
* Massive reorganization of pointcache code, things are now cleaner than ever.
* For all but smoke the cache is first written to memory when using disk cache and after that written to disk in one operation. This allows less disk operations and the possibility to compress the data before writing it to disk.
* Previously only smoke cache could be compressed, now the same options exist for other physics types too (when using disk cache). For now the default compression option is still "no compression", but if there aren't any problems this can be set to "light compression" as it's actually faster than no compression in most cases since there's less data to write to the disk. Based on quick tests heavy compression can reduce the file size down to 1/3rd of the original size, but is really slow compared to other options, so it should be used only if file size is critical!
* The pointcache code wasn't really 64bit compatible (for disk cache) until now, so this update should fix some crashes on 64bit builds too. Now all integer data that's saved to disk uses 32 bit unsigned integers, so simulations done on 64bit should load fine on 32bit machines and vice versa. (Important disk cache simulations made on 64bit builds should be converted to memory cache in a revision before this commit).
* There are also the beginnings of extradata handling code in pointcache in anticipation of adding the dynamic springs for particle fluids (the springs need to be stored as extradata into point cache).
* Particles were being read from the cache with a slightly wrong framerate. In most cases this probably wasn't noticeable, but none the less the code is now correct in every way.
* Small other fixes here and there & some cosmetic changes to cache panel, but over all there should be no functional changes other than the new disk cache compression options.
* This whole re-organization also seems to fix bug #25436 and hopefully shouldn't introduce any new ones!
2011-01-02 06:52:47 +00:00
Janne Karhu 9f88e0faeb Fix for [#25427] cloth or soft body crash un Undo
* Argh my bad, sorry about this!
* Now only the actual data array is saved to avoid constant re-allocations, but no relations to active data are kept.
* Also reverted Ton's quick fix for the crash as it's not needed anymore.
2011-01-02 03:55:26 +00:00
Campbell Barton 6fdfa97edb CMake: use blender_include_dirs("${OPENGL_INCLUDE_DIR}") rather then blender_include_dirs(${OPENGL_INCLUDE_DIR})
Apparently this is needed for MSVC in some cases, reported by Tamito Kajiyama r33895.
2010-12-31 04:29:11 +00:00
Joshua Leung 71da1e96d1 Drivers Code Cleanups and UI Tweaks:
- Adding drivers from the UI (not from py-scripts though) will now
automatically add a "Transform Channel" driver variable to the newly
created drivers. This makes setting up drivers a bit more convenient
for the most commonly used case.

- Drivers now report their errors using the Reports system instead of
writing these directly to the console.

- Clarified some comments to be more insightful about the "why's" of
some design decisions, and related formatting/cleanup tweaks
- Reduced scope of "path" vars to just the scope they're required in

- Removed some unused defines from a failed experiment in the original
Keying Sets code ("templates" and "template flags") which was
superseeded by the more flexible + nicer "Builtin KeyingSets"
2010-12-28 05:45:15 +00:00
Campbell Barton b4f61f0733 remove View3D.customdata_mask, since its stored in the scene now there is no need for each view to store every views combine data mask. 2010-12-23 04:26:53 +00:00
Campbell Barton c046ae14be Fix for multiple modifier stack calculations per frame.
Since 2.5x blender has been using CD_MASK_BAREMESH for updating objects since object_handle_update() no longer has access to G.curscreen to calculate the mask from viewports.

The problem with this is after an initial calculation, CD_MASK_MTFACE may be required on draw, so it would recalculate the modifier stack multiple times per frame.
One case which caused this is armature animated mesh with texface in a dupligroup.

Fix this by having customdata_mask member in the scene, this isn't great design but at least fixes the bug and only changes a few files.
2010-12-23 04:16:31 +00:00
Campbell Barton 5e382eb8e5 rename blenderlib to blender_add_lib 2010-12-22 23:09:30 +00:00
Guillermo S. Romero 29799bf09c Compact -I paths in makefiles for more readble files/output.
Also some white space cleaning and removal of redundant parameter.
2010-12-22 22:15:20 +00:00
Campbell Barton 2dc2f50a6e bugfix [#25335] crash with file, console told me to report! svn 33836
view rotate precision was lost over time, make view3d rotate normalize rv3d->viewquat.

note, this no longer crashes blender, just prints.
also commented some RegionView3D struct members.
2010-12-22 02:28:06 +00:00
Janne Karhu 6a79de7698 Fix for [#25325] Timeline doesn't show status of baked psys until frame is advanced
* Timeline didn't listen to file read notifier, so the pointcache frames indicator didn't get updated.
* Also added listens to particle & modifier (cloth, sb & smoke) notifiers as changes that cleared a pointcache weren't shown directly in the timeline either.
* The timeline display was also always one frame behind the actual state, since the notifiers are handled before the actual dynamics are calculated.
** This is now fixed too, by creating the actual drawn data always at drawtime.
2010-12-21 20:18:43 +00:00
Ton Roosendaal aeba7032e6 Bugfix #25330
3D Window: Snap to cursor or grid, didn't respect the 'restrict location'
options for objects or bones.
2010-12-21 18:55:49 +00:00
Sergey Sharybin 9cdf00897a Fix #25315: Curve points keyframe changes made in edit mode get lost
ED_curve_updateAnimPaths now updates fcurves from animation data rather than
from local copy of curves: nurb and point index from keyIndex data gets
updated in this function and for correct handling undo stuff copy of
fcurves is stored in UndoCurve.

Additional changes:
- Revert of rev33640 and more proper fix: do not copy remained
  spline-related rna fcurves after renaming pathes but all the rest
  fcurves woulddbe copied back to animation data
- Refresh graph and dopesheet editor after updating animation data
2010-12-20 19:47:16 +00:00
Campbell Barton a6f50e48aa fix [#25313] Outliner View Active only works once icon has been shown in view.
also disable UNDO and REGISTER flags for OUTLINER_OT_show_active() since its just scrolling the view.
2010-12-20 09:51:18 +00:00
Campbell Barton 3bed4cbf2b fix [#25283] Edge length display difficult to read
- made theme colors for mesh edge len & face angle/area display.
- use %g rather then %f for float display, trims unneeded zeros.
- store cached 2d and 3d text color as bytes rather then floats, compare when drawing to avoid setting the context.
- use unsigned char for more color functions, avoids casting to glColorubv().
2010-12-20 03:59:22 +00:00
Campbell Barton 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
Campbell Barton 566bda734a last commit to fix warnings didnt set them at all, not it works as it should.
also made cmakes output a lot quieter, messages can be uncommented for debugging or added back if other devs need this for some reason.
2010-12-16 12:48:30 +00:00
Nicholas Bishop 17bd906de3 Fixed bug #23826, Other kind of brushes appear in sculpt mode
Was another problem caused by each brush being allowed in more than
one paint mode.

Added a new field to the brush struct to indicate what mode the icon
was last set for; if it's changed then reset it. Not sure if it's
really worth it to cache this, could remove it for simplicity.
2010-12-14 01:19:51 +00:00
Janne Karhu 7bf5d9449c "Fix" for [#25184] Forces for growing hair - update inconsistency - as discussed with Jahka on Saturday on IRC
* New option to "Regrow hair" for each frame.
* This was perhaps more a feature request, but there was a similar useful feature called "animated hair" in particles at some point.
* The previous behavior for hair growing was inconsistent to say the least, so this is a nice option to have.
2010-12-13 10:45:24 +00:00
Joshua Leung 1474b32456 Lattices now have AnimData
This allows manual (point by point) animation of their control verts,
although many other settings cannot really be animated with any
visible effects yet. Interestingly, lattices also had IPO block
pointers, though they were never really used (AFAIK).

Todo:
- Animation Editor support has yet to be added. I've got a few other
things to add to, so will group those changes together.
2010-12-13 06:31:49 +00:00
Ton Roosendaal ba2edc007b Bugfix #25179
Armature properties: layer buttons now show which ones are in use,
like object layers.
2010-12-12 18:16:54 +00:00
Campbell Barton ee73c96e90 - fix for rna show_brush variable shadowing its parent classes with a flag which is now unused.
- getting clipboard RNA variable would crash blender in background mode.
2010-12-12 14:28:23 +00:00
Campbell Barton 1ad15c37aa avoid possible errors, surround bit shifted defines with brackets. 2010-12-12 01:33:12 +00:00
Janne Karhu 63a508408d Added some explanation to pointcache->step value as suggested by troubled on irc. 2010-12-11 13:51:04 +00:00
Campbell Barton 02f4003184 metaball rotations must be kept normalized, normalize values after setting from rna/python. 2010-12-08 13:02:16 +00:00
Campbell Barton afacd18498 use lowercase for cmake builtin names and macros, remove contents in else() and endif() which is no longer needed. 2010-12-08 08:43:06 +00:00
Campbell Barton 1f16e68af9 bug [#25081] changes to pose bone selection state via python have no effect.
Remove pose channel select, this is for internal use on read/write only.

Its possible to have a convenience attribute but rather not fake bone data being in the pose channel. just access pose_bone.bone.select
2010-12-08 04:40:20 +00:00
Campbell Barton 2e667e45fc Changed armature active bone so it is separate from selection this is consistent with active object, mesh editmode, curves & metaballs.
- active is no longer assumed to be selected.
  this fixes a simple bug - eg: Adding a new armature, entering pose mode and toggling selection failed.
- outliner editbone selection now works like object and pose mode.
- mouse selection sets the bone active even when the tip is selected.
- active, unselected bones draw as wire color with a 15% tint of the selected color.
2010-12-08 03:05:46 +00:00
Janne Karhu 9c76ff3f2e "Particle" texture coordinates for halo materials:
* Particle age can now be used as the texture x-coordinate, and location in a particle trail as the y-coordinate.
* This finally enables particles in 2.5 to change their color (or any other texturable material property) by their age.
* In 2.4x this was accomplished with the "100 frames == particle age", but this was both non-intuitive and slow as the animation system had to be recalculated for every particle.
* Currently these are 2d coordinates (age/lifetime == x-coordinate, trail particle index/number of trail particles == y-coordinate), but other particle properties or possibly even a user definable property can be added as coordinates in the future.
* On the code side this uses the same coordinate definition number (for halo materials) as strand coordinates (for surface materials). This is also nice as they intuitively mean nearly the same thing, i.e. along strand or during particle life.
2010-12-07 12:58:25 +00:00
Sergey Sharybin 14ec2d9122 Curves CV animation
===================

Update fcurves RNA pathes after making changes to curve topology, so
animation will no longer lost after edit and wouldn't lead to crash.

Will be very useful for RotoBezier addon.

Also NodeKeyIndex renamed to CVNodeIndex due to node is an entity from
another module and better not used in others.
2010-12-06 17:20:22 +00:00
Campbell Barton 4dceafc928 bugfix [#24995] Object rotation seems to be applied incorrectly
- Object actuator rotation was being scaled by: (1/0.02)*2*PI/360 == 0.872, since revision 2. 
- Remove scaling and use do_versions to adjust existing files.
2010-12-06 07:45:07 +00:00
Martin Poirier a1fed1e268 [#25047] Deletion of any custom key map item remove always first one
keymap item id for user defined keymaps wasn't defined properly. This is really old, I'm surprised with didn't catch this before.
2010-12-06 02:42:59 +00:00
Campbell Barton 9668c29ba0 bpath iterator updates
- loop over sequencer plugin and texture voxel paths.
- fix leak in python bpy.utils.blend_path() and use PyUnicode_DecodeFSDefault() to ensure correct paths with different encodings.
- operators to make paths absolute & relative now redraw the view.
2010-12-05 23:14:48 +00:00
Brecht Van Lommel b110c7c8f2 Dependency graph: changed DAG_id_flush_update to DAG_id_tag_update. Now it
only tags the ID and does the actual flush/update delayed, before the next
redraw. For objects the update was already delayed, just flushing wasn't
yet.

This should help performance in python and animation editors, by making 
calls to RNA property update quicker. Still need to add calls in a few
places where this was previously avoided due to bad performance.
2010-12-05 18:59:23 +00:00
Campbell Barton fa4bbbb249 Maintenance,
- remove some redundant declarations
- changed VertexTangent and Path structs to avoid compiler alignment padding.
2010-12-04 13:00:28 +00:00
Campbell Barton 263830f000 Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for 'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
2010-12-03 17:05:21 +00:00
Campbell Barton cd97253502 - added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.
2010-12-03 12:30:59 +00:00
Campbell Barton b45c3363fd fix for some pedantic warnings. 2010-12-03 01:52:28 +00:00
Ton Roosendaal f4205498a9 Bugfix #24890
Particle cache reading: crash when loading .blend on a different
endian system, code was dumping arrays in .blend without DNA.

General warning for devs: avoid generic write_data and dynamic
arrays in DNA.
2010-12-01 15:58:45 +00:00
Janne Karhu 17cd5811e7 Smoke now uses only one point cache where both normal and high resolution smoke are stored together:
* Separate caches were causing quite a lot of problems both in principle and practice.
* For example it doesn't really make sense to have different frame ranges for normal and high resolution smoke, but this was fully possible before.
* Also to fully bake the smoke you had to do a "Bake All Dynamics", which completely defeats the whole point of the feature!
* As a result of this change the smoke cache usage is much much simpler and less error prone.
* This is quite a big change, but hopefully there should be less rather than more problems as a result :)

Some other related changes:
* Changing the cache name now works for disk caches properly too, it now just renames the cache files so should be faster too!
* Smoke is now always forced to disk cache with step 1 on file load as there were some strange cases where smoke was trying to use memory cache.
* Disabled smoke debug prints from console.
* Disabled changing smoke parameters when smoke is baked.

Note to users: The unfortunate side effect of this is that old high resolution simulations have to be baked again, but in return you get much better and more logical functionality. Sorry none the less!
2010-11-30 21:31:18 +00:00
Campbell Barton 236a11ca63 misc small changes.
- commented unused View3D->flag's
- popup dialog now centers over the mouse
- only overwrite image alpha with render settings on save if saving the render result.
2010-11-30 18:07:44 +00:00
Campbell Barton e8397e6193 include headers in cmake source, added a script to check for consistency, reporting missing headers & C files.
this is important so IDE's using CMake integration always get blender headers. - QtCreator & MSVC for eg, probably others too.
2010-11-29 04:35:56 +00:00
Peter Schlaile 510920a299 == Sequencer ==
This fixes Orig Dimension display (mostly).
* orx, ory both didn't get calculated, if dimension already matched
* putting them into Strip instead of StripData ment, that using images
  of different dimensions in one strip could lead to incorrect results

Still TODO: on file open, timeline display happens before preview 
display which means: orig_width and height are calculated after the 
first draw of N-keys dialog. You have to hit refresh (or scrub one 
frame) to get the right values displayed.
2010-11-28 18:23:21 +00:00
Michael Fox d47a519cbb added option to turn off Text anti-aliasing in the UI
(userpref->system), with a great help from brecht (its been way too long
for me).

However as brecht pointed out that the non-AA text is slightly lareger
then AA'ed Text :S, i did not do anything about this as this commit was
just the option not the text drawing.

this commit also makes it possible to do all kinds of UI textrender options
2010-11-26 22:12:46 +00:00
Dalai Felinto 9d9a88348e BGE Bugfix: [#24926] Sensor 'Radar' les axes X+ et Y+ ont été inversé. (oui, a french bug report :)
we were using SENSOR_RAY for the radar sensor axis. However the Ray axis is inverted (God knows why) so I created a set of defines only for radar sensor.

Also I thought it was a good idea to replace some hardcoded values in Radar and Ray codes by their defines in DNA_sensor_types.h (similar to what Benoit did for Armature Sensor, so I see no problem on that).
2010-11-26 03:37:08 +00:00
Janne Karhu 4aeeee8819 Cached smoke wasn't being drawn on file load before going to simulation start frame. 2010-11-23 14:04:05 +00:00
Elia Sarti 19e091ec5e User preference to hide Python references in Tooltips. 2010-11-22 00:10:32 +00:00
Campbell Barton 39b7bfe6bd - check IF WIN32 AND NOT UNIX (for cygwin)
- patch from Mike S to enable OpenMP and xcode
2010-11-21 13:41:43 +00:00
Campbell Barton 72279e1c92 fix for RNA ranges exceeding the range of the type (INT_MAX used on short's for eg). 2010-11-21 03:45:35 +00:00
Ton Roosendaal 6e5ccba6da Bugfix #24801
- Reading 2.4x files could cause print "missing region type".
  Appeared the 2.50 do_versions patch differed from default region
  definitions
- Sometimes editors showed wrong button for type browsing.
  Was because variable wasn't correctly reset on saves.
2010-11-20 16:00:36 +00:00
Campbell Barton 3ae670fc02 fix [#24786] Setting Rotation Units to Radians doesn't affect the UI [33146] 2010-11-18 14:10:09 +00:00
Campbell Barton 7045ef617f - many settings in a new scene didn't match the startup.blend defaults, copied into scene.c.
- view3d metaball panel wasn't updated for rna name change 'location' -> 'co'
2010-11-18 03:03:17 +00:00
Campbell Barton 5a1fdcdc2a bugfix [#24746] Align Camera to View locks 3D Editor in Camera Perspective View 2010-11-16 09:35:58 +00:00
Campbell Barton 7e0f9229d6 fix for fix, r33086.
- incorrect range check broke ZYX euler rotations, use MIN/MAX constants so this doesn't happen again.
- BGE Armature PyAPI also wasn't using correct min/max with rotation modes.
- clamp on file read rather then when calling the rotation functions, so developers don't use invalid args without realizing it.
- added assert() checks for debug builds so invalid axis constants don't slip through.
2010-11-16 01:19:37 +00:00
Campbell Barton 43f396218f move report/operator view out of the 'Console' into the 'Info' space (file menu).
Ton will work on moving the File menu out of the Info space before release.

notes.
- reply Operator isn't working anymore.
- UI for reports is commented out so its not mixed with the file menu.
2010-11-11 13:36:57 +00:00
Joshua Leung 1a0198ee12 Reverting part of #32971
By just removing these vars (commenting them out), we were getting alignment errors which were causing crashes when loading old files with armatures (crash in armature drawing code). 

Fortunately I happen to be working on a little project right now, and caught this :)
2010-11-10 09:51:30 +00:00
Campbell Barton 5f69c0ec09 string lookup for scene.object_bases, also removed some unused DNA vars. 2010-11-10 00:51:34 +00:00
Ton Roosendaal 4c12298832 Bugfix #20812 (and probably others)
Issue: in user preferences window, using file selecting caused the
the userpref window to be saved, and not closing.

Reason: design error (by me) in using screen->full tag for denoting
a temporarily screen (like file window). Fixed by using a new 
screen->temp variable for it.

System remained unstable though, noticed another issue with freeing
temp screens in wrong places. Seems nice stable now! Will check on
the wiki for relarted issues now.
2010-11-09 14:54:59 +00:00
Campbell Barton db4c2b8016 remove unused scene members 'jumpframe' and 'ima' 2010-11-09 10:40:03 +00:00
Campbell Barton 8b27e83e5c [#24593] Cloud Depth setting above 30 cause texture corruption
disallow cloud depth over 30, it causes a lot of floating point exceptions (and nan value pixels), because of hitting the int limit with 1<<(oct+1) in BLI_gTurbulence
2010-11-07 22:48:51 +00:00
Joshua Leung db4609eb08 Animation Editors: Channel Reordering
This commit restores the ability to reorder channels in the animation editors (DopeSheet/Action/etc., Graph/Drivers, NLA). The hotkeys for this are:
- Shift-PageUp = Move Up
- Shift-PageDown = Move Down

- Ctrl-Shift-PageUp = Move to Top of List
- Ctrl-Shift-PageDown = Move to Bottom of List

Do note that only animation data can get reordered using this. 
So, do not expect to be able to change the object order (that is actually taken from the order that Blender actually evaluates them per update/frame).

---

In the process, I've fixed a couple of other bugs:
* Removed 'optimisation step' check in anim_filter.c for dopesheet with no filtering options modified, since this meant that the ANIMFILTER_ANIMDATA data filter was not getting processed (and potentially there were other maintenance problems with that).

* Made NLA Editor's channel list not totally duplicate the basic Animation Channels keymap. Instead, the "NLA Channels" keymap now only defines the parts that are different, and this then gets specified before the standard one so that these different parts will override the standard ones.

* Attempted to fix BorderSelect on NLA Channels list. Still not totally working correctly yet though.

* Moved "Euler Discontinuity" menu entry from "Channels" to "Keys". It really belongs in the latter, since it affects the keyframe values, rather than some aspect of the channel (i.e. ordering of channels or how they're displayed)
2010-11-07 12:09:15 +00:00
Andrea Weikert d475448bdd == filebrowser ==
Added two user preferences for filebrowser:

1. Hide Recent Locations
Requested by Kernon Dillon. Reason: People doing video tutorials might not want to expose the name of other projects they are working on.

2. Open Filebrowser in thumbnail view for images and movies
Requested by Sebastian König at the Blender Conference. Reason: In the past (and most likely still) some corrupt images or movies could crash the filebrowser when generating thumbnails. (crashes in ffmpeg, libtiff, libjpg). While many of those were solved, artists in a production environment might want to use this setting to prevent any crashes.

NOTE: the second setting should probably be set next time we create a new default startup.blend. Until then users need to switch this on manually in the User Preferences.
2010-11-06 18:54:15 +00:00
Campbell Barton 81fe9d2d04 workaround [#24392] 2d Image paint editor: no clone/smear/soften tools etc
the brush system matches the brush mode with the object mode, but this doesn't work for 2D image view paint.
since the poll() function doesnt have access to the context, for now just check if no paint modes are active, default to texture paint.
2010-11-03 21:23:02 +00:00
Campbell Barton 3db9233ae5 bugfix [#24483] Link/Append File Browser Typo 2010-11-03 03:45:09 +00:00
Campbell Barton 1c5f72f273 - remove BLANK* from rna icon enum, would string search this list for every python icon button call, enum from 818 down to 444.
- remove unused space image members
2010-11-02 21:43:47 +00:00
Nathan Letwory 73f21f20b7 Lock to Cursor
Patch by Dan Eicher. In 3dview properties you can enable this. Rotating view then uses cursor as pivot point. Note that with this option enabled just relocating the 3d cursor also changes the 3dview.

Sebastian König: "Now the 3d cursor is actually useful" (sitting next to me while applying patch at bconf hostel)
2010-10-31 01:18:26 +00:00
Janne Karhu a12d0fc836 Fix for [#24409] Particle corruption after rendering with multires
* Also removed some unused flags from the particle modifier.
2010-10-30 10:19:30 +00:00
Campbell Barton b7c8df231b partial bugfix [#24425] Blender 2.54 Beta crashes when starting rendering
Fix for one of the causes of crashing.
Applying armature deform wasn't thread safe since the pose bones had deform data written into them when deforming a mesh.

This fixes crashing immediately, on every render for me but blender still crashes calculating the subsurf sometimes.
2010-10-28 10:12:57 +00:00
Joseph Eagar 1d68058f77 ad-hoc test sys that can handle paint stuff. temporary. 2010-10-27 02:22:55 +00:00
Campbell Barton 619a8b6952 bugfix [#24357] Font folder can be specified but is not opened
- open operator was incorrectly checking if the font path was set.
- rna ID editable check was also incorrect, checking the ID name rather then the filename.
- use define FO_BUILTIN_NAME rather then "<builtin>".
2010-10-24 07:02:19 +00:00
Nicholas Bishop 8b0179a965 == Sculpt ==
Fixed bug #24111, "Mirror clipping not working while sculpting a mirrored mesh"

* Mirror modifiers can handle multiple-axis mirroring, updated sculpt to work with that
* Marked the "axis" field of MirrorModifierData deprecated, since it looks like bitflags are supposed to be used now
2010-10-19 01:57:15 +00:00
Campbell Barton 106867910e use unsigned int for all layers. 2010-10-19 01:21:22 +00:00
Sergey Sharybin 54ffc23cd5 Text space
==========

Main changes:
- lines could be partially shown when they starts somewhere behind the upper
  boundary of area but because of word-wrapping some part of line will be show
- fixed caret navigatiog in area when tabs aren't replaced by spaces
- highlight the whole current line not only it's wrapped segment with caret
- when you're in replace mode cursor would be as long as the tab's width if it's under tab symbol

This fixes:
  #22399: Text Editor: word-wrapped lines prevent navigating through text with up-arrow.
  #21163: Text editor scrollbar problem with word wrap
2010-10-13 06:06:39 +00:00
Campbell Barton bf4075236f bugfix [#23412] Weightpaint and rotate around bones
fixed by allowing an unselected armature to have its pose bones used in weightpaint mode.
2010-10-10 23:11:34 +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
Campbell Barton 1d2b96fa81 set the view3d used layer to be an unsigned int, mask out localview layers to avoid flag mismatch when checking if it changed. 2010-10-02 19:45:53 +00:00
Campbell Barton a6e7823942 make fly mode border draw into a area drawing callback rather then using a flag (no functional change). 2010-10-02 19:31:23 +00:00
Campbell Barton 38b6ca0358 stop dna from parsing structs that aren't used needed. 2010-10-01 15:59:34 +00:00
Janne Karhu afa4b855ca Fixed: Showing pointcached frames in the timeline was terribly slow when using disk cache.
* The existence of cached frames was checked each frame causing hundreds of disk operations per frame update.
* Pointcache now keeps an updated array of the cached frames for fast "frame exists in cache" queries.
* This fix also speeds up some other pointcache operations nicely.
2010-09-27 09:58:37 +00:00
Campbell Barton 6a4b9298c8 patch [#23968] filter_filetypes property to allow operators to filter by file extensions in the file selector
modified the patch to store the string internally rather then an array of allocated string pointers, less hassle with memory allocation.
changed to use fnmatch, so *.foo is needed (not .foo as with the patch)
2010-09-24 07:05:43 +00:00
Campbell Barton 6bb0fc3e4f minor changes to text3d editing, skip wchar --> utf-8 conversion on cursor movement. 2010-09-22 15:39:43 +00:00
Campbell Barton cf4f9d2c19 bugfix [#23923] extra material slots created 2010-09-21 06:09:14 +00:00
Campbell Barton dea59cc5eb warning fixes and minor cmake changes. 2010-09-18 03:55:56 +00:00
Campbell Barton d5e11d409f fix for a (probably harmless) bug in makesdna where 1 byte off the end of the buffer was used in a comparison.
also fixed a memory leak.
2010-09-18 03:46:13 +00:00
Janne Karhu e7a393d2e1 Tiny addition to boids functionality: pitch value
* Controls maximum rotation around side vector (as opposed to banking, which controls rotation around forward vector)
2010-09-16 20:06:10 +00:00
Campbell Barton b2b0869212 - camera max zoom limit was inconsistent
- camera pan now follows the mouse
2010-09-11 04:39:00 +00:00
Joseph Eagar 82432d0d99 merge from trunk at r31523 2010-09-07 05:47:34 +00:00
Campbell Barton f96c7ebd9d committed by accident 2010-09-06 05:35:09 +00:00
Joseph Eagar bb7339a7ae merge with trunk at r31523 2010-09-04 05:31:25 +00:00
Campbell Barton d0c54d3d0e use set as a suffix (matches operators)
- set_frame() --> frame_set()
 - set_context_pointer() --> context_pointer_set()

material adding works for curves and metaballs, new function to remove materials.

materials.link() didnt well fit how this is used elsewhere
 - order matters
 - it can be linked more than once.
 - remove(material), isnt that useful since you need to manage indicies.

... use list style functions instead. materials.append(mat) / materials.pop(index)
2010-09-03 07:25:37 +00:00
Ken Hughes c4895719af Fix "no newline at end of file" warnings in *nix. 2010-09-01 21:02:27 +00:00
Nathan Letwory 6c113b54b3 Finally change SConscript tabs to spaces. 2010-08-29 20:52:05 +00:00
Benoit Bolsee ad70072009 BGE patch #22623 applied: new bound type: Capsule. 2010-08-28 20:56:54 +00:00
Nathan Letwory fb7221ce21 Patch [#23390] Addition of Author field to user preferences
Contributed by Imran Syed (freakabcd)

Adds a field where the user can put in name/nickname that exporters
then can use to write authoring information, where possible.
2010-08-26 07:19:24 +00:00
Campbell Barton 7d0e4ac889 simplify pass drawing, give each pass its own list, avoids some context switching.
- also fixes a problem where xray+transp+alpha1.0 objects wouldnt draw at all.
- the patch worked by adding twice but this leaked memory.
- solve by adding the xraytransp object to the xray list if the alpha is 1.0
2010-08-25 14:23:02 +00:00
Campbell Barton 4b40d73bfb rename most scons build targets to match cmake 2010-08-25 04:30:47 +00:00
Robert Holcomb a42c490a04 Applied patch #23379. Does not change existing .blend files and looks
good.
2010-08-25 02:18:37 +00:00
Campbell Barton 98140e234e - pyrna fix for reference counting when unable to register a property
- added modified 'Warp' enum to reserve this ID for durian files until the modifier is merged.
2010-08-19 05:58:22 +00:00
Joerg Mueller 1964b2329e Scons:
* Should now build again without problems
* Fixed scons having problems to execute makes(d/r)na if build path contains spaces
2010-08-16 19:09:42 +00:00
Joerg Mueller 47d38dbd20 svn merge -r 31211:31313 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2010-08-13 10:50:29 +00:00
Campbell Barton 6be46efe6c fix for the rna curve interpolation enum, 'ease' was using the same value as Bezier. 2010-08-12 06:28:46 +00:00
Campbell Barton ac133d5d26 bugfix [#23270] Long directory name segmentation fault in File brower
file->relname was being edited when its length allocated at the size of the original name, realloc'ing failed because the old string was still used by a button.
2010-08-12 00:14:32 +00:00
Campbell Barton d739a1788d small edits to text editor from writing a python editor extension.
- rename TextLine.line -> body, ConsoleLine.line -> body
- minor speedups when setting the body text, also re-allocate console lines if they are < half the length.
- added option to highlight current line in the text editor.
2010-08-11 05:21:43 +00:00
Campbell Barton 8c39326962 bugfix [#23247] Load Image in Textures does not use a usefull path 2010-08-11 03:31:56 +00:00
Guillermo S. Romero 95aa8cfa4a Update address in license block. 2010-08-10 21:22:26 +00:00
Joerg Mueller 46cac18815 svn merge -r 31145:31210 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2010-08-10 09:47:57 +00:00
Sergey Sharybin c0e39df6ac - Enable shape key switching in edit mode for curves, surfaces and latticies
- Disable changing of lattice size if there are shape keys
2010-08-10 06:36:42 +00:00
Peter Schlaile 0c54337755 == Sequencer ==
This fixes: [#23184] Problems with speed control effect strip in the 
video sequence editor

Also: got rid of tstripdata caches in DNA.

Fixes some potential crashes in SEQ_IMAGE rendering (s_elem wasn't 
checked for NULL).
2010-08-08 13:55:30 +00:00
Joerg Mueller 64b36ffbb3 svn merge -r 31060:31144 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2010-08-07 15:45:07 +00:00
Campbell Barton acca04bf33 remove narrow ui feature
- re-arranged UI in a way that gave far too much vert scrolling.
- was added all over for simple things like making text="", layout engine should handle this.
- Ton and Brecht are ok with removing this now. Ton would like to work on the layout engine to make it better support these cases.
2010-08-06 15:17:44 +00:00
Campbell Barton 14fe11bd81 bugfix [#19525] Curve modifier moves mesh geometry first
more of a request then a bug but shows up a strange limitation with curve deform modifier,
The mesh bounding box would set the deform axis start/end to map the deformation of the curve to. This means it ignored offset in the object location and object data location (you could use a dummy vertex to trick it).

Old files wont change, added an option (next to stretch), called 'Bounds Clamp', old files have this behavior but newly made curves have it disabled.
Double checked this gives useful results with stretch on/off and negative axis.
2010-08-06 08:27:07 +00:00
Joerg Mueller 06d2dc86a1 svn merge -r 30954:31059 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2010-08-05 08:23:26 +00:00
Campbell Barton 1f77f7b05a Brush/Paint internal changes
- remove brush array for each Paint struct, just use a single brush pointer.
- removed rna function based template filtering.
- filter brushes using a flag on the brush and the pointer poll function.
- set the brushes using a new operator WM_OT_context_set_id().

TODO
- remake startup.blend, currently brush groupings are lost.
- rewrite WM_OT_context_set_id() to use rna introspection.
2010-08-04 12:18:07 +00:00
Campbell Barton 708ef64663 include cleanup, no functional changes
- removed DNA_brush_types.h from DNA_scene_types.h (and some other similar cases)
- removed DNA_wave_types.h (never used)
- removed Main.wave
2010-08-04 04:01:27 +00:00
Campbell Barton 957976882d build options to disable image formats WITH_CINEON, WITH_HDR.
- updated cmake, make & scons.
- renamed CMake build options WITH_TIFF -> WITH_IMAGE_TIFF, same for DDS, OPENJPEG etc.
2010-08-03 11:25:34 +00:00
Joerg Mueller 86fc34b924 Audaspace:
* Added a stopCallback function that is called when the end of a sound is reached.
* Fixed the scrubbing not working.
* Minor SoundActuator cleanup.
2010-08-02 18:22:34 +00:00
Martin Poirier 327b4d588b Separate proportional edit setting between edit and object mode. They are now used and toggled independently. 2010-07-31 19:26:21 +00:00
Campbell Barton 667a2cafbe recent commit to make color balance work like the sequencer, I forgot that the gamma was inverted. fixed. 2010-07-31 10:03:08 +00:00
Brecht Van Lommel 5251a9b3bf 2.5: remove vertex normal flip option, this is more harmful than helpful
in many cases, and also gave incorrect rim lighting.
2010-07-30 11:50:00 +00:00
Campbell Barton 449f8ce4fe bugfix [#22859] Multi-user images cant be made into single user in texure panel.
turns out this isnt exactly a bug since support was never written for this but may as well support it.
now rna/py can do image.copy() too.
2010-07-30 06:09:23 +00:00
Daniel Genrich 967d25ac1c Smoke Patch + additions: a) Applying patch #22765 by Miika Hämäläinen (domain border collision settings, vorticity settings, time scale, non absolute density, smooth high res emitter, initial velocity multiplier, high res strength available to be set to 0), b) Additions by me: --Initial velocity is now per flow object, not per domain; --Using boundingbox as standard display mode for domains (was wire before); --When adding a flow object, an initial nice SmokeParticle system is added too with nice initial settings (life=1, no_render, unborn, etc) fitting smoke simulation; --Adaptive timesteps introduced to the smoke sim (depending on the magnitude of the velocity) because it was quite unstable when used for fire simulations, still needs to be tested and will also slow down some simulations. 2010-07-27 14:53:20 +00:00
Nicholas Bishop ec19c7dffc == Sculpt ==
Fixed brush icons loading slowly

* Changed brush icon property from an enum to a flag that toggles whether a custom file is used for the brush icon
* Changed get_brush_icon to only handle loading external icons, built-ins are handled through the regular icon system
* Modified preview icon drawing to allow built-in icons
* When not using a custom icon, a default icon is selected based on the current tool

TODO:
* Allowing preview to show built-in icons makes the brush texture selector look ugly when nothing is selected. As discussed on IRC though, the nothing-selected state needs to be clarified anyway; I'll address this in another commit
* Use image browser when selecting a custom icon
* Selecting the default icon is ugly (uses the active object's mode), this can be fixed by making brushes know which paint mode they are part of
2010-07-26 04:00:09 +00:00
Sergey Sharybin cc0f3146e7 Shapekeys for curves/surfeces
Fix #21498: Edit curve Shape key /252_r 27318

Added full support of shape keys for curves and nurbs surfaces including
topology changing in edit mode, undo stuff, updating relative keys when
working under basis and so on.
2010-07-25 11:57:36 +00:00