Commit Graph

16106 Commits

Author SHA1 Message Date
Brecht Van Lommel 436969ce49 Sculpt: Fast Navigate option for multires. This will show the lowest multires
level when rotating/panning/zooming the viewport, and only draw the full thing
at the end, to make the viewport more interactive.
2009-11-25 14:13:43 +00:00
Brecht Van Lommel fffce6c554 Sculpt: Multires
* Displacement coordinates are now stored differently, as a grid per
  face corner. This means there is duplication of coordinates, especially
  at low subdivision levels, but the simpler implementation justifies it
  I think.
* ToDo: conversion of existing multires files (2.4x or 2.5x), loading them
  may even crash now.
* Editmode preservation/interpolation code also has not been updated yet.

* Multires now works on the CCGDerivedMesh grids instead of CDDerivedMesh,
  which should be more memory efficient.
* There are still bad memory peaks (if you're using 32bit) when subdividing
  or propagating displacements. Though at least there should be no huge
  memory blocks allocated, which windows is now to have trouble with.
* Still found some weird spike artifacts at lower multires levels, some also
  happening before this commit. Perhaps computation of tangents needs to be
  tweaked more.

* Multires modifier now has viewport, sculpt and render levels. Also the
  levels have been made consistent with subsurf, previously the same level
  of subdivision was one less for multires.
* Both multires and subsurf modifier now can have their subdivision level
  set to 0 for no subdivision.
2009-11-25 14:07:12 +00:00
Brecht Van Lommel 134935a8db Sculpt: Grid based PBVH
* PBVH can now be created contain both from face grids or standard
  meshes. The former is much quicker to build for high res meshes.
* Moved some drawing code into pbvh (mostly for the frustum test).
* Moved ray intersection code into pbvh.
* GPU buffers also can be built from either mesh or grids now.
* Updated sculpt code to work with this. The ugly part is that there
  is now a macro for iterating over vertices, to handle both cases,
  and some duplicated code for e.g. undo.
* Smooth brush does not work yet with grids.
2009-11-25 13:40:43 +00:00
Brecht Van Lommel a1bf207be3 Sculpt: Subsurf
* Now uses the CCG DerivedMesh also in object mode, used to be edit mode only.
* Create CD_ORIGINDEX layer on demand, to save memory.
* Removed ss_to_cdderivedmesh function, and instead create ccgdm and then
  convert that to cddm, to avoid code duplication.
* Added and implement DerivedMesh interface functions to obtain face grids.
* Store edge/face flags more memory efficient.
* Export CCGDerivedMesh struct in BKE_subsurf.h
2009-11-25 13:11:44 +00:00
Brecht Van Lommel 90cc7c8abd Sculpt: CCGSubsurf new functions to update normals, update subdivision
levels, copy coordinates from face grids, and stitch together face grids.
2009-11-25 12:27:21 +00:00
Brecht Van Lommel 9a31f37d19 Sculpt: math lib functions
* swap v2/v3
* multiply-and-add (madd) v3
* inline v3 short/float conversion
2009-11-25 12:04:11 +00:00
Nicholas Bishop e65fee2f65 Sculpt branch:
Fixed grab brush, was creating holes in the mesh due to uninitialized values.
2009-11-21 21:34:00 +00:00
Nicholas Bishop a1c8d92151 Sculpt branch:
Corrected the calculation of the center of the flatten effect.
2009-11-21 17:22:03 +00:00
Brecht Van Lommel 2e3326c153 Sculpt: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r24330:24483 2009-11-11 10:44:46 +00:00
Joshua Leung 6dcb4ac7a4 * Fixing various compiler warnings under scons+mingw. Mostly unused variables and functions.
* Added missing lib-linking code for Grease Pencil in nodetrees
* Uncommented some code for curve shapekeys
2009-11-11 09:59:51 +00:00
Campbell Barton 5c69f19904 [#19859] Lasso select causing Blender to crash
missing null check in own commit
2009-11-11 09:58:24 +00:00
Campbell Barton 5816912dc1 - In the context, EditBones and Bases were set as 'RNA_UnknownType', replaced with propper types.
- renamed RNA_Base to RNA_ObjectBase
- only include id_data for the python api's autocomplete if it has an ID type set.
2009-11-11 09:16:53 +00:00
Matt Ebb c0fae59c99 * Fixed nodetree animation by giving nodes unique names
Now the rna path to nodes happens via the node name, which is ensured to be unique via RNA.
As part of this, the node->username string has been removed, upon renaming the node itself it takes care of making sure it's unique (like bones, constraints, etc). There's currently no interactive rename tool, but you can do it via the datablocks editor.

- plus a few notifier tweaks, using the newer NC_NODE notifier to refresh graph editor etc.
2009-11-11 09:11:21 +00:00
Campbell Barton b2bb9ca39a Mitchell Stokes BGE MouseWarp patch + warning fix
[#19854] [bugfix] Fix for broken Rasterizer mouse functions
---
This patch fixes the embedded player's ability to control the mouse. For example, hiding and unhiding the mouse cursor
did not work in 2.5, nor could the mouse's position be controlled. This was because these parts still needed to be ported
to 2.5 window manager code.
2009-11-11 08:32:29 +00:00
Joshua Leung 1dfc7942d3 Grease Pencil for Nodes Editor:
This commit restores Grease Pencil functionality for the Nodes Editor. Grease Pencil data is now stored at the NodeTree level, which means that annotations remain with the NodeTree they were made for. 

Possible TODO's:
* In future, it may be worth investigating attaching Grease Pencil data to individual nodes, to allow annotations to stay attached to nodes as they are moved
* Include the settings for the 'active node' in a panel in the new NKEY region where the Grease Pencil buttons appear.
2009-11-11 08:12:54 +00:00
Matt Ebb 7206437c72 node warning fixes 2009-11-11 06:01:42 +00:00
Matt Ebb bf50cc8b39 Added compositing node support to the animation editors
Now when nodes are keyed, they will show up in the dopesheet/graph editor/etc in a new 'Nodetree' category.

Still a major problem left, nodes need unique names in order for the rna paths to hold animation data properly...
2009-11-11 05:03:49 +00:00
Matt Ebb 792c4d602d Fixes for martin's background mode commit - now works fine here on OS X 2009-11-11 04:38:37 +00:00
Martin Poirier e776ecfdde Background mode in more working conditions.
What works:
The usual command line options for rendering.
All python scripts are loaded (which includes custom properties)
Render engines are loaded and can be used
-P to run scripts works partially: rna api works ok, not operators.

What doesn't: 
Most operator calls in python. This is a problem with poll functions. (Brecht and Campbell are aware of this already)

Changes:
-d now also applied with -b (it was ignored before)
user file (.B25.blend) now also loaded in bg mode. This helps for custom paths and all.
wm is also initialized (it's needed for a lot of context calls)
Ghost, however, is not initialized.
2009-11-11 04:08:09 +00:00
Matt Ebb f0fc007c4b Wrapped node input and output sockets in RNA.
This allows you to set and animate the values of socket inputs and outputs, for example the value node.
It's also a step on the way to manipulating node trees via python (i.e. linking node sockets to each other).

This fixes [#19841] RGB Node in compositor not working
2009-11-11 02:15:09 +00:00
Joshua Leung 0807bc176a Actionzones (i.e. corner widgets for splitting views) were broken after the math-lib commit. Was caused by functions that got renamed to the same name but the order of arguments were different. 2009-11-11 01:32:38 +00:00
Erwin Coumans 9256408612 Fix CMake build system for Windows
Add support for OPTION WITH_OPENCOLLADA for Windows
2009-11-11 00:02:49 +00:00
Brecht Van Lommel 91446e9aad Math Lib
* Post-conversion commit, fixing some introduced warnings.
2009-11-10 20:50:34 +00:00
Martin Poirier 673396d285 Split operator internal call (for python) between invoke and exec. Only invoke needs window (for event), no need to require it for exec too.
No functionality changes, except that operator called with exec when a window isn't present (say, bg mode) won't silently fail.
2009-11-10 20:44:10 +00:00
Brecht Van Lommel 37e4a311b0 Math Lib
* Convert all code to use new functions.
* Branch maintainers may want to skip this commit, and run this
  conversion script instead, if they use a lot of math functions
  in new code:
  http://www.pasteall.org/9052/python
2009-11-10 20:43:45 +00:00
Brecht Van Lommel 4617bb68ba Math Lib
* Pre-conversion commit removing old arithb.c code, this will not compile,
  next commit fixes that.
2009-11-10 20:40:18 +00:00
Martin Poirier 84e3b2d726 NULL pointer check to prevent some crash in background mode 2009-11-10 20:34:35 +00:00
Martin Poirier 0797054c2d Running with -d, python context also prints members asked from context that are present.
Also, error messages were mixed up, wrong type and not present where inversed.
2009-11-10 19:57:04 +00:00
Roland Hess e29a70e136 Add Sticky was essentially a blank operator. Possibly context functions weren't around for this one when it was first looked at. Re-attached so it works now. 2009-11-10 19:54:59 +00:00
Brecht Van Lommel 385875632d Math Lib
* Fix remaining issues before conversion.
* Inline various vector functions, currently enabled for all platforms.
  I expect this to work in GCC/MSVC at least, if other platforms don't
  support it, #ifdef's can be added.
2009-11-10 19:13:05 +00:00
Martin Poirier d611dd3735 Function declaration for BPY_context_get 2009-11-10 16:18:54 +00:00
Campbell Barton de7504807c fix error with python exceptions in BPy_errors_to_report 2009-11-10 16:17:49 +00:00
Campbell Barton 7efc2c2375 modify the python context access so invalid names will raise an exception rather then returning None.
this way the UI scripts are less likely to fail silently and wont let typos work ok.

also allow subclassing of the context, added a copy function,
 bpy.context.copy(), returns the context as a python dict to be modified and used in python.

This also showed up an invalid brush member in the screen context.
2009-11-10 15:09:53 +00:00
Campbell Barton 1f2fe7ec14 fix for own error in active bone commit, wasnt checking object type was an armature
also fix for warning with printf
2009-11-10 13:20:32 +00:00
Brecht Van Lommel 14f9e686fa Fix for math lib commit, had duplicate definitions of functions,
giving build issues on some platforms.
2009-11-10 10:24:58 +00:00
Joshua Leung 89c2e6c803 Bugfix #19835: While playing animation, Render>Dimensions>FrameRate does not change animation speed
The timestep used for the playback timer now gets adjusted accordingly when the frames-per-second setting gets changed during playback (i.e. in the "animation_step" operator). This is not as ideal as only updating this when the framerate setting is changed, but using an appropriate update function for this failed miserably.
2009-11-10 09:50:39 +00:00
Matt Ebb 4573120399 Fix for [#19847] Joined meshes fail to render
Join function was accessing invalid memory for material indices when no materials were originally present on the joining objects
2009-11-10 06:29:10 +00:00
Matt Ebb 297045fd96 Fix for [#19852] Animation rendering not working in new scene
As part of this commit, I moved the scene frame_step to RenderData, where the other frame-related data is.
2009-11-10 04:56:55 +00:00
Matt Ebb b24b858394 Fix inconsistent order in Image editor alpha display buttons 2009-11-10 04:03:29 +00:00
Matt Ebb 84abb8ecb6 Fix for [#19855] Color Ramp Interpolation is not working 2009-11-10 04:02:44 +00:00
Matt Ebb bc006655ba * Finished (well, almost ;) RNA wrapping and layout-engine-ing all the nodes.
Still a few quirks, including redraw issues on multilayer image input nodes, but it's pretty much there.
Would also be good to wrap the input/output sockets, too, will check on it.

This fixes bug [#19740] INPUT NODE: Cannot load images / motion pictures
2009-11-10 04:01:44 +00:00
Matt Ebb ad409e5c7e * Small UI drawing tweaks, part of it allowing a bit of extra space for text in number fields 2009-11-10 03:48:02 +00:00
Nicholas Bishop 7fe52eedba Removed an unused function and changed the VBO functions to use the ARB name for consistency with the rest of the file. 2009-11-10 03:45:52 +00:00
Joshua Leung d0cd641de3 Bugfixes for Armatures, SplineIK, and F-Curve RNA:
* Fixed the handling of the 'draw_active' flag for drawing of armatures. This is now cleared from bones in old files (so one bone always got represented as active in the viewport even when others were selected), and the flag is correctly set temporarily when drawing the bones (only one place had been done).

* Fixed typo with SplineIK that was making the root bone of the bone chains always be ignored. Similar functionality can come back at some point, but in a more useful form.

* Shortened the UI names for the F-Curve colouring modes to increase readability. The old ones were too long to be able to distinguish between entries in the UI.
2009-11-09 23:41:48 +00:00
Martin Poirier d34261edab Don't free Context from python.
There might be a better way to do this, Cambo, please check.

This solves the Totblock == -1 error
2009-11-09 23:33:56 +00:00
Brecht Van Lommel 60ea745613 Math Lib Reorganization
* New header and source files.
* Still need a few tweaks before switching code to use them.
2009-11-09 22:42:41 +00:00
Campbell Barton 5935ef0049 use armature active bone as a pointer rather then a flag for each bone that needs looking up.
- rna vars arm.bones.active & rna.edit_bones.active
- needed special undo support.
- readfile.c loads.
- duplicate and copy_armature support.
- keep the draw flag, renamed to BONE_DRAW_ACTIVE, only use for openGL drawing.

Note: it may be better to allow active/unselected as with objects.
2009-11-09 21:03:54 +00:00
Guillermo S. Romero 3e2766bc2e Add FFTW3 support to Makefiles, make OpenJpeg use OS lib for Linux.
And handful of whitespace clean ups.
2009-11-09 20:08:19 +00:00
Roland Hess 6dd96fcfa8 Update of older commit (23102) from Bob Holcomb -- fix for Darken mode blending was only in place for nodes, not for general texture blending. This updates texture blending to reflect the fix. Now results don't trend toward black on Darken anymore as factor approaches 0. 2009-11-09 19:20:48 +00:00
Damien Plisson 45c0f70e3e - scons fix for linux build 2009-11-09 18:32:59 +00:00