blender.git
14 years agoFix some warning for unsigned vs signed comparisons.
Ken Hughes [Mon, 3 Apr 2006 20:31:10 +0000 (20:31 +0000)]
Fix some warning for unsigned vs signed comparisons.

14 years agoFixed small but that was causing an eternal loop.
Campbell Barton [Mon, 3 Apr 2006 20:15:24 +0000 (20:15 +0000)]
Fixed small but that was causing an eternal loop.

14 years ago-> Stored Selections in Mesh DNA
Geoffrey Bantle [Mon, 3 Apr 2006 19:02:22 +0000 (19:02 +0000)]
-> Stored Selections in Mesh DNA

Stored selections now get saved to mesh library blocks as direct data.
The idea that stored selections are 'erased' when leaving editmode and
switching objects is pretty mysterious for the user. Note that currently
the mselect array in a mesh is not written to file.  Not sure whether
to change this or not.

14 years agoFixed a but where applying the modifier option was disabled, Meshes woudl have there...
Campbell Barton [Mon, 3 Apr 2006 16:14:24 +0000 (16:14 +0000)]
Fixed a but where applying the modifier option was disabled, Meshes woudl have there objects matricies applied.
(Now always work on copied data- Blender.Mesh could do with a copy function)
Now triangulate works without "Apply Modifiers" enabled.

Much thanks to Gianluca Faletti for helping me track down the problem.

14 years agomade some gfx debug code win32 specific
Erwin Coumans [Mon, 3 Apr 2006 01:28:43 +0000 (01:28 +0000)]
made some gfx debug code win32 specific

14 years agocommented out some asserts that don't work multiplatform
Erwin Coumans [Sun, 2 Apr 2006 22:36:15 +0000 (22:36 +0000)]
commented out some asserts that don't work multiplatform

14 years agoapplied Charlies patch for game engine graphics. display list support, and bumpmappin...
Erwin Coumans [Sun, 2 Apr 2006 21:04:20 +0000 (21:04 +0000)]
applied Charlies patch for game engine graphics. display list support, and bumpmapping shader improvements.

14 years agoSped up quite a bit using zsorting and fast index guessing. so verts can find the...
Campbell Barton [Sun, 2 Apr 2006 20:59:02 +0000 (20:59 +0000)]
Sped up quite a bit using zsorting and fast index guessing. so verts can find the closest vert in the other mesh.
from 37.3sec to 8.65 sec on the test I used (human with 24 bones) - 24k verts on the source mesh.

14 years agoFix gcc warnings about NULL used in arithmetic comparison.
Ken Hughes [Sun, 2 Apr 2006 20:19:30 +0000 (20:19 +0000)]
Fix gcc warnings about NULL used in arithmetic comparison.

14 years agofixed a crashing bug in new vehicle physics, and removed some debugging code in conta...
Erwin Coumans [Sun, 2 Apr 2006 20:15:24 +0000 (20:15 +0000)]
fixed a crashing bug in new vehicle physics, and removed some debugging code in contact/friction physics code.

14 years ago - fix some minor typing/redefinition errors, should
Daniel Dunbar [Sun, 2 Apr 2006 18:11:02 +0000 (18:11 +0000)]
 - fix some minor typing/redefinition errors, should
   not be misconstrued as "working" by myself

14 years agoBugfix #3996
Ton Roosendaal [Sun, 2 Apr 2006 17:44:14 +0000 (17:44 +0000)]
Bugfix #3996

Particles were fully recalculated each time on frame advance, when they
had an animation itself (like Ipo). Was not needed for dynamic particles.

14 years agoAdded to select group-
Campbell Barton [Sun, 2 Apr 2006 15:40:56 +0000 (15:40 +0000)]
Added to select group-
Siblings, ad Type
This removes the need for the "Select Type" menu (please review Broken)

14 years agoA calculation was using an integer 100000000000, which was being truncated:
Ken Hughes [Sun, 2 Apr 2006 14:22:19 +0000 (14:22 +0000)]
A calculation was using an integer 100000000000, which was being truncated:

