1
1

Compare commits

...

131 Commits

Author SHA1 Message Date
2bdb4607be TileBranch
* clean up commit
2012-05-18 08:24:31 +00:00
dacfa55825 TileBranch
* new image socket type support
2012-05-16 09:49:16 +00:00
f829d9a0c8 TileBranch
* remove unused test-nodes
2012-05-16 08:36:09 +00:00
61fa44b6fc TileBranch
* Bokeh blur fix for depth buffers
 * Switch rename sockets
2012-05-16 08:18:09 +00:00
c8b752bc73 Tile Branch:
* Fix compile error, in C++ arguments to pow() must be either both float or both double.
2012-05-12 13:02:21 +00:00
4d84436197 Tiles branch:
* Run old compositing code with Debug Menu operator value set to 200, useful for testing.
2012-05-11 14:53:48 +00:00
1c390fb60d Tiles branch:
* Fix OpenCL not being found on Mac OS X.
* Fix merge error in tracking.c
* Node/RNA naming capitalization and underscore consistency.
* Add missing license headers in opencl files.
* Remove unneeded COM_defines.h.trunk file.
* Various code style consistency fixes.
2012-05-11 12:50:05 +00:00
cca55e5c58 TileBranch
* fixed support for file output node trunk
2012-05-11 09:08:58 +00:00
05a589928f TileBranch
* removed debug statements
2012-05-11 07:03:04 +00:00
eca837e15a TileBranch
* fix for [#31238] Directional Blur strange behaviours
2012-05-11 06:51:22 +00:00
e36ef1124e TileBranch
* fix issue with bilateral blur (when sigma space + iteration was to small, black spots appeared.
2012-05-11 06:38:43 +00:00
7ddfbb2fe7 TileBranch
* fixed for [#31298] plugging anything into size socket of blur node
does nothing
2012-05-10 20:48:36 +00:00
046c57c075 Tile Branch
[#31298] plugging anything into size socket of blur node does nothing
2012-05-10 20:24:20 +00:00
d424ccac04 TileBranch
* disable debug prints (DOT output of the execution operation system)
2012-05-10 14:51:18 +00:00
d78b003702 TileBranch
* fix for Lens distortion (out side pixels has random colors)
 * also calculate preview/viewnode when doing render image/animation
2012-05-10 13:52:35 +00:00
b1474a46b0 TileBranch
* added ImageNode for trunk.

The file COM_defines.h.trunk is a file that needs to be copied over the COM_defines.h when patching trunk
This will will make sure that the new image API, image node and outputfilenode will be used.
2012-05-09 20:47:13 +00:00
cc54ffef83 TileBranch
* delete when finished
2012-05-08 11:52:35 +00:00
5c449f49d4 TileBranch
* delete when finished
2012-05-08 11:15:09 +00:00
4957ee80c0 TileBranch
* removed determine resolution [temporarilly]
2012-05-08 10:53:59 +00:00
bd749b6a86 TileBranch
* fix for [#31313] Fast Gaussian - NO result & Mix node - NO preview
2012-05-06 13:49:12 +00:00
868bb2c02a TileBranch
* fix for [#31309] brightness/contrast node discards Green and Blue channels
2012-05-06 12:34:48 +00:00
e4532e9b04 Tile branche
[#31242] Fast Gaussian blur results in a black screen
2012-05-04 21:45:51 +00:00
7b5f58ae89 Tile Branche
[#31242] Fast Gaussian blur results in a black screen
Added viewer
2012-05-04 21:31:34 +00:00
aa3719e4e3 Tile Branche
[#31242] Fast Gaussian blur results in a black screen
2012-05-04 21:23:27 +00:00
55cee5f26b TileBranch
* fix for [#31284] Crasher on pulling a socket input out of a group

 - At Mind -
2012-05-04 17:55:05 +00:00
145f5bfcfd Tile branche
[#31282] Edit quality should be High by default
2012-05-04 17:37:07 +00:00
aa06fe686f Tile branche
Fix for [#31283] Crash with Levels node
2012-05-04 15:39:53 +00:00
Dalai Felinto
b29498ad01 fix for [#31274] Black border around image texture applied to geometry with UV pass 2012-05-04 15:02:31 +00:00
1fa74ff971 TileBranch
* added anti alias to Dilate/erode
 - At Mind -
2012-05-04 13:07:11 +00:00
f4c96c183d TileBranch
* Blur the alpha of the bilateral blur
 - At Mind -
2012-05-04 12:06:11 +00:00
9882d1dd95 TileBranch
* fix for [#31227] Bilateral blur is moving picture by 1-2 pix to right and up
 the number of iterations was not affecting the blur.

 - At Mind -
2012-05-04 11:59:20 +00:00
7b80e5d1a5 TileBranch
* fix for [#31262] Z-depth does not work with multilayer EXR's

 - At Mind -
2012-05-04 11:32:26 +00:00
39b65bd6fc TileBranch
* Added an AntiAlias Operation. It utilizes Blender internal renderer.
 * Fix for [#31263] ID Mask - Smooth Mask option doesnt do anything

 - At Mind -
2012-05-04 11:17:32 +00:00
e870e1dae3 TileBranch
* fix for [#31223] crash on mute RGB node
Mute nodes did not work for nodes with only output sockets.

Strange that it should be possible :)

Jeroen & Monique
 - At Mind -
2012-05-02 19:50:56 +00:00
449e8aba55 TileBranch
* Fixed [#31243] Image sequence does not work
issue was that an incorrect frame was used to determine the resolution of the sequence
defaulted to 0 by 0 pixels

Jeroen & Monique
 - At Mind -
2012-05-02 19:21:30 +00:00
abf05c0ae4 TileBranch
* Fix for [#31225] Blur Node - mitchell filter
   - Also implemented for the catrom filter

These filters don't look good on medium/low quality setting. so these will only be calculated on highest quality.

Jeroen & Monique
 - At Mind -
2012-05-02 18:39:59 +00:00
73150032c5 TileBranch
* Added depth image
 * fixed issue [#31123] Output from Z socket of image input node crashes blender.
 * fixed issue [#31244] Image node creates a Z socket

Monique & Jeroen
 - At Mind -
2012-05-02 18:30:47 +00:00
c2b40726f2 TileBranch
* Implemented the Crop Image

Monique & Jeroen
 - At Mind -
2012-05-02 18:08:55 +00:00
a737df595e TileBranch
* fix for [#31206] Input sockets on Texture node not functioning
2012-05-02 14:06:40 +00:00
feb88b538d TileBranch
* Fix for [#31222] Rendering compo fails with texture input

Compositor output resolution will always be set to the render output size
2012-05-02 10:36:29 +00:00
3a7d93b6af TileBranch
* Fixed issue [#31226] Invert node turns all B-White
2012-05-02 08:09:36 +00:00
5c380d3589 TileBranch
* Added the crop node
   - still needs some work with the crop image size
 * Added the Double Edge Mask
 * Changed the max tile size of the compositor

These were the last two nodes. now let's start with the clean up and bug fixing...

 - At Mind - 
Jeroen & Monique.
2012-04-29 21:47:41 +00:00
b03fcc62da TileBranch
* converted spaces to tabs
2012-04-24 16:55:19 +00:00
482d81d8cd TileBranch
* converted spaces => tabs
2012-04-24 16:08:39 +00:00
91a5b730f8 TileBranch
* removed unneeded file (colorspace)
2012-04-24 15:26:37 +00:00
fbae5d6bb2 TileBranch
* Fixed Convolution filters
2012-04-24 13:39:14 +00:00
0bff9e61a8 TileBranch
* Converted spaces to tab in the nodes nodes directory
2012-04-24 12:38:03 +00:00
4f05fb3eb7 TileBranch
* Fixed: ToneMap resulted into a black&white image.
2012-04-24 12:07:26 +00:00
60f19c526f TileBranch
* Fix for bug [#31031]
Blender chrash after disconnect Hue Saturation Value node from image.

removed the is connected check. this could result is a wrongly formed operation tree
2012-04-23 10:48:51 +00:00
31fce4b147 TileBranch
* added defocus node
  - only preview options do not work, as they are replaced by the Compositor tree quality settings
2012-04-23 09:01:27 +00:00
f6137df871 TileBranch
* removed unneeded files
2012-04-20 08:23:49 +00:00
57fa5dba60 TileBranch
* cleaned up whitespaces of compositor/intern
2012-04-18 20:29:54 +00:00
6032a9f111 TileBranch
* added a scale to fixed size option, for better workflow
2012-04-18 19:09:05 +00:00
4d7cee4d57 TileBranch
* Used the wrong index in the ViewLievels operations
2012-04-18 18:02:50 +00:00
33d9193501 TileBranch
* Added ViewLevels (no buckets)
   - Calculate Mean
   - Calculate Standard deviation
 * improved overall performance 
   - default tile size = 256

 - At Mind -
2012-04-18 18:01:47 +00:00
a1a369e9d4 TileBranch
* Cycles layers
 * OpenEXR support
2012-04-17 17:48:45 +00:00
Dalai Felinto
dd6c98a82b Tile: Alpha Convert node (premul/key) 2012-04-14 15:14:24 +00:00
e5f550990f TileBranch
* The distortion node could read from unassigned memory. This is solved by this commit
2012-04-13 06:45:29 +00:00
fc355e406c TileBranch
* Added absolute scale and scene scale options
2012-04-12 20:21:02 +00:00
61c4288b76 TileBranch
* added cycles passes
2012-04-12 15:31:48 +00:00
22761fafbb TileBranch
* fill an uninitialized value

 - At Mind -
2012-04-11 20:46:50 +00:00
8ef0cf7af6 TileBranch
* added caching operations to Distortion node.

With thanks to Sergey!

 - At Mind -
2012-04-11 19:36:33 +00:00
6dd7c3f6c0 TileBranch
* added initial version of the MovieDistortion/MovieDistortion node.

 - At Mind -
2012-04-11 18:37:46 +00:00
61082cfcab TileBranch
* do not use area of interest, when the blur has already been calculated. Saves some time in the memory manager.
 - At Mind -
2012-04-11 07:09:35 +00:00
a51cbef1b0 TileBranch
* fixed the vectorBlur additional artifacts. These were created as the editor output socket is an vector, but the output operation was a color. this color type was set to the editor node output socket type. this was an early optimization, and this is the only 'issue' that we can have with it :)
 * replaced spaces => tabs in ConvertVectorToColor
 - At Mind -
2012-04-11 04:40:45 +00:00
d02ba08612 TileBranch
* added quality setting for vector blur. The quality setting will change the actual number of samples to be calculated. With high quality the user selected number of samples will be used. with low this amount is divided by 3, medium by 2. Tests are needed if this suits in a normal workflow.

 - At Mind -
2012-04-10 21:33:43 +00:00
df483f2dda TileBranch
* added first implementation of the VectorBlur; It uses Blender Internal renderer to calculate the vectorBlur. 
 * still needs some work (artifacts + quality setting)

 - At Mind -
2012-04-10 20:14:48 +00:00
02eff53c56 TileBranch
* increased editing performance of the bilateral blur

 - At Mind -
2012-04-10 17:07:14 +00:00
f3cd37afbf TileBranch:
* added a simple implementation of the bilateral blur. The implementation needs still has a lot of places to improve speed. The simplicity of the kernel makes it an ideal candidate for OpenCL!

 - At Mind -
2012-04-10 15:48:28 +00:00
e9c8ae74d6 TileBranch
* Added sampler operation to the Rotate node
 * Added sampler operation to the Transform node

Effect:
 * Bilinear, Bicubic, nearest filtering should work on MovieClips
2012-04-05 12:44:59 +00:00
ac47630f48 TileBranch
* Fixed issue with Stabilize2d node.
reason of crash:
 - the resolution of the movie clip attribute operation was set to the default values
 - the system did a translate operation to center this
 - these new added operations crashed the system
2012-04-05 06:46:18 +00:00
8754ed835d Tile branch
* added debug info (dot graph) during debugging;
 * fixed issue in the movieclip node, where wrong connections where created
2012-04-03 11:56:01 +00:00
8b4f32f64f TileBranch
* Added a sampler node

With the sampler node it is possible to change image sample methods where you want.
Sampler only works for Images & MovieClips

 - At Mind -
2012-02-28 12:05:11 +00:00
bccc528e23 TileBranch
* Added basic flow for samplers in the compositor
samplers can be used to identify how to sample an ImBuf/LenderLayer/Image/MovieClip/TempBuffer.
example of samplers are Nearest, Bilinear, Bicubic

 - At Mind -
2012-02-28 10:43:37 +00:00
00a6b07523 TileBranch
* Added transform node
 * Fixed rounding issue in MovieClipOperation
 * Initial version of Stabilize2d node (not working ATM; Memory rewrites occurs)
 * Added MovieClipAttributeOperation, to read movieclip attributes, like frame stabilization offset, angle, scale

 - At Mind -
2012-02-27 14:56:21 +00:00
a911beea33 TileBranch
* Added the MapValue node

 - At Mind -
2012-02-22 18:56:57 +00:00
7f342e0944 TileBranch
* added parameter to the compositor to really identify if the
compositor is called from an editor or from the renderer/pipeline

This is a fix so that the quality level and speedups are managed
appropriate.

 - At Mind -
2012-02-22 16:26:24 +00:00
913df3ab03 TileBranch
* Added Output file node
 * Fixed issue during deinitialization of the compositor

Note:
 * There is a change in the render pipeline of blender that the 
   render vs editor attribute is not correct anymore.
This needs to be fixed, have noted in the todo list

 - At Mind -
2012-02-22 14:34:17 +00:00
5d2e22aa99 TileBranch
* added color spill node.
 * did some optimizations to the color spill logic
2012-02-21 13:13:14 +00:00
271fd73c44 Tile Branch
* added the color correction node back. Node was only merged for a part from the git branch

With the color correction node ("Color/Color correction" in the compositor node editor) colors can be manipulated using the most common color operations.
Even color channels can be enabled/disabled and fine-tuning on highlights, midtones and shadows can be tweaked.

 - At Mind -
2012-02-20 12:18:54 +00:00
ad734a391a Tile Branch:
* converted the MovieClip node to tiles.
 * added color profile conversion operation
2012-02-16 13:23:36 +00:00
Dalai Felinto
92ade59a4b Channel Matte Node Tile
node from trunk converted to tile.
2012-02-07 22:20:10 +00:00
Lukas Toenne
e8c48ab687 Fixed use of deprecated bNodeStack values from sockets. These have been replaced by the default_value pointer, which points to one of the bNodeSocketValue*** structs, depending on socket type. The bNodeStack ns member in bNodeSocket might still work occasionally since it is restored in writefile.c for forward compatibility (happens on undo push too). 2012-02-02 10:05:44 +00:00
Lukas Toenne
e8a268f0e3 Fixed registration functions for last section of compositor nodes in registerCompositNodes (dilate/erode 2, box mask, ellipse mask, bokeh image, bokeh blur, switch and opencl test). The register functions need a tree type argument now instead of a plain ListBase. 2012-02-02 09:24:48 +00:00
Dalai Felinto
51727f132a adding double edge mask to the list of to be converted nodes + blenderplayer stubs update 2012-02-02 00:14:35 +00:00
Dalai Felinto
28f1fdd39b svn merge ^/trunk/blender -r43091:43824(HEAD)
Conflicted file manually update:
===============================
readfile.c

Note 1:
=======
The Double Edge Mask is not in tile since it's not a simple convert.
The author of this node is aware of it and should have it working there eventually.
(I'm going to add it in COM_Converter.cpp in a next commit)

Note 2:
=======
In COM_compositor.cpp we are passing only "Compositing" instead of what we have in trunk "Compositing 1 Gamma"
If we decide to go with trunk then we need to incorporate the 43283 and 43287 commits.

Something like:
COM_compositor.cpp:51
-	editingtree->stats_draw(editingtree->sdh, (char*)"Compositing");
+	char str[128];
+	BLI_snprintf(str, sizeof(str), "Compositing %d %s", curnode, node->name)
+	editingtree->stats_draw(editingtree->sdh, str);
2012-02-01 23:22:55 +00:00
Dalai Felinto
6b39a476cb Normalize Node - Tile
The implementation is simple. Fancy alternatives to gather the minimum and
maximum through recursive loop in the tiles proved inefficient (Jeroen Bakker's
 tests)

I'm also using the generic NodeTwoFloats to store the temporary values calculated in the loop.
And different from Blender trunk I'm not checking to see if the value is between the accepted Z range
(e.g. (*val <= BLENDER_ZMAX)). I can't see why that would be necessary. To avoid overflow? If so this be handled (aka clamped) outside the nodes in a generic way.

Credits to Jeroen Bakker for the solution in using mutex (copy pasted from his ToneMap code) and review
2012-01-31 19:57:01 +00:00
Dalai Felinto
ed4ea07030 displace node cleanup (using clamp) + simple displace glitch fix + not using protected variables 2012-01-27 09:03:47 +00:00
20cfd2f388 Tile branch
* Added the Glare streaks operation
 * Added a clear method to the MemoryBuffer

Jeroen Bakker
 - At Mind -
2012-01-26 10:42:15 +00:00
7605fabf92 TileBranch
* removed a python null-value when doing the next steps:
1. start blender
2. go to the compositor view
3. press 'N'

issue was that no node_tree is available
2012-01-26 08:45:01 +00:00
Dalai Felinto
6a93b4f5b1 Displacement Node Simple version - Tile 2012-01-26 08:37:43 +00:00
Dalai Felinto
ba57e043ca Displace Node - Tile
--------------------
I had to make it into a Complex node to allow the readEWA to be used.
(the other alternative is to expose readEWA to all node types when dx and dy are
passed as parameter to read).

This node also uses the readEWA. It's the last one that needs that (from trunk nodes at least)

Thanks for Jeroen Bakker for the help in the determineDependingAreaOfInterest. Using +1 as max for the uv was producing precision problems resulting in a strange artifact (a vertical and a horizontal line from the origin (0,0))
2012-01-24 16:45:42 +00:00
04045a8f6c TileBranch
* resolution propagation patch

Resolution were not always propagated between read/write buffers. This will be important when implementing Buffer caches

Jeroen Bakker
 - At Mind -
2012-01-18 15:08:37 +00:00
dd97bf7a24 TileBranch
* Removed storage of tiles to disc. in order to support buffer caching
 * Cleaned up spaces/tabs

Jeroen
2012-01-18 10:39:07 +00:00
Dalai Felinto
8d1d696978 fix compile: doubleedgemask define will only be available when trunk get merged in tile again 2012-01-14 20:11:05 +00:00
Dalai Felinto
4aef01b83a including the non implemented nodes in the COM_Convert.cpp to make it easy to see what's missing
(thanks bash tools :)
2012-01-12 19:47:54 +00:00
Dalai Felinto
dcbbd13162 cleanup - removing unecessary #includes
(COM_InputSocket.h and COM_OutputSocket.h - as suggested by Jeroen Bakker)
2012-01-12 19:17:47 +00:00
Dalai Felinto
bf911f41eb Color Matte Node - tiles
thanks Jeroen Bakker for review + small corrections
2012-01-12 18:54:19 +00:00
Dalai Felinto
c81a1b33a3 Tile - Chroma Matte Node
note - shadow adjust (c->t3) and lift (c->fsize) are no longer used in the algorith (since somewhere in 2.5 dev).
The properties are still in ChromaNode and have a RNA property.

This should be address in trunk, not in Tile I think.
If those are parameters needed for a more robust algorith we bring it to Tile later.
2012-01-11 18:24:22 +00:00
Dalai Felinto
eb14b7fb23 Separate Combine YCbCr nodes + fix for YUV
------------------------------------------
YUV was missing in COM_Converter.cpp

Sep/Comb YCC could even inherit each other (given the setMode function is th same). But I think it's fine to duplicate that. Thoughts?

Also, I'm not using m_privateprops C++ like naming. As we are not doing this in the other nodes.

reviewed/approved by Jeroen Bakker.
2012-01-10 22:15:50 +00:00
Dalai Felinto
134dd5bc6b Refactor of Distance Matte Node/Operation
reinforcing that all Matte operations should output the alpha channel (VALUE).
thus it needs the SetAlpha operation (instead of the split Alpha)
2012-01-08 20:30:12 +00:00
Dalai Felinto
5ca343bcd8 Distance Matte node - Tile
this matte operation is outputting RGBA (in oppose to only the A value as some other mattes).
The reason for this is to avoid and extra operation to get the main output ready (which is always needed
for the preview so we may as well get it done).

Instead of using the SetAlphaOperation I'm using SeparateChannel to extract the alpha from the output
of the Distance Matte operation.

Jeroen, I think it's simpler if I go ahead and commit the nodes if I think they are good.
If there are problems it'll be simpler to fix in svn since they should be small.
2012-01-08 02:11:59 +00:00
Dalai Felinto
1d4bb67b37 Separate+Combine YUV + Luminance Matte node for Tile
reviewed by Jeroen Bakker
2012-01-06 19:13:20 +00:00
ec9998ff30 TileBranch
* added preview to the DifferenceMatteNode
2012-01-06 18:40:48 +00:00
d4af26fbc2 Tile branch
* added the simple start (4star) glare operation
 * cleaned up the FogGlowImage operation.

In the trunk implementation there is an error in the formula when using the 'Quality' setting
low quality will create larger stars. In the new implementation all will be done in the high quality setting.
2012-01-05 17:02:20 +00:00
Dalai Felinto
079753252b MapUV Node - Tile
This node requires an EWA filter to read the final value.
In COM_MemoryBuffer.cpp I copied the functions from texture.c
The reason for copying and not re-using from a header is to allow
for further refactoring. Basically the codes should be independent.

The EWA happens automatically when  you call the read function with two extra arguments
(dx and dy, calculated from a differential filter pass before in the operation).

Good news, the result works better than trunk. In trunk the edges of the image get black,
here it works all fine.
2012-01-04 19:18:11 +00:00
02f17cf92a TileBranch
* added the basic implementation of the GlareNode
 * only implemented the FogGlow
 * all others will also do fogglow

FogGlowImageOperation calculates a BokehImage for the glow. This way the BokehBlur is reused to calculate the actual blur
GlareThresholdOperation will generate the image where the effect must take place. (BTL function in the old compositor)
2012-01-04 14:43:26 +00:00
de3071d196 Merge changes from commits 42814, 42928, 43004 into new compositing nodes code,
to complete the previous merge commit.
2012-01-03 17:33:38 +00:00
19448bb139 Tile Branch
* make sure that OpenCL initialization works for the MS compiler. Issue concerned the way when local variables are initialized.
GNU based compilers initialize locals when the variable is defined.
MS compiler first initialize all local variables, before any code will be executed.

The arrays are now initialized in code to make sure it compiles on MS compiler.
2012-01-03 12:40:51 +00:00
871d5b5896 Tile branch
* Enabled OpenCL for the compositor
 * Remove not working Threadind models of the compositor
 * OpenCL will only work when the COM_TM_QUEUE is enabled and COM_OPENCL_ENABLED
 * Updated the scons build system
2012-01-03 12:06:30 +00:00
d3af919ac6 Merging Trunk changes into Tile branch:
SVN Range: 42300-43091.

Resolved issues:
* Re-added compat code for new Compositor in readfile.c
* Matrix multiplication order fixes, see commit 42670.

Tested compile on windows, branch looks good after merge! :)
2012-01-03 04:23:41 +00:00
e8dab248c8 Tile Branch
* Fix some wrong #if's to #ifdef's
2012-01-03 02:38:48 +00:00
65fe4a9ed3 Tile branch
implemented the thread queue pattern for work scheduling.
This is stable and has the possibility to do OpenCL threading in the future.
This threading model is selected to be the default one.

Still needed to be tested by other users to make sure it is the right direction.

Jeroen Bakker
 - At Mind -
2012-01-02 16:24:30 +00:00
67ddab0e53 Tile branch:
removed a warning (missing return)
removed a debug statement
2011-12-15 13:38:45 +00:00
4af3899708 Tile branch:
added the worker pattern in the workscheduler for stability reasons.
the execution time is slower (+-70% of normal speed) but it does not crash that much.

Goal is still to use the pthreaded model. but this needs some more complex debugging.

Jeroen
2011-12-15 12:42:43 +00:00
f8a20575aa Tile branch
some changes to clean up memory in order to continue tracking the threading/memory issue
2011-12-14 08:51:50 +00:00
Lukas Toenne
01755ae537 Generalization of group node conversion in the new compositor.
This allows groups inside groups to work and also simplifies the code a lot.

* Ungrouping of group nodes ("expanding" might be a better name?) is
done as part of the general addNodeTree function now. This way the
ungrouping happens recursively on all levels of group nodes.
* The adding of a node tree works in three basic steps:
 1) Add all nodes, including group nodes (ignoring internals of the
group at this point)
 2) Add links between nodes (again, no group internals here)
 3) Expand all newly added group nodes from this tree, which replaces
them with internal nodes and proxy nodes for inputs and outputs.
* Expanding the node tree works different now:
 1) First add proxy nodes for all input/output sockets. The group
node sockets are then reconnected to the "outer" proxy sockets, while
the internal group sockets (sock->groupsock) are assigned to the
"inner" proxy sockets.
 2) Then the actual inner node tree is added, which connects internal
nodes to the proxies
 An important change is that the list of nodes, which is used to look
up link targets by their bNode/bNodeSocket pairs, is now limited to
the nodes added from the current tree (including proxies from the
group). This is necessary to avoid ambiguous assignments from other
instances of the same group node type!
 An advantage is also that now no more special group socket pointers
and "insideGroup" flags are needed for the Socket class, making the
code a bit simpler.
* Currently the "actual data type" is not converted on proxy
nodes (XXX TODO in the patch), this should be revisited.
2011-12-12 10:22:34 +00:00
Lukas Toenne
1948bd13c9 Fixed some destructor calls on array variables. 2011-12-10 12:42:01 +00:00
Lukas Toenne
20edbc0b07 Fix for group nodes in new compositor: when ungrouping the internal groups prior to conversion all unlinked inputs of the group node would be ignored. What should actually happen is that inputs without _internal_ connections are ignored, since these are not used for any outputs. 2011-12-09 14:40:30 +00:00
Lukas Toenne
4113090b40 Finished all blend modes for the color mix node.
In detail:
* Added missing implementations for Dodge, Burn, Hue, Saturation, Value and Color blend modes.
* Reviewed all other blend modes for correctness.
* Base Operation: Leave alpha unchanged (all color mix ops do so); use the alpha multiply value like all others (just for clarity, base op is not really used)
* Difference: Use fabsf instead of fabs, the latter works on doubles instead floats.
* Divide: return 0 if divisor is 0.
2011-12-09 11:38:10 +00:00
Lukas Toenne
0255b4b257 Use the default_value data in bNodeSocket for input constants instead of the deprecated bNodeStack ns member. The ns member only still works partially since it is updated back from the actual default_value on each file write and also undo pushes (for forward compatibility). 2011-12-09 09:39:50 +00:00
579da5c052 Tile Branch:
* Fixing wrong button RNA identifier, causing the Switch Buttons not to display.
2011-12-08 21:50:52 +00:00
d674508590 Tile branch:
cleaned up some debugging information
2011-12-07 20:27:50 +00:00
967edae8b6 Tile Branch:
* Some UI cleanup of the Viewer Center Buttons + naming fixes.
* Fixing some align booleans in the UI code, there is only 0 and 1. 

ToDo: Do not re composite when changing the center value.
2011-12-06 21:25:46 +00:00
9f96c97cac Tile Branch
* Compile fixes for MSVC, patch by Andrew Wiggin (ender79). Thanks a lot! 
* Fixed scons compile on win, missing pthreads include.
2011-12-06 20:47:57 +00:00
ecf71e6635 Branch Tile:
added the GPL header to all files.
2011-12-06 08:36:33 +00:00
ccf498387f Tile Branch:
* Minor UI tweak to save some space in the node editor properties region.
* Rename RNA "opencl" to "use_opencl", to follow boolean rna-naming conventions.
2011-12-01 20:02:47 +00:00
63fa5be2e7 Tile-branch
removed the strange vector allocations in NodeBase. This stabelize the code a lot. 
Next crash was about preview images. In order to do dynamic screen update the data can be lost during drawing. this needs to be fixed by working on copies.
2011-12-01 14:46:36 +00:00
89eb81d629 optimized the interface of nodes and operations sockets 2011-12-01 10:27:35 +00:00
5f7f094e5b New composite engine.
committed in order to start the migration of the nodes.
have some issues with some changes in trunk based on the UI event handlers.
sometimes an exception happens in the malloc of a UI-control.
need to discuss what the issue is.

OpenCL part is disabled right now. will be enabled in a folowing commit.

Jeroen & Monique.
 - At Mind -
2011-11-30 22:23:40 +00:00
551570fcfa Initial copy of trunk to the tile branch.
Tile branch will be used for migrating compositor nodes to the new structure.
Integration of the new compositor will follow in different commit
2011-11-30 20:37:05 +00:00
2657 changed files with 273764 additions and 343863 deletions

View File

@@ -124,7 +124,7 @@ mark_as_advanced(WITH_PYTHON) # dont want people disabling this unless they rea
mark_as_advanced(WITH_PYTHON_SECURITY) # some distrobutions see this as a security issue, rather than have them patch it, make a build option.
option(WITH_PYTHON_SAFETY "Enable internal API error checking to track invalid data to prevent crash on access (at the expense of some effeciency, only enable for development)." OFF)
option(WITH_PYTHON_MODULE "Enable building as a python module (experimental, only enable for development)" OFF)
option(WITH_PYTHON_MODULE "Enable building as a python module (experemental, only enable for development)" OFF)
option(WITH_BUILDINFO "Include extra build details (only disable for development & faster builds)" ON)
option(WITH_IK_ITASC "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)" ON)
option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke and audio effects)" OFF)
@@ -149,13 +149,10 @@ mark_as_advanced(WITH_AUDASPACE)
# (unix defaults to OpenMP On)
if(UNIX AND NOT APPLE)
set(PLATFORM_DEFAULT ON)
option(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" ON)
else()
set(PLATFORM_DEFAULT OFF)
option(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF)
endif()
option(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" ${PLATFORM_DEFAULT})
unset(PLATFORM_DEFAULT)
if(UNIX AND NOT APPLE)
option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)" ON)
@@ -163,11 +160,6 @@ if(UNIX AND NOT APPLE)
option(WITH_BUILTIN_GLEW "Use GLEW OpenGL wrapper library bundled with blender" ON)
option(WITH_XDG_USER_DIRS "Build with XDG Base Directory Specification (only config and documents for now)" OFF)
mark_as_advanced(WITH_XDG_USER_DIRS)
# freebsd doesn't seems to support XDND
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
option(WITH_GHOST_XDND "Enable drag'n'drop support on Linux using XDND protocol" ON)
endif()
else()
# not an option for other OS's
set(WITH_BUILTIN_GLEW ON)
@@ -179,7 +171,7 @@ option(WITH_MOD_SMOKE "Enable Smoke Modifier (Smoke Simulation)" ON)
option(WITH_MOD_DECIMATE "Enable Decimate Modifier" ON)
option(WITH_MOD_BOOLEAN "Enable Boolean Modifier" ON)
option(WITH_MOD_REMESH "Enable Remesh Modifier" ON)
option(WITH_MOD_CLOTH_ELTOPO "Enable Experimental cloth solver" OFF)
option(WITH_MOD_CLOTH_ELTOPO "Enable Experemental cloth solver" OFF)
mark_as_advanced(WITH_MOD_CLOTH_ELTOPO)
option(WITH_MOD_OCEANSIM "Enable Ocean Modifier" OFF)
@@ -195,7 +187,6 @@ option(WITH_IMAGE_FRAMESERVER "Enable image FrameServer Support for rendering"
# Audio/Video format support
option(WITH_CODEC_FFMPEG "Enable FFMPeg Support (http://ffmpeg.org)" OFF)
option(WITH_CODEC_SNDFILE "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF)
if(APPLE OR (WIN32 AND NOT UNIX))
option(WITH_CODEC_QUICKTIME "Enable Quicktime Support" OFF)
@@ -227,12 +218,6 @@ if(UNIX AND NOT APPLE)
option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
endif()
option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON)
option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder" ON)
set(PYTHON_NUMPY_PATH "" CACHE PATH "Python to python site-packages or dist-packages containing 'numpy' module")
mark_as_advanced(PYTHON_NUMPY_PATH)
option(WITH_MINGW64 "Use the 64-bit version of MinGW" OFF)
mark_as_advanced(WITH_MINGW64)
# Cycles
option(WITH_CYCLES "Enable cycles Render Engine" ON)
@@ -259,54 +244,20 @@ if(APPLE)
"Choose the architecture you want to build Blender for: i386, x86_64 or ppc"
FORCE)
endif()
execute_process(COMMAND uname -r OUTPUT_VARIABLE MAC_SYS) # check for actual system-version
if (${MAC_SYS} MATCHES 11)
set(OSX_SYSTEM 10.7)
elseif(${MAC_SYS} MATCHES 10)
set(OSX_SYSTEM 10.6)
elseif(${MAC_SYS} MATCHES 9)
set(OSX_SYSTEM 10.5)
else()
set(OSX_SYSTEM unsupported)
endif()
message(STATUS "Detected system-version: " ${OSX_SYSTEM})
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.5" CACHE STRING "" FORCE) # 10.5 is our minimum target, if you have higher sdk, weak linking happens
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5 CACHE STRING
"Choose the minimum OSX version required: 10.4 or 10.5"
FORCE)
endif()
if(${CMAKE_GENERATOR} MATCHES "Xcode")
##### workaround for actual official cmake incompatibility with xcode 4.3 #####
if(${XCODE_VERSION} MATCHES '') # cmake fails due looking for xcode in the wrong path, thus will be empty var
message("Official cmake does not yet support Xcode 4.3, get a patched version here: http://www.jensverwiebe.de/Blender/CMake%202.8-7patched.zip")
endif()
### end workaround for actual official cmake incompatibility with xcode 4.3 ###
if(${XCODE_VERSION} VERSION_EQUAL 4 OR ${XCODE_VERSION} VERSION_GREATER 4 AND ${XCODE_VERSION} VERSION_LESS 4.3)
# Xcode 4 defaults to the Apple LLVM Compiler.
# Override the default compiler selection because Blender only compiles with gcc up to xcode 4.2
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
message(STATUS "Setting compiler to: " ${CMAKE_XCODE_ATTRIBUTE_GCC_VERSION})
endif()
else() # unix makefile generator does not fill XCODE_VERSION var, so we get it with a command
execute_process(COMMAND xcodebuild -version OUTPUT_VARIABLE XCODE_VERS_BUILDNR )
STRING(SUBSTRING ${XCODE_VERS_BUILDNR} 6 3 XCODE_VERSION) # truncate away build-nr
endif()
message(STATUS "Detected Xcode-version: " ${XCODE_VERSION})
option(WITH_COCOA "Use Cocoa framework instead of deprecated Carbon" ON)
option(USE_QTKIT "Use QtKit instead of Carbon quicktime (needed for having partial quicktime for 64bit)" OFF)
option(WITH_LIBS10.5 "Use 10.5 libs (needed for 64bit builds)" OFF)
endif()
#-----------------------------------------------------------------------------
# Check for conflicting/unsupported configurations
if(NOT WITH_BLENDER AND NOT WITH_PLAYER AND NOT WITH_CYCLES_TEST)
if(NOT WITH_BLENDER AND NOT WITH_PLAYER)
message(FATAL_ERROR "At least one of WITH_BLENDER or WITH_PLAYER must be enabled, nothing to do!")
endif()
@@ -314,8 +265,8 @@ if(NOT WITH_GAMEENGINE AND WITH_PLAYER)
message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
endif()
if(NOT WITH_AUDASPACE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK OR WITH_GAMEENGINE))
message(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK/WITH_CODEC_FFMPEG/WITH_GAMEENGINE require WITH_AUDASPACE")
if(NOT WITH_AUDASPACE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK))
message(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK/WITH_CODEC_FFMPEG require WITH_AUDASPACE")
endif()
if(NOT WITH_SDL AND WITH_GHOST_SDL)
@@ -335,6 +286,13 @@ if(WITH_PYTHON_MODULE AND WITH_PYTHON_INSTALL)
message(FATAL_ERROR "WITH_PYTHON_MODULE requires WITH_PYTHON_INSTALL to be OFF")
endif()
if(MINGW)
if(WITH_CODEC_QUICKTIME)
message(FATAL_ERROR "MINGW requires WITH_CODEC_QUICKTIME to be OFF "
"because it is currently unsupported, remove this "
"line if youre a developer who wants to add support.")
endif()
endif()
if(NOT WITH_FFTW3 AND WITH_MOD_OCEANSIM)
message(FATAL_ERROR "WITH_MOD_OCEANSIM requires WITH_FFTW3 to be ON")
@@ -355,47 +313,13 @@ if(WITH_CYCLES OR WITH_CARVE)
set(WITH_BOOST ON)
endif()
TEST_SSE_SUPPORT(COMPILER_SSE_FLAG COMPILER_SSE2_FLAG)
# don't store paths to libs for portable distrobution
if(WITH_INSTALL_PORTABLE)
set(CMAKE_SKIP_BUILD_RPATH TRUE)
endif()
if(WITH_GHOST_SDL OR WITH_HEADLESS)
set(WITH_GHOST_XDND OFF)
endif()
if(MINGW)
if(WITH_CODEC_QUICKTIME)
message(FATAL_ERROR "MINGW requires WITH_CODEC_QUICKTIME to be OFF "
"because it is currently unsupported, remove this "
"line if youre a developer who wants to add support.")
endif()
endif()
TEST_SSE_SUPPORT(COMPILER_SSE_FLAG COMPILER_SSE2_FLAG)
#-----------------------------------------------------------------------------
# Check for valid directories
# ... svn extern paths can be missing because of svn-git.
if(WITH_INTERNATIONAL)
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/datafiles/locale")
message(WARNING "Translation path '${CMAKE_SOURCE_DIR}/release/datafiles/locale' is missing, "
"This is an 'svn external', which are known not to work with bridges to other version "
"control systems, disabling 'WITH_INTERNATIONAL'.")
set(WITH_INTERNATIONAL OFF)
endif()
endif()
if(WITH_PYTHON)
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/scripts/addons")
message(WARNING "Addons path '${CMAKE_SOURCE_DIR}/release/scripts/addons' is missing, "
"This is an 'svn external', which are known not to work with bridges to other version "
"control systems: * CONTINUING WITHOUT ADDONS *")
endif()
endif()
#-----------------------------------------------------------------------------
# Initialize un-cached vars, avoid unused warning
@@ -735,24 +659,14 @@ elseif(WIN32)
# this file is included anyway when building under Windows with cl.exe
# include(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
if(CMAKE_COMPILER_IS_GNUCC)
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32)
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
# Setup 64bit and 64bit windows systems
if(WITH_MINGW64)
message("Set 64 bit compiler for MinGW.")
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64)
endif()
else()
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
# Setup 64bit and 64bit windows systems
if(CMAKE_CL_64)
message("64 bit compiler detected.")
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
endif()
# Setup 64bit and 64bit windows systems
if(CMAKE_CL_64)
message("64 bit compiler detected.")
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
endif()
add_definitions(-DWIN32)
if(WITH_INTERNATIONAL)
@@ -771,7 +685,7 @@ elseif(WIN32)
if(WITH_OPENAL)
set(OPENAL ${LIBDIR}/openal)
set(OPENAL_INCLUDE_DIR ${OPENAL}/include)
set(OPENAL_LIBRARY wrap_oal)
set(OPENAL_LIBRARY OpenAL32)
set(OPENAL_LIBPATH ${OPENAL}/lib)
endif()
@@ -801,35 +715,33 @@ elseif(WIN32)
endif()
if(MSVC)
set(PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid)
if(CMAKE_CL_64)
set(PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid)
else()
set(PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid)
endif()
add_definitions(/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_CONSOLE /D_LIB)
set(CMAKE_CXX_FLAGS "/nologo /J /Gd /EHsc" CACHE STRING "MSVC MT C++ flags " FORCE)
set(CMAKE_C_FLAGS "/nologo /J /Gd" CACHE STRING "MSVC MT C++ flags " FORCE)
set(CMAKE_CXX_FLAGS "/nologo /J /W1 /Gd /wd4018 /wd4244 /wd4305 /wd4800 /wd4065 /wd4267 /we4013" CACHE STRING "MSVC MT C++ flags " FORCE)
set(CMAKE_C_FLAGS "/nologo /J /W1 /Gd /wd4018 /wd4244 /wd4305 /wd4800 /wd4065 /wd4267 /we4013 /EHsc" CACHE STRING "MSVC MT C++ flags " FORCE)
if(CMAKE_CL_64)
set(CMAKE_CXX_FLAGS_DEBUG "/Od /Gm /RTC1 /MTd /Zi" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "/Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
else()
set(CMAKE_CXX_FLAGS_DEBUG "/Od /Gm /RTC1 /MTd /ZI" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "/Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
endif()
set(CMAKE_CXX_FLAGS_RELEASE "/O2 /Ob2 /MT" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_CXX_FLAGS_MINSIZEREL "/O1 /Ob1 /MT" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /MT /Zi" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "/O2 /Ob2 /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_CXX_FLAGS_MINSIZEREL "/O1 /Ob1 /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
if(CMAKE_CL_64)
set(CMAKE_C_FLAGS_DEBUG "/Od /Gm /RTC1 /MTd /Zi" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_C_FLAGS_DEBUG "/Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
else()
set(CMAKE_C_FLAGS_DEBUG "/Od /Gm /RTC1 /MTd /ZI" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_C_FLAGS_DEBUG "/Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
endif()
set(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /MT" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_C_FLAGS_MINSIZEREL "/O1 /Ob1 /MT" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_C_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /MT /Zi" CACHE STRING "MSVC MT flags " FORCE)
# most msvc warnings are C & C++
set(_WARNINGS "/W3 /wd4018 /wd4244 /wd4305 /wd4800 /wd4181 /wd4065 /wd4267 /we4013 /wd4200")
set(C_WARNINGS "${_WARNINGS}")
set(CXX_WARNINGS "${_WARNINGS}")
unset(_WARNINGS)
set(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_C_FLAGS_MINSIZEREL "/O1 /Ob1 /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
set(CMAKE_C_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
if(WITH_INTERNATIONAL)
set(GETTEXT ${LIBDIR}/gettext)
@@ -837,17 +749,6 @@ elseif(WIN32)
set(GETTEXT_LIBPATH ${GETTEXT}/lib)
set(GETTEXT_LIBRARIES gnu_gettext)
endif()
if(WITH_MOD_CLOTH_ELTOPO)
set(LAPACK ${LIBDIR}/lapack)
# set(LAPACK_INCLUDE_DIR ${LAPACK}/include)
set_lib_path(LAPACK_LIBPATH ${LAPACK}/lib)
set(LAPACK_LIBRARIES
${LIBDIR}/lapack/lib/libf2c.lib
${LIBDIR}/lapack/lib/clapack_nowrap.lib
${LIBDIR}/lapack/lib/BLAS_nowrap.lib
)
endif()
set(PNG_LIBRARIES libpng)
set(JPEG_LIBRARIES libjpeg)
@@ -1013,46 +914,29 @@ elseif(WIN32)
set(PLATFORM_LINKFLAGS_DEBUG "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
# used in many places so include globally, like OpenGL
blender_include_dirs("${PTHREADS_INCLUDE_DIRS}")
else()
# keep GCC specific stuff here
if(CMAKE_COMPILER_IS_GNUCC)
set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi")
set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
elseif(CMAKE_COMPILER_IS_GNUCC)
# keep GCC specific stuff here
set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi")
set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
if(WITH_MINGW64)
#We need to take care though not to have these on debug builds because they may play funky with gdb
if(CMAKE_BUILD_TYPE MATCHES "Release")
set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -mmmx -ftree-vectorize")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} -lpthread")
add_definitions(-DFREE_WINDOWS64 -DMS_WIN64)
add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
endif()
add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
add_definitions(-DFREE_WINDOWS)
if(WITH_INTERNATIONAL)
set(GETTEXT ${LIBDIR}/gettext)
set(GETTEXT ${LIBDIR}/gcc/gettext)
set(GETTEXT_INCLUDE_DIRS ${GETTEXT}/include)
set(GETTEXT_LIBPATH ${GETTEXT}/lib)
set(GETTEXT_LIBRARIES intl)
endif()
set(PNG "${LIBDIR}/png")
set(PNG "${LIBDIR}/gcc/png")
set(PNG_INCLUDE_DIR "${PNG}/include")
set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
if(WITH_MINGW64)
set(JPEG_LIBRARIES jpeg)
else()
set(JPEG_LIBRARIES libjpeg)
endif()
set(JPEG_LIBRARIES libjpeg)
set(PNG_LIBRARIES png)
set(ZLIB ${LIBDIR}/zlib)
@@ -1060,64 +944,53 @@ elseif(WIN32)
set(ZLIB_LIBPATH ${ZLIB}/lib)
set(ZLIB_LIBRARIES z)
#comes with own pthread library
if(NOT WITH_MINGW64)
set(PTHREADS ${LIBDIR}/pthreads)
set(PTHREADS_INCLUDE_DIRS ${PTHREADS}/include)
set(PTHREADS_LIBPATH ${PTHREADS}/lib)
set(PTHREADS_LIBRARIES pthreadGC2)
endif()
set(FREETYPE ${LIBDIR}/freetype)
set(PTHREADS ${LIBDIR}/pthreads)
set(PTHREADS_INCLUDE_DIRS ${PTHREADS}/include)
set(PTHREADS_LIBPATH ${PTHREADS}/lib)
set(PTHREADS_LIBRARIES pthreadGC2)
set(FREETYPE ${LIBDIR}/gcc/freetype)
set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
set(FREETYPE_LIBPATH ${FREETYPE}/lib)
set(FREETYPE_LIBRARY freetype)
if(WITH_FFTW3)
set(FFTW3 ${LIBDIR}/fftw3)
set(FFTW3 ${LIBDIR}/gcc/fftw3)
set(FFTW3_LIBRARIES fftw3)
set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
set(FFTW3_LIBPATH ${FFTW3}/lib)
endif()
if(WITH_OPENCOLLADA)
set(OPENCOLLADA ${LIBDIR}/opencollada)
set(OPENCOLLADA ${LIBDIR}/gcc/opencollada)
set(OPENCOLLADA_INCLUDE_DIRS
${LIBDIR}/opencollada/include/COLLADAStreamWriter/include
${LIBDIR}/opencollada/include/COLLADABaseUtils/include
${LIBDIR}/opencollada/include/COLLADAFramework/include
${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader/include
${LIBDIR}/opencollada/include/GeneratedSaxParser/include
${LIBDIR}/gcc/opencollada/include/COLLADAStreamWriter/include
${LIBDIR}/gcc/opencollada/include/COLLADABaseUtils/include
${LIBDIR}/gcc/opencollada/include/COLLADAFramework/include
${LIBDIR}/gcc/opencollada/include/COLLADASaxFrameworkLoader/include
${LIBDIR}/gcc/opencollada/include/GeneratedSaxParser/include
)
set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib)
if(WITH_MINGW64)
set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa xml)
else()
set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
endif()
set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
set(PCRE_LIBRARIES pcre)
endif()
if(WITH_CODEC_FFMPEG)
set(FFMPEG ${LIBDIR}/ffmpeg)
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include ${FFMPEG}/include)
if(WITH_MINGW64)
set(FFMPEG_LIBRARIES avcodec.dll avformat.dll avdevice.dll avutil.dll swscale.dll swresample.dll)
else()
set(FFMPEG_LIBRARIES avcodec-53 avformat-53 avdevice-53 avutil-51 swscale-2)
endif()
set(FFMPEG_LIBRARIES avcodec-53 avformat-53 avdevice-53 avutil-51 swscale-2)
set(FFMPEG_LIBPATH ${FFMPEG}/lib)
endif()
if(WITH_IMAGE_OPENEXR)
set(OPENEXR ${LIBDIR}/openexr)
set(OPENEXR ${LIBDIR}/gcc/openexr)
set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
set(OPENEXR_LIBRARIES Half IlmImf Imath IlmThread Iex)
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
endif()
if(WITH_IMAGE_TIFF)
set(TIFF ${LIBDIR}/tiff)
set(TIFF ${LIBDIR}/gcc/tiff)
set(TIFF_LIBRARY tiff)
set(TIFF_INCLUDE_DIR ${TIFF}/include)
set(TIFF_LIBPATH ${TIFF}/lib)
@@ -1147,24 +1020,19 @@ elseif(WIN32)
if(WITH_BOOST)
set(BOOST ${LIBDIR}/boost)
set(BOOST_INCLUDE_DIR ${BOOST}/include)
if(WITH_MINGW64)
set(BOOST_POSTFIX "mgw47-mt-s-1_49")
set(BOOST_DEBUG_POSTFIX "mgw47-mt-sd-1_49")
else()
set(BOOST_POSTFIX "mgw46-mt-s-1_47")
set(BOOST_DEBUG_POSTFIX "mgw46-mt-sd-1_47")
endif()
set(BOOST_POSTFIX "mgw45-mt-s-1_47")
set(BOOST_DEBUG_POSTFIX "mgw45-mt-sd-1_47")
set(BOOST_LIBRARIES
optimized boost_date_time-${BOOST_POSTFIX} boost_filesystem-${BOOST_POSTFIX}
boost_regex-${BOOST_POSTFIX} boost_system-${BOOST_POSTFIX} boost_thread-${BOOST_POSTFIX}
debug boost_date_time-${BOOST_DEBUG_POSTFIX} boost_filesystem-${BOOST_DEBUG_POSTFIX}
boost_regex-${BOOST_DEBUG_POSTFIX} boost_system-${BOOST_DEBUG_POSTFIX} boost_thread-${BOOST_DEBUG_POSTFIX})
set(BOOST_LIBPATH ${BOOST}/lib)
set(BOOST_LIBPATH ${BOOST}/lib/gcc)
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB -DBOOST_THREAD_USE_LIB ")
endif()
if(WITH_OPENIMAGEIO)
set(OPENIMAGEIO ${LIBDIR}/openimageio)
set(OPENIMAGEIO ${LIBDIR}/gcc/openimageio)
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
set(OPENIMAGEIO_LIBRARIES OpenImageIO)
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
@@ -1179,22 +1047,15 @@ elseif(WIN32)
endif()
# used in many places so include globally, like OpenGL
blender_include_dirs("${PTHREADS_INCLUDE_DIRS}")
elseif(APPLE)
if(${CMAKE_OSX_DEPLOYMENT_TARGET} STREQUAL "10.5" OR ${CMAKE_OSX_DEPLOYMENT_TARGET} STRGREATER "10.5")
set(WITH_LIBS10.5 ON CACHE BOOL "Use 10.5 libs" FORCE) # valid also for 10.6/10.7
if (${CMAKE_OSX_DEPLOYMENT_TARGET} STREQUAL "10.5")
set(WITH_LIBS10.5 ON CACHE BOOL "Use 10.5 libs" FORCE)
endif()
if(${XCODE_VERSION} VERSION_LESS 4.3)
SET(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE ) # use guaranteed existing sdk
else()
# note: i don't use xcode-select path on purpose, cause also /Applications/Xcode.app would be allowed
# absolute pathes are more foolproof here !
SET(OSX_SYSROOT_PREFIX /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform)
SET(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk) # use guaranteed existing sdk
SET(CMAKE_OSX_SYSROOT ${OSX_SYSROOT_PREFIX}/${OSX_DEVELOPER_PREFIX} CACHE PATH "" FORCE)
endif()
if(WITH_LIBS10.5)
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-9.x.universal)
else()
@@ -1622,6 +1483,15 @@ if(MSVC10)
endif()
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(WITH_IK_ITASC OR WITH_MOD_FLUID)
message(WARNING "Using Clang as CXX compiler: disabling WITH_IK_ITASC and WITH_MOD_FLUID, these features will be missing.")
set(WITH_IK_ITASC OFF)
set(WITH_MOD_FLUID OFF)
endif()
endif()
# ensure python header is found since detection can fail, this could happen
# with _any_ library but since we used a fixed python version this tends to
# be most problematic.
@@ -1632,50 +1502,6 @@ if(WITH_PYTHON)
"to a valid python include path. Containing "
"Python.h for python version \"${PYTHON_VERSION}\"")
endif()
if(WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY)
# set but invalid
if(NOT ${PYTHON_NUMPY_PATH} STREQUAL "")
if(NOT EXISTS "${PYTHON_NUMPY_PATH}/numpy")
message(WARNING "PYTHON_NUMPY_PATH is invalid, numpy not found in '${PYTHON_NUMPY_PATH}' "
"WITH_PYTHON_INSTALL_NUMPY option will be ignored when installing python")
set(WITH_PYTHON_INSTALL_NUMPY OFF)
endif()
# not set, so initialize
else()
string(REPLACE "." ";" _PY_VER_SPLIT "${PYTHON_VERSION}")
list(GET _PY_VER_SPLIT 0 _PY_VER_MAJOR)
# re-cache
unset(PYTHON_NUMPY_PATH CACHE)
find_path(PYTHON_NUMPY_PATH
NAMES
numpy
HINTS
"${PYTHON_LIBPATH}/python${PYTHON_VERSION}/"
"${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/"
PATH_SUFFIXES
site-packages
dist-packages
NO_DEFAULT_PATH
)
if(NOT EXISTS "${PYTHON_NUMPY_PATH}")
message(WARNING "'numpy' path could not be found in:\n"
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/numpy', "
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/site-packages/numpy', "
"'${PYTHON_LIBPATH}/python${PYTHON_VERSION}/dist-packages/numpy', "
"'${PYTHON_LIBPATH}/python${_PY_VER_MAJOR}/dist-packages/numpy', "
"WITH_PYTHON_INSTALL_NUMPY option will be ignored when installing python")
set(WITH_PYTHON_INSTALL_NUMPY OFF)
else()
message(STATUS "numpy found at '${PYTHON_NUMPY_PATH}'")
endif()
unset(_PY_VER_SPLIT)
unset(_PY_VER_MAJOR)
endif()
endif()
endif()
@@ -1732,7 +1558,7 @@ if(FIRST_RUN)
_setting)
set(_msg " * ${_setting}")
string(LENGTH "${_msg}" _len)
while("32" GREATER "${_len}")
while("28" GREATER "${_len}")
set(_msg "${_msg} ")
math(EXPR _len "${_len} + 1")
endwhile()
@@ -1768,7 +1594,6 @@ if(FIRST_RUN)
info_cfg_option(WITH_X11_XF86VMODE)
info_cfg_option(WITH_X11_XINPUT)
info_cfg_option(WITH_BUILTIN_GLEW)
info_cfg_option(WITH_MEM_JEMALLOC)
info_cfg_text("Image Formats:")
info_cfg_option(WITH_IMAGE_CINEON)
@@ -1792,7 +1617,6 @@ if(FIRST_RUN)
info_cfg_text("Python:")
info_cfg_option(WITH_PYTHON_INSTALL)
info_cfg_option(WITH_PYTHON_INSTALL_NUMPY)
info_cfg_option(WITH_PYTHON_MODULE)
info_cfg_option(WITH_PYTHON_SAFETY)

View File

@@ -164,14 +164,11 @@ help:
@echo " * test_cmake - runs our own cmake file checker which detects errors in the cmake file list definitions"
@echo " * test_pep8 - checks all python script are pep8 which are tagged to use the stricter formatting"
@echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed"
@echo " * test_style - checks C/C++ conforms with blenders style guide: http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
@echo ""
@echo "Static Source Code Checking (not assosiated with building blender)"
@echo " * check_cppcheck - run blender source through cppcheck (C & C++)"
@echo " * check_splint - run blenders source through splint (C only)"
@echo " * check_sparse - run blenders source through sparse (C only)"
@echo " * check_spelling_c - check for spelling errors (C/C++ only)"
@echo " * check_spelling_py - check for spelling errors (Python only)"
@echo " * check_cppcheck - run blender source through cppcheck (C & C++)"
@echo " * check_splint - run blenders source through splint (C only)"
@echo " * check_sparse - run blenders source through sparse (C only)"
@echo ""
@echo "Documentation Targets (not assosiated with building blender)"
@echo " * doc_py - generate sphinx python api docs"
@@ -202,31 +199,28 @@ test:
# run pep8 check check on scripts we distribute.
test_pep8:
python3.2 source/tests/pep8.py > test_pep8.log 2>&1
python3 source/tests/pep8.py > test_pep8.log 2>&1
@echo "written: test_pep8.log"
# run some checks on our cmakefiles.
test_cmake:
python3.2 build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
python3 build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
@echo "written: test_cmake_consistency.log"
# run deprecation tests, see if we have anything to remove.
test_deprecated:
python3.2 source/tests/check_deprecated.py
python3 source/tests/check_deprecated.py
test_style:
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 python3.2 $(BLENDER_DIR)/source/tools/check_style_c.py $(BLENDER_DIR)/source/blender $(BLENDER_DIR)/source/creator --no-length-check
# -----------------------------------------------------------------------------
# Project Files
#
project_qtcreator:
python3.2 build_files/cmake/cmake_qtcreator_project.py $(BUILD_DIR)
python3 build_files/cmake/cmake_qtcreator_project.py $(BUILD_DIR)
project_netbeans:
python3.2 build_files/cmake/cmake_netbeans_project.py $(BUILD_DIR)
python3 build_files/cmake/cmake_netbeans_project.py $(BUILD_DIR)
project_eclipse:
cmake -G"Eclipse CDT4 - Unix Makefiles" -H$(BLENDER_DIR) -B$(BUILD_DIR)
@@ -238,21 +232,16 @@ project_eclipse:
check_cppcheck:
$(CMAKE_CONFIG)
cd $(BUILD_DIR) ; python3.2 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py
cd $(BUILD_DIR) ; python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py
check_splint:
$(CMAKE_CONFIG)
cd $(BUILD_DIR) ; python3.2 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py
cd $(BUILD_DIR) ; python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py
check_sparse:
$(CMAKE_CONFIG)
cd $(BUILD_DIR) ; python3.2 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py
cd $(BUILD_DIR) ; python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py
check_spelling_py:
cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3.2 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/release/scripts
check_spelling_c:
cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3.2 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/source
# -----------------------------------------------------------------------------
# Documentation
@@ -265,7 +254,7 @@ doc_py:
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
doc_doxy:
cd doc/doxygen; doxygen Doxyfile
cd doc/doxygen; doxygen
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
doc_dna:
@@ -273,7 +262,7 @@ doc_dna:
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
doc_man:
python3.2 doc/manpage/blender.1.py $(BUILD_DIR)/bin/blender
python3 doc/manpage/blender.1.py $(BUILD_DIR)/bin/blender
clean:

View File

@@ -170,7 +170,7 @@ if sys.platform=='win32':
if env['CC'] in ['cl', 'cl.exe']:
platform = 'win64-vc' if bitness == 64 else 'win32-vc'
elif env['CC'] in ['gcc']:
platform = 'win64-mingw' if bitness == 64 else 'win32-mingw'
platform = 'win32-mingw'
env.SConscriptChdir(0)
@@ -251,7 +251,6 @@ if 'blenderlite' in B.targets:
target_env_defs['WITH_BF_REDCODE'] = False
target_env_defs['WITH_BF_DDS'] = False
target_env_defs['WITH_BF_CINEON'] = False
target_env_defs['WITH_BF_FRAMESERVER'] = False
target_env_defs['WITH_BF_HDR'] = False
target_env_defs['WITH_BF_ZLIB'] = False
target_env_defs['WITH_BF_SDL'] = False
@@ -262,13 +261,11 @@ if 'blenderlite' in B.targets:
target_env_defs['BF_BUILDINFO'] = False
target_env_defs['WITH_BF_FLUID'] = False
target_env_defs['WITH_BF_OCEANSIM'] = False
target_env_defs['WITH_BF_SMOKE'] = False
target_env_defs['WITH_BF_DECIMATE'] = False
target_env_defs['WITH_BF_BOOLEAN'] = False
target_env_defs['WITH_BF_REMESH'] = False
target_env_defs['WITH_BF_PYTHON'] = False
target_env_defs['WITH_BF_3DMOUSE'] = False
target_env_defs['WITH_BF_LIBMV'] = False
# Merge blenderlite, let command line to override
for k,v in target_env_defs.iteritems():
@@ -277,7 +274,7 @@ if 'blenderlite' in B.targets:
# Extended OSX_SDK and 3D_CONNEXION_CLIENT_LIBRARY and JAckOSX detection for OSX
if env['OURPLATFORM']=='darwin':
print B.bc.OKGREEN + "Detected Xcode version: -- " + B.bc.ENDC + env['XCODE_CUR_VER'] + " --"
print B.bc.OKGREEN + "Detected Xcode version: -- " + B.bc.ENDC + env['XCODE_CUR_VER'][:9] + " --"
print "Available " + env['MACOSX_SDK_CHECK']
if not 'Mac OS X 10.5' in env['MACOSX_SDK_CHECK']:
print B.bc.OKGREEN + "MacOSX10.5.sdk not available:" + B.bc.ENDC + " using MacOSX10.6.sdk"
@@ -759,7 +756,6 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
if env['WITH_BF_OPENAL']:
dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
if env['WITH_BF_SNDFILE']:
dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
@@ -774,7 +770,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb.dll')
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb64.dll')
if env['WITH_BF_OIIO'] and env['OURPLATFORM'] != 'win32-mingw':
if env['WITH_BF_OIIO']:
dllsources.append('${LCGDIR}/openimageio/bin/OpenImageIO.dll')
dllsources.append('#source/icons/blender.exe.manifest')
@@ -782,35 +778,6 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
allinstall += windlls
if env['OURPLATFORM'] == 'win64-mingw':
dllsources = []
if env['WITH_BF_PYTHON']:
if env['BF_DEBUG']:
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll')
else:
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll')
if env['WITH_BF_FFMPEG']:
dllsources += env['BF_FFMPEG_DLL'].split()
if env['WITH_BF_OPENAL']:
dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
if env['WITH_BF_SNDFILE']:
dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
if env['WITH_BF_SDL']:
dllsources.append('${LCGDIR}/sdl/lib/SDL.dll')
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb64.dll')
dllsources.append('${LCGDIR}/binaries/pthreadGC2-w64.dll')
dllsources.append('#source/icons/blender.exe.manifest')
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
allinstall += windlls
installtarget = env.Alias('install', allinstall)
bininstalltarget = env.Alias('install-bin', blenderinstall)

View File

@@ -117,8 +117,6 @@ add_builder(c, 'salad_linux_x86_64_scons', '', generic_builder, 'soc-2011-salad'
add_builder(c, 'win32_scons', 'windows', generic_builder)
add_builder(c, 'salad_win32_scons', 'windows', generic_builder, 'soc-2011-salad')
add_builder(c, 'win64_scons', 'win64', generic_builder)
add_builder(c, 'mingw_win64_scons', 'mingw64', generic_builder)
add_builder(c, 'mingw_win32_scons', 'mingw32', generic_builder)
#add_builder(c, 'freebsd_i386_cmake', '', generic_builder)
#add_builder(c, 'freebsd_x86_64_cmake', '', generic_builder)

View File

@@ -48,8 +48,7 @@ def get_platform(filename):
tokens = filename.split("-")
platforms = ('osx', 'mac', 'bsd',
'win', 'linux', 'source',
'solaris',
'mingw')
'solaris')
platform_tokens = []
found = False

View File

@@ -55,7 +55,7 @@ else:
# scons
os.chdir(blender_dir)
scons_cmd = ['python', 'scons/scons.py']
scons_options = ['BF_FANCY=False']
scons_options = []
if builder.find('linux') != -1:
import shutil
@@ -65,7 +65,7 @@ else:
build_dir = os.path.join('..', 'build', builder)
install_dir = os.path.join('..', 'install', builder)
common_options = ['BF_INSTALLDIR=' + install_dir] + scons_options
common_options = ['BF_INSTALLDIR=' + install_dir]
# Clean install directory so we'll be sure there's no
if os.path.isdir(install_dir):
@@ -115,10 +115,6 @@ else:
bitness = '64'
scons_options.append('BF_BITNESS=' + bitness)
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=True')
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
if builder.find('mingw') != -1:
scons_options.append('BF_TOOLSET=mingw')
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
sys.exit(retcode)

View File

@@ -41,7 +41,7 @@ if len(sys.argv) >= 3:
# scons does own packaging
if builder.find('scons') != -1:
os.chdir('../blender')
scons_options = ['BF_QUICK=slnt', 'BUILDBOT_BRANCH=' + branch, 'buildslave', 'BF_FANCY=False']
scons_options = ['BF_QUICK=slnt', 'BUILDBOT_BRANCH=' + branch, 'buildslave']
if builder.find('linux') != -1:
buildbot_dir = os.path.dirname(os.path.realpath(__file__))
@@ -79,10 +79,6 @@ if builder.find('scons') != -1:
bitness = '64'
scons_options.append('BF_BITNESS=' + bitness)
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=True')
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
if builder.find('mingw') != -1:
scons_options.append('BF_TOOLSET=mingw')
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
sys.exit(retcode)

View File

@@ -18,7 +18,7 @@ IF (WIN32)
PATHS
$ENV{PROGRAMFILES}/GLEW/lib
${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin
${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
DOC "The GLEW library (64-bit)"
)
ELSE(NV_SYSTEM_PROCESSOR STREQUAL "AMD64")
@@ -27,7 +27,7 @@ IF (WIN32)
PATHS
$ENV{PROGRAMFILES}/GLEW/lib
${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin
${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
DOC "The GLEW library"
)
ENDIF(NV_SYSTEM_PROCESSOR STREQUAL "AMD64")

View File

@@ -8,7 +8,7 @@
# This can also be an environment variable.
# OPENEXR_FOUND, If false, do not try to use OpenEXR.
#
# For individual library access these advanced settings are available
# For indervidual library access these advanced settings are available
# OPENEXR_HALF_LIBRARY, Path to Half library
# OPENEXR_IEX_LIBRARY, Path to Half library
# OPENEXR_ILMIMF_LIBRARY, Path to Ilmimf library

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python3.2
#!/usr/bin/env python
# ***** BEGIN GPL LICENSE BLOCK *****
#

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python3.2
#!/usr/bin/env python
# ***** BEGIN GPL LICENSE BLOCK *****
#

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python3.2
#!/usr/bin/env python
# ***** BEGIN GPL LICENSE BLOCK *****
#

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python3.2
#!/usr/bin/env python
# ***** BEGIN GPL LICENSE BLOCK *****
#
@@ -37,7 +37,7 @@ CHECKER_BIN = "cppcheck"
CHECKER_ARGS = [
# not sure why this is needed, but it is.
"-I" + os.path.join(project_source_info.SOURCE_DIR, "extern", "glew", "include"),
"--suppress=*:%s/extern/glew/include/GL/glew.h:241" % project_source_info.SOURCE_DIR,
"--suppress=*:%s/extern/glew/include/GL/glew.h:241" % project_source_info.SOURCE_DIR,
# "--max-configs=1", # speeds up execution
# "--check-config", # when includes are missing
# "--enable=all", # if you want sixty hundred pedantic suggestions

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python3.2
#!/usr/bin/env python
# ***** BEGIN GPL LICENSE BLOCK *****
#

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python3.2
#!/usr/bin/env python
# ***** BEGIN GPL LICENSE BLOCK *****
#

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python3.2
#! /usr/bin/env python
# ##### BEGIN GPL LICENSE BLOCK #####
#

View File

@@ -212,10 +212,11 @@ macro(setup_liblinks
target_link_libraries(${target}
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
${JPEG_LIBRARIES}
${PNG_LIBRARIES}
${ZLIB_LIBRARIES}
${FREETYPE_LIBRARY}
${LAPACK_LIBRARIES})
${PLATFORM_LINKLIBS})
# since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
if(WITH_PYTHON) # AND NOT WITH_PYTHON_MODULE # WIN32 needs
@@ -270,7 +271,6 @@ macro(setup_liblinks
if(WITH_BOOST)
target_link_libraries(${target} ${BOOST_LIBRARIES})
endif()
target_link_libraries(${target} ${JPEG_LIBRARIES})
if(WITH_IMAGE_OPENEXR)
if(WIN32 AND NOT UNIX AND NOT CMAKE_COMPILER_IS_GNUCC)
file_list_suffix(OPENEXR_LIBRARIES_DEBUG "${OPENEXR_LIBRARIES}" "_d")
@@ -328,8 +328,6 @@ macro(setup_liblinks
if(WIN32 AND NOT UNIX)
target_link_libraries(${target} ${PTHREADS_LIBRARIES})
endif()
target_link_libraries(${target} ${PLATFORM_LINKLIBS})
endmacro()
macro(TEST_SSE_SUPPORT
@@ -679,4 +677,4 @@ macro(set_lib_path
endif()
endmacro()
endmacro()

View File

@@ -1,5 +1,5 @@
set(PROJECT_DESCRIPTION "Blender is a very fast and versatile 3D modeller/renderer.")
set(PROJECT_COPYRIGHT "Copyright (C) 2001-2012 Blender Foundation")
set(PROJECT_COPYRIGHT "Copyright (C) 2001-2011 Blender Foundation")
set(PROJECT_CONTACT "foundation@blender.org")
set(PROJECT_VENDOR "Blender Foundation")
set(ORG_WEBSITE "www.blender.org")
@@ -31,7 +31,7 @@ set(BUILD_REV ${MY_WC_REVISION})
# Force Package Name
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-1.r${BUILD_REV}-${CMAKE_SYSTEM_PROCESSOR})
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${BLENDER_VERSION}-r${BUILD_REV}-${CMAKE_SYSTEM_PROCESSOR})
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
# RPM packages

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python3.2
#!/usr/bin/env python
# ***** BEGIN GPL LICENSE BLOCK *****
#
@@ -231,13 +231,8 @@ def project_name_get(path, fallback="Blender", prefix="Blender_"):
return fallback
import subprocess
try:
info = subprocess.Popen(["svn", "info", path],
stdout=subprocess.PIPE).communicate()[0]
except:
# possibly 'svn' isnt found/installed
return fallback
info = subprocess.Popen(["svn", "info", path],
stdout=subprocess.PIPE).communicate()[0]
# string version, we only want the URL
info = info.decode(encoding="utf-8", errors="ignore")

View File

@@ -1,11 +1,5 @@
# -*- rpm-spec -*-
%global __python %{__python3}
%global blender_api @CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@
%define _rpmdir @CPACK_RPM_DIRECTORY@
%define _rpmfilename @CPACK_RPM_FILE_NAME@
%define _unpackaged_files_terminate_build 0
%define _topdir @CPACK_RPM_DIRECTORY@
BuildRoot: @CPACK_RPM_DIRECTORY@/@CPACK_PACKAGE_FILE_NAME@@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH@
Summary: @CPACK_RPM_PACKAGE_SUMMARY@
@@ -15,17 +9,12 @@ Release: @CPACK_RPM_PACKAGE_RELEASE@%{?dist}
License: @CPACK_RPM_PACKAGE_LICENSE@
Group: @CPACK_RPM_PACKAGE_GROUP@
Vendor: @CPACK_RPM_PACKAGE_VENDOR@
Epoch: 1
Epoch: 1
Requires(post): desktop-file-utils
Requires(post): shared-mime-info
Requires(postun): desktop-file-utils
Requires(postun): shared-mime-info
Provides: blender(ABI) = %{blender_api}
Provides: blender-fonts = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: blender-fonts <= 2.49a-9
%define _rpmdir @CPACK_RPM_DIRECTORY@
%define _rpmfilename @CPACK_RPM_FILE_NAME@
%define _unpackaged_files_terminate_build 0
%define _topdir @CPACK_RPM_DIRECTORY@
%description
Blender is an integrated 3d suite for modelling, animation, rendering,
@@ -51,10 +40,6 @@ then
fi
mv "@CPACK_TOPLEVEL_DIRECTORY@/tmpBBroot" ${RPM_BUILD_ROOT}
rm -f ${RPM_BUILD_ROOT}%{_bindir}/blender-thumbnailer.py
%find_lang %{name}
%clean
rm -rf ${RPM_BUILD_ROOT}
@@ -72,15 +57,14 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
fi || :
%files -f blender.lang
%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%{_datadir}/%{name}/%{blender_api}/datafiles/fonts
%{_datadir}/%{name}/%{blender_api}/scripts
%{_datadir}/%{name}/@CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/doc/%{name}
%{_mandir}/man1/%{name}.*
%{_datadir}/doc/blender
%{_mandir}/man1/blender.*
%changelog
@CPACK_RPM_SPEC_CHANGELOG@

View File

@@ -1,32 +0,0 @@
import os
def FindPython():
all_abi_flags = ['m', 'mu', '']
python = "/usr"
abi_flags = "m" # Most common for linux distros
version = "3.2"
# Determine ABI flags used on this system
include = os.path.join(python, "include")
for cur_flags in all_abi_flags:
inc = os.path.join(include, "python" + version + cur_flags, "Python.h")
if os.path.exists(inc):
abi_flags = cur_flags
break
# Determine whether python is in /usr/lib or /usr/lib64
lib32 = os.path.join(python, "lib", "python" + version, "sysconfig.py")
lib64 = os.path.join(python, "lib64", "python" + version, "sysconfig.py")
if os.path.exists(lib32):
libpath = "${BF_PYTHON}/lib"
elif os.path.exists(lib64):
libpath = "${BF_PYTHON}/lib64"
else:
# roll back to default value
libpath = "${BF_PYTHON}/lib"
return {'PYTHON': python,
"VERSION": version,
'LIBPATH': libpath,
'ABI_FLAGS': abi_flags}

View File

@@ -34,7 +34,7 @@ elif cmd_res[:2]=='11':
MAC_CUR_VER='10.7'
cmd = 'xcodebuild -version'
cmd_xcode=commands.getoutput(cmd)
XCODE_CUR_VER=cmd_xcode[6:][:3] # truncate output to major.minor version
XCODE_CUR_VER=cmd_xcode
cmd = 'xcodebuild -showsdks'
cmd_sdk=commands.getoutput(cmd)
MACOSX_SDK_CHECK=cmd_sdk
@@ -86,22 +86,19 @@ else :
LIBDIR = '${LCGDIR}'
if XCODE_CUR_VER >= '4.3': ## since version 4.3, XCode and developer dir are bundled ##
MACOSX_SDK = '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform' + MACOSX_SDK
#############################################################################
################### Dependency settings ##################
#############################################################################
#Defaults openMP to true if compiler handles it ( only gcc 4.6.1 and newer )
# if your compiler does not have accurate suffix you may have to enable it by hand !
if CC[:-2].endswith('4.6'):
if CC.endswith('4.6.1'):
WITH_BF_OPENMP = True # multithreading for fluids, cloth, sculpt and smoke
else:
WITH_BF_OPENMP = False
# enable ffmpeg support
WITH_BF_FFMPEG = True
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = LIBDIR + '/ffmpeg'
BF_FFMPEG_INC = "${BF_FFMPEG}/include"
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
@@ -233,6 +230,24 @@ BF_FFTW3_INC = '${BF_FFTW3}/include'
BF_FFTW3_LIB = 'libfftw3'
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
# Uncomment the following line to use Mozilla inplace of netscape
#CPPFLAGS += -DMOZ_NOT_NET
# Location of MOZILLA/Netscape header files...
#BF_MOZILLA = $(LIBDIR)/mozilla
#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
#BF_MOZILLA_LIB =
# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = True
# enable freetype2 support for text objects
BF_FREETYPE = LIBDIR + '/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'

View File

@@ -91,12 +91,13 @@ BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
# enable freetype2 support for text objects
BF_FREETYPE = '/usr/local'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
### XXX Find what this actually wants; it doesn't want libquicktime.
WITH_BF_QUICKTIME = False
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
@@ -109,7 +110,7 @@ BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_BINRELOC = True
# enable ffmpeg support
WITH_BF_FFMPEG = True
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = '/usr/local'
BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
@@ -163,8 +164,6 @@ BF_EXPAT = '/usr/local'
BF_EXPAT_LIB = 'expat'
BF_EXPAT_LIBPATH = '${BF_EXPAT}/lib'
WITH_GHOST_XDND = False
WITH_BF_OPENMP = True
#Ray trace optimization

View File

@@ -91,12 +91,13 @@ BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
# enable freetype2 support for text objects
BF_FREETYPE = '/usr/local'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
### XXX Find what this actually wants; it doesn't want libquicktime.
WITH_BF_QUICKTIME = False
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
@@ -109,7 +110,7 @@ BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_BINRELOC = True
# enable ffmpeg support
WITH_BF_FFMPEG = True
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = '/usr/local'
BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
@@ -165,8 +166,6 @@ BF_EXPAT_LIBPATH = '${BF_EXPAT}/lib'
WITH_BF_OPENMP = True
WITH_GHOST_XDND = False
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']

View File

@@ -91,12 +91,13 @@ BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
# enable freetype2 support for text objects
BF_FREETYPE = '/usr/local'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
### XXX Find what this actually wants; it doesn't want libquicktime.
WITH_BF_QUICKTIME = False
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
@@ -109,7 +110,7 @@ BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_BINRELOC = True
# enable ffmpeg support
WITH_BF_FFMPEG = True
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = '/usr/local'
BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
@@ -165,8 +166,6 @@ BF_EXPAT_LIBPATH = '${BF_EXPAT}/lib'
WITH_BF_OPENMP = True
WITH_GHOST_XDND = False
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']

View File

@@ -1,8 +1,6 @@
# find library directory
import platform
import os
from Modules.FindPython import FindPython
bitness = platform.architecture()[0]
if bitness == '64bit':
LCGDIR = '../lib/linux64'
@@ -10,12 +8,10 @@ else:
LCGDIR = '../lib/linux'
LIBDIR = "#${LCGDIR}"
py = FindPython()
BF_PYTHON_ABI_FLAGS = py['ABI_FLAGS']
BF_PYTHON = py['PYTHON']
BF_PYTHON_LIBPATH = py['LIBPATH']
BF_PYTHON_VERSION = py['VERSION']
BF_PYTHON_ABI_FLAGS = 'm' # Most common for linux distros
BF_PYTHON = '/usr'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
BF_PYTHON_VERSION = '3.2'
WITH_BF_STATICPYTHON = False
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
@@ -105,12 +101,13 @@ BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
# enable freetype2 support for text objects
BF_FREETYPE = '/usr'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
#BF_FREETYPE_LIB_STATIC = '${BF_FREETYPE}/lib/libfreetype.a'
WITH_BF_QUICKTIME = False
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
@@ -123,7 +120,7 @@ BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_BINRELOC = True
# enable ffmpeg support
WITH_BF_FFMPEG = True
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = LIBDIR + '/ffmpeg'
if os.path.exists(LCGDIR + '/ffmpeg'):
WITH_BF_STATICFFMPEG = True

View File

@@ -13,7 +13,7 @@ WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = False
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'OpenAL32 wrap_oal'
BF_OPENAL_LIB = 'OpenAL32'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
@@ -100,13 +100,14 @@ BF_BULLET_LIB = 'extern_bullet'
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
# enable freetype2 support for text objects
BF_WITH_FREETYPE = True
BF_FREETYPE = LIBDIR + '/gcc/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = False
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
@@ -119,7 +120,7 @@ BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_BINRELOC = False
# enable ffmpeg support
WITH_BF_FFMPEG = True
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = LIBDIR + '/ffmpeg'
BF_FFMPEG_LIB = 'avformat-53 avcodec-53 avdevice-53 avutil-51 swscale-2'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'

View File

@@ -1,4 +1,4 @@
LCGDIR = '#../lib/mingw32'
LCGDIR = '#../lib/windows'
LIBDIR = "${LCGDIR}"
BF_PYTHON = LIBDIR + '/python'
@@ -14,7 +14,7 @@ BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION[0]}${BF_PY
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIB = 'OpenAL32'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_FFMPEG = True
@@ -48,7 +48,7 @@ BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR = LIBDIR + '/gcc/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = 'Half IlmImf Imath IlmThread Iex'
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
@@ -64,13 +64,13 @@ BF_JPEG_LIB = 'liblibjpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG = LIBDIR + '/gcc/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
BF_PNG_LIBPATH = '${BF_PNG}/lib'
WITH_BF_TIFF = True
BF_TIFF = LIBDIR + '/tiff'
BF_TIFF = LIBDIR + '/gcc/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
BF_TIFF_LIB = 'tiff'
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
@@ -83,7 +83,7 @@ BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = LIBDIR + '/gettext'
BF_GETTEXT = LIBDIR + '/gcc/gettext'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'intl'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
@@ -95,7 +95,7 @@ BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_FFTW3 = True
BF_FFTW3 = LIBDIR + '/fftw3'
BF_FFTW3 = LIBDIR + '/gcc/fftw3'
BF_FFTW3_INC = '${BF_FFTW3}/include'
BF_FFTW3_LIB = 'fftw3'
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
@@ -112,12 +112,13 @@ BF_BULLET_LIB = 'extern_bullet'
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
BF_FREETYPE = LIBDIR + '/freetype'
# enable freetype2 support for text objects
BF_FREETYPE = LIBDIR + '/gcc/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = False
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
@@ -145,7 +146,7 @@ BF_COLLADA = '#source/blender/collada'
BF_COLLADA_INC = '${BF_COLLADA}'
BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = LIBDIR + '/opencollada'
BF_OPENCOLLADA = LIBDIR + '/gcc/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
@@ -154,7 +155,7 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
WITH_BF_CYCLES = True
WITH_BF_OIIO = True
BF_OIIO = LIBDIR + '/openimageio'
BF_OIIO = LIBDIR + '/gcc/openimageio'
BF_OIIO_INC = BF_OIIO + '/include'
BF_OIIO_LIB = 'OpenImageIO'
BF_OIIO_LIBPATH = BF_OIIO + '/lib'
@@ -162,8 +163,8 @@ BF_OIIO_LIBPATH = BF_OIIO + '/lib'
WITH_BF_BOOST = True
BF_BOOST = LIBDIR + '/boost'
BF_BOOST_INC = BF_BOOST + '/include'
BF_BOOST_LIB = 'boost_date_time-mgw46-mt-s-1_47 boost_filesystem-mgw46-mt-s-1_47 boost_regex-mgw46-mt-s-1_47 boost_system-mgw46-mt-s-1_47 boost_thread-mgw46-mt-s-1_47'
BF_BOOST_LIBPATH = BF_BOOST + '/lib'
BF_BOOST_LIB = 'boost_date_time-mgw45-mt-s-1_47 boost_filesystem-mgw45-mt-s-1_47 boost_regex-mgw45-mt-s-1_47 boost_system-mgw45-mt-s-1_47 boost_thread-mgw45-mt-s-1_47'
BF_BOOST_LIBPATH = BF_BOOST + '/lib/gcc'
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True

View File

@@ -1,7 +1,8 @@
LCGDIR = '#../lib/windows'
LIBDIR = '${LCGDIR}'
WITH_BF_FFMPEG = True
# enable ffmpeg support
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = LIBDIR +'/ffmpeg'
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
@@ -19,7 +20,7 @@ BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include '
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIB = 'OpenAL32'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_ICONV = True
@@ -57,6 +58,7 @@ BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/IlmImf ${BF_OPENEXR}/include/Iex ${BF_OPENEXR}/include/Imath '
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread '
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = True
@@ -106,13 +108,14 @@ BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
WITH_BF_BINRELOC = False
# enable freetype2 support for text objects
BF_WITH_FREETYPE = True
BF_FREETYPE = LIBDIR + '/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype2ST'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = False
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = LIBDIR + '/QTDevWin'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
BF_QUICKTIME_LIB = 'qtmlClient'
@@ -165,7 +168,7 @@ BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
#CUDA
WITH_BF_CYCLES_CUDA_BINARIES = False
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21'] # don't build sm_13 until the compile can fit in 32bit process again :)
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_13', 'sm_20', 'sm_21']
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True

View File

@@ -1,208 +0,0 @@
LCGDIR = '#../lib/mingw64'
LIBDIR = "${LCGDIR}"
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.2'
WITH_BF_STATICPYTHON = False
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
BF_PYTHON_DLL = 'python32'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_FFMPEG = True
BF_FFMPEG_LIB = 'avformat.dll avcodec.dll avdevice.dll avutil.dll swscale.dll swresample.dll'
BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll ${BF_FFMPEG_LIBPATH}/swresample-0.dll ${BF_FFMPEG_LIBPATH}/xvidcore.dll'
WITH_BF_JACK = False
BF_JACK = LIBDIR + '/jack'
BF_JACK_INC = '${BF_JACK}/include'
BF_JACK_LIB = 'libjack'
BF_JACK_LIBPATH = '${BF_JACK}/lib'
WITH_BF_SNDFILE = False
BF_SNDFILE = LIBDIR + '/sndfile'
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
BF_SNDFILE_LIB = 'libsndfile-1'
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL'
BF_SDL_LIBPATH = '${BF_SDL}/lib'
BF_PTHREADS = '' # Part of MinGW-w64
BF_PTHREADS_INC = ''
BF_PTHREADS_LIB = ''
BF_PTHREADS_LIBPATH = ''
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = 'Half IlmImf Imath IlmThread Iex'
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
WITH_BF_DDS = True
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
BF_PNG_LIBPATH = '${BF_PNG}/lib'
WITH_BF_TIFF = True
BF_TIFF = LIBDIR + '/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
BF_TIFF_LIB = 'tiff'
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
WITH_BF_ZLIB = True
BF_ZLIB = LIBDIR + '/zlib'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = LIBDIR + '/gettext'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'intl'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_OPENJPEG = True
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_FFTW3 = True
BF_FFTW3 = LIBDIR + '/fftw3'
BF_FFTW3_INC = '${BF_FFTW3}/include'
BF_FFTW3_LIB = 'fftw3'
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
WITH_BF_GAMEENGINE = True
WITH_BF_OCEANSIM = True
WITH_BF_PLAYER = True
WITH_BF_LIBMV = True
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
# enable freetype2 support for text objects
BF_FREETYPE = LIBDIR + '/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2/'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = False
WITH_BF_ICONV = True
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_REDCODE = False
BF_REDCODE_INC = '#extern'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = False
BF_OPENGL = 'C:\\MingW'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
BF_OPENGL_LIB = 'opengl32 glu32'
BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
'${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
'${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
WITH_BF_COLLADA = True
BF_COLLADA = '#source/blender/collada'
BF_COLLADA_INC = '${BF_COLLADA}'
BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = LIBDIR + '/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa xml'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
#Cycles
WITH_BF_CYCLES = True
WITH_BF_CYCLES_CUDA_BINARIES = False
BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_13', 'sm_20', 'sm_21']
WITH_BF_OIIO = True
BF_OIIO = LIBDIR + '/openimageio'
BF_OIIO_INC = '${BF_OIIO}/include'
BF_OIIO_LIB = 'OpenImageIO'
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
WITH_BF_BOOST = True
BF_BOOST = LIBDIR + '/boost'
BF_BOOST_INC = BF_BOOST + '/include'
BF_BOOST_LIB = 'boost_date_time-mgw47-mt-s-1_49 boost_date_time-mgw47-mt-sd-1_49 boost_filesystem-mgw47-mt-s-1_49 boost_filesystem-mgw47-mt-sd-1_49 boost_regex-mgw47-mt-s-1_49 boost_regex-mgw47-mt-sd-1_49 boost_system-mgw47-mt-s-1_49 boost_system-mgw47-mt-sd-1_49 boost_thread-mgw47-mt-s-1_49 boost_thread-mgw47-mt-sd-1_49'
BF_BOOST_LIBPATH = BF_BOOST + '/lib'
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-mmmx', '-msse', '-msse2']
#Produces errors while rendering with subsurf/multires,
WITH_BF_OPENMP = False
##
CC = 'gcc'
CXX = 'g++'
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
CXXFLAGS = [ '-fpermissive' ]
CPPFLAGS = ['-DWIN32', '-DMS_WIN64', '-DFREE_WINDOWS', '-DFREE_WINDOWS64', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC']
REL_CFLAGS = []
REL_CXXFLAGS = []
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-ftree-vectorize']
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
CC_WARN = [ '-Wall' ]
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread']
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
## DISABLED, causes linking errors!
## for re-distrobution, so users dont need mingw installed
# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
BF_DEBUG = False
BF_DEBUG_CCFLAGS= ['-g', '-D_DEBUG']
BF_PROFILE_CCFLAGS = ['-pg', '-g']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_PROFILE_FLAGS = BF_PROFILE_CCFLAGS
BF_PROFILE = False
BF_BUILDDIR = '..\\build\\win64-mingw'
BF_INSTALLDIR='..\\install\\win64-mingw'

View File

@@ -1,7 +1,8 @@
LCGDIR = '#../lib/win64'
LIBDIR = '${LCGDIR}'
WITH_BF_FFMPEG = True
# enable ffmpeg support
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = LIBDIR +'/ffmpeg'
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc '
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
@@ -19,7 +20,7 @@ BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include '
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIB = 'OpenAL32'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
WITH_BF_SNDFILE = True
@@ -28,6 +29,11 @@ BF_SNDFILE_INC = '${BF_SNDFILE}/include'
BF_SNDFILE_LIB = 'libsndfile-1'
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
# TODO - are these useful on win32?
# BF_CXX = '/usr'
# WITH_BF_STATICCXX = False
# BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_ICONV = True
BF_ICONV = LIBDIR + '/iconv'
BF_ICONV_INC = '${BF_ICONV}/include'
@@ -47,12 +53,16 @@ BF_PTHREADS_INC = '${BF_PTHREADS}/include'
BF_PTHREADS_LIB = 'pthreadVC2'
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
WITH_BF_FMOD = False
BF_FMOD = LIBDIR + '/fmod'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/IlmImf ${BF_OPENEXR}/include/Iex ${BF_OPENEXR}/include/Imath '
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread '
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = True
@@ -102,19 +112,20 @@ BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
WITH_BF_BINRELOC = False
# enable freetype2 support for text objects
BF_WITH_FREETYPE = True
BF_FREETYPE = LIBDIR + '/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype2ST'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = False
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = LIBDIR + '/QTDevWin'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
BF_QUICKTIME_LIB = 'qtmlClient'
BF_QUICKTIME_LIBPATH = '${BF_QUICKTIME}/Libraries'
WITH_BF_OPENJPEG = True
WITH_BF_OPENJPEG = False
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
@@ -198,6 +209,6 @@ LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32',
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/STACK:2097152','/OPT:NOREF','/INCREMENTAL:NO', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
BF_BUILDDIR = '..\\build\\win64-vc'
BF_INSTALLDIR='..\\install\\win64-vc'
BF_BUILDDIR = '..\\build\\blender25-win64-vc'
BF_INSTALLDIR='..\\install\\blender25-win64-vc'

View File

@@ -182,12 +182,12 @@ def setup_staticlibs(lenv):
if lenv['WITH_BF_SNDFILE'] and lenv['WITH_BF_STATICSNDFILE']:
statlibs += Split(lenv['BF_SNDFILE_LIB_STATIC'])
if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
libincs += Split(lenv['BF_PTHREADS_LIBPATH'])
if lenv['WITH_BF_COLLADA']:
libincs += Split(lenv['BF_OPENCOLLADA_LIBPATH'])
if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
libincs += Split(lenv['BF_PCRE_LIBPATH'])
libincs += Split(lenv['BF_EXPAT_LIBPATH'])
@@ -206,7 +206,7 @@ def setup_staticlibs(lenv):
statlibs += Split(lenv['BF_BOOST_LIB_STATIC'])
# setting this last so any overriding of manually libs could be handled
if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross', 'win64-mingw'):
if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
libincs.append('/usr/lib')
if lenv['WITH_BF_JEMALLOC']:
@@ -228,7 +228,7 @@ def setup_syslibs(lenv):
if not lenv['WITH_BF_FREETYPE_STATIC']:
syslibs += Split(lenv['BF_FREETYPE_LIB'])
if lenv['WITH_BF_PYTHON'] and not lenv['WITH_BF_STATICPYTHON']:
if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw', 'win64-mingw'):
if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'):
syslibs.append(lenv['BF_PYTHON_LIB']+'_d')
else:
syslibs.append(lenv['BF_PYTHON_LIB'])
@@ -268,7 +268,7 @@ def setup_syslibs(lenv):
syslibs += Split(lenv['BF_SDL_LIB'])
if not lenv['WITH_BF_STATICOPENGL']:
syslibs += Split(lenv['BF_OPENGL_LIB'])
if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw','linuxcross', 'win64-vc', 'win64-mingw'):
if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw','linuxcross', 'win64-vc'):
syslibs += Split(lenv['BF_PTHREADS_LIB'])
if lenv['WITH_BF_COLLADA']:
syslibs.append(lenv['BF_PCRE_LIB'])
@@ -317,7 +317,7 @@ def propose_priorities():
def creator(env):
sources = ['creator.c']# + Blender.buildinfo(env, "dynamic") + Blender.resources
incs = ['#/intern/guardedalloc', '#/source/blender/blenlib', '#/source/blender/blenkernel', '#/source/blender/editors/include', '#/source/blender/blenloader', '#/source/blender/imbuf', '#/source/blender/renderconverter', '#/source/blender/render/extern/include', '#/source/blender/windowmanager', '#/source/blender/makesdna', '#/source/blender/makesrna', '#/source/gameengine/BlenderRoutines', '#/extern/glew/include', '#/source/blender/gpu', env['BF_OPENGL_INC']]
incs = ['#/intern/guardedalloc', '#/source/blender/blenlib', '#/source/blender/blenkernel', '#/source/blender/editors/include', '#/source/blender/blenloader', '#/source/blender/imbuf', '#/source/blender/renderconverter', '#/source/blender/render/extern/include', '#/source/blender/windowmanager', '#/source/blender/makesdna', '#/source/blender/makesrna', '#/source/gameengine/BlenderRoutines', '#/extern/glew/include', '#/source/blender/gpu', '#/source/blender/opencl', env['BF_OPENGL_INC']]
defs = []
@@ -332,18 +332,14 @@ def creator(env):
incs.append('#/extern/libmv')
defs.append('WITH_LIBMV')
if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
if env['WITH_BF_PYTHON']:
incs.append('#/source/blender/python')
defs.append('WITH_PYTHON')
if env['BF_DEBUG']:
defs.append('_DEBUG')
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs.append(env['BF_PTHREADS_INC'])
incs.append('#/intern/utfconv')
env.Append(CPPDEFINES=defs)
env.Append(CPPPATH=incs)
@@ -441,9 +437,8 @@ def set_quiet_output(env):
static_ob, shared_ob = SCons.Tool.createObjBuilders(env)
static_ob.add_action('.c', mycaction)
static_ob.add_action('.cpp', mycppaction)
static_ob.add_action('.cc', mycppaction)
shared_ob.add_action('.c', myshcaction)
shared_ob.add_action('.cc', myshcppaction)
shared_ob.add_action('.cpp', myshcppaction)
static_lib = SCons.Builder.Builder(action = mylibaction,
emitter = '$LIBEMITTER',
@@ -512,12 +507,13 @@ def WinPyBundle(target=None, source=None, env=None):
print str(func) + ' failed on ' + str(path)
print "Trying to remove existing py bundle."
shutil.rmtree(py_target, False, printexception)
exclude_re=[re.compile('.*/test'),
re.compile('^test'),
re.compile('^distutils'),
re.compile('^idlelib'),
re.compile('^lib2to3'),
re.compile('^tkinter'),
exclude_re=[re.compile('.*/test/.*'),
re.compile('^config/.*'),
re.compile('^config-*/.*'),
re.compile('^distutils/.*'),
re.compile('^idlelib/.*'),
re.compile('^lib2to3/.*'),
re.compile('^tkinter/.*'),
re.compile('^_tkinter_d.pyd'),
re.compile('^turtledemo'),
re.compile('^turtle.py'),
@@ -620,7 +616,7 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'find %s/%s.app -name __MACOSX -exec rm -rf {} \;'%(installdir, binary)
commands.getoutput(cmd)
if env['CC'][:-2].endswith('4.6'): # for correct errorhandling with gcc 4.6.x we need the gcc.dylib to link, thus distribute in app-bundle
if env['CC'].endswith('4.6.1'): # for correct errorhandling with gcc 4.6.1 we need the gcc.dylib to link, thus distribute in app-bundle
cmd = 'mkdir %s/%s.app/Contents/MacOS/lib'%(installdir, binary)
commands.getoutput(cmd)
instname = env['BF_CXX']
@@ -652,11 +648,8 @@ def UnixPyBundle(target=None, source=None, env=None):
dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
lib = env['BF_PYTHON_LIBPATH'].split(os.sep)[-1]
target_lib = "lib64" if lib == "lib64" else "lib"
py_src = env.subst( env['BF_PYTHON_LIBPATH'] + '/python'+env['BF_PYTHON_VERSION'] )
py_target = env.subst( dir + '/python/' + target_lib + '/python'+env['BF_PYTHON_VERSION'] )
py_target = env.subst( dir + '/python/lib/python'+env['BF_PYTHON_VERSION'] )
# This is a bit weak, but dont install if its been installed before, makes rebuilds quite slow.
if os.path.exists(py_target):
@@ -731,7 +724,7 @@ class BlenderEnvironment(SConsEnvironment):
if not self or not libname or not source:
print bc.FAIL+'Cannot continue. Missing argument for BlenderRes '+libname+bc.ENDC
self.Exit()
if self['OURPLATFORM'] not in ('win32-vc','win32-mingw','linuxcross', 'win64-vc', 'win64-mingw'):
if self['OURPLATFORM'] not in ('win32-vc','win32-mingw','linuxcross', 'win64-vc'):
print bc.FAIL+'BlenderRes is for windows only!'+bc.END
self.Exit()

View File

@@ -107,7 +107,6 @@ def validate_arguments(args, bc):
'WITH_BF_FFMPEG', 'BF_FFMPEG_LIB','BF_FFMPEG_EXTRA', 'BF_FFMPEG', 'BF_FFMPEG_INC', 'BF_FFMPEG_DLL',
'WITH_BF_STATICFFMPEG', 'BF_FFMPEG_LIB_STATIC',
'WITH_BF_OGG', 'BF_OGG', 'BF_OGG_LIB',
'WITH_BF_FRAMESERVER',
'WITH_BF_JPEG', 'BF_JPEG', 'BF_JPEG_INC', 'BF_JPEG_LIB', 'BF_JPEG_LIBPATH',
'WITH_BF_OPENJPEG', 'BF_OPENJPEG', 'BF_OPENJPEG_INC', 'BF_OPENJPEG_LIB', 'BF_OPENJPEG_LIBPATH',
'WITH_BF_REDCODE', 'BF_REDCODE', 'BF_REDCODE_INC', 'BF_REDCODE_LIB', 'BF_REDCODE_LIBPATH',
@@ -139,7 +138,6 @@ def validate_arguments(args, bc):
'WITH_BF_OPENMP', 'BF_OPENMP', 'BF_OPENMP_LIBPATH',
'WITH_GHOST_COCOA',
'WITH_GHOST_SDL',
'WITH_GHOST_XDND',
'BF_GHOST_DEBUG',
'USE_QTKIT',
'BF_FANCY', 'BF_QUIET', 'BF_LINE_OVERWRITE',
@@ -148,6 +146,7 @@ def validate_arguments(args, bc):
'WITH_BF_DOCS',
'BF_NUMJOBS',
'BF_MSVS',
'BF_VERSION',
'WITH_BF_RAYOPTIMIZATION',
'BF_RAYOPTIMIZATION_SSE_FLAGS',
'WITH_BF_FLUID',
@@ -155,12 +154,11 @@ def validate_arguments(args, bc):
'WITH_BF_BOOLEAN',
'WITH_BF_REMESH',
'WITH_BF_OCEANSIM',
'WITH_BF_SMOKE',
'WITH_BF_CXX_GUARDEDALLOC',
'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC',
'BUILDBOT_BRANCH',
'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC',
'WITH_BF_CYCLES', 'WITH_BF_CYCLES_CUDA_BINARIES', 'BF_CYCLES_CUDA_NVCC', 'BF_CYCLES_CUDA_NVCC', 'WITH_BF_CYCLES_CUDA_THREADED_COMPILE',
'WITH_BF_CYCLES', 'WITH_BF_CYCLES_CUDA_BINARIES' 'BF_CYCLES_CUDA_NVCC', 'BF_CYCLES_CUDA_NVCC', 'WITH_BF_CYCLES_CUDA_THREADED_COMPILE',
'WITH_BF_OIIO', 'WITH_BF_STATICOIIO', 'BF_OIIO', 'BF_OIIO_INC', 'BF_OIIO_LIB', 'BF_OIIO_LIB_STATIC', 'BF_OIIO_LIBPATH',
'WITH_BF_BOOST', 'WITH_BF_STATICBOOST', 'BF_BOOST', 'BF_BOOST_INC', 'BF_BOOST_LIB', 'BF_BOOST_LIB_STATIC', 'BF_BOOST_LIBPATH',
'WITH_BF_LIBMV', 'WITH_BF_CARVE'
@@ -177,7 +175,6 @@ def validate_arguments(args, bc):
'BF_DEBUG_CFLAGS', 'BF_DEBUG_CCFLAGS', 'BF_DEBUG_CXXFLAGS',
'C_WARN', 'CC_WARN', 'CXX_WARN',
'LLIBS', 'PLATFORM_LINKFLAGS','MACOSX_ARCHITECTURE', 'MACOSX_SDK_CHECK', 'XCODE_CUR_VER',
'BF_CYCLES_CUDA_BINARIES_ARCH',
]
@@ -245,8 +242,8 @@ def SetupSpawn( env ):
def read_opts(env, cfg, args):
localopts = Variables.Variables(cfg, args)
localopts.AddVariables(
('LCGDIR', 'Location of SVN lib dir'),
('LIBDIR', 'Root dir of libs'),
('LCGDIR', 'location of cvs lib dir'),
('LIBDIR', 'root dir of libs'),
(BoolVariable('WITH_BF_PYTHON', 'Compile with python', True)),
(BoolVariable('WITH_BF_PYTHON_SAFETY', 'Internal API error checking to track invalid data to prevent crash on access (at the expense of some effeciency)', False)),
('BF_PYTHON', 'Base path for python', ''),
@@ -267,7 +264,6 @@ def read_opts(env, cfg, args):
(BoolVariable('WITH_BF_BOOLEAN', 'Build with boolean modifier', True)),
(BoolVariable('WITH_BF_REMESH', 'Build with remesh modifier', True)),
(BoolVariable('WITH_BF_OCEANSIM', 'Build with ocean simulation', False)),
(BoolVariable('WITH_BF_SMOKE', 'Build with smoke simulation', True)),
('BF_PROFILE_FLAGS', 'Profiling compiler flags', ''),
(BoolVariable('WITH_BF_OPENAL', 'Use OpenAL if true', False)),
('BF_OPENAL', 'Base path for OpenAL', ''),
@@ -315,8 +311,6 @@ def read_opts(env, cfg, args):
(BoolVariable('WITH_BF_CINEON', 'Support CINEON and DPX image formats if true', True)),
(BoolVariable('WITH_BF_HDR', 'Support HDR image formats if true', True)),
(BoolVariable('WITH_BF_FRAMESERVER', 'Support export to a frameserver', True)),
(BoolVariable('WITH_BF_FFMPEG', 'Use FFMPEG if true', False)),
('BF_FFMPEG', 'FFMPEG base path', ''),
@@ -539,6 +533,8 @@ def read_opts(env, cfg, args):
('BF_NUMJOBS', 'Number of build processes to spawn', '1'),
('BF_MSVS', 'Generate MSVS project files and solution', False),
('BF_VERSION', 'The root path for Unix (non-apple)', '2.5'),
(BoolVariable('BF_UNIT_TEST', 'Build with unit test support.', False)),
(BoolVariable('BF_GHOST_DEBUG', 'Make GHOST print events and info to stdout. (very verbose)', False)),
@@ -571,9 +567,7 @@ def read_opts(env, cfg, args):
('BF_BOOST_INC', 'Boost include path', ''),
('BF_BOOST_LIB', 'Boost library', ''),
('BF_BOOST_LIBPATH', 'Boost library path', ''),
('BF_BOOST_LIB_STATIC', 'Boost static library', ''),
(BoolVariable('WITH_GHOST_XDND', 'Build with drag-n-drop support on Linux platforms using XDND protocol', True))
('BF_BOOST_LIB_STATIC', 'Boost static library', '')
) # end of opts.AddOptions()
return localopts
@@ -618,18 +612,12 @@ def buildslave(target=None, source=None, env=None):
Builder for buildbot integration. Used by buildslaves of http://builder.blender.org only.
"""
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw', 'darwin', 'win64-mingw'):
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw', 'darwin'):
extension = '.zip'
else:
extension = '.tar.bz2'
if env['OURPLATFORM'] == 'win32-mingw':
platform = 'mingw32'
elif env['OURPLATFORM'] == 'win64-mingw':
platform = 'mingw64'
else:
platform = env['OURPLATFORM'].split('-')[0]
platform = env['OURPLATFORM'].split('-')[0]
if platform == 'linux':
import platform
@@ -669,13 +657,15 @@ def NSIS_print(target, source, env):
def NSIS_Installer(target=None, source=None, env=None):
print "="*35
if env['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'win64-mingw'):
if env['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc'):
print "NSIS installer is only available on Windows."
Exit()
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
if env['OURPLATFORM'] == 'win32-vc':
bitness = '32'
elif env['OURPLATFORM'] in ('win64-vc', 'win64-mingw'):
elif env['OURPLATFORM'] == 'win64-vc':
bitness = '64'
else:
bitness = '-mingw'
start_dir = os.getcwd()
rel_dir = os.path.join(start_dir,'release','windows','installer')
@@ -767,7 +757,7 @@ def NSIS_Installer(target=None, source=None, env=None):
cmdline = "makensis " + "\""+tmpnsi+"\""
startupinfo = subprocess.STARTUPINFO()
#startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, startupinfo=startupinfo, shell = True)
data, err = proc.communicate()

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python3.2
#! /usr/bin/env python3
# ***** BEGIN GPL LICENSE BLOCK *****
#
@@ -206,13 +206,13 @@ class DNACatalogHTML:
<td>${size}</td>
</tr>"""
if field.Type.Structure is None or field.Name.IsPointer():
if field.Type.Structure == None or field.Name.IsPointer():
# ${reference}
reference = field.Name.AsReference(parentReference)
# ${struct}
if parentReference is not None:
if parentReference != None:
struct = '<a href="#{0}">{0}</a>'.format(structure.Type.Name)
else:
struct = structure.Type.Name
@@ -240,7 +240,7 @@ class DNACatalogHTML:
structure_field = Template(structure_field_template).substitute(d)
elif field.Type.Structure is not None:
elif field.Type.Structure != None:
reference = field.Name.AsReference(parentReference)
structure_field = self.StructureFields(field.Type.Structure, reference, offset)

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python3.2
#! /usr/bin/env python3
# ***** BEGIN GPL LICENSE BLOCK *****
#
@@ -329,7 +329,7 @@ class DNAName:
self.Name = name
def AsReference(self, parent):
if parent is None:
if parent == None:
result = ""
else:
result = parent+"."

View File

@@ -31,7 +31,7 @@ PROJECT_NAME = Blender
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = "V2.6x"
PROJECT_NUMBER = "V2.59"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer
@@ -648,7 +648,7 @@ RECURSIVE = YES
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
EXCLUDE = ../../build_files, ../../release
EXCLUDE = ../../source/gameengine/PyDoc
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
@@ -662,7 +662,7 @@ EXCLUDE_SYMLINKS = NO
# against the file with absolute path, so to exclude all test directories
# for example use the pattern */test/*
EXCLUDE_PATTERNS = .svn .git *.py
EXCLUDE_PATTERNS = .svn
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the

View File

@@ -8,14 +8,14 @@
/** \defgroup render Rendering
* \ingroup blender
*/
/** \defgroup bmesh BMesh
* \ingroup blender
*/
/** \defgroup meshedit Mesh Editing */
/** \defgroup texture Texturing */
/** \defgroup compositor Compositing */
/** \defgroup scripts Scripting */
/** \defgroup python Python
* \ingroup blender
* \ingroup blender scripts
*/
/** \defgroup pygen Python Generic
@@ -332,7 +332,7 @@
* \ingroup imbuf
*/
/** \defgroup imbdds DDS
/** \defgorup imbdds DDS
* \ingroup imbuf
*/

View File

@@ -1,13 +1,4 @@
.TH "BLENDER" "1" "April 26, 2012" "Blender Blender 2\&.63 (sub 0)
build date: 2012-04-26
build time: 19:38:31
build revision: 45987
build platform: Linux
build type: Debug
build c flags: -fopenmp -msse2 -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -Wall -Wcast-align -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type -Wstrict-prototypes -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings
build c++ flags: -D__STDC_CONSTANT_MACROS -fopenmp -msse2 -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -Wall -Wno-invalid-offsetof -Wno-sign-compare
build link flags: -pthread
build system: CMake"
.TH "BLENDER" "1" "December 10, 2011" "Blender Blender 2\&.60 (sub 7)"
.SH NAME
blender \- a 3D modelling and rendering package
@@ -24,7 +15,7 @@ Use Blender to create TV commercials, to make technical visualizations, business
http://www.blender.org
.SH OPTIONS
Blender 2.63 (sub 0)
Blender 2.60 (sub 7)
Usage: blender [args ...] [file] [args ...]
.br
.SS "Render Options:"
@@ -142,17 +133,9 @@ Use amount of <threads> for rendering in background
.SS "Animation Playback Options:"
.TP
.B \-a <options> <file(s)>
.B \-a or \-\-render\-anim
.br
Playback <file(s)>, only operates this way when not running in background.
.br
\-p <sx> <sy> Open with lower left corner at <sx>, <sy>
.br
\-m Read from disk (Don't buffer)
.br
\-f <fps> <fps\-base> Specify FPS to start with
.br
\-j <frame> Set frame step to <frame>
Render frames from start to end (inclusive)
.br
.IP
@@ -223,18 +206,6 @@ Turn debugging on
Enable floating point exceptions
.br
.TP
.B \-\-debug\-ffmpeg
.br
Enable debug messages from FFmpeg library
.br
.TP
.B \-\-debug\-libmv
.br
Enable debug messages from libmv library
.br
.IP
.TP
@@ -360,27 +331,17 @@ Print this help text and exit (windows only)
.br
.TP
.B \-\-debug\-python
.B \-a <options> <file(s)>
.br
Enable debug messages for python
Playback <file(s)>, only operates this way when not running in background.
.br
.TP
.B \-\-debug\-events
\-p <sx> <sy> Open with lower left corner at <sx>, <sy>
.br
Enable debug messages for the event system
\-m Read from disk (Don't buffer)
.br
.TP
.B \-\-debug\-wm
\-f <fps> <fps\-base> Specify FPS to start with
.br
Enable debug messages for the window manager
.br
.TP
.B \-\-debug\-all
.br
Enable all debug messages (excludes libmv)
\-j <frame> Set frame step to <frame>
.br
.TP
@@ -417,11 +378,10 @@ Arguments are executed in the order they are given. eg
\fIBLENDER_USER_CONFIG\fR Directory for user configuration files.
\fIBLENDER_USER_SCRIPTS\fR Directory for user scripts.
\fIBLENDER_SYSTEM_SCRIPTS\fR Directory for system wide scripts.
\fIDirectory\fR for user data files (icons, translations, ..).
\fIBLENDER_USER_DAT`AFILES\fR Directory for user data files (icons, translations, ..).
\fIBLENDER_SYSTEM_DATAFILES\fR Directory for system wide data files.
\fIBLENDER_SYSTEM_PYTHON\fR Directory for system python libraries.
\fITMP\fR or \fITMPDIR\fR Store temporary files here.
\fISDL_AUDIODRIVER\fR LibSDL audio driver \- alsa, esd, dma.
\fIPYTHONHOME\fR Path to the python directory, eg. /usr/lib/python.
.br
.br

View File

@@ -1,18 +0,0 @@
"""
Overriding Context
++++++++++++++++++
It is possible to override context members that the operator sees, so that they
act on specified rather than the selected or active data, or to execute an
operator in the different part of the user interface.
The context overrides are passed as a dictionary, with keys matching the context
member names in bpy.context. For example to override bpy.context.active_object,
you would pass {'active_object': object}.
"""
# remove all objects in scene rather than the selected ones
import bpy
override = {'selected_bases': list(bpy.context.scene.object_bases)}
bpy.ops.object.delete(override)

View File

@@ -1,18 +0,0 @@
"""
It is also possible to run an operator in a particular part of the user
interface. For this we need to pass the window, screen, area and sometimes
a region.
"""
# maximize 3d view in all windows
import bpy
for window in bpy.context.window_manager.windows:
screen = window.screen
for area in screen.areas:
if area.type == 'VIEW_3D':
override = {'window': window, 'screen': screen, 'area': area}
bpy.ops.screen.screen_full_area(override)
break

View File

@@ -1,40 +0,0 @@
"""
Mesh Data
+++++++++
The mesh data is accessed in object mode and intended for compact storage,
for more flexible mesh editing from python see :mod:`bmesh`.
Blender stores 4 main arrays to define mesh geometry.
* :class:`Mesh.vertices` (3 points in space)
* :class:`Mesh.edges` (reference 2 vertices)
* :class:`Mesh.loops` (reference a single vertex and edge)
* :class:`Mesh.polygons`: (reference a range of loops)
Each polygon reference a slice in the loop array, this way, polygons do not store vertices or corner data such as UV's directly,
only a reference to loops that the polygon uses.
:class:`Mesh.loops`, :class:`Mesh.uv_layers` :class:`Mesh.vertex_colors` are all aligned so the same polygon loop
indicies can be used to find the UV's and vertex colors as with as the vertices.
To compare mesh API options see: :ref:`NGons and Tessellation Faces <info_gotcha_mesh_faces>`
This example script prints the vertices and UV's for each polygon, assumes the active object is a mesh with UVs.
"""
import bpy
me = bpy.context.object.data
uv_layer = me.uv.layers.active.data
for poly in me.polygons:
print("Polygon index: %d, length: %d" % (poly.index, poly.loop_total))
# range is used here to show how the polygons reference loops,
# for convenience 'poly.loop_indices' can be used instead.
for loop_index in range(poly.loop_start, poly.loop_start + poly.loop_total):
print(" Vertex: %d" % me.loops[loop_index].vertex_index)
print(" UV: %r" % uv_layer[loop_index].uv)

View File

@@ -1806,9 +1806,9 @@ Game Types (bge.types)
object = cont.owner
for mesh in object.meshes:
for m_index in range(len(mesh.materials)):
for v_index in range(mesh.getVertexArrayLength(m_index)):
vertex = mesh.getVertex(m_index, v_index)
for material in mesh.materials:
for v_index in range(mesh.getVertexArrayLength(mat)):
vertex = mesh.getVertex(mat, v_index)
# Do something with vertex here...
# ... eg: colour the vertex red.
vertex.colour = [1.0, 0.0, 0.0, 1.0]
@@ -4518,16 +4518,10 @@ Game Types (bge.types)
.. data:: KX_ACT_ARMATURE_SETWEIGHT
Change weight of constraint (IK only).
Change weight of (only for IK constraint).
:value: 4
.. data:: KX_ACT_ARMATURE_SETINFLUENCE
Change influence of constraint.
:value: 5
.. attribute:: type
The type of action that the actuator executes when it is active.
@@ -4572,12 +4566,6 @@ Game Types (bge.types)
A weight of 0 disables a constraint while still updating constraint runtime values (see :class:`BL_ArmatureConstraint`)
.. attribute:: influence
The influence this actuator will set on the constraint it controls.
:type: float.
.. class:: KX_ArmatureSensor(SCA_ISensor)
Armature sensor detect conditions on armatures.

View File

@@ -27,7 +27,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Operate on the accumulation buffer.
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glAccum.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/accum.html>`_
:type op: Enumerated constant
:arg op: The accumulation buffer operation.
@@ -39,7 +39,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the alpha test function.
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glAlphaFunc.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/alphafunc.html>`_
:type func: Enumerated constant
:arg func: Specifies the alpha comparison function.
@@ -52,7 +52,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Determine if textures are loaded in texture memory
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glAreTexturesResident.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/aretexturesresident.html>`_
:type n: int
:arg n: Specifies the number of textures to be queried.
@@ -68,7 +68,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Delimit the vertices of a primitive or a group of like primatives
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glBegin.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/begin.html>`_
:type mode: Enumerated constant
:arg mode: Specifies the primitive that will be create from vertices between
@@ -79,7 +79,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Bind a named texture to a texturing target
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glBindTexture.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/bindtexture.html>`_
:type target: Enumerated constant
:arg target: Specifies the target to which the texture is bound.
@@ -91,7 +91,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Draw a bitmap
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glBitmap.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/bitmap.html>`_
:type width, height: int
:arg width, height: Specify the pixel width and height of the bitmap image.
@@ -109,7 +109,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify pixel arithmetic
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/blendfunc.html>`_
:type sfactor: Enumerated constant
:arg sfactor: Specifies how the red, green, blue, and alpha source blending factors are
@@ -123,7 +123,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Execute a display list
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glCallList.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/calllist.html>`_
:type list: unsigned int
:arg list: Specifies the integer name of the display list to be executed.
@@ -133,7 +133,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Execute a list of display lists
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glCallLists.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/calllists.html>`_
:type n: int
:arg n: Specifies the number of display lists to be executed.
@@ -149,7 +149,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Clear buffers to preset values
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glClear.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clear.html>`_
:type mask: Enumerated constant(s)
:arg mask: Bitwise OR of masks that indicate the buffers to be cleared.
@@ -159,7 +159,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify clear values for the accumulation buffer
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glClearAccum.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearaccum.html>`_
:type red, green, blue, alpha: float
:arg red, green, blue, alpha: Specify the red, green, blue, and alpha values used when the
@@ -170,7 +170,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify clear values for the color buffers
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glClearColor.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearcolor.html>`_
:type red, green, blue, alpha: float
:arg red, green, blue, alpha: Specify the red, green, blue, and alpha values used when the
@@ -181,7 +181,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the clear value for the depth buffer
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glClearDepth.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/cleardepth.html>`_
:type depth: int
:arg depth: Specifies the depth value used when the depth buffer is cleared.
@@ -192,7 +192,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the clear value for the color index buffers
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glClearIndex.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearindex.html>`_
:type c: float
:arg c: Specifies the index used when the color index buffers are cleared.
@@ -203,7 +203,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the clear value for the stencil buffer
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glClearStencil.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clearstencil.html>`_
:type s: int
:arg s: Specifies the index used when the stencil buffer is cleared. The initial value is 0.
@@ -213,7 +213,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify a plane against which all geometry is clipped
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glClipPlane.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/clipplane.html>`_
:type plane: Enumerated constant
:arg plane: Specifies which clipping plane is being positioned.
@@ -232,7 +232,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set a new color.
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glColor.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/color.html>`_
:type red, green, blue, alpha: Depends on function prototype.
:arg red, green, blue: Specify new red, green, and blue values for the current color.
@@ -244,7 +244,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Enable and disable writing of frame buffer color components
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glColorMask.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/colormask.html>`_
:type red, green, blue, alpha: int (boolean)
:arg red, green, blue, alpha: Specify whether red, green, blue, and alpha can or cannot be
@@ -256,7 +256,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Cause a material color to track the current color
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glColorMaterial.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/colormaterial.html>`_
:type face: Enumerated constant
:arg face: Specifies whether front, back, or both front and back material parameters should
@@ -269,7 +269,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Copy pixels in the frame buffer
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glCopyPixels.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/copypixels.html>`_
:type x, y: int
:arg x, y: Specify the window coordinates of the lower left corner of the rectangular
@@ -314,7 +314,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify whether front- or back-facing facets can be culled
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glCullFace.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/cullface.html>`_
:type mode: Enumerated constant
:arg mode: Specifies whether front- or back-facing facets are candidates for culling.
@@ -324,7 +324,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Delete a contiguous group of display lists
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glDeleteLists.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/deletelists.html>`_
:type list: unsigned int
:arg list: Specifies the integer name of the first display list to delete
@@ -336,7 +336,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Delete named textures
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glDeleteTextures.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/deletetextures.html>`_
:type n: int
:arg n: Specifies the number of textures to be deleted
@@ -348,7 +348,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the value used for depth buffer comparisons
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glDepthFunc.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/depthfunc.html>`_
:type func: Enumerated constant
:arg func: Specifies the depth comparison function.
@@ -358,7 +358,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Enable or disable writing into the depth buffer
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glDepthMask.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/depthmask.html>`_
:type flag: int (boolean)
:arg flag: Specifies whether the depth buffer is enabled for writing. If flag is GL_FALSE,
@@ -370,7 +370,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify mapping of depth values from normalized device coordinates to window coordinates
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glDepthRange.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/depthrange.html>`_
:type zNear: int
:arg zNear: Specifies the mapping of the near clipping plane to window coordinates.
@@ -384,7 +384,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Disable server-side GL capabilities
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glEnable.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/enable.html>`_
:type cap: Enumerated constant
:arg cap: Specifies a symbolic constant indicating a GL capability.
@@ -394,7 +394,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify which color buffers are to be drawn into
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glDrawBuffer.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/drawbuffer.html>`_
:type mode: Enumerated constant
:arg mode: Specifies up to four color buffers to be drawn into.
@@ -404,7 +404,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Write a block of pixels to the frame buffer
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glDrawPixels.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/drawpixels.html>`_
:type width, height: int
:arg width, height: Specify the dimensions of the pixel rectangle to be
@@ -423,7 +423,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Flag edges as either boundary or non-boundary
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glEdgeFlag.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/edgeflag.html>`_
:type flag: Depends of function prototype
:arg flag: Specifies the current edge flag value.The initial value is GL_TRUE.
@@ -433,7 +433,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Enable server-side GL capabilities
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glEnable.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/enable.html>`_
:type cap: Enumerated constant
:arg cap: Specifies a symbolic constant indicating a GL capability.
@@ -443,14 +443,14 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Delimit the vertices of a primitive or group of like primitives
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glBegin.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/begin.html>`_
.. function:: glEndList():
Create or replace a display list
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glNewList.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/newlist.html>`_
.. function:: glEvalCoord (u,v):
@@ -460,7 +460,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Evaluate enabled one- and two-dimensional maps
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glEvalCoord.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/evalcoord.html>`_
:type u: Depends on function prototype.
:arg u: Specifies a value that is the domain coordinate u to the basis function defined
@@ -478,7 +478,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Compute a one- or two-dimensional grid of points or lines
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glEvalMesh.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/evalmesh.html>`_
:type mode: Enumerated constant
:arg mode: In glEvalMesh1, specifies whether to compute a one-dimensional
@@ -493,7 +493,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Generate and evaluate a single point in a mesh
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glEvalPoint.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/evalpoint.html>`_
:type i: int
:arg i: Specifies the integer value for grid domain variable i.
@@ -505,7 +505,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Controls feedback mode
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glFeedbackBuffer.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/feedbackbuffer.html>`_
:type size: int
:arg size: Specifies the maximum number of values that can be written into buffer.
@@ -520,14 +520,14 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Block until all GL execution is complete
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glFinish.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/finish.html>`_
.. function:: glFlush():
Force Execution of GL commands in finite time
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glFlush.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/flush.html>`_
.. function:: glFog (pname, param):
@@ -536,7 +536,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify fog parameters
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glFog.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/fog.html>`_
:type pname: Enumerated constant
:arg pname: Specifies a single-valued fog parameter. If the function prototype
@@ -551,7 +551,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Define front- and back-facing polygons
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glFrontFace.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/frontface.html>`_
:type mode: Enumerated constant
:arg mode: Specifies the orientation of front-facing polygons.
@@ -561,7 +561,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Multiply the current matrix by a perspective matrix
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glFrustum.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/frustum.html>`_
:type left, right: double (float)
:arg left, right: Specify the coordinates for the left and right vertical
@@ -578,7 +578,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Generate a contiguous set of empty display lists
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGenLists.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/genlists.html>`_
:type range: int
:arg range: Specifies the number of contiguous empty display lists to be generated.
@@ -588,7 +588,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Generate texture names
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGenTextures.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gentextures.html>`_
:type n: int
:arg n: Specifies the number of textures name to be generated.
@@ -602,7 +602,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return the value or values of a selected parameter
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGet.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/get.html>`_
:type pname: Enumerated constant
:arg pname: Specifies the parameter value to be returned.
@@ -614,7 +614,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return the coefficients of the specified clipping plane
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetClipPlane.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getclipplane.html>`_
:type plane: Enumerated constant
:arg plane: Specifies a clipping plane. The number of clipping planes depends on the
@@ -629,7 +629,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return error information
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetError.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/geterror.html>`_
.. function:: glGetLight (light, pname, params):
@@ -638,7 +638,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return light source parameter values
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetLight.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getlight.html>`_
:type light: Enumerated constant
:arg light: Specifies a light source. The number of possible lights depends on the
@@ -656,7 +656,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return evaluator parameters
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetMap.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getmap.html>`_
:type target: Enumerated constant
:arg target: Specifies the symbolic name of a map.
@@ -672,7 +672,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return material parameters
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetMaterial.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getmaterial.html>`_
:type face: Enumerated constant
:arg face: Specifies which of the two materials is being queried.
@@ -689,7 +689,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return the specified pixel map
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetPixelMap.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getpixelmap.html>`_
:type map: Enumerated constant
:arg map: Specifies the name of the pixel map to return.
@@ -701,7 +701,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return the polygon stipple pattern
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetPolygonStipple.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getpolygonstipple.html>`_
:type mask: :class:`bgl.Buffer` object I{type GL_BYTE}
:arg mask: Returns the stipple pattern. The initial value is all 1's.
@@ -711,7 +711,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return a string describing the current GL connection
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetString.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getstring.html>`_
:type name: Enumerated constant
:arg name: Specifies a symbolic constant.
@@ -724,7 +724,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return texture environment parameters
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetTexEnv.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gettexenv.html>`_
:type target: Enumerated constant
:arg target: Specifies a texture environment. Must be GL_TEXTURE_ENV.
@@ -740,7 +740,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return texture coordinate generation parameters
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetTexGen.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gettexgen.html>`_
:type coord: Enumerated constant
:arg coord: Specifies a texture coordinate.
@@ -754,7 +754,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return a texture image
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetTexImage.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getteximage.html>`_
:type target: Enumerated constant
:arg target: Specifies which texture is to be obtained.
@@ -776,7 +776,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
return texture parameter values for a specific level of detail
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetTexLevelParameter.xml>`_
.. seealso:: U{opengl.org/developers/documentation/man_pages/hardcopy/GL/html/gl/gettexlevelparameter.html>`_
:type target: Enumerated constant
:arg target: Specifies the symbolic name of the target texture.
@@ -795,7 +795,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Return texture parameter values
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glGetTexParameter.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/gettexparameter.html>`_
:type target: Enumerated constant
:arg target: Specifies the symbolic name of the target texture.
@@ -809,7 +809,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify implementation-specific hints
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glHint.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/hint.html>`_
:type target: Enumerated constant
:arg target: Specifies a symbolic constant indicating the behavior to be
@@ -824,7 +824,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the current color index
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glIndex.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/index_.html>`_
:type c: :class:`bgl.Buffer` object. Depends on function prototype.
:arg c: Specifies a pointer to a one element array that contains the new value for
@@ -835,14 +835,14 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Initialize the name stack
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glInitNames.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/initnames.html>`_
.. function:: glIsEnabled(cap):
Test whether a capability is enabled
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glIsEnabled.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/isenabled.html>`_
:type cap: Enumerated constant
:arg cap: Specifies a constant representing a GL capability.
@@ -852,7 +852,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Determine if a name corresponds to a display-list
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glIsList.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/islist.html>`_
:type list: unsigned int
:arg list: Specifies a potential display-list name.
@@ -862,7 +862,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Determine if a name corresponds to a texture
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glIsTexture.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/istexture.html>`_
:type texture: unsigned int
:arg texture: Specifies a value that may be the name of a texture.
@@ -874,7 +874,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the light source parameters
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glLight.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/light.html>`_
:type light: Enumerated constant
:arg light: Specifies a light. The number of lights depends on the implementation,
@@ -894,7 +894,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the lighting model parameters
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glLightModel.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/lightmodel.html>`_
:type pname: Enumerated constant
:arg pname: Specifies a single-value light model parameter.
@@ -907,7 +907,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the line stipple pattern
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glLineStipple.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/linestipple.html>`_
:type factor: int
:arg factor: Specifies a multiplier for each bit in the line stipple pattern.
@@ -924,7 +924,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the width of rasterized lines.
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glLineWidth.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/linewidth.html>`_
:type width: float
:arg width: Specifies the width of rasterized lines. The initial value is 1.
@@ -934,7 +934,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the display-list base for glCallLists
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glListBase.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/listbase.html>`_
:type base: unsigned int
:arg base: Specifies an integer offset that will be added to glCallLists
@@ -945,7 +945,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Replace the current matrix with the identity matrix
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glLoadIdentity.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/loadidentity.html>`_
.. function:: glLoadMatrix (m):
@@ -954,7 +954,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Replace the current matrix with the specified matrix
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glLoadMatrix.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/loadmatrix.html>`_
:type m: :class:`bgl.Buffer` object. Depends on function prototype.
:arg m: Specifies a pointer to 16 consecutive values, which are used as the elements
@@ -965,7 +965,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Load a name onto the name stack.
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glLoadName.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/loadname.html>`_
:type name: unsigned int
:arg name: Specifies a name that will replace the top value on the name stack.
@@ -975,7 +975,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify a logical pixel operation for color index rendering
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glLogicOp.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/logicop.html>`_
:type opcode: Enumerated constant
:arg opcode: Specifies a symbolic constant that selects a logical operation.
@@ -987,7 +987,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Define a one-dimensional evaluator
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glMap1.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/map1.html>`_
:type target: Enumerated constant
:arg target: Specifies the kind of values that are generated by the evaluator.
@@ -1012,7 +1012,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Define a two-dimensional evaluator
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glMap2.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/map2.html>`_
:type target: Enumerated constant
:arg target: Specifies the kind of values that are generated by the evaluator.
@@ -1053,7 +1053,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Define a one- or two-dimensional mesh
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glMapGrid.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/mapgrid.html>`_
:type un: int
:arg un: Specifies the number of partitions in the grid range interval
@@ -1072,7 +1072,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify material parameters for the lighting model.
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glMaterial.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/material.html>`_
:type face: Enumerated constant
:arg face: Specifies which face or faces are being updated. Must be one of:
@@ -1089,7 +1089,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify which matrix is the current matrix.
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glMatrixMode.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/matrixmode.html>`_
:type mode: Enumerated constant
:arg mode: Specifies which matrix stack is the target for subsequent matrix operations.
@@ -1101,7 +1101,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Multiply the current matrix with the specified matrix
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glMultMatrix.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/multmatrix.html>`_
:type m: :class:`bgl.Buffer` object. Depends on function prototype.
:arg m: Points to 16 consecutive values that are used as the elements of a 4x4 column
@@ -1112,7 +1112,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Create or replace a display list
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glNewList.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/newlist.html>`_
:type list: unsigned int
:arg list: Specifies the display list name
@@ -1127,7 +1127,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the current normal vector
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glNormal.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/normal.html>`_
:type nx, ny, nz: Depends on function prototype. (non - 'v' prototypes only)
:arg nx, ny, nz: Specify the x, y, and z coordinates of the new current normal.
@@ -1141,7 +1141,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Multiply the current matrix with an orthographic matrix
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glOrtho.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/ortho.html>`_
:type left, right: double (float)
:arg left, right: Specify the coordinates for the left and
@@ -1158,7 +1158,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Place a marker in the feedback buffer
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPassThrough.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/passthrough.html>`_
:type token: float
:arg token: Specifies a marker value to be placed in the feedback
@@ -1171,7 +1171,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set up pixel transfer maps
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPixelMap.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixelmap.html>`_
:type map: Enumerated constant
:arg map: Specifies a symbolic map name.
@@ -1187,7 +1187,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set pixel storage modes
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPixelStore.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixelstore.html>`_
:type pname: Enumerated constant
:arg pname: Specifies the symbolic name of the parameter to be set.
@@ -1203,7 +1203,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set pixel transfer modes
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPixelTransfer.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixeltransfer.html>`_
:type pname: Enumerated constant
:arg pname: Specifies the symbolic name of the pixel transfer parameter to be set.
@@ -1215,7 +1215,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the pixel zoom factors
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPixelZoom.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pixelzoom.html>`_
:type xfactor, yfactor: float
:arg xfactor, yfactor: Specify the x and y zoom factors for pixel write operations.
@@ -1225,7 +1225,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the diameter of rasterized points
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPointSize.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pointsize.html>`_
:type size: float
:arg size: Specifies the diameter of rasterized points. The initial value is 1.
@@ -1235,7 +1235,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Select a polygon rasterization mode
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPolygonMode.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/polygonmode.html>`_
:type face: Enumerated constant
:arg face: Specifies the polygons that mode applies to.
@@ -1250,7 +1250,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the scale and units used to calculate depth values
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPolygonOffset.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/polygonoffset.html>`_
:type factor: float
:arg factor: Specifies a scale factor that is used to create a variable depth
@@ -1264,7 +1264,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the polygon stippling pattern
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPolygonStipple.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/polygonstipple.html>`_
:type mask: :class:`bgl.Buffer` object I{type GL_BYTE}
:arg mask: Specifies a pointer to a 32x32 stipple pattern that will be unpacked
@@ -1275,35 +1275,35 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Pop the server attribute stack
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPopAttrib.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushattrib.html>`_
.. function:: glPopClientAttrib():
Pop the client attribute stack
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPopClientAttrib.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushclientattrib.html>`_
.. function:: glPopMatrix():
Pop the current matrix stack
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPopMatrix.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushmatrix.html>`_
.. function:: glPopName():
Pop the name stack
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPopName.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushname.html>`_
.. function:: glPrioritizeTextures(n, textures, priorities):
Set texture residence priority
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPrioritizeTextures.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/prioritizetextures.html>`_
:type n: int
:arg n: Specifies the number of textures to be prioritized.
@@ -1319,7 +1319,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Push the server attribute stack
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPushAttrib.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushattrib.html>`_
:type mask: Enumerated constant(s)
:arg mask: Specifies a mask that indicates which attributes to save.
@@ -1329,7 +1329,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Push the client attribute stack
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPushClientAttrib.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushclientattrib.html>`_
:type mask: Enumerated constant(s)
:arg mask: Specifies a mask that indicates which attributes to save.
@@ -1339,14 +1339,14 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Push the current matrix stack
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPushMatrix.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushmatrix.html>`_
.. function:: glPushName(name):
Push the name stack
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glPushName.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/pushname.html>`_
:type name: unsigned int
:arg name: Specifies a name that will be pushed onto the name stack.
@@ -1362,7 +1362,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify the raster position for pixel operations
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glRasterPos.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rasterpos.html>`_
:type x, y, z, w: Depends on function prototype. (z and w for '3' and '4' prototypes only)
:arg x, y, z, w: Specify the x,y,z, and w object coordinates (if present) for the
@@ -1394,7 +1394,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Select a color buffer source for pixels.
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glReadBuffer.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/readbuffer.html>`_
:type mode: Enumerated constant
:arg mode: Specifies a color buffer.
@@ -1404,7 +1404,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Read a block of pixels from the frame buffer
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glReadPixels.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/readpixels.html>`_
:type x, y: int
:arg x, y: Specify the window coordinates of the first pixel that is read
@@ -1427,7 +1427,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Draw a rectangle
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glRect.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rect.html>`_
:type x1, y1: Depends on function prototype. (for non 'v' prototypes only)
:arg x1, y1: Specify one vertex of a rectangle
@@ -1442,7 +1442,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set rasterization mode
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glRenderMode.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rendermode.html>`_
:type mode: Enumerated constant
:arg mode: Specifies the rasterization mode.
@@ -1454,7 +1454,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Multiply the current matrix by a rotation matrix
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glRotate.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/rotate.html>`_
:type angle: Depends on function prototype.
:arg angle: Specifies the angle of rotation in degrees.
@@ -1468,7 +1468,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Multiply the current matrix by a general scaling matrix
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glScale.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/scale.html>`_
:type x, y, z: Depends on function prototype.
:arg x, y, z: Specify scale factors along the x, y, and z axes, respectively.
@@ -1478,7 +1478,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Define the scissor box
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glScissor.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/scissor.html>`_
:type x, y: int
:arg x, y: Specify the lower left corner of the scissor box. Initially (0, 0).
@@ -1492,7 +1492,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Establish a buffer for selection mode values
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glSelectBuffer.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/selectbuffer.html>`_
:type size: int
:arg size: Specifies the size of buffer
@@ -1504,7 +1504,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Select flat or smooth shading
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glShadeModel.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/shademodel.html>`_
:type mode: Enumerated constant
:arg mode: Specifies a symbolic value representing a shading technique.
@@ -1514,7 +1514,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set function and reference value for stencil testing
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glStencilFuc.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/stencilfunc.html>`_
:type func: Enumerated constant
:arg func: Specifies the test function.
@@ -1531,7 +1531,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Control the writing of individual bits in the stencil planes
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glStencilMask.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/stencilmask.html>`_
:type mask: unsigned int
:arg mask: Specifies a bit mask to enable and disable writing of individual bits
@@ -1542,7 +1542,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set stencil test actions
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glStencilOp.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/stencilop.html>`_
:type fail: Enumerated constant
:arg fail: Specifies the action to take when the stencil test fails.
@@ -1570,7 +1570,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the current texture coordinates
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glTexCoord.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texcoord.html>`_
:type s, t, r, q: Depends on function prototype. (r and q for '3' and '4' prototypes only)
:arg s, t, r, q: Specify s, t, r, and q texture coordinates. Not all parameters are
@@ -1586,7 +1586,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set texture environment parameters
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glTexEnv.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texenv.html>`_
:type target: Enumerated constant
:arg target: Specifies a texture environment. Must be GL_TEXTURE_ENV.
@@ -1605,7 +1605,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Control the generation of texture coordinates
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glTexGen.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texgen.html>`_
:type coord: Enumerated constant
:arg coord: Specifies a texture coordinate.
@@ -1623,7 +1623,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify a one-dimensional texture image
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glTexImage1D.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/teximage1d.html>`_
:type target: Enumerated constant
:arg target: Specifies the target texture.
@@ -1650,7 +1650,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify a two-dimensional texture image
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/teximage2d.html>`_
:type target: Enumerated constant
:arg target: Specifies the target texture.
@@ -1683,7 +1683,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set texture parameters
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glTexParameter.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/texparameter.html>`_
:type target: Enumerated constant
:arg target: Specifies the target texture.
@@ -1700,7 +1700,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Multiply the current matrix by a translation matrix
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glTranslate.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/translate.html>`_
:type x, y, z: Depends on function prototype.
:arg x, y, z: Specify the x, y, and z coordinates of a translation vector.
@@ -1715,7 +1715,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Specify a vertex
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glVertex.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/vertex.html>`_
:type x, y, z, w: Depends on function prototype (z and w for '3' and '4' prototypes only)
:arg x, y, z, w: Specify x, y, z, and w coordinates of a vertex. Not all parameters
@@ -1731,7 +1731,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Set the viewport
.. seealso:: `OpenGL Docs <http://www.opengl.org/sdk/docs/man/xhtml/glViewport.xml>`_
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/viewport.html>`_
:type x, y: int
:arg x, y: Specify the lower left corner of the viewport rectangle,

View File

@@ -1636,6 +1636,14 @@ Removed
* **use_exr_half**
* **use_tiff_16bit**
bpy.types.Curve
---------------
Added
^^^^^
* :class:`bpy.types.Curve.cycles`
bpy.types.RegionView3D
----------------------
@@ -1652,6 +1660,7 @@ Added
^^^^^
* :class:`bpy.types.Scene.active_clip`
* :class:`bpy.types.Scene.cycles`
bpy.types.NodeLinks
-------------------
@@ -1716,6 +1725,7 @@ bpy.types.Lamp
Added
^^^^^
* :class:`bpy.types.Lamp.cycles`
* :class:`bpy.types.Lamp.node_tree`
* :class:`bpy.types.Lamp.use_nodes`
@@ -1757,6 +1767,7 @@ bpy.types.Object
Added
^^^^^
* :class:`bpy.types.Object.cycles_visibility`
* :class:`bpy.types.Object.slow_parent_offset`
Removed
@@ -1959,6 +1970,14 @@ Removed
* **ndof_orbit_invert_axes**
bpy.types.Mesh
--------------
Added
^^^^^
* :class:`bpy.types.Mesh.cycles`
bpy.types.BlendDataCameras
--------------------------
@@ -1967,6 +1986,14 @@ Added
* :class:`bpy.types.BlendDataCameras.is_updated`
bpy.types.MetaBall
------------------
Added
^^^^^
* :class:`bpy.types.MetaBall.cycles`
bpy.types.UILayout
------------------
@@ -2001,6 +2028,7 @@ bpy.types.World
Added
^^^^^
* :class:`bpy.types.World.cycles`
* :class:`bpy.types.World.node_tree`
* :class:`bpy.types.World.use_nodes`
@@ -2036,6 +2064,14 @@ Added
* :class:`bpy.types.SpaceFileBrowser.active_operator`
bpy.types.Material
------------------
Added
^^^^^
* :class:`bpy.types.Material.cycles`
bpy.types.BlendDataSpeakers
---------------------------
@@ -2052,6 +2088,7 @@ Added
* :class:`bpy.types.Camera.angle_x`
* :class:`bpy.types.Camera.angle_y`
* :class:`bpy.types.Camera.cycles`
* :class:`bpy.types.Camera.sensor_fit`
* :class:`bpy.types.Camera.sensor_height`
* :class:`bpy.types.Camera.sensor_width`
@@ -2080,320 +2117,3 @@ Added
^^^^^
* :class:`bpy.types.BlendDataFonts.is_updated`
2.61 to 2.62
============
bpy.types.SpaceTimeline
-----------------------
Added
^^^^^
* :class:`bpy.types.SpaceTimeline.show_seconds`
bpy.types.MovieClipProxy
------------------------
Added
^^^^^
* :class:`bpy.types.MovieClipProxy.build_undistorted_100`
* :class:`bpy.types.MovieClipProxy.build_undistorted_25`
* :class:`bpy.types.MovieClipProxy.build_undistorted_50`
* :class:`bpy.types.MovieClipProxy.build_undistorted_75`
Removed
^^^^^^^
* **build_undistorted**
bpy.types.ToolSettings
----------------------
Added
^^^^^
* :class:`bpy.types.ToolSettings.unified_paint_settings`
* :class:`bpy.types.ToolSettings.use_uv_sculpt`
* :class:`bpy.types.ToolSettings.uv_relax_method`
* :class:`bpy.types.ToolSettings.uv_sculpt`
* :class:`bpy.types.ToolSettings.uv_sculpt_all_islands`
* :class:`bpy.types.ToolSettings.uv_sculpt_lock_borders`
* :class:`bpy.types.ToolSettings.uv_sculpt_tool`
Removed
^^^^^^^
* **sculpt_paint_use_unified_size**
* **sculpt_paint_use_unified_strength**
bpy.types.DupliObject
---------------------
Added
^^^^^
* :class:`bpy.types.DupliObject.hide`
bpy.types.Curve
---------------
Added
^^^^^
* :class:`bpy.types.Curve.use_fill_caps`
bpy.types.DomainFluidSettings
-----------------------------
Added
^^^^^
* :class:`bpy.types.DomainFluidSettings.frame_offset`
* :class:`bpy.types.DomainFluidSettings.simulation_rate`
bpy.types.SceneGameData
-----------------------
Added
^^^^^
* :class:`bpy.types.SceneGameData.exit_key`
* :class:`bpy.types.SceneGameData.samples`
* :class:`bpy.types.SceneGameData.use_desktop`
bpy.types.Sensor
----------------
Added
^^^^^
* :class:`bpy.types.Sensor.controllers`
bpy.types.Scene
---------------
Removed
^^^^^^^
* **collada_export**
bpy.types.Controller
--------------------
Added
^^^^^
* :class:`bpy.types.Controller.actuators`
bpy.types.SceneRenderLayer
--------------------------
Added
^^^^^
* :class:`bpy.types.SceneRenderLayer.use_pass_diffuse_color`
* :class:`bpy.types.SceneRenderLayer.use_pass_diffuse_direct`
* :class:`bpy.types.SceneRenderLayer.use_pass_diffuse_indirect`
* :class:`bpy.types.SceneRenderLayer.use_pass_glossy_color`
* :class:`bpy.types.SceneRenderLayer.use_pass_glossy_direct`
* :class:`bpy.types.SceneRenderLayer.use_pass_glossy_indirect`
* :class:`bpy.types.SceneRenderLayer.use_pass_transmission_color`
* :class:`bpy.types.SceneRenderLayer.use_pass_transmission_direct`
* :class:`bpy.types.SceneRenderLayer.use_pass_transmission_indirect`
bpy.types.ClothSettings
-----------------------
Added
^^^^^
* :class:`bpy.types.ClothSettings.vel_damping`
bpy.types.FollowTrackConstraint
-------------------------------
Added
^^^^^
* :class:`bpy.types.FollowTrackConstraint.camera`
* :class:`bpy.types.FollowTrackConstraint.depth_object`
* :class:`bpy.types.FollowTrackConstraint.object`
bpy.types.ImageFormatSettings
-----------------------------
Removed
^^^^^^^
* **exr_codec**
* **use_jpeg2k_cinema_48**
* **use_jpeg2k_cinema_preset**
* **use_jpeg2k_ycc**
bpy.types.Property
------------------
Added
^^^^^
* :class:`bpy.types.Property.translation_context`
bpy.types.MovieTrackingTrack
----------------------------
Added
^^^^^
* :class:`bpy.types.MovieTrackingTrack.use_grayscale_preview`
Removed
^^^^^^^
* **marker_find_frame**
bpy.types.Object
----------------
Added
^^^^^
* :class:`bpy.types.Object.dm_info`
bpy.types.UserPreferencesSystem
-------------------------------
Added
^^^^^
* :class:`bpy.types.UserPreferencesSystem.compute_device`
* :class:`bpy.types.UserPreferencesSystem.compute_device_type`
* :class:`bpy.types.UserPreferencesSystem.use_16bit_textures`
bpy.types.SpaceClipEditor
-------------------------
Added
^^^^^
* :class:`bpy.types.SpaceClipEditor.lock_time_cursor`
* :class:`bpy.types.SpaceClipEditor.show_blue_channel`
* :class:`bpy.types.SpaceClipEditor.show_green_channel`
* :class:`bpy.types.SpaceClipEditor.show_red_channel`
* :class:`bpy.types.SpaceClipEditor.use_grayscale_preview`
Removed
^^^^^^^
* **show_grease_pencil**
* **show_pyramid_levels**
bpy.types.VertexPaint
---------------------
Added
^^^^^
* :class:`bpy.types.VertexPaint.use_group_restrict`
bpy.types.DynamicPaintSurface
-----------------------------
Added
^^^^^
* :class:`bpy.types.DynamicPaintSurface.brush_influence_scale`
* :class:`bpy.types.DynamicPaintSurface.brush_radius_scale`
* :class:`bpy.types.DynamicPaintSurface.color_dry_threshold`
* :class:`bpy.types.DynamicPaintSurface.use_drying`
bpy.types.RenderLayer
---------------------
Added
^^^^^
* :class:`bpy.types.RenderLayer.use_pass_diffuse_color`
* :class:`bpy.types.RenderLayer.use_pass_diffuse_direct`
* :class:`bpy.types.RenderLayer.use_pass_diffuse_indirect`
* :class:`bpy.types.RenderLayer.use_pass_glossy_color`
* :class:`bpy.types.RenderLayer.use_pass_glossy_direct`
* :class:`bpy.types.RenderLayer.use_pass_glossy_indirect`
* :class:`bpy.types.RenderLayer.use_pass_transmission_color`
* :class:`bpy.types.RenderLayer.use_pass_transmission_direct`
* :class:`bpy.types.RenderLayer.use_pass_transmission_indirect`
bpy.types.MovieTracking
-----------------------
Added
^^^^^
* :class:`bpy.types.MovieTracking.active_object_index`
* :class:`bpy.types.MovieTracking.objects`
bpy.types.MovieTrackingSettings
-------------------------------
Added
^^^^^
* :class:`bpy.types.MovieTrackingSettings.object_distance`
* :class:`bpy.types.MovieTrackingSettings.use_default_blue_channel`
* :class:`bpy.types.MovieTrackingSettings.use_default_green_channel`
* :class:`bpy.types.MovieTrackingSettings.use_default_red_channel`
bpy.types.Mesh
--------------
Added
^^^^^
* :class:`bpy.types.Mesh.show_extra_indices`
bpy.types.SpaceSequenceEditor
-----------------------------
Added
^^^^^
* :class:`bpy.types.SpaceSequenceEditor.show_seconds`
Removed
^^^^^^^
* **offset_x**
* **offset_y**
* **zoom**
bpy.types.RenderSettings
------------------------
Added
^^^^^
* :class:`bpy.types.RenderSettings.ffmpeg`
* :class:`bpy.types.RenderSettings.use_color_unpremultiply`
Removed
^^^^^^^
* **ffmpeg_audio_bitrate**
* **ffmpeg_audio_channels**
* **ffmpeg_audio_codec**
* **ffmpeg_audio_mixrate**
* **ffmpeg_audio_volume**
* **ffmpeg_autosplit**
* **ffmpeg_buffersize**
* **ffmpeg_codec**
* **ffmpeg_format**
* **ffmpeg_gopsize**
* **ffmpeg_maxrate**
* **ffmpeg_minrate**
* **ffmpeg_muxrate**
* **ffmpeg_packetsize**
* **ffmpeg_video_bitrate**

View File

@@ -1,14 +1,13 @@
*******************
GPU functions (gpu)
*******************
===================
.. module:: gpu
This module provides access to materials GLSL shaders.
*****
Intro
=====
*****
Module to provide functions concerning the GPU implementation in Blender, in particular
the GLSL shaders that blender generates automatically to render materials in the 3D view
@@ -16,15 +15,16 @@ and in the game engine.
.. warning::
The API provided by this module should be consider unstable. The data exposed by the API
are are closely related to Blender's internal GLSL code and may change if the GLSL code
is modified (e.g. new uniform type).
The API provided by this module should be consider unstable. The data exposed by the API
are are closely related to Blender's internal GLSL code and may change if the GLSL code
is modified (e.g. new uniform type).
*********
Constants
=========
*********
--------------
GLSL data type
--------------
@@ -59,15 +59,15 @@ See export_shader_
.. data:: GPU_DATA_3F
three floats
:value: 4
.. data:: GPU_DATA_4F
four floats
:value: 5
.. data:: GPU_DATA_9F
matrix 3x3 in column-major order
@@ -86,450 +86,448 @@ See export_shader_
:value: 8
-----------------
GLSL uniform type
-----------------
.. _uniform-type:
Constants that specify the type of uniform used in a GLSL shader.
Constants that specify the type of uniform used in a GLSL shader.
The uniform type determines the data type, origin and method
of calculation used by Blender to compute the uniform value.
of calculation used by Blender to compute the uniform value.
The calculation of some of the uniforms is based on matrices available in the scene:
.. _mat4_cam_to_world:
.. _mat4_world_to_cam:
.. _mat4_cam_to_world:
.. _mat4_world_to_cam:
*mat4_cam_to_world*
Model matrix of the camera. OpenGL 4x4 matrix that converts
camera local coordinates to world coordinates. In blender this is obtained from the
'matrix_world' attribute of the camera object.
*mat4_cam_to_world*
Model matrix of the camera. OpenGL 4x4 matrix that converts
camera local coordinates to world coordinates. In blender this is obtained from the
'matrix_world' attribute of the camera object.
Some uniform will need the *mat4_world_to_cam*
matrix computed as the inverse of this matrix.
Some uniform will need the *mat4_world_to_cam*
matrix computed as the inverse of this matrix.
.. _mat4_object_to_world:
.. _mat4_world_to_object:
.. _mat4_object_to_world:
.. _mat4_world_to_object:
*mat4_object_to_world*
Model matrix of the object that is being rendered. OpenGL 4x4 matric that converts
object local coordinates to world coordinates. In blender this is obtained from the
'matrix_world' attribute of the object.
*mat4_object_to_world*
Model matrix of the object that is being rendered. OpenGL 4x4 matric that converts
object local coordinates to world coordinates. In blender this is obtained from the
'matrix_world' attribute of the object.
Some uniform will need the *mat4_world_to_object* matrix, computed as the inverse of this matrix.
.. _mat4_lamp_to_world:
.. _mat4_world_to_lamp:
Some uniform will need the *mat4_world_to_object* matrix, computed as the inverse of this matrix.
.. _mat4_lamp_to_world:
.. _mat4_world_to_lamp:
*mat4_lamp_to_world*
Model matrix of the lamp lighting the object. OpenGL 4x4 matrix that converts lamp
local coordinates to world coordinates. In blender this is obtained from the
'matrix_world' attribute of the lamp object.
Some uniform will need the *mat4_world_to_lamp* matrix
computed as the inverse of this matrix.
*mat4_lamp_to_world*
Model matrix of the lamp lighting the object. OpenGL 4x4 matrix that converts lamp
local coordinates to world coordinates. In blender this is obtained from the
'matrix_world' attribute of the lamp object.
Some uniform will need the *mat4_world_to_lamp* matrix
computed as the inverse of this matrix.
.. data:: GPU_DYNAMIC_OBJECT_VIEWMAT
The uniform is a 4x4 GL matrix that converts world coordinates to
camera coordinates (see mat4_world_to_cam_). Can be set once per frame.
There is at most one uniform of that type per shader.
The uniform is a 4x4 GL matrix that converts world coordinates to
camera coordinates (see mat4_world_to_cam_). Can be set once per frame.
There is at most one uniform of that type per shader.
:value: 1
:value: 1
.. data:: GPU_DYNAMIC_OBJECT_MAT
The uniform is a 4x4 GL matrix that converts object coordinates
to world coordinates (see mat4_object_to_world_). Must be set before drawing the object.
There is at most one uniform of that type per shader.
The uniform is a 4x4 GL matrix that converts object coordinates
to world coordinates (see mat4_object_to_world_). Must be set before drawing the object.
There is at most one uniform of that type per shader.
:value: 2
:value: 2
.. data:: GPU_DYNAMIC_OBJECT_VIEWIMAT
The uniform is a 4x4 GL matrix that converts coordinates
in camera space to world coordinates (see mat4_cam_to_world_).
Can be set once per frame.
There is at most one uniform of that type per shader.
The uniform is a 4x4 GL matrix that converts coordinates
in camera space to world coordinates (see mat4_cam_to_world_).
Can be set once per frame.
There is at most one uniform of that type per shader.
:value: 3
:value: 3
.. data:: GPU_DYNAMIC_OBJECT_IMAT
The uniform is a 4x4 GL matrix that converts world coodinates
to object coordinates (see mat4_world_to_object_).
Must be set before drawing the object.
There is at most one uniform of that type per shader.
:value: 4
The uniform is a 4x4 GL matrix that converts world coodinates
to object coordinates (see mat4_world_to_object_).
Must be set before drawing the object.
There is at most one uniform of that type per shader.
:value: 4
.. data:: GPU_DYNAMIC_OBJECT_COLOR
The uniform is a vector of 4 float representing a RGB color + alpha defined at object level.
Each values between 0.0 and 1.0. In blender it corresponds to the 'color' attribute of the object.
Must be set before drawing the object.
There is at most one uniform of that type per shader.
:value: 5
The uniform is a vector of 4 float representing a RGB color + alpha defined at object level.
Each values between 0.0 and 1.0. In blender it corresponds to the 'color' attribute of the object.
Must be set before drawing the object.
There is at most one uniform of that type per shader.
:value: 5
.. data:: GPU_DYNAMIC_LAMP_DYNVEC
The uniform is a vector of 3 float representing the direction of light in camera space.
In Blender, this is computed by
The uniform is a vector of 3 float representing the direction of light in camera space.
In Blender, this is computed by
mat4_world_to_cam_ * (-vec3_lamp_Z_axis)
mat4_world_to_cam_ * (-vec3_lamp_Z_axis)
as the lamp Z axis points to the opposite direction of light.
The norm of the vector should be unity. Can be set once per frame.
There is one uniform of that type per lamp lighting the material.
:value: 6
as the lamp Z axis points to the opposite direction of light.
The norm of the vector should be unity. Can be set once per frame.
There is one uniform of that type per lamp lighting the material.
:value: 6
.. data:: GPU_DYNAMIC_LAMP_DYNCO
The uniform is a vector of 3 float representing the position of the light in camera space.
Computed as
mat4_world_to_cam_ * vec3_lamp_pos
Can be set once per frame.
There is one uniform of that type per lamp lighting the material.
:value: 7
The uniform is a vector of 3 float representing the position of the light in camera space.
Computed as
mat4_world_to_cam_ * vec3_lamp_pos
Can be set once per frame.
There is one uniform of that type per lamp lighting the material.
:value: 7
.. data:: GPU_DYNAMIC_LAMP_DYNIMAT
The uniform is a 4x4 GL matrix that converts vector in camera space to lamp space.
Computed as
The uniform is a 4x4 GL matrix that converts vector in camera space to lamp space.
Computed as
mat4_world_to_lamp_ * mat4_cam_to_world_
mat4_world_to_lamp_ * mat4_cam_to_world_
Can be set once per frame.
There is one uniform of that type per lamp lighting the material.
Can be set once per frame.
There is one uniform of that type per lamp lighting the material.
:value: 8
:value: 8
.. data:: GPU_DYNAMIC_LAMP_DYNPERSMAT
The uniform is a 4x4 GL matrix that converts a vector in camera space to shadow buffer depth space.
Computed as
The uniform is a 4x4 GL matrix that converts a vector in camera space to shadow buffer depth space.
Computed as
mat4_perspective_to_depth_ * mat4_lamp_to_perspective_ * mat4_world_to_lamp_ * mat4_cam_to_world_.
mat4_perspective_to_depth_ * mat4_lamp_to_perspective_ * mat4_world_to_lamp_ * mat4_cam_to_world_.
.. _mat4_perspective_to_depth:
.. _mat4_perspective_to_depth:
*mat4_perspective_to_depth* is a fixed matrix defined as follow::
*mat4_perspective_to_depth* is a fixed matrix defined as follow::
0.5 0.0 0.0 0.5
0.0 0.5 0.0 0.5
0.0 0.0 0.5 0.5
0.0 0.0 0.0 1.0
0.5 0.0 0.0 0.5
0.0 0.5 0.0 0.5
0.0 0.0 0.5 0.5
0.0 0.0 0.0 1.0
This uniform can be set once per frame. There is one uniform of that type per lamp casting shadow in the scene.
This uniform can be set once per frame. There is one uniform of that type per lamp casting shadow in the scene.
:value: 9
:value: 9
.. data:: GPU_DYNAMIC_LAMP_DYNENERGY
The uniform is a single float representing the lamp energy. In blender it corresponds
to the 'energy' attribute of the lamp data block.
There is one uniform of that type per lamp lighting the material.
The uniform is a single float representing the lamp energy. In blender it corresponds
to the 'energy' attribute of the lamp data block.
There is one uniform of that type per lamp lighting the material.
:value: 10
:value: 10
.. data:: GPU_DYNAMIC_LAMP_DYNCOL
The uniform is a vector of 3 float representing the lamp color.
Color elements are between 0.0 and 1.0. In blender it corresponds
to the 'color' attribute of the lamp data block.
There is one uniform of that type per lamp lighting the material.
The uniform is a vector of 3 float representing the lamp color.
Color elements are between 0.0 and 1.0. In blender it corresponds
to the 'color' attribute of the lamp data block.
There is one uniform of that type per lamp lighting the material.
:value: 11
:value: 11
.. data:: GPU_DYNAMIC_SAMPLER_2DBUFFER
The uniform is an integer representing an internal texture used for certain effect
(color band, etc).
:value: 12
The uniform is an integer representing an internal texture used for certain effect
(color band, etc).
:value: 12
.. data:: GPU_DYNAMIC_SAMPLER_2DIMAGE
The uniform is an integer representing a texture loaded from an image file.
The uniform is an integer representing a texture loaded from an image file.
:value: 13
:value: 13
.. data:: GPU_DYNAMIC_SAMPLER_2DSHADOW
The uniform is an integer representing a shadow buffer corresponding to a lamp
casting shadow.
:value: 14
The uniform is an integer representing a shadow buffer corresponding to a lamp
casting shadow.
:value: 14
-------------------
GLSL attribute type
-------------------
.. _attribute-type:
Type of the vertex attribute used in the GLSL shader. Determines the mesh custom data
layer that contains the vertex attribute.
layer that contains the vertex attribute.
.. data:: CD_MTFACE
Vertex attribute is a UV Map. Data type is vector of 2 float.
Vertex attribute is a UV Map. Data type is vector of 2 float.
There can be more than one attribute of that type, they are differenciated by name.
In blender, you can retrieve the attribute data with:
There can be more than one attribute of that type, they are differenciated by name.
In blender, you can retrieve the attribute data with:
.. code-block:: python
.. code-block:: python
mesh.uv_textures[attribute["name"]]
mesh.uv_textures[attribute['name']]
:value: 5
:value: 5
.. data:: CD_MCOL
Vertex attribute is color layer. Data type is vector 4 unsigned byte (RGBA).
Vertex attribute is color layer. Data type is vector 4 unsigned byte (RGBA).
There can be more than one attribute of that type, they are differenciated by name.
In blender you can retrieve the attribute data with:
There can be more than one attribute of that type, they are differenciated by name.
In blender you can retrieve the attribute data with:
.. code-block:: python
.. code-block:: python
mesh.vertex_colors[attribute["name"]]
mesh.vertex_colors[attribute['name']]
:value: 6
:value: 6
.. data:: CD_ORCO
Vertex attribute is original coordinates. Data type is vector 3 float.
Vertex attribute is original coordinates. Data type is vector 3 float.
There can be only 1 attribute of that type per shader.
In blender you can retrieve the attribute data with:
There can be only 1 attribute of that type per shader.
In blender you can retrieve the attribute data with:
.. code-block:: python
.. code-block:: python
mesh.vertices
mesh.vertices
:value: 14
:value: 14
.. data:: CD_TANGENT
Vertex attribute is the tangent vector. Data type is vector 4 float.
Vertex attribute is the tangent vector. Data type is vector 4 float.
There can be only 1 attribute of that type per shader.
There is currently no way to retrieve this attribute data via the RNA API but a standalone
C function to compute the tangent layer from the other layers can be obtained from
blender.org.
:value: 18
There can be only 1 attribute of that type per shader.
There is currently no way to retrieve this attribute data via the RNA API but a standalone
C function to compute the tangent layer from the other layers can be obtained from
blender.org.
:value: 18
*********
Functions
=========
*********
.. _export_shader:
.. function:: export_shader(scene,material)
Extracts the GLSL shader producing the visual effect of material in scene for the purpose of
reusing the shader in an external engine. This function is meant to be used in material exporter
so that the GLSL shader can be exported entirely. The return value is a dictionary containing the
shader source code and all associated data.
Extracts the GLSL shader producing the visual effect of material in scene for the purpose of
reusing the shader in an external engine. This function is meant to be used in material exporter
so that the GLSL shader can be exported entirely. The return value is a dictionary containing the
shader source code and all associated data.
:arg scene: the scene in which the material in rendered.
:type scene: :class:`bpy.types.Scene`
:arg material: the material that you want to export the GLSL shader
:type material: :class:`bpy.types.Material`
:return: the shader source code and all associated data in a dictionary
:rtype: dictionary
:arg scene: the scene in which the material in rendered.
:type scene: :class:`bpy.types.Scene`
:arg material: the material that you want to export the GLSL shader
:type material: :class:`bpy.types.Material`
:return: the shader source code and all associated data in a dictionary
:rtype: dictionary
The dictionary contains the following elements:
The dictionary contains the following elements:
* ["fragment"] : string
fragment shader source code.
* ['fragment'] : string
fragment shader source code.
* ['vertex'] : string
vertex shader source code.
* ["vertex"] : string
vertex shader source code.
* ['uniforms'] : sequence
list of uniforms used in fragment shader, can be empty list. Each element of the
sequence is a dictionary with the following elements:
* ["uniforms"] : sequence
list of uniforms used in fragment shader, can be empty list. Each element of the
sequence is a dictionary with the following elements:
* ['varname'] : string
name of the uniform in the fragment shader. Always of the form 'unf<number>'.
* ["varname"] : string
name of the uniform in the fragment shader. Always of the form 'unf<number>'.
* ['datatype'] : integer
data type of the uniform variable. Can be one of the following:
* ["datatype"] : integer
data type of the uniform variable. Can be one of the following:
* :data:`gpu.GPU_DATA_1I` : use glUniform1i
* :data:`gpu.GPU_DATA_1F` : use glUniform1fv
* :data:`gpu.GPU_DATA_2F` : use glUniform2fv
* :data:`gpu.GPU_DATA_3F` : use glUniform3fv
* :data:`gpu.GPU_DATA_4F` : use glUniform4fv
* :data:`gpu.GPU_DATA_9F` : use glUniformMatrix3fv
* :data:`gpu.GPU_DATA_16F` : use glUniformMatrix4fv
* :data:`gpu.GPU_DATA_1I` : use glUniform1i
* :data:`gpu.GPU_DATA_1F` : use glUniform1fv
* :data:`gpu.GPU_DATA_2F` : use glUniform2fv
* :data:`gpu.GPU_DATA_3F` : use glUniform3fv
* :data:`gpu.GPU_DATA_4F` : use glUniform4fv
* :data:`gpu.GPU_DATA_9F` : use glUniformMatrix3fv
* :data:`gpu.GPU_DATA_16F` : use glUniformMatrix4fv
* ['type'] : integer
type of uniform, determines the origin and method of calculation. See uniform-type_.
Depending on the type, more elements will be be present.
* ["type"] : integer
type of uniform, determines the origin and method of calculation. See uniform-type_.
Depending on the type, more elements will be be present.
* ['lamp'] : :class:`bpy.types.Object`
Reference to the lamp object from which the uniforms value are extracted. Set for the following uniforms types:
* ["lamp"] : :class:`bpy.types.Object`
Reference to the lamp object from which the uniforms value are extracted. Set for the following uniforms types:
.. hlist::
:columns: 3
.. hlist::
:columns: 3
* :data:`gpu.GPU_DYNAMIC_LAMP_DYNVEC`
* :data:`gpu.GPU_DYNAMIC_LAMP_DYNCO`
* :data:`gpu.GPU_DYNAMIC_LAMP_DYNIMAT`
* :data:`gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT`
* :data:`gpu.GPU_DYNAMIC_LAMP_DYNENERGY`
* :data:`gpu.GPU_DYNAMIC_LAMP_DYNCOL`
* :data:`gpu.GPU_DYNAMIC_SAMPLER_2DSHADOW`
* :data:`gpu.GPU_DYNAMIC_LAMP_DYNVEC`
* :data:`gpu.GPU_DYNAMIC_LAMP_DYNCO`
* :data:`gpu.GPU_DYNAMIC_LAMP_DYNIMAT`
* :data:`gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT`
* :data:`gpu.GPU_DYNAMIC_LAMP_DYNENERGY`
* :data:`gpu.GPU_DYNAMIC_LAMP_DYNCOL`
* :data:`gpu.GPU_DYNAMIC_SAMPLER_2DSHADOW`
Notes:
Notes:
* The uniforms :data:`gpu.GPU_DYNAMIC_LAMP_DYNVEC`, :data:`gpu.GPU_DYNAMIC_LAMP_DYNCO`, :data:`gpu.GPU_DYNAMIC_LAMP_DYNIMAT` and :data:`gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT`
refer to the lamp object position and orientation, both of can be derived from the object world matrix:
* The uniforms :data:`gpu.GPU_DYNAMIC_LAMP_DYNVEC`, :data:`gpu.GPU_DYNAMIC_LAMP_DYNCO`, :data:`gpu.GPU_DYNAMIC_LAMP_DYNIMAT` and :data:`gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT`
refer to the lamp object position and orientation, both of can be derived from the object world matrix:
.. code-block:: python
obmat = uniform['lamp'].matrix_world
where obmat is the mat4_lamp_to_world_ matrix of the lamp as a 2 dimensional array,
the lamp world location location is in obmat[3].
* The uniform types :data:`gpu.GPU_DYNAMIC_LAMP_DYNENERGY` and :data:`gpu.GPU_DYNAMIC_LAMP_DYNCOL` refer to the lamp data bloc that you get from:
.. code-block:: python
la = uniform['lamp'].data
from which you get la.energy and la.color
* Lamp duplication is not supported: if you have duplicated lamps in your scene
(i.e. lamp that are instantiated by dupligroup, etc), this element will only
give you a reference to the orignal lamp and you will not know which instance
of the lamp it is refering too. You can still handle that case in the exporter
by distributing the uniforms amongst the duplicated lamps.
* ['image'] : :class:`bpy.types.Image`
Reference to the image databloc. Set for uniform type :data:`gpu.GPU_DYNAMIC_SAMPLER_2DIMAGE`. You can get the image data from:
.. code-block:: python
obmat = uniform["lamp"].matrix_world
# full path to image file
uniform['image'].filepath
# image size as a 2-dimensional array of int
uniform['image'].size
where obmat is the mat4_lamp_to_world_ matrix of the lamp as a 2 dimensional array,
the lamp world location location is in obmat[3].
* ['texnumber'] : integer
Channel number to which the texture is bound when drawing the object.
Set for uniform types :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`, :data:`gpu.GPU_DYNAMIC_SAMPLER_2DIMAGE` and :data:`gpu.GPU_DYNAMIC_SAMPLER_2DSHADOW`.
* The uniform types :data:`gpu.GPU_DYNAMIC_LAMP_DYNENERGY` and :data:`gpu.GPU_DYNAMIC_LAMP_DYNCOL` refer to the lamp data bloc that you get from:
This is provided for information only: when reusing the shader outside blencer,
you are free to assign the textures to the channel of your choice and to pass
that number channel to the GPU in the uniform.
.. code-block:: python
* ['texpixels'] : byte array
texture data for uniform type :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`. Although
the corresponding uniform is a 2D sampler, the texture is always a 1D texture
of n x 1 pixel. The texture size n is provided in ['texsize'] element.
These texture are only used for computer generated texture (colorband, etc).
The texture data is provided so that you can make a real image out of it in the
exporter.
* ['texsize'] : integer
horizontal size of texture for uniform type :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`.
The texture data is in ['texpixels'].
la = uniform["lamp"].data
* ['attributes'] : sequence
list of attributes used in vertex shader, can be empty. Blender doesn't use
standard attributes except for vertex position and normal. All other vertex
attributes must be passed using the generic glVertexAttrib functions.
The attribute data can be found in the derived mesh custom data using RNA.
Each element of the sequence is a dictionary containing the following elements:
from which you get la.energy and la.color
* ['varname'] : string
name of the uniform in the vertex shader. Always of the form 'att<number>'.
* Lamp duplication is not supported: if you have duplicated lamps in your scene
(i.e. lamp that are instantiated by dupligroup, etc), this element will only
give you a reference to the orignal lamp and you will not know which instance
of the lamp it is refering too. You can still handle that case in the exporter
by distributing the uniforms amongst the duplicated lamps.
* ['datatype'] : integer
data type of vertex attribute, can be one of the following:
* ["image"] : :class:`bpy.types.Image`
Reference to the image databloc. Set for uniform type :data:`gpu.GPU_DYNAMIC_SAMPLER_2DIMAGE`. You can get the image data from:
* :data:`gpu.GPU_DATA_2F` : use glVertexAttrib2fv
* :data:`gpu.GPU_DATA_3F` : use glVertexAttrib3fv
* :data:`gpu.GPU_DATA_4F` : use glVertexAttrib4fv
* :data:`gpu.GPU_DATA_4UB` : use glVertexAttrib4ubv
.. code-block:: python
* ['number'] : integer
generic attribute number. This is provided for information only. Blender
doesn't use glBindAttribLocation to place generic attributes at specific location,
it lets the shader compiler place the attributes automatically and query the
placement with glGetAttribLocation. The result of this placement is returned in
this element.
# full path to image file
uniform["image"].filepath
# image size as a 2-dimensional array of int
uniform["image"].size
When using this shader in a render engine, you should either use
glBindAttribLocation to force the attribute at this location or use
glGetAttribLocation to get the placement chosen by the compiler of your GPU.
* ["texnumber"] : integer
Channel number to which the texture is bound when drawing the object.
Set for uniform types :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`, :data:`gpu.GPU_DYNAMIC_SAMPLER_2DIMAGE` and :data:`gpu.GPU_DYNAMIC_SAMPLER_2DSHADOW`.
* ['type'] : integer
type of the mesh custom data from which the vertex attribute is loaded.
See attribute-type_.
This is provided for information only: when reusing the shader outside blencer,
you are free to assign the textures to the channel of your choice and to pass
that number channel to the GPU in the uniform.
* ['name'] : string or integer
custom data layer name, used for attribute type :data:`gpu.CD_MTFACE` and :data:`gpu.CD_MCOL`.
* ["texpixels"] : byte array
texture data for uniform type :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`. Although
the corresponding uniform is a 2D sampler, the texture is always a 1D texture
of n x 1 pixel. The texture size n is provided in ["texsize"] element.
These texture are only used for computer generated texture (colorband, etc).
The texture data is provided so that you can make a real image out of it in the
exporter.
Example:
* ["texsize"] : integer
horizontal size of texture for uniform type :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`.
The texture data is in ["texpixels"].
* ["attributes"] : sequence
list of attributes used in vertex shader, can be empty. Blender doesn't use
standard attributes except for vertex position and normal. All other vertex
attributes must be passed using the generic glVertexAttrib functions.
The attribute data can be found in the derived mesh custom data using RNA.
Each element of the sequence is a dictionary containing the following elements:
* ["varname"] : string
name of the uniform in the vertex shader. Always of the form 'att<number>'.
* ["datatype"] : integer
data type of vertex attribute, can be one of the following:
* :data:`gpu.GPU_DATA_2F` : use glVertexAttrib2fv
* :data:`gpu.GPU_DATA_3F` : use glVertexAttrib3fv
* :data:`gpu.GPU_DATA_4F` : use glVertexAttrib4fv
* :data:`gpu.GPU_DATA_4UB` : use glVertexAttrib4ubv
* ["number"] : integer
generic attribute number. This is provided for information only. Blender
doesn't use glBindAttribLocation to place generic attributes at specific location,
it lets the shader compiler place the attributes automatically and query the
placement with glGetAttribLocation. The result of this placement is returned in
this element.
When using this shader in a render engine, you should either use
glBindAttribLocation to force the attribute at this location or use
glGetAttribLocation to get the placement chosen by the compiler of your GPU.
* ["type"] : integer
type of the mesh custom data from which the vertex attribute is loaded.
See attribute-type_.
* ["name"] : string or integer
custom data layer name, used for attribute type :data:`gpu.CD_MTFACE` and :data:`gpu.CD_MCOL`.
Example:
.. code-block:: python
import gpu
# get GLSL shader of material Mat.001 in scene Scene.001
scene = bpy.data.scenes["Scene.001"]
material = bpy.data.materials["Mat.001"]
shader = gpu.export_shader(scene,material)
# scan the uniform list and find the images used in the shader
for uniform in shader["uniforms"]:
if uniform["type"] == gpu.GPU_DYNAMIC_SAMPLER_2DIMAGE:
print("uniform {0} is using image {1}".format(uniform["varname"], uniform["image"].filepath))
# scan the attribute list and find the UV Map used in the shader
for attribute in shader["attributes"]:
if attribute["type"] == gpu.CD_MTFACE:
print("attribute {0} is using UV Map {1}".format(attribute["varname"], attribute["name"]))
.. code-block:: python
import gpu
# get GLSL shader of material Mat.001 in scene Scene.001
scene = bpy.data.scenes['Scene.001']
material = bpy.data.materials['Mat.001']
shader = gpu.export_shader(scene,material)
# scan the uniform list and find the images used in the shader
for uniform in shader['uniforms']:
if uniform['type'] == gpu.GPU_DYNAMIC_SAMPLER_2DIMAGE:
print("uniform {0} is using image {1}".format(uniform['varname'], uniform['image'].filepath))
# scan the attribute list and find the UV Map used in the shader
for attribute in shader['attributes']:
if attribute['type'] == gpu.CD_MTFACE:
print("attribute {0} is using UV Map {1}".format(attribute['varname'], attribute['name']))
*****
Notes
=====
*****
.. _mat4_lamp_to_perspective:
1. Calculation of the *mat4_lamp_to_perspective* matrix for a spot lamp.
The following pseudo code shows how the *mat4_lamp_to_perspective* matrix is computed
The following pseudo code shows how the *mat4_lamp_to_perspective* matrix is computed
in blender for uniforms of :data:`gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT` type::
.. code-block:: python
#Get the lamp datablock with:
lamp=bpy.data.objects[uniform['lamp']].data
#Get the lamp datablock with:
lamp = bpy.data.objects[uniform["lamp"]].data
#Compute the projection matrix:
# You will need these lamp attributes:
# lamp.clipsta : near clip plane in world unit
# lamp.clipend : far clip plane in world unit
# lamp.spotsize : angle in degree of the spot light
# Compute the projection matrix:
# You will need these lamp attributes:
# lamp.clipsta : near clip plane in world unit
# lamp.clipend : far clip plane in world unit
# lamp.spotsize : angle in degree of the spot light
#The size of the projection plane is computed with the usual formula:
wsize = lamp.clista * tan(lamp.spotsize/2)
# The size of the projection plane is computed with the usual formula:
wsize = lamp.clista * tan(lamp.spotsize/2)
#And the projection matrix:
mat4_lamp_to_perspective = glFrustum(-wsize, wsize, -wsize, wsize, lamp.clista, lamp.clipend)
#And the projection matrix:
mat4_lamp_to_perspective = glFrustum(-wsize,wsize,-wsize,wsize,lamp.clista,lamp.clipend)
2. Creation of the shadow map for a spot lamp.
The shadow map is the depth buffer of a render performed by placing the camera at the
spot light position. The size of the shadow map is given by the attribute lamp.bufsize :
spot light position. The size of the shadow map is given by the attribute lamp.bufsize :
shadow map size in pixel, same size in both dimensions.

View File

@@ -1,162 +0,0 @@
..
This document is appended to the auto generated bmesh api doc to avoid clogging up the C files with details.
to test this run:
./blender.bin -b -noaudio -P doc/python_api/sphinx_doc_gen.py -- --partial bmesh* ; cd doc/python_api ; sphinx-build sphinx-in sphinx-out ; cd ../../
Intro
-----
This API gives access the blenders internal mesh editing api, featuring geometry connectivity data and
access to editing operations such as split, separate, collapse and dissolve.
The features exposed closely follow the C API,
giving python access to the functions used by blenders own mesh editing tools.
For an overview of BMesh data types and how they reference each other see:
`BMesh Design Document <http://wiki.blender.org/index.php/Dev:2.6/Source/Modeling/BMesh/Design>`_ .
.. note::
**Disk** and **Radial** data is not exposed by the python api since this is for internal use only.
.. warning::
This API is still in development and experimental, while we don't expect to see large changes,
many areas are not well tested yet and so its possible changes will be made that break scripts.
*Campbell Barton, 13, March 2012*
.. warning::
TODO items are...
* add access to BMesh **walkers**
* add api for calling BMesh operators (unrelated to bpy.ops)
* add custom-data manipulation functions add/remove/rename.
Example Script
--------------
.. literalinclude:: ../../../release/scripts/templates/bmesh_simple.py
Stand-Alone Module
^^^^^^^^^^^^^^^^^^
The bmesh module is written to be standalone except for :mod:`mathutils`
which is used for vertex locations and normals.
The only other exception to this are when converting mesh data to and from :class:`bpy.types.Mesh`.
Mesh Access
-----------
There are 2 ways to access BMesh data, you can create a new BMesh by converting a mesh from
:class:`bpy.types.BlendData.meshes` or by accessing the current edit mode mesh.
see: :class:`bmesh.types.BMesh.from_mesh` and :mod:`bmesh.from_edit_mesh` respectively.
When explicitly converting from mesh data python **owns** the data, that is to say - that the mesh only exists while
python holds a reference to it, and the script is responsible for putting it back into a mesh data-block when the edits
are done.
Note that unlike :mod:`bpy`, a BMesh does not necessarily correspond to data in the currently open blend file,
a BMesh can be created, edited and freed without the user ever seeing or having access to it.
Unlike edit mode, the bmesh module can use multiple BMesh instances at once.
Take care when dealing with multiple BMesh instances since the mesh data can use a lot of memory, while a mesh that
python owns will be freed in when the script holds no references to it,
its good practice to call :class:`bmesh.types.BMesh.free` which will remove all the mesh data immediately and disable
further access.
EditMode Tessellation
^^^^^^^^^^^^^^^^^^^^^
When writing scripts that operate on editmode data you will normally want to re-calculate the tessellation after
running the script, this needs to be called explicitly.
The BMesh its self does not store the triangulated faces, they are stored in the :class:`bpy.types.Mesh`,
to refresh tessellation faces call :class:`bpy.types.Mesh.calc_tessface`.
CustomData Access
-----------------
BMesh has a unified way to access mesh attributes such as UV's vertex colors, shape keys, edge crease etc.
This works by having a **layers** property on bmesh data sequences to access the custom data layers which can then be
used to access the actual data on each vert/edge/face/loop.
Here are some examples ...
.. code-block:: python
uv_lay = bm.loops.layers.uv.active
for face in bm.faces:
for loop in f.loops:
uv = loop[uv_lay]
print("Loop UV: %f, %f" % (uv.x, uv.y))
.. code-block:: python
shape_lay = bm.verts.layers.shape["Key.001"]
for vert in bm.verts:
shape = vert[shape_lay]
print("Vert Shape: %f, %f, %f" % (shape.x, shape.y, shape.z))
.. code-block:: python
# in this example the active vertex group index is used,
# this is stored in the object, not the BMesh
group_index = obj.vertex_groups.active_index
# only ever one deform weight layer
dvert_lay = bm.verts.layers.deform.active
for vert in bm.verts:
dvert = vert[dvert_lay]
if group_index in dvert:
print("Weight %f" % dvert[group_index])
else:
print("Setting Weight")
dvert[group_index] = 0.5
Keeping a Correct State
-----------------------
When modeling in blender there are certain assumptions made about the state of the mesh.
* hidden geometry isn't selected.
* when an edge is selected, its vertices are selected too.
* when a face is selected, its edges and vertices are selected.
* duplicate edges / faces don't exist.
* faces have at least 3 vertices.
To give developers flexibility these conventions are not enforced,
however tools must leave the mesh in a valid state else other tools may behave incorrectly.
Any errors that arise from not following these conventions is considered a bug in the script,
not a bug in blender.
Selection / Flushing
^^^^^^^^^^^^^^^^^^^^
As mentioned above, it is possible to create an invalid selection state
(by selecting a state and then de-selecting one of its vertices's for example), mostly the best way to solve this is to
flush the selection after performing a series of edits. this validates the selection state.
Module Functions
----------------

View File

@@ -264,11 +264,11 @@ if your unsure whether the text is upper or lower case use lower or upper string
Use try/except Sparingly
------------------------
The **try** statement is useful to save time writing error checking code.
The **try** statement useful to save time writing error checking code.
However **try** is significantly slower then an **if** since an exception has to be set each time, so avoid using **try** in areas of your code that execute in a loop and runs many times.
There are cases where using **try** is faster than checking whether the condition will raise an error, so it is worth experimenting.
There are cases where using **try** is faster than checking weather the condition will raise an error, so it is worth experimenting.
Value Comparison

View File

@@ -118,6 +118,14 @@ If you insist - yes its possible, but scripts that use this hack wont be conside
bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)
Matrix multiplication is wrong
==============================
Every so often users complain that Blenders matrix math is wrong, the confusion comes from mathutils matrices being column-major to match OpenGL and the rest of Blenders matrix operations and stored matrix data.
This is different to **numpy** which is row-major which matches what you would expect when using conventional matrix math notation.
I can't edit the mesh in edit-mode!
===================================
@@ -132,93 +140,6 @@ write useful tools in python which are also fast to execute while in edit-mode.
For the time being this limitation just has to be worked around but we're aware its frustrating needs to be addressed.
.. _info_gotcha_mesh_faces:
NGons and Tessellation Faces
============================
Since 2.63 NGons are supported, this adds some complexity since in some cases you need to access triangles still (some exporters for example).
There are now 3 ways to access faces:
* :class:`bpy.types.MeshPolygon` - this is the data stricture which now stores faces in object mode (access as ``mesh.polygons`` rather then ``mesh.faces``).
* :class:`bpy.types.MeshTessFace` - the result of triangulating (tessellated) polygons, the main method of face access in 2.62 or older (access as ``mesh.tessfaces``).
* :class:`bmesh.types.BMFace` - the polygons as used in editmode.
For the purpose of the following documentation, these will be referred to as polygons, tessfaces and bmesh-faces respectively.
5+ sided faces will be referred to as ``ngons``.
Support Overview
----------------
+--------------+------------------------------+--------------------------------+--------------------------------+
|Usage |:class:`bpy.types.MeshPolygon`|:class:`bpy.types.MeshTessFace` |:class:`bmesh.types.BMFace` |
+==============+==============================+================================+================================+
|Import/Create |Bad (inflexible) |Fine (supported as upgrade path)|Best |
+--------------+------------------------------+--------------------------------+--------------------------------+
|Manipulate |Bad (inflexible) |Bad (loses ngons) |Best |
+--------------+------------------------------+--------------------------------+--------------------------------+
|Export/Output |Good (ngons) |Good (When ngons can't be used) |Good (ngons, memory overhead) |
+--------------+------------------------------+--------------------------------+--------------------------------+
.. note::
Using the :mod:`bmesh` api is completely separate api from :mod:`bpy`, typically you would would use one or the other based on the level of editing needed, not simply for a different way to access faces.
Creating
--------
All 3 datatypes can be used for face creation.
* polygons are the most efficient way to create faces but the data structure is _very_ rigid and inflexible, you must have all your vertes and faces ready and create them all at once. This is further complicated by the fact that each polygon does not store its own verts (as with tessfaces), rather they reference an index and size in :class:`bpy.types.Mesh.loops` which are a fixed array too.
* tessfaces ideally should not be used for creating faces since they are really only tessellation cache of polygons, however for scripts upgrading from 2.62 this is by far the most straightforward option. This works by creating tessfaces and when finished - they can be converted into polygons by calling :class:`bpy.types.Mesh.update`. The obvious limitation is ngons can't be created this way.
* bmesh-faces are most likely the easiest way for new scripts to create faces, since faces can be added one by one and the api has features intended for mesh manipulation. While :class:`bmesh.types.BMesh` uses more memory it can be managed by only operating on one mesh at a time.
Editing
-------
Editing is where the 3 data types vary most.
* polygons are very limited for editing, changing materials and options like smooth works but for anything else they are too inflexible and are only intended for storage.
* tessfaces should not be used for editing geometry because doing so will cause existing ngons to be tessellated.
* bmesh-faces are by far the best way to manipulate geometry.
Exporting
---------
All 3 data types can be used for exporting, the choice mostly depends on whether the target format supports ngons or not.
* polygons are the most direct & efficient way to export providing they convert into the output format easily enough.
* tessfaces work well for exporting to formats which dont support ngons, in fact this is the only place where their use is encouraged.
* bmesh-faces can work for exporting too but may not be necessary if polygons can be used since using bmesh gives some overhead because its not the native storage format in object mode.
Upgrading Importers from 2.62
-----------------------------
Importers can be upgraded to work with only minor changes.
The main change to be made is used the tessellation versions of each attribute.
* mesh.faces --> :class:`bpy.types.Mesh.tessfaces`
* mesh.uv_textures --> :class:`bpy.types.Mesh.tessface_uv_textures`
* mesh.vertex_colors --> :class:`bpy.types.Mesh.tessface_vertex_colors`
Once the data is created call :class:`bpy.types.Mesh.update` to convert the tessfaces into polygons.
Upgrading Exporters from 2.62
-----------------------------
For exporters the most direct way to upgrade is to use tessfaces as with importing however its important to know that tessfaces may **not** exist for a mesh, the array will be empty as if there are no faces.
So before accessing tessface data call: :class:`bpy.types.Mesh.update` ``(calc_tessface=True)``.
EditBones, PoseBones, Bone... Bones
===================================

View File

@@ -82,7 +82,7 @@ You might want to reference a script relative to the blend file.
import bpy
import os
filename = os.path.join(os.path.dirname(bpy.data.filepath), "myscript.py")
filename = os.path.join(os.path.basename(bpy.data.filepath), "myscript.py")
exec(compile(open(filename).read(), filename, 'exec'))

File diff suppressed because it is too large Load Diff

View File

@@ -11,8 +11,7 @@
DO_UPLOAD=true
DO_EXE_BLENDER=true
DO_OUT_HTML=true
DO_OUT_HTML_ZIP=true
DO_OUT_PDF=false
DO_OUT_PDF=true
BLENDER="./blender.bin"
@@ -62,24 +61,6 @@ if $DO_OUT_HTML ; then
# annoying bug in sphinx makes it very slow unless we do this. should report.
cd $SPHINXBASE
sphinx-build -n -b html sphinx-in sphinx-out
# XXX, saves space on upload and zip, should move HTML outside
# and zip up there, for now this is OK
rm -rf sphinx-out/.doctrees
# incase we have a zip already
rm -f blender_python_reference_$BLENDER_VERSION.zip
# ------------------------------------------------------------------------
# ZIP the HTML dir for upload
if $DO_OUT_HTML_ZIP ; then
# lame, temp rename dir
mv sphinx-out blender_python_reference_$BLENDER_VERSION
zip -r -9 blender_python_reference_$BLENDER_VERSION.zip blender_python_reference_$BLENDER_VERSION
mv blender_python_reference_$BLENDER_VERSION sphinx-out
fi
cd -
fi
@@ -93,7 +74,6 @@ if $DO_OUT_PDF ; then
mv $SPHINXBASE/sphinx-out/contents.pdf $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf
fi
# ----------------------------------------------------------------------------
# Upload to blender servers, comment this section for testing
@@ -109,14 +89,8 @@ if $DO_UPLOAD ; then
# better redirect
ssh $SSH_USER@emo.blender.org 'echo "<html><head><title>Redirecting...</title><meta http-equiv=\"REFRESH\" content=\"0;url=../blender_python_api_'$BLENDER_VERSION'/\"></head><body>Redirecting...</body></html>" > '$SSH_UPLOAD'/250PythonDoc/index.html'
if $DO_OUT_PDF ; then
# rename so local PDF has matching name.
rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf
fi
if $DO_OUT_HTML_ZIP ; then
rsync --progress -avze "ssh -p 22" $SPHINXBASE/blender_python_reference_$BLENDER_VERSION.zip $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.zip
fi
# rename so local PDF has matching name.
rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf
fi

View File

@@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.
@@ -71,9 +71,3 @@ endif()
if(WITH_CARVE)
add_subdirectory(carve)
endif()
if(WITH_GHOST_XDND)
if(UNIX AND NOT APPLE)
add_subdirectory(xdnd)
endif()
endif()

View File

@@ -167,7 +167,7 @@
#include <intrin.h>
#endif
#if defined(_CPPUNWIND) || defined(__EXCEPTIONS)
#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_NO_EXCEPTIONS)
#define EIGEN_EXCEPTIONS
#endif

View File

@@ -13,9 +13,9 @@ namespace Eigen {
*
*
*
* This module provides SVD decomposition for matrices (both real and complex).
* This module provides SVD decomposition for (currently) real matrices.
* This decomposition is accessible via the following MatrixBase method:
* - MatrixBase::jacobiSvd()
* - MatrixBase::svd()
*
* \code
* #include <Eigen/SVD>

View File

@@ -331,16 +331,16 @@ template<> struct ldlt_inplace<Upper>
template<typename MatrixType> struct LDLT_Traits<MatrixType,Lower>
{
typedef const TriangularView<const MatrixType, UnitLower> MatrixL;
typedef const TriangularView<const typename MatrixType::AdjointReturnType, UnitUpper> MatrixU;
typedef TriangularView<MatrixType, UnitLower> MatrixL;
typedef TriangularView<typename MatrixType::AdjointReturnType, UnitUpper> MatrixU;
inline static MatrixL getL(const MatrixType& m) { return m; }
inline static MatrixU getU(const MatrixType& m) { return m.adjoint(); }
};
template<typename MatrixType> struct LDLT_Traits<MatrixType,Upper>
{
typedef const TriangularView<const typename MatrixType::AdjointReturnType, UnitLower> MatrixL;
typedef const TriangularView<const MatrixType, UnitUpper> MatrixU;
typedef TriangularView<typename MatrixType::AdjointReturnType, UnitLower> MatrixL;
typedef TriangularView<MatrixType, UnitUpper> MatrixU;
inline static MatrixL getL(const MatrixType& m) { return m.adjoint(); }
inline static MatrixU getU(const MatrixType& m) { return m; }
};

View File

@@ -274,8 +274,8 @@ template<> struct llt_inplace<Upper>
template<typename MatrixType> struct LLT_Traits<MatrixType,Lower>
{
typedef const TriangularView<const MatrixType, Lower> MatrixL;
typedef const TriangularView<const typename MatrixType::AdjointReturnType, Upper> MatrixU;
typedef TriangularView<MatrixType, Lower> MatrixL;
typedef TriangularView<typename MatrixType::AdjointReturnType, Upper> MatrixU;
inline static MatrixL getL(const MatrixType& m) { return m; }
inline static MatrixU getU(const MatrixType& m) { return m.adjoint(); }
static bool inplace_decomposition(MatrixType& m)
@@ -284,8 +284,8 @@ template<typename MatrixType> struct LLT_Traits<MatrixType,Lower>
template<typename MatrixType> struct LLT_Traits<MatrixType,Upper>
{
typedef const TriangularView<const typename MatrixType::AdjointReturnType, Lower> MatrixL;
typedef const TriangularView<const MatrixType, Upper> MatrixU;
typedef TriangularView<typename MatrixType::AdjointReturnType, Lower> MatrixL;
typedef TriangularView<MatrixType, Upper> MatrixU;
inline static MatrixL getL(const MatrixType& m) { return m.adjoint(); }
inline static MatrixU getU(const MatrixType& m) { return m; }
static bool inplace_decomposition(MatrixType& m)

View File

@@ -68,8 +68,10 @@ class Array
friend struct internal::conservative_resize_like_impl;
using Base::m_storage;
public:
enum { NeedsToAlign = (!(Options&DontAlign))
&& SizeAtCompileTime!=Dynamic && ((static_cast<int>(sizeof(Scalar))*SizeAtCompileTime)%16)==0 };
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
using Base::base;
using Base::coeff;

View File

@@ -94,7 +94,7 @@ struct traits<Block<XprType, BlockRows, BlockCols, InnerPanel, HasDirectAccess>
MaskPacketAccessBit = (InnerSize == Dynamic || (InnerSize % packet_traits<Scalar>::size) == 0)
&& (InnerStrideAtCompileTime == 1)
? PacketAccessBit : 0,
MaskAlignedBit = (InnerPanel && (OuterStrideAtCompileTime!=Dynamic) && (((OuterStrideAtCompileTime * int(sizeof(Scalar))) % 16) == 0)) ? AlignedBit : 0,
MaskAlignedBit = (InnerPanel && (OuterStrideAtCompileTime!=Dynamic) && ((OuterStrideAtCompileTime % packet_traits<Scalar>::size) == 0)) ? AlignedBit : 0,
FlagsLinearAccessBit = (RowsAtCompileTime == 1 || ColsAtCompileTime == 1) ? LinearAccessBit : 0,
FlagsLvalueBit = is_lvalue<XprType>::value ? LvalueBit : 0,
FlagsRowMajorBit = IsRowMajor ? RowMajorBit : 0,
@@ -342,7 +342,7 @@ class Block<XprType,BlockRows,BlockCols, InnerPanel,true>
}
const typename XprType::Nested m_xpr;
Index m_outerStride;
int m_outerStride;
};

View File

@@ -169,8 +169,8 @@ template<typename Derived> class DenseBase
IsRowMajor = int(Flags) & RowMajorBit, /**< True if this expression has row-major storage order. */
InnerSizeAtCompileTime = int(IsVectorAtCompileTime) ? int(SizeAtCompileTime)
: int(IsRowMajor) ? int(ColsAtCompileTime) : int(RowsAtCompileTime),
InnerSizeAtCompileTime = int(IsVectorAtCompileTime) ? SizeAtCompileTime
: int(IsRowMajor) ? ColsAtCompileTime : RowsAtCompileTime,
CoeffReadCost = internal::traits<Derived>::CoeffReadCost,
/**< This is a rough measure of how expensive it is to read one coefficient from

View File

@@ -102,7 +102,7 @@ struct traits<Map<PlainObjectType, MapOptions, StrideType> >
|| HasNoOuterStride
|| ( OuterStrideAtCompileTime!=Dynamic
&& ((static_cast<int>(sizeof(Scalar))*OuterStrideAtCompileTime)%16)==0 ) ),
Flags0 = TraitsBase::Flags & (~NestByRefBit),
Flags0 = TraitsBase::Flags,
Flags1 = IsAligned ? (int(Flags0) | AlignedBit) : (int(Flags0) & ~AlignedBit),
Flags2 = (bool(HasNoStride) || bool(PlainObjectType::IsVectorAtCompileTime))
? int(Flags1) : int(Flags1 & ~LinearAccessBit),
@@ -120,6 +120,7 @@ template<typename PlainObjectType, int MapOptions, typename StrideType> class Ma
public:
typedef MapBase<Map> Base;
EIGEN_DENSE_PUBLIC_INTERFACE(Map)
typedef typename Base::PointerType PointerType;
@@ -180,6 +181,7 @@ template<typename PlainObjectType, int MapOptions, typename StrideType> class Ma
PlainObjectType::Base::_check_template_params();
}
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)
protected:

View File

@@ -170,8 +170,8 @@ template<typename Derived> class MapBase<Derived, ReadOnlyAccessors>
EIGEN_STATIC_ASSERT(EIGEN_IMPLIES(internal::traits<Derived>::Flags&PacketAccessBit,
internal::inner_stride_at_compile_time<Derived>::ret==1),
PACKET_ACCESS_REQUIRES_TO_HAVE_INNER_STRIDE_FIXED_TO_1);
eigen_assert(EIGEN_IMPLIES(internal::traits<Derived>::Flags&AlignedBit, (size_t(m_data) % 16) == 0)
&& "data is not aligned");
eigen_assert(EIGEN_IMPLIES(internal::traits<Derived>::Flags&AlignedBit, (size_t(m_data) % (sizeof(Scalar)*internal::packet_traits<Scalar>::size)) == 0)
&& "data is not aligned");
}
PointerType m_data;

View File

@@ -153,6 +153,10 @@ class Matrix
typedef typename Base::PlainObject PlainObject;
enum { NeedsToAlign = (!(Options&DontAlign))
&& SizeAtCompileTime!=Dynamic && ((static_cast<int>(sizeof(Scalar))*SizeAtCompileTime)%16)==0 };
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
using Base::base;
using Base::coeffRef;

View File

@@ -250,8 +250,7 @@ template<typename Derived> class MatrixBase
// huuuge hack. make Eigen2's matrix.part<Diagonal>() work in eigen3. Problem: Diagonal is now a class template instead
// of an integer constant. Solution: overload the part() method template wrt template parameters list.
// Note: replacing next line by "template<template<typename T, int n> class U>" produces a mysterious error C2082 in MSVC.
template<template<typename, int> class U>
template<template<typename T, int n> class U>
const DiagonalWrapper<ConstDiagonalReturnType> part() const
{ return diagonal().asDiagonal(); }
#endif // EIGEN2_SUPPORT

View File

@@ -34,19 +34,6 @@
namespace internal {
template<typename Index>
EIGEN_ALWAYS_INLINE void check_rows_cols_for_overflow(Index rows, Index cols)
{
// http://hg.mozilla.org/mozilla-central/file/6c8a909977d3/xpcom/ds/CheckedInt.h#l242
// we assume Index is signed
Index max_index = (size_t(1) << (8 * sizeof(Index) - 1)) - 1; // assume Index is signed
bool error = (rows < 0 || cols < 0) ? true
: (rows == 0 || cols == 0) ? false
: (rows > max_index / cols);
if (error)
throw_std_bad_alloc();
}
template <typename Derived, typename OtherDerived = Derived, bool IsVector = static_cast<bool>(Derived::IsVectorAtCompileTime)> struct conservative_resize_like_impl;
template<typename MatrixTypeA, typename MatrixTypeB, bool SwapPointers> struct matrix_swap_impl;
@@ -97,12 +84,14 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
template<typename StrideType> struct StridedConstMapType { typedef Eigen::Map<const Derived, Unaligned, StrideType> type; };
template<typename StrideType> struct StridedAlignedMapType { typedef Eigen::Map<Derived, Aligned, StrideType> type; };
template<typename StrideType> struct StridedConstAlignedMapType { typedef Eigen::Map<const Derived, Aligned, StrideType> type; };
protected:
DenseStorage<Scalar, Base::MaxSizeAtCompileTime, Base::RowsAtCompileTime, Base::ColsAtCompileTime, Options> m_storage;
public:
enum { NeedsToAlign = SizeAtCompileTime != Dynamic && (internal::traits<Derived>::Flags & AlignedBit) != 0 };
enum { NeedsToAlign = (!(Options&DontAlign))
&& SizeAtCompileTime!=Dynamic && ((static_cast<int>(sizeof(Scalar))*SizeAtCompileTime)%16)==0 };
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
Base& base() { return *static_cast<Base*>(this); }
@@ -211,13 +200,11 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
{
#ifdef EIGEN_INITIALIZE_MATRICES_BY_ZERO
internal::check_rows_cols_for_overflow(rows, cols);
Index size = rows*cols;
bool size_changed = size != this->size();
m_storage.resize(size, rows, cols);
if(size_changed) EIGEN_INITIALIZE_BY_ZERO_IF_THAT_OPTION_IS_ENABLED
#else
internal::check_rows_cols_for_overflow(rows, cols);
m_storage.resize(rows*cols, rows, cols);
#endif
}
@@ -286,7 +273,6 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
EIGEN_STRONG_INLINE void resizeLike(const EigenBase<OtherDerived>& _other)
{
const OtherDerived& other = _other.derived();
internal::check_rows_cols_for_overflow(other.rows(), other.cols());
const Index othersize = other.rows()*other.cols();
if(RowsAtCompileTime == 1)
{
@@ -431,7 +417,6 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
: m_storage(other.derived().rows() * other.derived().cols(), other.derived().rows(), other.derived().cols())
{
_check_template_params();
internal::check_rows_cols_for_overflow(other.derived().rows(), other.derived().cols());
Base::operator=(other.derived());
}
@@ -596,7 +581,6 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
{
eigen_assert(rows >= 0 && (RowsAtCompileTime == Dynamic || RowsAtCompileTime == rows)
&& cols >= 0 && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == cols));
internal::check_rows_cols_for_overflow(rows, cols);
m_storage.resize(rows*cols,rows,cols);
EIGEN_INITIALIZE_BY_ZERO_IF_THAT_OPTION_IS_ENABLED
}
@@ -654,7 +638,6 @@ struct internal::conservative_resize_like_impl
if ( ( Derived::IsRowMajor && _this.cols() == cols) || // row-major and we change only the number of rows
(!Derived::IsRowMajor && _this.rows() == rows) ) // column-major and we change only the number of columns
{
internal::check_rows_cols_for_overflow(rows, cols);
_this.derived().m_storage.conservativeResize(rows*cols,rows,cols);
}
else

View File

@@ -152,8 +152,7 @@ class ProductBase : public MatrixBase<Derived>
#else
EIGEN_STATIC_ASSERT_SIZE_1x1(Derived)
eigen_assert(this->rows() == 1 && this->cols() == 1);
Matrix<Scalar,1,1> result = *this;
return result.coeff(row,col);
return derived().coeff(row,col);
#endif
}
@@ -161,8 +160,7 @@ class ProductBase : public MatrixBase<Derived>
{
EIGEN_STATIC_ASSERT_SIZE_1x1(Derived)
eigen_assert(this->rows() == 1 && this->cols() == 1);
Matrix<Scalar,1,1> result = *this;
return result.coeff(i);
return derived().coeff(i);
}
const Scalar& coeffRef(Index row, Index col) const
@@ -258,16 +256,16 @@ class ScaledProduct
: Base(prod.lhs(),prod.rhs()), m_prod(prod), m_alpha(x) {}
template<typename Dest>
inline void evalTo(Dest& dst) const { dst.setZero(); scaleAndAddTo(dst, Scalar(1)); }
inline void evalTo(Dest& dst) const { dst.setZero(); scaleAndAddTo(dst,m_alpha); }
template<typename Dest>
inline void addTo(Dest& dst) const { scaleAndAddTo(dst, Scalar(1)); }
inline void addTo(Dest& dst) const { scaleAndAddTo(dst,m_alpha); }
template<typename Dest>
inline void subTo(Dest& dst) const { scaleAndAddTo(dst, Scalar(-1)); }
inline void subTo(Dest& dst) const { scaleAndAddTo(dst,-m_alpha); }
template<typename Dest>
inline void scaleAndAddTo(Dest& dst,Scalar alpha) const { m_prod.derived().scaleAndAddTo(dst,alpha * m_alpha); }
inline void scaleAndAddTo(Dest& dst,Scalar alpha) const { m_prod.derived().scaleAndAddTo(dst,alpha); }
const Scalar& alpha() const { return m_alpha; }

View File

@@ -48,10 +48,7 @@ struct traits<Replicate<MatrixType,RowFactor,ColFactor> >
typedef typename MatrixType::Scalar Scalar;
typedef typename traits<MatrixType>::StorageKind StorageKind;
typedef typename traits<MatrixType>::XprKind XprKind;
enum {
Factor = (RowFactor==Dynamic || ColFactor==Dynamic) ? Dynamic : RowFactor*ColFactor
};
typedef typename nested<MatrixType,Factor>::type MatrixTypeNested;
typedef typename nested<MatrixType>::type MatrixTypeNested;
typedef typename remove_reference<MatrixTypeNested>::type _MatrixTypeNested;
enum {
RowsAtCompileTime = RowFactor==Dynamic || int(MatrixType::RowsAtCompileTime)==Dynamic
@@ -75,8 +72,6 @@ struct traits<Replicate<MatrixType,RowFactor,ColFactor> >
template<typename MatrixType,int RowFactor,int ColFactor> class Replicate
: public internal::dense_xpr_base< Replicate<MatrixType,RowFactor,ColFactor> >::type
{
typedef typename internal::traits<Replicate>::MatrixTypeNested MatrixTypeNested;
typedef typename internal::traits<Replicate>::_MatrixTypeNested _MatrixTypeNested;
public:
typedef typename internal::dense_xpr_base<Replicate>::type Base;
@@ -129,7 +124,7 @@ template<typename MatrixType,int RowFactor,int ColFactor> class Replicate
protected:
const MatrixTypeNested m_matrix;
const typename MatrixType::Nested m_matrix;
const internal::variable_if_dynamic<Index, RowFactor> m_rowFactor;
const internal::variable_if_dynamic<Index, ColFactor> m_colFactor;
};

View File

@@ -180,7 +180,7 @@ void TriangularView<MatrixType,Mode>::solveInPlace(const MatrixBase<OtherDerived
eigen_assert(cols() == rows());
eigen_assert( (Side==OnTheLeft && cols() == other.rows()) || (Side==OnTheRight && cols() == other.cols()) );
eigen_assert(!(Mode & ZeroDiag));
eigen_assert((Mode & (Upper|Lower)) != 0);
eigen_assert(Mode & (Upper|Lower));
enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit && OtherDerived::IsVectorAtCompileTime };
typedef typename internal::conditional<copy,

View File

@@ -27,8 +27,8 @@
namespace internal {
static uint32x4_t p4ui_CONJ_XOR = EIGEN_INIT_NEON_PACKET4(0x00000000, 0x80000000, 0x00000000, 0x80000000);
static uint32x2_t p2ui_CONJ_XOR = EIGEN_INIT_NEON_PACKET2(0x00000000, 0x80000000);
static uint32x4_t p4ui_CONJ_XOR = { 0x00000000, 0x80000000, 0x00000000, 0x80000000 };
static uint32x2_t p2ui_CONJ_XOR = { 0x00000000, 0x80000000 };
//---------- float ----------
struct Packet2cf

View File

@@ -52,16 +52,6 @@ typedef uint32x4_t Packet4ui;
#define _EIGEN_DECLARE_CONST_Packet4i(NAME,X) \
const Packet4i p4i_##NAME = pset1<Packet4i>(X)
#if defined(__llvm__) && !defined(__clang__)
//Special treatment for Apple's llvm-gcc, its NEON packet types are unions
#define EIGEN_INIT_NEON_PACKET2(X, Y) {{X, Y}}
#define EIGEN_INIT_NEON_PACKET4(X, Y, Z, W) {{X, Y, Z, W}}
#else
//Default initializer for packets
#define EIGEN_INIT_NEON_PACKET2(X, Y) {X, Y}
#define EIGEN_INIT_NEON_PACKET4(X, Y, Z, W) {X, Y, Z, W}
#endif
#ifndef __pld
#define __pld(x) asm volatile ( " pld [%[addr]]\n" :: [addr] "r" (x) : "cc" );
#endif
@@ -94,7 +84,7 @@ template<> struct packet_traits<int> : default_packet_traits
};
};
#if EIGEN_GNUC_AT_MOST(4,4) && !defined(__llvm__)
#if EIGEN_GNUC_AT_MOST(4,4)
// workaround gcc 4.2, 4.3 and 4.4 compilatin issue
EIGEN_STRONG_INLINE float32x4_t vld1q_f32(const float* x) { return ::vld1q_f32((const float32_t*)x); }
EIGEN_STRONG_INLINE float32x2_t vld1_f32 (const float* x) { return ::vld1_f32 ((const float32_t*)x); }
@@ -110,12 +100,12 @@ template<> EIGEN_STRONG_INLINE Packet4i pset1<Packet4i>(const int& from) {
template<> EIGEN_STRONG_INLINE Packet4f plset<float>(const float& a)
{
Packet4f countdown = EIGEN_INIT_NEON_PACKET4(0, 1, 2, 3);
Packet4f countdown = { 0, 1, 2, 3 };
return vaddq_f32(pset1<Packet4f>(a), countdown);
}
template<> EIGEN_STRONG_INLINE Packet4i plset<int>(const int& a)
{
Packet4i countdown = EIGEN_INIT_NEON_PACKET4(0, 1, 2, 3);
Packet4i countdown = { 0, 1, 2, 3 };
return vaddq_s32(pset1<Packet4i>(a), countdown);
}
@@ -405,29 +395,25 @@ template<> EIGEN_STRONG_INLINE int predux_max<Packet4i>(const Packet4i& a)
return s[0];
}
// this PALIGN_NEON business is to work around a bug in LLVM Clang 3.0 causing incorrect compilation errors,
// see bug 347 and this LLVM bug: http://llvm.org/bugs/show_bug.cgi?id=11074
#define PALIGN_NEON(Offset,Type,Command) \
template<>\
struct palign_impl<Offset,Type>\
{\
EIGEN_STRONG_INLINE static void run(Type& first, const Type& second)\
{\
if (Offset!=0)\
first = Command(first, second, Offset);\
}\
};\
template<int Offset>
struct palign_impl<Offset,Packet4f>
{
EIGEN_STRONG_INLINE static void run(Packet4f& first, const Packet4f& second)
{
if (Offset!=0)
first = vextq_f32(first, second, Offset);
}
};
PALIGN_NEON(0,Packet4f,vextq_f32)
PALIGN_NEON(1,Packet4f,vextq_f32)
PALIGN_NEON(2,Packet4f,vextq_f32)
PALIGN_NEON(3,Packet4f,vextq_f32)
PALIGN_NEON(0,Packet4i,vextq_s32)
PALIGN_NEON(1,Packet4i,vextq_s32)
PALIGN_NEON(2,Packet4i,vextq_s32)
PALIGN_NEON(3,Packet4i,vextq_s32)
#undef PALIGN_NEON
template<int Offset>
struct palign_impl<Offset,Packet4i>
{
EIGEN_STRONG_INLINE static void run(Packet4i& first, const Packet4i& second)
{
if (Offset!=0)
first = vextq_s32(first, second, Offset);
}
};
} // end namespace internal

View File

@@ -30,16 +30,19 @@ namespace internal {
template<typename _LhsScalar, typename _RhsScalar, bool _ConjLhs=false, bool _ConjRhs=false>
class gebp_traits;
inline std::ptrdiff_t manage_caching_sizes_second_if_negative(std::ptrdiff_t a, std::ptrdiff_t b)
{
return a<=0 ? b : a;
}
/** \internal */
inline void manage_caching_sizes(Action action, std::ptrdiff_t* l1=0, std::ptrdiff_t* l2=0)
{
static std::ptrdiff_t m_l1CacheSize = manage_caching_sizes_second_if_negative(queryL1CacheSize(),8 * 1024);
static std::ptrdiff_t m_l2CacheSize = manage_caching_sizes_second_if_negative(queryTopLevelCacheSize(),1*1024*1024);
static std::ptrdiff_t m_l1CacheSize = 0;
static std::ptrdiff_t m_l2CacheSize = 0;
if(m_l1CacheSize==0)
{
m_l1CacheSize = queryL1CacheSize();
m_l2CacheSize = queryTopLevelCacheSize();
if(m_l1CacheSize<=0) m_l1CacheSize = 8 * 1024;
if(m_l2CacheSize<=0) m_l2CacheSize = 1 * 1024 * 1024;
}
if(action==SetAction)
{
@@ -115,14 +118,14 @@ inline void computeProductBlockingSizes(std::ptrdiff_t& k, std::ptrdiff_t& m, st
// FIXME (a bit overkill maybe ?)
template<typename CJ, typename A, typename B, typename C, typename T> struct gebp_madd_selector {
EIGEN_ALWAYS_INLINE static void run(const CJ& cj, A& a, B& b, C& c, T& /*t*/)
EIGEN_STRONG_INLINE EIGEN_ALWAYS_INLINE_ATTRIB static void run(const CJ& cj, A& a, B& b, C& c, T& /*t*/)
{
c = cj.pmadd(a,b,c);
}
};
template<typename CJ, typename T> struct gebp_madd_selector<CJ,T,T,T,T> {
EIGEN_ALWAYS_INLINE static void run(const CJ& cj, T& a, T& b, T& c, T& t)
EIGEN_STRONG_INLINE EIGEN_ALWAYS_INLINE_ATTRIB static void run(const CJ& cj, T& a, T& b, T& c, T& t)
{
t = b; t = cj.pmul(a,t); c = padd(c,t);
}

View File

@@ -1,4 +1,3 @@
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
@@ -29,7 +28,7 @@
#define EIGEN_WORLD_VERSION 3
#define EIGEN_MAJOR_VERSION 0
#define EIGEN_MINOR_VERSION 5
#define EIGEN_MINOR_VERSION 2
#define EIGEN_VERSION_AT_LEAST(x,y,z) (EIGEN_WORLD_VERSION>x || (EIGEN_WORLD_VERSION>=x && \
(EIGEN_MAJOR_VERSION>y || (EIGEN_MAJOR_VERSION>=y && \
@@ -46,7 +45,7 @@
#define EIGEN_GNUC_AT_MOST(x,y) 0
#endif
#if EIGEN_GNUC_AT_MOST(4,3) && !defined(__clang__)
#if EIGEN_GNUC_AT_MOST(4,3)
// see bug 89
#define EIGEN_SAFE_TO_USE_STANDARD_ASSERT_MACRO 0
#else
@@ -131,34 +130,31 @@
#define EIGEN_MAKESTRING2(a) #a
#define EIGEN_MAKESTRING(a) EIGEN_MAKESTRING2(a)
// EIGEN_ALWAYS_INLINE_ATTRIB should be use in the declaration of function
// which should be inlined even in debug mode.
// FIXME with the always_inline attribute,
// gcc 3.4.x reports the following compilation error:
// Eval.h:91: sorry, unimplemented: inlining failed in call to 'const Eigen::Eval<Derived> Eigen::MatrixBase<Scalar, Derived>::eval() const'
// : function body not available
#if EIGEN_GNUC_AT_LEAST(4,0)
#define EIGEN_ALWAYS_INLINE_ATTRIB __attribute__((always_inline))
#else
#define EIGEN_ALWAYS_INLINE_ATTRIB
#endif
#if EIGEN_GNUC_AT_LEAST(4,1) && !defined(__clang__) && !defined(__INTEL_COMPILER)
#define EIGEN_FLATTEN_ATTRIB __attribute__((flatten))
#else
#define EIGEN_FLATTEN_ATTRIB
#endif
// EIGEN_STRONG_INLINE is a stronger version of the inline, using __forceinline on MSVC,
// but it still doesn't use GCC's always_inline. This is useful in (common) situations where MSVC needs forceinline
// but GCC is still doing fine with just inline.
// EIGEN_FORCE_INLINE means "inline as much as possible"
#if (defined _MSC_VER) || (defined __INTEL_COMPILER)
#define EIGEN_STRONG_INLINE __forceinline
#else
#define EIGEN_STRONG_INLINE inline
#endif
// EIGEN_ALWAYS_INLINE is the stronget, it has the effect of making the function inline and adding every possible
// attribute to maximize inlining. This should only be used when really necessary: in particular,
// it uses __attribute__((always_inline)) on GCC, which most of the time is useless and can severely harm compile times.
// FIXME with the always_inline attribute,
// gcc 3.4.x reports the following compilation error:
// Eval.h:91: sorry, unimplemented: inlining failed in call to 'const Eigen::Eval<Derived> Eigen::MatrixBase<Scalar, Derived>::eval() const'
// : function body not available
#if EIGEN_GNUC_AT_LEAST(4,0)
#define EIGEN_ALWAYS_INLINE __attribute__((always_inline)) inline
#else
#define EIGEN_ALWAYS_INLINE EIGEN_STRONG_INLINE
#endif
#if (defined __GNUC__)
#define EIGEN_DONT_INLINE __attribute__((noinline))
#elif (defined _MSC_VER)
@@ -253,7 +249,7 @@
#define EIGEN_UNUSED_VARIABLE(var) (void)var;
#if (defined __GNUC__)
#define EIGEN_ASM_COMMENT(X) asm("#" X)
#define EIGEN_ASM_COMMENT(X) asm("#"X)
#else
#define EIGEN_ASM_COMMENT(X)
#endif

View File

@@ -82,16 +82,6 @@
namespace internal {
inline void throw_std_bad_alloc()
{
#ifdef EIGEN_EXCEPTIONS
throw std::bad_alloc();
#else
std::size_t huge = -1;
new int[huge];
#endif
}
/*****************************************************************************
*** Implementation of handmade aligned functions ***
*****************************************************************************/
@@ -202,7 +192,7 @@ inline void check_that_malloc_is_allowed()
#endif
/** \internal Allocates \a size bytes. The returned pointer is guaranteed to have 16 bytes alignment.
* On allocation error, the returned pointer is null, and std::bad_alloc is thrown.
* On allocation error, the returned pointer is null, and if exceptions are enabled then a std::bad_alloc is thrown.
*/
inline void* aligned_malloc(size_t size)
{
@@ -223,9 +213,10 @@ inline void* aligned_malloc(size_t size)
result = handmade_aligned_malloc(size);
#endif
if(!result && size)
throw_std_bad_alloc();
#ifdef EIGEN_EXCEPTIONS
if(result == 0)
throw std::bad_alloc();
#endif
return result;
}
@@ -250,7 +241,7 @@ inline void aligned_free(void *ptr)
/**
* \internal
* \brief Reallocates an aligned block of memory.
* \throws std::bad_alloc on allocation failure
* \throws std::bad_alloc if EIGEN_EXCEPTIONS are defined.
**/
inline void* aligned_realloc(void *ptr, size_t new_size, size_t old_size)
{
@@ -278,9 +269,10 @@ inline void* aligned_realloc(void *ptr, size_t new_size, size_t old_size)
result = handmade_aligned_realloc(ptr,new_size,old_size);
#endif
if (!result && new_size)
throw_std_bad_alloc();
#ifdef EIGEN_EXCEPTIONS
if (result==0 && new_size!=0)
throw std::bad_alloc();
#endif
return result;
}
@@ -289,7 +281,7 @@ inline void* aligned_realloc(void *ptr, size_t new_size, size_t old_size)
*****************************************************************************/
/** \internal Allocates \a size bytes. If Align is true, then the returned ptr is 16-byte-aligned.
* On allocation error, the returned pointer is null, and a std::bad_alloc is thrown.
* On allocation error, the returned pointer is null, and if exceptions are enabled then a std::bad_alloc is thrown.
*/
template<bool Align> inline void* conditional_aligned_malloc(size_t size)
{
@@ -301,8 +293,9 @@ template<> inline void* conditional_aligned_malloc<false>(size_t size)
check_that_malloc_is_allowed();
void *result = std::malloc(size);
if(!result && size)
throw_std_bad_alloc();
#ifdef EIGEN_EXCEPTIONS
if(!result) throw std::bad_alloc();
#endif
return result;
}
@@ -354,27 +347,18 @@ template<typename T> inline void destruct_elements_of_array(T *ptr, size_t size)
*** Implementation of aligned new/delete-like functions ***
*****************************************************************************/
template<typename T>
EIGEN_ALWAYS_INLINE void check_size_for_overflow(size_t size)
{
if(size > size_t(-1) / sizeof(T))
throw_std_bad_alloc();
}
/** \internal Allocates \a size objects of type T. The returned pointer is guaranteed to have 16 bytes alignment.
* On allocation error, the returned pointer is undefined, but a std::bad_alloc is thrown.
* On allocation error, the returned pointer is undefined, but if exceptions are enabled then a std::bad_alloc is thrown.
* The default constructor of T is called.
*/
template<typename T> inline T* aligned_new(size_t size)
{
check_size_for_overflow<T>(size);
T *result = reinterpret_cast<T*>(aligned_malloc(sizeof(T)*size));
return construct_elements_of_array(result, size);
}
template<typename T, bool Align> inline T* conditional_aligned_new(size_t size)
{
check_size_for_overflow<T>(size);
T *result = reinterpret_cast<T*>(conditional_aligned_malloc<Align>(sizeof(T)*size));
return construct_elements_of_array(result, size);
}
@@ -399,8 +383,6 @@ template<typename T, bool Align> inline void conditional_aligned_delete(T *ptr,
template<typename T, bool Align> inline T* conditional_aligned_realloc_new(T* pts, size_t new_size, size_t old_size)
{
check_size_for_overflow<T>(new_size);
check_size_for_overflow<T>(old_size);
if(new_size < old_size)
destruct_elements_of_array(pts+new_size, old_size-new_size);
T *result = reinterpret_cast<T*>(conditional_aligned_realloc<Align>(reinterpret_cast<void*>(pts), sizeof(T)*new_size, sizeof(T)*old_size));
@@ -412,7 +394,6 @@ template<typename T, bool Align> inline T* conditional_aligned_realloc_new(T* pt
template<typename T, bool Align> inline T* conditional_aligned_new_auto(size_t size)
{
check_size_for_overflow<T>(size);
T *result = reinterpret_cast<T*>(conditional_aligned_malloc<Align>(sizeof(T)*size));
if(NumTraits<T>::RequireInitialization)
construct_elements_of_array(result, size);
@@ -421,8 +402,6 @@ template<typename T, bool Align> inline T* conditional_aligned_new_auto(size_t s
template<typename T, bool Align> inline T* conditional_aligned_realloc_new_auto(T* pts, size_t new_size, size_t old_size)
{
check_size_for_overflow<T>(new_size);
check_size_for_overflow<T>(old_size);
if(NumTraits<T>::RequireInitialization && (new_size < old_size))
destruct_elements_of_array(pts+new_size, old_size-new_size);
T *result = reinterpret_cast<T*>(conditional_aligned_realloc<Align>(reinterpret_cast<void*>(pts), sizeof(T)*new_size, sizeof(T)*old_size));
@@ -557,7 +536,6 @@ template<typename T> class aligned_stack_memory_handler
#endif
#define ei_declare_aligned_stack_constructed_variable(TYPE,NAME,SIZE,BUFFER) \
Eigen::internal::check_size_for_overflow<TYPE>(SIZE); \
TYPE* NAME = (BUFFER)!=0 ? (BUFFER) \
: reinterpret_cast<TYPE*>( \
(sizeof(TYPE)*SIZE<=EIGEN_STACK_ALLOCATION_LIMIT) ? EIGEN_ALIGNED_ALLOCA(sizeof(TYPE)*SIZE) \
@@ -567,7 +545,6 @@ template<typename T> class aligned_stack_memory_handler
#else
#define ei_declare_aligned_stack_constructed_variable(TYPE,NAME,SIZE,BUFFER) \
Eigen::internal::check_size_for_overflow<TYPE>(SIZE); \
TYPE* NAME = (BUFFER)!=0 ? BUFFER : reinterpret_cast<TYPE*>(Eigen::internal::aligned_malloc(sizeof(TYPE)*SIZE)); \
Eigen::internal::aligned_stack_memory_handler<TYPE> EIGEN_CAT(NAME,_stack_memory_destructor)((BUFFER)==0 ? NAME : 0,SIZE,true)
@@ -692,7 +669,6 @@ public:
pointer allocate( size_type num, const void* hint = 0 )
{
EIGEN_UNUSED_VARIABLE(hint);
internal::check_size_for_overflow<T>(num);
return static_cast<pointer>( internal::aligned_malloc( num * sizeof(T) ) );
}

View File

@@ -125,9 +125,10 @@ class compute_matrix_flags
aligned_bit =
(
((Options&DontAlign)==0)
&& packet_traits<Scalar>::Vectorizable
&& (
#if EIGEN_ALIGN_STATICALLY
((!is_dynamic_size_storage) && (((MaxCols*MaxRows*int(sizeof(Scalar))) % 16) == 0))
((!is_dynamic_size_storage) && (((MaxCols*MaxRows) % packet_traits<Scalar>::size) == 0))
#else
0
#endif

View File

@@ -291,7 +291,7 @@ template<typename _MatrixType> class EigenSolver
ComputationInfo info() const
{
eigen_assert(m_isInitialized && "EigenSolver is not initialized.");
eigen_assert(m_isInitialized && "ComplexEigenSolver is not initialized.");
return m_realSchur.info();
}
@@ -339,7 +339,7 @@ typename EigenSolver<MatrixType>::EigenvectorsType EigenSolver<MatrixType>::eige
EigenvectorsType matV(n,n);
for (Index j=0; j<n; ++j)
{
if (internal::isMuchSmallerThan(internal::imag(m_eivalues.coeff(j)), internal::real(m_eivalues.coeff(j))) || j+1==n)
if (internal::isMuchSmallerThan(internal::imag(m_eivalues.coeff(j)), internal::real(m_eivalues.coeff(j))))
{
// we have a real eigen value
matV.col(j) = m_eivec.col(j).template cast<ComplexScalar>();
@@ -570,13 +570,10 @@ void EigenSolver<MatrixType>::doComputeEigenvectors()
}
}
// We handled a pair of complex conjugate eigenvalues, so need to skip them both
n--;
}
else
{
eigen_assert(0 && "Internal bug in EigenSolver"); // this should not happen
eigen_assert("Internal bug in EigenSolver"); // this should not happen
}
}

View File

@@ -307,8 +307,7 @@ template<typename _MatrixType> class SelfAdjointEigenSolver
/** \brief Maximum number of iterations.
*
* The algorithm terminates if it does not converge within m_maxIterations * n iterations, where n
* denotes the size of the matrix. This value is currently set to 30 (copied from LAPACK).
* Maximum number of iterations allowed for an eigenvalue to converge.
*/
static const int m_maxIterations = 30;
@@ -408,7 +407,7 @@ SelfAdjointEigenSolver<MatrixType>& SelfAdjointEigenSolver<MatrixType>
Index end = n-1;
Index start = 0;
Index iter = 0; // total number of iterations
Index iter = 0; // number of iterations we are working on one element
while (end>0)
{
@@ -419,14 +418,15 @@ SelfAdjointEigenSolver<MatrixType>& SelfAdjointEigenSolver<MatrixType>
// find the largest unreduced block
while (end>0 && m_subdiag[end-1]==0)
{
iter = 0;
end--;
}
if (end<=0)
break;
// if we spent too many iterations, we give up
// if we spent too many iterations on the current element, we give up
iter++;
if(iter > m_maxIterations * n) break;
if(iter > m_maxIterations) break;
start = end - 1;
while (start>0 && m_subdiag[start-1]!=0)
@@ -435,7 +435,7 @@ SelfAdjointEigenSolver<MatrixType>& SelfAdjointEigenSolver<MatrixType>
internal::tridiagonal_qr_step<MatrixType::Flags&RowMajorBit ? RowMajor : ColMajor>(diag.data(), m_subdiag.data(), start, end, computeEigenvectors ? m_eivec.data() : (Scalar*)0, n);
}
if (iter <= m_maxIterations * n)
if (iter <= m_maxIterations)
m_info = Success;
else
m_info = NoConvergence;

View File

@@ -225,7 +225,7 @@ public:
normal() = mat * normal();
else
{
eigen_assert(0 && "invalid traits value in Hyperplane::transform()");
eigen_assert("invalid traits value in Hyperplane::transform()");
}
return *this;
}

View File

@@ -182,9 +182,10 @@ public:
template<typename NewScalarType>
inline typename internal::cast_return_type<Derived,Quaternion<NewScalarType> >::type cast() const
{
return typename internal::cast_return_type<Derived,Quaternion<NewScalarType> >::type(derived());
return typename internal::cast_return_type<Derived,Quaternion<NewScalarType> >::type(
coeffs().template cast<NewScalarType>());
}
#ifdef EIGEN_QUATERNIONBASE_PLUGIN
# include EIGEN_QUATERNIONBASE_PLUGIN
#endif
@@ -224,25 +225,22 @@ struct traits<Quaternion<_Scalar,_Options> >
typedef _Scalar Scalar;
typedef Matrix<_Scalar,4,1,_Options> Coefficients;
enum{
IsAligned = internal::traits<Coefficients>::Flags & AlignedBit,
IsAligned = bool(EIGEN_ALIGN) && ((int(_Options)&Aligned)==Aligned),
Flags = IsAligned ? (AlignedBit | LvalueBit) : LvalueBit
};
};
}
template<typename _Scalar, int _Options>
class Quaternion : public QuaternionBase<Quaternion<_Scalar,_Options> >
{
class Quaternion : public QuaternionBase<Quaternion<_Scalar,_Options> >{
typedef QuaternionBase<Quaternion<_Scalar,_Options> > Base;
enum { IsAligned = internal::traits<Quaternion>::IsAligned };
public:
typedef _Scalar Scalar;
EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Quaternion)
using Base::operator*=;
typedef typename internal::traits<Quaternion>::Coefficients Coefficients;
typedef typename internal::traits<Quaternion<Scalar,_Options> >::Coefficients Coefficients;
typedef typename Base::AngleAxisType AngleAxisType;
/** Default constructor leaving the quaternion uninitialized. */
@@ -273,16 +271,9 @@ public:
template<typename Derived>
explicit inline Quaternion(const MatrixBase<Derived>& other) { *this = other; }
/** Explicit copy constructor with scalar conversion */
template<typename OtherScalar, int OtherOptions>
explicit inline Quaternion(const Quaternion<OtherScalar, OtherOptions>& other)
{ m_coeffs = other.coeffs().template cast<Scalar>(); }
inline Coefficients& coeffs() { return m_coeffs;}
inline const Coefficients& coeffs() const { return m_coeffs;}
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(IsAligned)
protected:
Coefficients m_coeffs;
@@ -682,7 +673,7 @@ QuaternionBase<Derived>::slerp(Scalar t, const QuaternionBase<OtherDerived>& oth
Scalar scale0;
Scalar scale1;
if(absD>=one)
if (absD>=one)
{
scale0 = Scalar(1) - t;
scale1 = t;
@@ -695,8 +686,9 @@ QuaternionBase<Derived>::slerp(Scalar t, const QuaternionBase<OtherDerived>& oth
scale0 = internal::sin( ( Scalar(1) - t ) * theta) / sinTheta;
scale1 = internal::sin( ( t * theta) ) / sinTheta;
if (d<0)
scale1 = -scale1;
}
if(d<0) scale1 = -scale1;
return Quaternion<Scalar>(scale0 * coeffs() + scale1 * other.coeffs());
}

View File

@@ -89,7 +89,7 @@ public:
/** Concatenates two rotations */
inline Rotation2D& operator*=(const Rotation2D& other)
{ m_angle += other.m_angle; return *this; }
{ return m_angle += other.m_angle; return *this; }
/** Applies the rotation to a 2D vector */
Vector2 operator* (const Vector2& vec) const

View File

@@ -61,7 +61,7 @@ template< typename Lhs,
typename Rhs,
bool AnyProjective =
transform_traits<Lhs>::IsProjective ||
transform_traits<Rhs>::IsProjective>
transform_traits<Lhs>::IsProjective>
struct transform_transform_product_impl;
template< typename Other,
@@ -1391,35 +1391,6 @@ struct transform_transform_product_impl<Transform<Scalar,Dim,LhsMode,LhsOptions>
}
};
template<typename Scalar, int Dim, int LhsOptions, int RhsOptions>
struct transform_transform_product_impl<Transform<Scalar,Dim,AffineCompact,LhsOptions>,Transform<Scalar,Dim,Projective,RhsOptions>,true >
{
typedef Transform<Scalar,Dim,AffineCompact,LhsOptions> Lhs;
typedef Transform<Scalar,Dim,Projective,RhsOptions> Rhs;
typedef Transform<Scalar,Dim,Projective> ResultType;
static ResultType run(const Lhs& lhs, const Rhs& rhs)
{
ResultType res;
res.matrix().template topRows<Dim>() = lhs.matrix() * rhs.matrix();
res.matrix().row(Dim) = rhs.matrix().row(Dim);
return res;
}
};
template<typename Scalar, int Dim, int LhsOptions, int RhsOptions>
struct transform_transform_product_impl<Transform<Scalar,Dim,Projective,LhsOptions>,Transform<Scalar,Dim,AffineCompact,RhsOptions>,true >
{
typedef Transform<Scalar,Dim,Projective,LhsOptions> Lhs;
typedef Transform<Scalar,Dim,AffineCompact,RhsOptions> Rhs;
typedef Transform<Scalar,Dim,Projective> ResultType;
static ResultType run(const Lhs& lhs, const Rhs& rhs)
{
ResultType res(lhs.matrix().template leftCols<Dim>() * rhs.matrix());
res.matrix().col(Dim) += lhs.matrix().col(Dim);
return res;
}
};
} // end namespace internal
#endif // EIGEN_TRANSFORM_H

View File

@@ -96,7 +96,7 @@ struct quat_product<Architecture::SSE, Derived, OtherDerived, double, Aligned>
*/
t1 = padd(pmul(a_ww, b_xy), pmul(a_yy, b_zw));
t2 = psub(pmul(a_zz, b_xy), pmul(a_xx, b_zw));
#ifdef EIGEN_VECTORIZE_SSE3
#ifdef __SSE3__
EIGEN_UNUSED_VARIABLE(mask)
pstore(&res.x(), _mm_addsub_pd(t1, preverse(t2)));
#else
@@ -110,7 +110,7 @@ struct quat_product<Architecture::SSE, Derived, OtherDerived, double, Aligned>
*/
t1 = psub(pmul(a_ww, b_zw), pmul(a_yy, b_xy));
t2 = padd(pmul(a_zz, b_zw), pmul(a_xx, b_xy));
#ifdef EIGEN_VECTORIZE_SSE3
#ifdef __SSE3__
EIGEN_UNUSED_VARIABLE(mask)
pstore(&res.z(), preverse(_mm_addsub_pd(preverse(t1), t2)));
#else

View File

@@ -443,6 +443,7 @@ FullPivLU<MatrixType>& FullPivLU<MatrixType>::compute(const MatrixType& matrix)
m_nonzero_pivots = size; // the generic case is that in which all pivots are nonzero (invertible case)
m_maxpivot = RealScalar(0);
RealScalar cutoff(0);
for(Index k = 0; k < size; ++k)
{
@@ -457,7 +458,14 @@ FullPivLU<MatrixType>& FullPivLU<MatrixType>::compute(const MatrixType& matrix)
row_of_biggest_in_corner += k; // correct the values! since they were computed in the corner,
col_of_biggest_in_corner += k; // need to add k to them.
if(biggest_in_corner==RealScalar(0))
// when k==0, biggest_in_corner is the biggest coeff absolute value in the original matrix
if(k == 0) cutoff = biggest_in_corner * NumTraits<Scalar>::epsilon();
// if the pivot (hence the corner) is "zero", terminate to avoid generating nan/inf values.
// Notice that using an exact comparison (biggest_in_corner==0) here, as Golub-van Loan do in
// their pseudo-code, results in numerical instability! The cutoff here has been validated
// by running the unit test 'lu' with many repetitions.
if(biggest_in_corner < cutoff)
{
// before exiting, make sure to initialize the still uninitialized transpositions
// in a sane state without destroying what we already have.

View File

@@ -55,7 +55,7 @@ struct compute_inverse_size4<Architecture::SSE, float, MatrixType, ResultType>
static void run(const MatrixType& matrix, ResultType& result)
{
EIGEN_ALIGN16 const unsigned int _Sign_PNNP[4] = { 0x00000000, 0x80000000, 0x80000000, 0x00000000 };
EIGEN_ALIGN16 const int _Sign_PNNP[4] = { 0x00000000, 0x80000000, 0x80000000, 0x00000000 };
// Load the full matrix into registers
__m128 _L1 = matrix.template packet<MatrixAlignment>( 0);

View File

@@ -590,9 +590,6 @@ JacobiSVD<MatrixType, QRPreconditioner>::compute(const MatrixType& matrix, unsig
// only worsening the precision of U and V as we accumulate more rotations
const RealScalar precision = RealScalar(2) * NumTraits<Scalar>::epsilon();
// limit for very small denormal numbers to be considered zero in order to avoid infinite loops (see bug 286)
const RealScalar considerAsZero = RealScalar(2) * std::numeric_limits<RealScalar>::denorm_min();
/*** step 1. The R-SVD step: we use a QR decomposition to reduce to the case of a square matrix */
if(!internal::qr_preconditioner_impl<MatrixType, QRPreconditioner, internal::PreconditionIfMoreColsThanRows>::run(*this, matrix)
@@ -620,11 +617,10 @@ JacobiSVD<MatrixType, QRPreconditioner>::compute(const MatrixType& matrix, unsig
{
// if this 2x2 sub-matrix is not diagonal already...
// notice that this comparison will evaluate to false if any NaN is involved, ensuring that NaN's don't
// keep us iterating forever. Similarly, small denormal numbers are considered zero.
// keep us iterating forever.
using std::max;
RealScalar threshold = (max)(considerAsZero, precision * (max)(internal::abs(m_workMatrix.coeff(p,p)),
internal::abs(m_workMatrix.coeff(q,q))));
if((max)(internal::abs(m_workMatrix.coeff(p,q)),internal::abs(m_workMatrix.coeff(q,p))) > threshold)
if((max)(internal::abs(m_workMatrix.coeff(p,q)),internal::abs(m_workMatrix.coeff(q,p)))
> (max)(internal::abs(m_workMatrix.coeff(p,p)),internal::abs(m_workMatrix.coeff(q,q)))*precision)
{
finished = false;
@@ -708,13 +704,6 @@ struct solve_retval<JacobiSVD<_MatrixType, QRPreconditioner>, Rhs>
};
} // end namespace internal
/** \svd_module
*
* \return the singular value decomposition of \c *this computed by two-sided
* Jacobi transformations.
*
* \sa class JacobiSVD
*/
template<typename Derived>
JacobiSVD<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::jacobiSvd(unsigned int computationOptions) const

View File

@@ -171,7 +171,7 @@ void SparseTriangularView<ExpressionType,Mode>::solveInPlace(MatrixBase<OtherDer
eigen_assert(m_matrix.cols() == m_matrix.rows());
eigen_assert(m_matrix.cols() == other.rows());
eigen_assert(!(Mode & ZeroDiag));
eigen_assert((Mode & (Upper|Lower)) != 0);
eigen_assert(Mode & (Upper|Lower));
enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit };
@@ -298,7 +298,7 @@ void SparseTriangularView<ExpressionType,Mode>::solveInPlace(SparseMatrixBase<Ot
eigen_assert(m_matrix.cols() == m_matrix.rows());
eigen_assert(m_matrix.cols() == other.rows());
eigen_assert(!(Mode & ZeroDiag));
eigen_assert((Mode & (Upper|Lower)) != 0);
eigen_assert(Mode & (Upper|Lower));
// enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit };

5
extern/SConscript vendored
View File

@@ -34,8 +34,3 @@ if env['WITH_BF_LIBMV']:
if env['WITH_BF_CARVE']:
SConscript(['carve/SConscript'])
if env['WITH_GHOST_XDND']:
# FreeBSD doesn't seems to support XDND protocol
if env['OURPLATFORM'] in ('linux', 'openbsd3', 'sunos5', 'aix4', 'aix5'):
SConscript(['xdnd/SConscript'])

View File

@@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# The Original Code is Copyright (C) 2008 by The Blender Foundation
# All rights reserved.

View File

@@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.

View File

@@ -1,42 +0,0 @@
Index: src/LinearMath/btSerializer.h
===================================================================
--- src/LinearMath/btSerializer.h (revision 46625)
+++ src/LinearMath/btSerializer.h (working copy)
@@ -106,23 +106,23 @@
#define BT_HEADER_LENGTH 12
#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
-# define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
+# define BT_MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
#else
-# define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
+# define BT_MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
#endif
-#define BT_SOFTBODY_CODE MAKE_ID('S','B','D','Y')
-#define BT_COLLISIONOBJECT_CODE MAKE_ID('C','O','B','J')
-#define BT_RIGIDBODY_CODE MAKE_ID('R','B','D','Y')
-#define BT_CONSTRAINT_CODE MAKE_ID('C','O','N','S')
-#define BT_BOXSHAPE_CODE MAKE_ID('B','O','X','S')
-#define BT_QUANTIZED_BVH_CODE MAKE_ID('Q','B','V','H')
-#define BT_TRIANLGE_INFO_MAP MAKE_ID('T','M','A','P')
-#define BT_SHAPE_CODE MAKE_ID('S','H','A','P')
-#define BT_ARRAY_CODE MAKE_ID('A','R','A','Y')
-#define BT_SBMATERIAL_CODE MAKE_ID('S','B','M','T')
-#define BT_SBNODE_CODE MAKE_ID('S','B','N','D')
-#define BT_DNA_CODE MAKE_ID('D','N','A','1')
+#define BT_SOFTBODY_CODE BT_MAKE_ID('S','B','D','Y')
+#define BT_COLLISIONOBJECT_CODE BT_MAKE_ID('C','O','B','J')
+#define BT_RIGIDBODY_CODE BT_MAKE_ID('R','B','D','Y')
+#define BT_CONSTRAINT_CODE BT_MAKE_ID('C','O','N','S')
+#define BT_BOXSHAPE_CODE BT_MAKE_ID('B','O','X','S')
+#define BT_QUANTIZED_BVH_CODE BT_MAKE_ID('Q','B','V','H')
+#define BT_TRIANLGE_INFO_MAP BT_MAKE_ID('T','M','A','P')
+#define BT_SHAPE_CODE BT_MAKE_ID('S','H','A','P')
+#define BT_ARRAY_CODE BT_MAKE_ID('A','R','A','Y')
+#define BT_SBMATERIAL_CODE BT_MAKE_ID('S','B','M','T')
+#define BT_SBNODE_CODE BT_MAKE_ID('S','B','N','D')
+#define BT_DNA_CODE BT_MAKE_ID('D','N','A','1')
struct btPointerUid

View File

@@ -15,7 +15,3 @@ Once that is done all build systems can be updated to use/build extern/bullet2 f
Questions? mail blender at erwincoumans.com, or check the bf-blender mailing list.
Thanks,
Erwin
Apply patches/make_id.patch to prevent duplicated define of MAKE_ID macro in blender
side and bullet side.
Sergey

View File

@@ -78,10 +78,8 @@ ATTRIBUTE_ALIGNED16 (struct) btQuantizedBvhNode
int getTriangleIndex() const
{
btAssert(isLeafNode());
unsigned int x=0;
unsigned int y = (~(x&0))<<(31-MAX_NUM_PARTS_IN_BITS);
// Get only the lower bits where the triangle index is stored
return (m_escapeIndexOrTriangleIndex&~(y));
return (m_escapeIndexOrTriangleIndex&~((~0)<<(31-MAX_NUM_PARTS_IN_BITS)));
}
int getPartId() const
{

View File

@@ -354,7 +354,7 @@ public:
//! Calcs global transform of the offsets
/*!
Calcs the global transform for the joint offset for body A an B, and also calcs the angle differences between the bodies.
Calcs the global transform for the joint offset for body A an B, and also calcs the agle differences between the bodies.
\sa btGeneric6DofConstraint.getCalculatedTransformA , btGeneric6DofConstraint.getCalculatedTransformB, btGeneric6DofConstraint.calculateAngleInfo
*/
void calculateTransforms(const btTransform& transA,const btTransform& transB);

View File

@@ -2780,23 +2780,21 @@ void btSoftBody::PSolve_RContacts(btSoftBody* psb, btScalar kst, btScalar ti)
{
const RContact& c = psb->m_rcontacts[i];
const sCti& cti = c.m_cti;
btRigidBody* tmpRigid = btRigidBody::upcast(cti.m_colObj);
if (cti.m_colObj->hasContactResponse()) {
btRigidBody* tmpRigid = btRigidBody::upcast(cti.m_colObj);
const btVector3 va = tmpRigid ? tmpRigid->getVelocityInLocalPoint(c.m_c1)*dt : btVector3(0,0,0);
const btVector3 vb = c.m_node->m_x-c.m_node->m_q;
const btVector3 vr = vb-va;
const btScalar dn = btDot(vr, cti.m_normal);
if(dn<=SIMD_EPSILON)
{
const btScalar dp = btMin( (btDot(c.m_node->m_x, cti.m_normal) + cti.m_offset), mrg );
const btVector3 fv = vr - (cti.m_normal * dn);
// c0 is the impulse matrix, c3 is 1 - the friction coefficient or 0, c4 is the contact hardness coefficient
const btVector3 impulse = c.m_c0 * ( (vr - (fv * c.m_c3) + (cti.m_normal * (dp * c.m_c4))) * kst );
c.m_node->m_x -= impulse * c.m_c2;
if (tmpRigid)
tmpRigid->applyImpulse(impulse,c.m_c1);
}
const btVector3 va = tmpRigid ? tmpRigid->getVelocityInLocalPoint(c.m_c1)*dt : btVector3(0,0,0);
const btVector3 vb = c.m_node->m_x-c.m_node->m_q;
const btVector3 vr = vb-va;
const btScalar dn = btDot(vr, cti.m_normal);
if(dn<=SIMD_EPSILON)
{
const btScalar dp = btMin( (btDot(c.m_node->m_x, cti.m_normal) + cti.m_offset), mrg );
const btVector3 fv = vr - (cti.m_normal * dn);
// c0 is the impulse matrix, c3 is 1 - the friction coefficient or 0, c4 is the contact hardness coefficient
const btVector3 impulse = c.m_c0 * ( (vr - (fv * c.m_c3) + (cti.m_normal * (dp * c.m_c4))) * kst );
c.m_node->m_x -= impulse * c.m_c2;
if (tmpRigid)
tmpRigid->applyImpulse(impulse,c.m_c1);
}
}
}

View File

@@ -45,9 +45,7 @@ struct btTriIndex
int getTriangleIndex() const
{
// Get only the lower bits where the triangle index is stored
unsigned int x = 0;
unsigned int y = (~(x&0))<<(31-MAX_NUM_PARTS_IN_BITS);
return (m_PartIdTriangleIndex&~(y));
return (m_PartIdTriangleIndex&~((~0)<<(31-MAX_NUM_PARTS_IN_BITS)));
}
int getPartId() const
{

View File

@@ -106,23 +106,23 @@ public:
#define BT_HEADER_LENGTH 12
#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
# define BT_MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
# define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
#else
# define BT_MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
# define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
#endif
#define BT_SOFTBODY_CODE BT_MAKE_ID('S','B','D','Y')
#define BT_COLLISIONOBJECT_CODE BT_MAKE_ID('C','O','B','J')
#define BT_RIGIDBODY_CODE BT_MAKE_ID('R','B','D','Y')
#define BT_CONSTRAINT_CODE BT_MAKE_ID('C','O','N','S')
#define BT_BOXSHAPE_CODE BT_MAKE_ID('B','O','X','S')
#define BT_QUANTIZED_BVH_CODE BT_MAKE_ID('Q','B','V','H')
#define BT_TRIANLGE_INFO_MAP BT_MAKE_ID('T','M','A','P')
#define BT_SHAPE_CODE BT_MAKE_ID('S','H','A','P')
#define BT_ARRAY_CODE BT_MAKE_ID('A','R','A','Y')
#define BT_SBMATERIAL_CODE BT_MAKE_ID('S','B','M','T')
#define BT_SBNODE_CODE BT_MAKE_ID('S','B','N','D')
#define BT_DNA_CODE BT_MAKE_ID('D','N','A','1')
#define BT_SOFTBODY_CODE MAKE_ID('S','B','D','Y')
#define BT_COLLISIONOBJECT_CODE MAKE_ID('C','O','B','J')
#define BT_RIGIDBODY_CODE MAKE_ID('R','B','D','Y')
#define BT_CONSTRAINT_CODE MAKE_ID('C','O','N','S')
#define BT_BOXSHAPE_CODE MAKE_ID('B','O','X','S')
#define BT_QUANTIZED_BVH_CODE MAKE_ID('Q','B','V','H')
#define BT_TRIANLGE_INFO_MAP MAKE_ID('T','M','A','P')
#define BT_SHAPE_CODE MAKE_ID('S','H','A','P')
#define BT_ARRAY_CODE MAKE_ID('A','R','A','Y')
#define BT_SBMATERIAL_CODE MAKE_ID('S','B','M','T')
#define BT_SBNODE_CODE MAKE_ID('S','B','N','D')
#define BT_DNA_CODE MAKE_ID('D','N','A','1')
struct btPointerUid

View File

@@ -11,7 +11,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
defs += ' WIN32 NDEBUG _WINDOWS'
#cflags += ['/MT', '/W3', '/GX', '/O2', '/Op']
cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6', '/O3', '/EHcs']
elif env['OURPLATFORM'] in ('win32-mingw', 'linuxcross', 'win64-mingw'):
elif env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'):
defs += ' NDEBUG'
cflags += ['-O2']
elif env['OURPLATFORM'] in ('linux', 'freebsd4', 'freebsd5'):

View File

@@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.
@@ -35,115 +35,115 @@ set(INC_SYS
)
set(SRC
lib/aabb.cpp
lib/carve.cpp
lib/convex_hull.cpp
lib/csg_collector.cpp
lib/csg.cpp
lib/edge.cpp
lib/face.cpp
lib/geom2d.cpp
lib/geom3d.cpp
lib/mesh.cpp
lib/intersect_group.cpp
lib/intersect_classify_edge.cpp
lib/intersect_classify_group.cpp
lib/intersect.cpp
lib/intersect_debug.cpp
lib/intersect_face_division.cpp
lib/intersect_group.cpp
lib/intersect_half_classify_group.cpp
lib/intersection.cpp
lib/math.cpp
lib/mesh.cpp
lib/octree.cpp
lib/pointset.cpp
lib/polyhedron.cpp
lib/geom3d.cpp
lib/polyline.cpp
lib/tag.cpp
lib/timing.cpp
lib/csg_collector.cpp
lib/triangulator.cpp
lib/intersect_face_division.cpp
lib/intersect_half_classify_group.cpp
lib/edge.cpp
lib/math.cpp
lib/geom2d.cpp
lib/tag.cpp
lib/intersection.cpp
lib/convex_hull.cpp
lib/csg.cpp
lib/intersect.cpp
lib/face.cpp
lib/pointset.cpp
lib/timing.cpp
lib/octree.cpp
lib/aabb.cpp
lib/intersect_debug.cpp
lib/csg_collector.hpp
lib/csg_data.hpp
lib/csg_detail.hpp
lib/intersect_classify_common.hpp
lib/intersect_classify_common_impl.hpp
lib/csg_data.hpp
lib/csg_collector.hpp
lib/intersect_common.hpp
lib/intersect_classify_common_impl.hpp
lib/csg_detail.hpp
lib/intersect_debug.hpp
include/carve/aabb.hpp
include/carve/aabb_impl.hpp
include/carve/carve.hpp
include/carve/cbrt.h
include/carve/classification.hpp
include/carve/polyhedron_decl.hpp
include/carve/geom2d.hpp
include/carve/exact.hpp
include/carve/triangulator_impl.hpp
include/carve/collection.hpp
include/carve/collection_types.hpp
include/carve/collection/unordered/boost_impl.hpp
include/carve/collection/unordered/fallback_impl.hpp
include/carve/collection/unordered.hpp
include/carve/collection/unordered/libstdcpp_impl.hpp
include/carve/pointset.hpp
include/carve/djset.hpp
include/carve/kd_node.hpp
include/carve/polyline.hpp
include/carve/polyline_iter.hpp
include/carve/geom3d.hpp
include/carve/edge_decl.hpp
include/carve/face_decl.hpp
include/carve/aabb_impl.hpp
include/carve/colour.hpp
include/carve/pointset_iter.hpp
include/carve/polyline_decl.hpp
include/carve/rescale.hpp
include/carve/mesh_impl.hpp
include/carve/classification.hpp
include/carve/util.hpp
include/carve/triangulator.hpp
include/carve/polyhedron_base.hpp
include/carve/rtree.hpp
include/carve/math.hpp
include/carve/math_constants.hpp
include/carve/octree_decl.hpp
include/carve/input.hpp
include/carve/mesh_ops.hpp
include/carve/debug_hooks.hpp
include/carve/mesh_simplify.hpp
include/carve/interpolator.hpp
include/carve/poly_decl.hpp
include/carve/csg.hpp
include/carve/mesh.hpp
include/carve/carve.hpp
include/carve/gnu_cxx.h
include/carve/polyhedron_impl.hpp
include/carve/poly_impl.hpp
include/carve/aabb.hpp
include/carve/convex_hull.hpp
include/carve/vertex_decl.hpp
include/carve/win32.h
include/carve/edge_impl.hpp
include/carve/tag.hpp
include/carve/tree.hpp
include/carve/heap.hpp
include/carve/matrix.hpp
include/carve/poly.hpp
include/carve/vector.hpp
include/carve/intersection.hpp
include/carve/faceloop.hpp
include/carve/geom_impl.hpp
include/carve/octree_impl.hpp
include/carve/spacetree.hpp
include/carve/collection/unordered/std_impl.hpp
include/carve/collection/unordered/tr1_impl.hpp
include/carve/collection/unordered/libstdcpp_impl.hpp
include/carve/collection/unordered/boost_impl.hpp
include/carve/collection/unordered/vcpp_impl.hpp
include/carve/colour.hpp
include/carve/convex_hull.hpp
include/carve/csg.hpp
include/carve/csg_triangulator.hpp
include/carve/debug_hooks.hpp
include/carve/djset.hpp
include/carve/edge_decl.hpp
include/carve/edge_impl.hpp
include/carve/exact.hpp
include/carve/face_decl.hpp
include/carve/collection/unordered/fallback_impl.hpp
include/carve/collection/unordered.hpp
include/carve/face_impl.hpp
include/carve/faceloop.hpp
include/carve/geom2d.hpp
include/carve/geom3d.hpp
include/carve/geom.hpp
include/carve/geom_impl.hpp
include/carve/gnu_cxx.h
include/carve/heap.hpp
include/carve/input.hpp
include/carve/interpolator.hpp
include/carve/intersection.hpp
include/carve/iobj.hpp
include/carve/kd_node.hpp
include/carve/math_constants.hpp
include/carve/math.hpp
include/carve/matrix.hpp
include/carve/mesh.hpp
include/carve/mesh_impl.hpp
include/carve/mesh_ops.hpp
include/carve/mesh_simplify.hpp
include/carve/octree_decl.hpp
include/carve/octree_impl.hpp
include/carve/pointset_decl.hpp
include/carve/pointset.hpp
include/carve/pointset_impl.hpp
include/carve/pointset_iter.hpp
include/carve/poly_decl.hpp
include/carve/polyhedron_base.hpp
include/carve/polyhedron_decl.hpp
include/carve/polyhedron_impl.hpp
include/carve/poly.hpp
include/carve/poly_impl.hpp
include/carve/polyline_decl.hpp
include/carve/polyline.hpp
include/carve/polyline_impl.hpp
include/carve/polyline_iter.hpp
include/carve/rescale.hpp
include/carve/rtree.hpp
include/carve/spacetree.hpp
include/carve/tag.hpp
include/carve/timing.hpp
include/carve/tree.hpp
include/carve/triangulator.hpp
include/carve/triangulator_impl.hpp
include/carve/util.hpp
include/carve/cbrt.h
include/carve/vcpp_config.h
include/carve/vector.hpp
include/carve/vertex_decl.hpp
include/carve/geom.hpp
include/carve/vertex_impl.hpp
include/carve/win32.h
include/carve/polyline_impl.hpp
include/carve/pointset_decl.hpp
include/carve/timing.hpp
include/carve/csg_triangulator.hpp
include/carve/iobj.hpp
include/carve/collection_types.hpp
)
if(WITH_BOOST)

View File

@@ -14,7 +14,7 @@ incs = ['include']
if env['WITH_BF_BOOST']:
if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'):
# Boost is setting as preferred collections library in the Carve code when using MSVC compiler
if env['OURPLATFORM'] not in ('win32-mingw', 'win64-mingw'):
if env['OURPLATFORM'] != 'win32-mingw':
defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS')
defs.append('CARVE_SYSTEM_BOOST')

View File

@@ -1,9 +1,7 @@
#!/bin/sh
if [ "x$1" = "x--i-really-know-what-im-doing" ] ; then
echo Proceeding as requested by command line ...
else
echo "*** Please run again with --i-really-know-what-im-doing ..."
if [ -d ./.svn ]; then
echo "This script is supposed to work only when using git-svn"
exit 1
fi
@@ -16,8 +14,8 @@ for p in `cat ./patches/series`; do
cat ./patches/$p | patch -d $tmp/carve -p1
done
find include -type f -not -iwholename '*.svn*' -exec rm -rf {} \;
find lib -type f -not -iwholename '*.svn*' -exec rm -rf {} \;
rm -rf include
rm -rf lib
cat "files.txt" | while read f; do
mkdir -p `dirname $f`
@@ -26,9 +24,9 @@ done
rm -rf $tmp
sources=`find ./lib -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | sed -r 's/^\.\//\t/' | sort -d`
headers=`find ./lib -type f -iname '*.h' -or -iname '*.hpp' | sed -r 's/^\.\//\t/' | sort -d`
includes=`find ./include -type f -iname '*.h' -or -iname '*.hpp' | sed -r 's/^\.\//\t/' | sort -d`
sources=`find ./lib -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | sed -r 's/^\.\//\t/'`
headers=`find ./lib -type f -iname '*.h' -or -iname '*.hpp' | sed -r 's/^\.\//\t/'`
includes=`find ./include -type f -iname '*.h' -or -iname '*.hpp' | sed -r 's/^\.\//\t/'`
mkdir -p include/carve/external/boost
cp patches/files/random.hpp include/carve/external/boost/random.hpp
@@ -49,7 +47,7 @@ cat > CMakeLists.txt << EOF
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.
@@ -116,7 +114,7 @@ incs = ['include']
if env['WITH_BF_BOOST']:
if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'):
# Boost is setting as preferred collections library in the Carve code when using MSVC compiler
if env['OURPLATFORM'] not in ('win32-mingw', 'win64-mingw'):
if env['OURPLATFORM'] != 'win32-mingw':
defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS')
defs.append('CARVE_SYSTEM_BOOST')

View File

@@ -639,11 +639,9 @@ namespace carve {
}
exact_t operator+(const exact_t &a, const exact_t &b) {
exact_t r;
sum_zeroelim(a, b, r);
return r;
}
// XXX: not implemented yet
//exact_t operator+(const exact_t &a, const exact_t &b) {
//}

Some files were not shown because too many files have changed in this diff Show More