source/blender/src/writeimage.c: In function `save_rendered_image_cb_real':
source/blender/src/writeimage.c:129: warning: integer constant is too large
for "long" type

Since the calculation is on a float anyway, changed constant to a float.

Ken

14 years agoBugfix #4046
Ton Roosendaal [Sun, 2 Apr 2006 12:45:55 +0000 (12:45 +0000)]
Bugfix #4046

Copying constraints should refresh the dependency graph, otherwise the
new relations don't get calculated properly.

14 years agoBugfix #4042
Ton Roosendaal [Sun, 2 Apr 2006 12:39:11 +0000 (12:39 +0000)]
Bugfix #4042

New empty drawsize and type are initialized on loading old files now.

14 years agoBugfix #4047
Ton Roosendaal [Sun, 2 Apr 2006 12:20:46 +0000 (12:20 +0000)]
Bugfix #4047

"Delete scene" should exit modes too, crashed in dependency graph then.
Now it exits editmode and paint modes first.

14 years agoFix for #4048
Ton Roosendaal [Sun, 2 Apr 2006 12:08:34 +0000 (12:08 +0000)]
Fix for #4048

Camera was excluded from depsgraph when not visible in current layer...
resulting in camera animations to not move.

Solved with just an exception, but it certainly is attention point for the
depsgraph cleanup.

14 years agoBugfix #4051
Ton Roosendaal [Sun, 2 Apr 2006 11:48:22 +0000 (11:48 +0000)]
Bugfix #4051

- particle duplicators should not include parent animation (error in
  duplicator recode of last december)
- added exception for 'died' particles to keep correct orientation

Also in this commit:

- added comment in code to explain why vertexnormals in mesh are equal to
  vertex location when no faces exist
- cleanup of BKE_object.h for functions that don't need export.

14 years agoAdded proper initialize for curve pointer, fix for commit of march 24th.
Ton Roosendaal [Sun, 2 Apr 2006 11:41:46 +0000 (11:41 +0000)]
Added proper initialize for curve pointer, fix for commit of march 24th.

14 years agoBugreport #4057
Ton Roosendaal [Sun, 2 Apr 2006 08:21:47 +0000 (08:21 +0000)]
Bugreport #4057

Uninitialized variable used in viewmove for 2d windows... the reporter
found it himself. thanks Michael Jones!

14 years agoBugfix when checking for a container mesh (Mesh.Unlink needed here)
Campbell Barton [Sun, 2 Apr 2006 01:46:10 +0000 (01:46 +0000)]
Bugfix when checking for a container mesh (Mesh.Unlink needed here)

14 years agoSilly var typo fix.
Campbell Barton [Sat, 1 Apr 2006 19:28:55 +0000 (19:28 +0000)]
Silly var typo fix.

14 years agoBug fix #3900, washed out AO colors
Ton Roosendaal [Sat, 1 Apr 2006 15:35:25 +0000 (15:35 +0000)]
Bug fix #3900, washed out AO colors

Darn typo in AO code... it only multiplied the red compononent for AO. :)

14 years agoThis script copys vertex groups and weights from 1 weighted mesh, to all unweighted...
Campbell Barton [Sat, 1 Apr 2006 15:32:58 +0000 (15:32 +0000)]
This script copys vertex groups and weights from 1 weighted mesh, to all unweighted meshes.
It just uses the closest to copy the weights, but this means the meshes need not have the same number of verts.
Worldspace coords are used so the meshes only need to overlap in worldspace.

14 years agoAnd the preview.blend for texture preview fix
Ton Roosendaal [Sat, 1 Apr 2006 14:09:23 +0000 (14:09 +0000)]
And the preview.blend for texture preview fix

14 years agoTexture button preview:
Ton Roosendaal [Sat, 1 Apr 2006 14:08:57 +0000 (14:08 +0000)]
Texture button preview:

- now draws intensity value correct (black/white was inversed)
- added option to show texture alpha too

14 years agoSequence render bug: pressing ANIM didn't update renderwindow, when files
Ton Roosendaal [Sat, 1 Apr 2006 12:53:51 +0000 (12:53 +0000)]
Sequence render bug: pressing ANIM didn't update renderwindow, when files
for input were 32 bits.

14 years agoPreviewrender fix: when moving the mouse still while previews should render
Ton Roosendaal [Sat, 1 Apr 2006 09:36:18 +0000 (09:36 +0000)]
Previewrender fix: when moving the mouse still while previews should render
the escape happened without resetting a variable correctly, resulting in
black preview.

This can still be coded better...

14 years agomore Bullet physics improvements, mainly stability and performance related.
Erwin Coumans [Sat, 1 Apr 2006 03:30:15 +0000 (03:30 +0000)]
more Bullet physics improvements, mainly stability and performance related.
AddObjectActuator has new python method to immediately create objects (this allows to create multiple objects in 1 frame in different positions)

14 years agoAdded relative vertex references to obj importer,
Campbell Barton [Fri, 31 Mar 2006 13:07:27 +0000 (13:07 +0000)]
Added relative vertex references to obj importer,
Found a model that used negative relative vertex indicies.
positive relative vert indicies should work also but untested (no example models).

14 years agoAdded matt's empty drawsize property to python.
Campbell Barton [Fri, 31 Mar 2006 09:50:39 +0000 (09:50 +0000)]
Added matt's empty drawsize property to python.

14 years agoRemoved debug printing.
Campbell Barton [Fri, 31 Mar 2006 02:35:16 +0000 (02:35 +0000)]
Removed debug printing.

14 years agoFREE_WINDOWS was declaring a typedef for __int64. __int64 was alredy defined.
Campbell Barton [Thu, 30 Mar 2006 22:44:33 +0000 (22:44 +0000)]
FREE_WINDOWS was declaring a typedef for __int64. __int64 was alredy defined.
so WIngws' GCC was seeing it as
typedef long long long long... and not compiling.

Added an ifndef around this decleration. safe solution. but probably remove the typedef entirely.

- Cam

14 years agoBugfix: isffmpeg() could access a pointer array using an index of -1,
Ken Hughes [Thu, 30 Mar 2006 21:51:59 +0000 (21:51 +0000)]
Bugfix: isffmpeg() could access a pointer array using an index of -1,
causing a segfault.

14 years ago==Nothing to see here, move along==
Chris Want [Thu, 30 Mar 2006 14:23:25 +0000 (14:23 +0000)]
==Nothing to see here, move along==

Removing some outdated files from elbeem, as suggested by Nils.
(Compiles OK without them.)

14 years agofixed vehicle related issue (re-enabled them)
Erwin Coumans [Thu, 30 Mar 2006 06:08:41 +0000 (06:08 +0000)]
fixed vehicle related issue (re-enabled them)

14 years ago==Nothing to see here, move along==
Chris Want [Wed, 29 Mar 2006 23:16:09 +0000 (23:16 +0000)]
==Nothing to see here, move along==

A header (BKE_Scene.h) was not included.

14 years ago==Nothing to see here, move along==
Chris Want [Wed, 29 Mar 2006 23:14:37 +0000 (23:14 +0000)]
==Nothing to see here, move along==

Try to get the yy_wrap and yy_parse definitions for IRIX. Hoping
that it will also help Kent's multiply resolved warnings, I've done
this so that these symbols are defined only if they are currently
undefined. I'm not sure if it will work though, please test!

14 years agoFixed some bugs in BPyImage comprehensive loade. (used by 3ds and obj import)
Campbell Barton [Wed, 29 Mar 2006 18:25:42 +0000 (18:25 +0000)]
Fixed some bugs in BPyImage comprehensive loade. (used by 3ds and obj import)

OBJ Importer,
Added true FGon support for faces >4 verts. (Does a propper scanfill and optionaly converts it to an FGON.) - Checks for flipping, uses a face fan when scanfill fails.
Added the option to split by materials, into seperate mesh objects (Good for large databases)
Made smoothGroups optional.

14 years agoAdded BOP_Mesh constructor to get rid of this:
Kent Mein [Wed, 29 Mar 2006 16:47:56 +0000 (16:47 +0000)]
Added BOP_Mesh constructor to get rid of this:
BOP_Mesh.h:45: warning: ‘class BOP_Mesh’ only defines private constructors and h
as no friends

drawimasel.c initalized a variable so it didn't give warnings about it.
(wasn't really needed but if the code changes could be potential issue)

Kent

14 years ago- fixed elbeem header include problems
Nils Thuerey [Wed, 29 Mar 2006 14:57:14 +0000 (14:57 +0000)]
- fixed elbeem header include problems

14 years agoSeveral minor fixes:
Nils Thuerey [Wed, 29 Mar 2006 07:35:54 +0000 (07:35 +0000)]
Several minor fixes:
- Added part of Austin's msvc8 fixes (vector::erase function
  was "misused"), hopefully compiles better now.
- Ctrl-b now also bakes a selected fluidsim domain
  similar to the softbodies.
- Added surface smoothing option for domains: default is
  1, higher values result in a smoother surface (and probably
  slightly higher comupation times), while 0 means the surface
  is not modified at all.
- Added BLENDER_ELBEEMBOBJABORT environment variable in readBobj,
  if >0 quits blender when a not yet existing fluidsim
  frame should be loaded. Useful for rendering simulations
  as far as possible from the command line.
- Surface normals pointer is now set to NULL in readfile.c
- Fixed win32 error string handling, now uses a function
  to return the string from the solver.
- Fixed fluidsim particle halo scaling problem.
- Solver update

14 years ago==Directx 8 importer==
Tom Musgrove [Wed, 29 Mar 2006 06:25:07 +0000 (06:25 +0000)]
==Directx 8 importer==

addition of a direct x importer by Ben Omari

14 years ago==Directx 8 exporter update==
Tom Musgrove [Wed, 29 Mar 2006 06:22:43 +0000 (06:22 +0000)]
==Directx 8 exporter update==

update to the direct x exporter by Ben Omari

14 years agomore physics work: fixed some deactivation bug, improved contact constraint stability...
Erwin Coumans [Wed, 29 Mar 2006 03:11:30 +0000 (03:11 +0000)]
more physics work: fixed some deactivation bug, improved contact constraint stability and friction (lower the number of iterations).

14 years agoI fixed some warnings about multiply defined yy_parse (etc) fuctions.
Kent Mein [Tue, 28 Mar 2006 20:56:58 +0000 (20:56 +0000)]
I fixed some warnings about multiply defined yy_parse (etc) fuctions.
Did some small indentation fixes, and moved some variables so they
were declared at the top of the function blocks.

Kent

14 years agodisabled restitution in the new iterative contact constraint.
Erwin Coumans [Tue, 28 Mar 2006 20:55:44 +0000 (20:55 +0000)]
disabled restitution in the new iterative contact constraint.

14 years agofixed scons build for moved and added file.
Erwin Coumans [Tue, 28 Mar 2006 20:18:14 +0000 (20:18 +0000)]
fixed scons build for moved and added file.

14 years agoRemoved a bad return and and unused variable.
Campbell Barton [Tue, 28 Mar 2006 03:20:10 +0000 (03:20 +0000)]
Removed a bad return and and unused variable.
swappsed all // for /**/.

14 years agoFix gcc warning about usage of identifier "main"; renamed the variable to
Ken Hughes [Mon, 27 Mar 2006 22:33:21 +0000 (22:33 +0000)]
Fix gcc warning about usage of identifier "main"; renamed the variable to
"mainptr".

14 years agoAdd structure declaration to beginning of file to fix gcc warnings.
Ken Hughes [Mon, 27 Mar 2006 22:22:08 +0000 (22:22 +0000)]
Add structure declaration to beginning of file to fix gcc warnings.

14 years agoMove variable declaration to beginning of code block, to avoid compiler
Ken Hughes [Mon, 27 Mar 2006 22:20:24 +0000 (22:20 +0000)]
Move variable declaration to beginning of code block, to avoid compiler
warnings or errors.

14 years agoModified editmesh_mods.c
Campbell Barton [Mon, 27 Mar 2006 21:35:31 +0000 (21:35 +0000)]
Modified editmesh_mods.c
Added "Similar Edge Face Angles" to "Select Edge Groups"
This means you can select edges based on the angles of edges in the existing selection.
Only works for edges with 2 face users at the moment.

14 years agoanother couple of uninitalized variables get the axe.
Kent Mein [Mon, 27 Mar 2006 16:15:44 +0000 (16:15 +0000)]
another couple of uninitalized variables get the axe.

This is only to make things predictable until that section of the
code is finished.  Ton said it'd be a good idea to drop in in for now.

Kent

14 years agoMake editmesh edge length and face area drawing's precission proportonate to the...
Campbell Barton [Mon, 27 Mar 2006 14:57:53 +0000 (14:57 +0000)]
Make editmesh edge length and face area drawing's precission proportonate to the gridsize.
Needed when working with small models.

14 years agoneeded to normalize the plane for the manipulator.
Campbell Barton [Mon, 27 Mar 2006 08:52:28 +0000 (08:52 +0000)]
needed to normalize the plane for the manipulator.

14 years agoremoved 2 warnings from Image.py epydocs
Campbell Barton [Mon, 27 Mar 2006 08:34:06 +0000 (08:34 +0000)]
removed 2 warnings from Image.py epydocs

14 years agoSeperated out some functionality into 3 new functions.
Campbell Barton [Mon, 27 Mar 2006 08:25:06 +0000 (08:25 +0000)]
Seperated out some functionality into 3 new functions.
EM_editselection_center
EM_editselection_normal
EM_editselection_plane
These functions are used by the manipulator to get data from an editselection. regardless of weather its a face/edge/vert.

14 years agoSynchronized Bullet physics to latest version.
Erwin Coumans [Mon, 27 Mar 2006 06:37:30 +0000 (06:37 +0000)]
Synchronized Bullet physics to latest version.

- Changed license from MIT to ZLib.
- Added 3D Sweep and Prune contribution
- More stable native constraint solver

Sorry for any inconvenience caused by this checkin.
All Blender buildsystems require update: added files and moved files.

14 years agoAdded rotate about centre for active Vert/Edge/Face in mesh editmode. also works...
Campbell Barton [Mon, 27 Mar 2006 05:28:36 +0000 (05:28 +0000)]
Added rotate about centre for active Vert/Edge/Face in mesh editmode. also works for getting the V/E/F normal. Means we can now rotate about the last selected edge.

14 years ago-> Stored Selections
Geoffrey Bantle [Mon, 27 Mar 2006 05:19:14 +0000 (05:19 +0000)]
-> Stored Selections

Previously Blender did not store the order in which vertices, edges
or faces were selected in edit mode. In many cases it is useful to
have this data, however it is not desirable to store every selection
made. Now blender stores selections in the order in which they were
made in a linked list called 'selected' in  EditMesh. EditSelection structs
are created whenever 'EM_store_selection' from  editmesh_lib.c is called
(currently only on user selection with mouse). There are several cases
in which they might be deallocated by calling the 'EM_remove_selection'
function however:

-When the user deselects something with the mouse ('mouse_mesh' in
 editmesh_mods.c)

-When switching selection modes stored selections that are not relevant
to the new mode are removed by the 'EM_strip_selections' function
(multi-select mode is supported)

-When the vertex, edge or face pointed to by a certain stored selection is
deallocated

-When EM_clear_flag_all is called and where the flag passed to the function
contains the 'SELECT' bitmask.

-When leaving edit mode (making stored selection data persistent across
editing sessions will require modifications to mesh DNA later)

Todo:

There are a few cases still where you can temporarily end up with a stored
selection that points to an element that is no longer selected
(edge loop de-select can cause this for instance). The solution to this is to
add a call to EM_remove_selection from 'EM_select_edge' and 'EM_select_face' when
these functions are being used to deselect elements. For the sake of completeness
however this will also require that an 'EM_select_vert' function be coded and
called at all appropriate parts of the editmesh code. I will look into this
later in the week.

For now there are two tools that already take advantage of the stored selections.
The first one is 'merge at first or last vertex' in the merge menu (the 'firstvert' and
'lastvert' pointers are gone from EditMesh). The second tool is path select, which builds
a path between the last vert selected and the second to last vert selected. This allows you
to build complex path selections in a short amount of time like this
'select A, select B, path select. select C, path select. select D...'

14 years ago=== Transform Display ===
Martin Poirier [Sun, 26 Mar 2006 22:35:03 +0000 (22:35 +0000)]
=== Transform Display ===
Based on a patch by Matthias Derer, this adds the distance moved to a translation (grab) transform
(both 3D and 2D, although the 2D transform displays the normalised distance only).

14 years ago==sequencer==
Tom Musgrove [Sun, 26 Mar 2006 22:31:11 +0000 (22:31 +0000)]
==sequencer==

a tiny patch by Luis de Bethencourt Guimera (luisbg) adds RETKEY as completing a transform for consistency

14 years ago==Sequencer==
Peter Schlaile [Sun, 26 Mar 2006 21:36:42 +0000 (21:36 +0000)]
==Sequencer==
This patch is mostly a usability patch for the sequencer, mainly written by
Anders Gudmundson and twisted a little bit by me.

- Lock Time to other windows
- Possibility to switch the X-Axis between frames and seconds-display
- IPO-Frame Locking for plugins (T-Key)
- Additional Popup to add HD-Sound and Movie at once
- In Timeline-Window: Sequencer windows only playback
- Make the IPOs a little bit IPO-Frame-Lock friendlier (doesn't jump;
  the frame that is drawn has the right dimension)
- Wheel-Mouse buttons make the sequencer window zoom again.
- The "This is not a sound/movie-file message" now reads "... or
  FFMPEG-support not compiled in!" since I learned some prominent
  people who complained, that hdaudio does not work for them ;-)
- Make SPACEKEY open up the "Add Strip"-Popup on the timeline and start
  playback in the preview window.

14 years agoAdded python image pack/unpack per image.
Campbell Barton [Sun, 26 Mar 2006 09:25:30 +0000 (09:25 +0000)]
Added python image pack/unpack per image.

14 years agoselect group with large selections could make blender hang. break out of the loop...
Campbell Barton [Sun, 26 Mar 2006 01:54:52 +0000 (01:54 +0000)]
select group with large selections could make blender hang. break out of the loop when no more can be done.

14 years agoMade group work from multiple selection's (before it used the first selected face...
Campbell Barton [Sun, 26 Mar 2006 01:02:22 +0000 (01:02 +0000)]
Made group work from multiple selection's (before it used the first selected face/vert/edge)
so you can select 2 faces and then get all coplaner faces around both.
Added fp to face and edge edit data so as to store edge length and face area/perimeter. (in the union so minimal overhead)
current implimentation is fairly optimized.

Change to arithb.c was just to command Inpf as being the dot producr.

14 years ago==paint==
Tom Musgrove [Sat, 25 Mar 2006 22:29:48 +0000 (22:29 +0000)]
==paint==

change CKEY to toggle paint on or off in image paint patch by Stephan Kassemeyer

14 years agoFixed a possible bug where counting faces was a short and could be less then the...
Campbell Barton [Sat, 25 Mar 2006 11:51:33 +0000 (11:51 +0000)]
Fixed a possible bug where counting faces was a short and could be less then the number of items selected.
Added Vertex group select menu- Similar Normal|Same FaceUsers|Shared Vertex Groups

14 years agoFixed a but where DupStart and DupEnd (duplivert settings) max values were larger...
Campbell Barton [Sat, 25 Mar 2006 10:06:40 +0000 (10:06 +0000)]
Fixed a but where DupStart and DupEnd (duplivert settings) max values were larger then a short. which made the buttons act oddly.
Also added tooltips.

Idealy these would be unsigned shorts or ints because they should be able to go up to the max frame number 300000.

14 years agoAdded select group edges (Length/Direction/FaceUsers)
Campbell Barton [Sat, 25 Mar 2006 06:32:39 +0000 (06:32 +0000)]
Added select group edges (Length/Direction/FaceUsers)
Added VecAngle2 - needed for grouping by normal and planer faces.
Made select face & edge group ignore hidden faces.
fixed a bug where hiding faces didnt update G.tot*sel

14 years agoAdded select group meny to mesh editmode.
Campbell Barton [Sat, 25 Mar 2006 04:37:40 +0000 (04:37 +0000)]
Added select group meny to mesh editmode.
Currently only works for faces.
Try Shift+G in face/editmode.

14 years agoBugfix #3818: nmesh.insertKey() was not letting Ipo space know to
Ken Hughes [Fri, 24 Mar 2006 21:56:29 +0000 (21:56 +0000)]
Bugfix #3818:  nmesh.insertKey() was not letting Ipo space know to
recalculate, causing a segfault when the curve was selected in the Ipo
window.  lattice.insertKey() has similar code.  Added calls to
allspace(REMAKEIPO,0) to correct this.

14 years agoBugfix #3772: Allows "Center Cursor" for 3D curves to modify the curve
Ken Hughes [Fri, 24 Mar 2006 20:39:38 +0000 (20:39 +0000)]
Bugfix #3772: Allows "Center Cursor" for 3D curves to modify the curve
center's Z location.  An eons-old comment in the code said:

/* Curves need to be 2d, never offset in
 * Z. Is a somewhat arbitrary restriction,
 * would probably be nice to remove. */

I couldn't find any other reason for the restriction other than 2D curves
limit the point's Z component to 0, so added a check to only forve the
center Z to 0 when the curve is 2D.  If there are other reasons for the
restriction, then this commit may need to be rolled back.

14 years agoa bunch of small warnings fixes:
Kent Mein [Fri, 24 Mar 2006 16:40:32 +0000 (16:40 +0000)]
a bunch of small warnings fixes:

newline missing at end of file fixes:
TypedConstraint.h WheelInfo.h RaycastVehicle.h VehicleRaycaster.h
CcdPhysicsEnvironment.cpp

radiance_hdr.c fixed the following warning by changing type of local variable:
radiance_hdr.c:357: warning: pointer targets in passing argument 3 of
‘fwritecol rs’ differ in signedness

edgeRender.c,edgeRender.h same thing changed type of local vars to get rid
of warnings about signedness

RAS_OpenGLRasterizer.cpp removed unused variable unit line 1295

Kent

14 years agoblender -P xxx -b crashed sometimes, still will crash in some cases if the python...
Campbell Barton [Fri, 24 Mar 2006 16:04:55 +0000 (16:04 +0000)]
blender -P xxx -b crashed sometimes, still will crash in some cases if the python functions access screen data. but at least Blender.sys.expandpath wont segfault anymore.

14 years agoMade blender python work in background mode without a blend file loading.
Campbell Barton [Fri, 24 Mar 2006 15:46:26 +0000 (15:46 +0000)]
Made blender python work in background mode without a blend file loading.
Blender.c python initialization creates a scene when in background mode and when there is no scene.
Needed to skip redrawing when in background mode because it depended on screen data that wasnt there.

14 years agoAttempted to unify and document Dupli* stuff.
Campbell Barton [Fri, 24 Mar 2006 08:36:39 +0000 (08:36 +0000)]
Attempted to unify and document Dupli* stuff.
DupGroup
DupObjects
enableDupVerts
enableDupFrames
enableDupGroup
enableDupRot
enableDupNoSpeed

see the epydocs for documentation at http://members.iinet.net.au/~cpbarton/ideasman/BPY_API/Object.Object-class.html - will update in a tick.

14 years agoFix problem with possibly random calls to MEM_freeN() due to uninitialized
Ken Hughes [Thu, 23 Mar 2006 23:54:48 +0000 (23:54 +0000)]
Fix problem with possibly random calls to MEM_freeN() due to uninitialized
variable in NMesh.c

14 years agoUpdated mallocn.c MEM_check_memory_integrity was casting
Kent Mein [Thu, 23 Mar 2006 17:45:40 +0000 (17:45 +0000)]
Updated mallocn.c MEM_check_memory_integrity was casting
a string as an int and it was causing a warning.
I changed it to check to see if the string == 0
return 0 else return 1.

The only thing that called this function was memtest.c and it
had outdated code, so I fixed that...
        was calling MEM_set_error_stream updated to
                    MEM_set_error_callback

Kent

14 years agooops, typo
Campbell Barton [Tue, 21 Mar 2006 23:59:52 +0000 (23:59 +0000)]
oops, typo

14 years ago===Python API===
Ken Hughes [Tue, 21 Mar 2006 23:30:25 +0000 (23:30 +0000)]
===Python API===
Two small bugfixes:
   * Image.New() resets id.us to 0; it is set to 1 by new_image()
   * allow ima.depth and ima.size getters to propagate their own error
     messages (missing image was returning MemoryError)

Also, seems to me there's something funny going on with image id.us
accounting.  In do_image_buttons(), id.us is set whenever an image is
accessed vi the datablock menu:

        if(idtest!=id) {
            G.sima->image= (Image *)idtest;
            if(idtest->us==0) idtest->us= 1;
            allqueue(REDRAWIMAGE, 0);
        }

This is independent of whether a UV face is selected or not (and it also
seems that the number of UV faces linked to an image is not maintained
either).

14 years agoFix for a bug where python could save a sceneless blend file.
Campbell Barton [Tue, 21 Mar 2006 22:30:29 +0000 (22:30 +0000)]
Fix for a bug where python could save a sceneless blend file.
https://projects.blender.org/tracker/index.php?func=detail&aid=3902&group_id=9&atid=125

14 years agoFix for bug,
Campbell Barton [Tue, 21 Mar 2006 22:16:41 +0000 (22:16 +0000)]
Fix for bug,
https://projects.blender.org/tracker/index.php?func=detail&aid=4021&group_id=9&atid=125
Raise an error instead of crash when python expandpath runs and no scene is loaded.

14 years agoSilly bug in using Compositor... the code that checked if a 3d rendering
Ton Roosendaal [Tue, 21 Mar 2006 11:29:03 +0000 (11:29 +0000)]
Silly bug in using Compositor... the code that checked if a 3d rendering
was required (compositor can also be used with only image input) told
the pipeline not to render when no composite nodes were available at all,
and with button 'Use Nodes' on.

14 years agoScene id->us user counter was always set to 1 on a file read, which did not
Ton Roosendaal [Mon, 20 Mar 2006 20:52:04 +0000 (20:52 +0000)]
Scene id->us user counter was always set to 1 on a file read, which did not
work for Composite nodes using a scene... when you delete such a node the
scene could get zero users then.

Now scenes count users correctly, and are initialized to 1 on the correct
place.

14 years ago=== MINGW compile ===
Andrea Weikert [Mon, 20 Mar 2006 17:25:42 +0000 (17:25 +0000)]
=== MINGW compile ===
Fixing compile for Windows mingw builds with cygwin make and scons.
Used SHGetFolderPath instead of SHGetSpecialFolderPath which is
better supported for mingw.
Thanks to Ralf Hoelzemer for the tip and the patch.

Let me know if any problems persist, I'll try to fix then.

--- Andrea

14 years agoCineon/DPX export didn't survive when Blender gave it negative colors.
Ton Roosendaal [Mon, 20 Mar 2006 16:53:13 +0000 (16:53 +0000)]
Cineon/DPX export didn't survive when Blender gave it negative colors.
Was missing test for it before turning it into unsigned short.

14 years agoFixed an error in the help printout and set out the formats that are not supported...
Campbell Barton [Mon, 20 Mar 2006 16:24:00 +0000 (16:24 +0000)]
Fixed an error in the help printout and set out the formats that are not supported on all os's.

14 years agoFix various gcc warnings.
Ken Hughes [Sun, 19 Mar 2006 20:45:50 +0000 (20:45 +0000)]
Fix various gcc warnings.

14 years agoThreshold for non-flat quad detection was too wide still. Causing errors
Ton Roosendaal [Sun, 19 Mar 2006 20:14:16 +0000 (20:14 +0000)]
Threshold for non-flat quad detection was too wide still. Causing errors
of quads filling in in octrees...

14 years agoMore environment map stuff:
Ton Roosendaal [Sun, 19 Mar 2006 17:50:53 +0000 (17:50 +0000)]
More environment map stuff:

- added a zoom factor for Planar Environment Map, allowing to zoom in or
  out on the reflected object. The zoom is corrected when rendering, so it
  just gives control over the resolution.
- Planar maps don't cycle anymore, but only render the front plane, using
  standard image texture extend mode.
- threaded rendering is back in envmap render

14 years ago=== fileseletor ===
Andrea Weikert [Sun, 19 Mar 2006 16:36:37 +0000 (16:36 +0000)]
=== fileseletor ===

patch #2554: My Documents and Desktop folder automaticly added to the Folders
pulldown of the filesector

Only affects Windows builds.

Uses shell functions to correctly get the My Documents and Desktop folders and
then add them to the fsmenu, right below the drive letters.

Needs shell32.lib linked, which is already linked by default for VS7 project files.
Platform maintainer please check if it has to be added to scons and MSVC6 project files.

Patch provided by Martin Poirier (theeth) - many thanks!

14 years agoAdded a way to set the renderpath (dir and name) from the command line.
Campbell Barton [Sun, 19 Mar 2006 16:25:32 +0000 (16:25 +0000)]
Added a way to set the renderpath (dir and name) from the command line.
eg
Blender  -b c:\blends\test.blend  -o "c:\renders\render_#.png"  -x 0  -F PNG

-x 1/0 for extension enable/disable
-F for format/filetype

This is important because somebody elses Blend files can render anywhere on your PC, possibly a security risk.
And nice for renderfarms to be able to set the path without running a python script inside the blend file.

blender --help (render opts only)
Render options:
  -b <file>     Render <file> in background
    -S <name>   Set scene <name>
    -f <frame>  Render frame <frame> and save it
    -s <frame>  Set start to frame <frame> (use with -a)
    -e <frame>  Set end to frame (use with -a)<frame>
    -o <path>   Set the render path and file name.
      Use // at the start of the path to
        render relative to the blend file.
      Use # in the filename to be replaced with the frame number
      eg: blender -b foobar.blend -o //render_# -F PNG -x 1
    -F <format> Set the render format, Valid options are..
        TGA IRIS HAMX FTYPE JPEG MOVIE IRIZ RAWTGA
        AVIRAW AVIJPEG PNG AVICODEC QUICKTIME BMP
        HDR TIFF EXR MPEG FRAMESERVER CINEON DPX
               Use // at the start of the path to
    -x <bool>   Set option to add the file extension to the end of the file.

Added details to the -v option
Eg
blender -v
Blender 2.41 Build
        build date: 2006-03-20
        build time: 16:16:34
        build platform: linux-glibc2.3.6-i386
        build type: dynamic

Also fixed bugs where nagative/realy big  frames could be set- causing Blender to crash.

14 years agoBugfix in environment mapping: Ztransp and Halo didn't show up. Bug is
Ton Roosendaal [Sun, 19 Mar 2006 15:16:02 +0000 (15:16 +0000)]
Bugfix in environment mapping: Ztransp and Halo didn't show up. Bug is
there since the Render refactor of early january.

14 years agoAdded option to only render a single side of an Environment map cube,
Ton Roosendaal [Sun, 19 Mar 2006 14:26:56 +0000 (14:26 +0000)]
Added option to only render a single side of an Environment map cube,
allowing to use it for planar mirrors. Enable it with the new "Plane"
option in the Environment Map Panel.

Current default is to render the cube side that points to the positive
Z axis direction. To make it work, it uses the same image for all
other cube sides, so it will 'wrap around'.

Also made maximum resolution for environment map to be 4096x4096 now.

14 years agoUpdated to use Blender.sys.exists() which now uses BLI_exist rather then stat.
Campbell Barton [Sun, 19 Mar 2006 13:31:44 +0000 (13:31 +0000)]
Updated to use Blender.sys.exists() which now uses BLI_exist rather then stat.

14 years ago=== bugfix win32 - python ===
Andrea Weikert [Sun, 19 Mar 2006 13:28:01 +0000 (13:28 +0000)]
=== bugfix win32 - python ===

Fixed BLI_exist: In Windows stat doesn't recognize
a dirname ending is a slash, exept when it's
the root dir ("C:\\"), where it is required.
So trailing slashes are only removed when filename
is longer than 3 chars.
Also fixed Python Sys.c that now uses BLI_exist
instead of calling stat directly.

14 years agoAdded support for group objects
Campbell Barton [Sun, 19 Mar 2006 04:45:58 +0000 (04:45 +0000)]
Added support for group objects
  grp.objects

To have an iterator assigned as well as a list. Since gp.objects is an ietartor this is expected.
grp.objects= someGroup.objects works now.

Some other small fixes made.

Made a wrapper for add_to_group() That handles the OB_FROMGROUP flag. Should be moved to group.c's add_to_group()

void add_to_group_wraper(Group *group, Object *ob) {
Base *base;
add_to_group(group, ob);

if (!(ob->flag & OB_FROMGROUP)) { /* do this to avoid a listbase lookup */
ob->flag |= OB_FROMGROUP;

base= object_in_scene(ob, G.scene);
if (base)
base->flag |= OB_FROMGROUP;
}
}