Commit Graph

5693 Commits

Author SHA1 Message Date
Andrea Weikert
652bf89985 === 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!
2006-03-19 16:36:37 +00:00
Campbell Barton
90e590936c 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.
2006-03-19 16:25:32 +00:00
Ton Roosendaal
54004b8dcc Bugfix in environment mapping: Ztransp and Halo didn't show up. Bug is
there since the Render refactor of early january.
2006-03-19 15:16:02 +00:00
Ton Roosendaal
4bbc9df60d 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.
2006-03-19 14:26:56 +00:00
Andrea Weikert
368cab399c === 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.
2006-03-19 13:28:01 +00:00
Campbell Barton
59ed566e86 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;
	}
}
2006-03-19 04:45:58 +00:00
Campbell Barton
abab9fc3de Added object.dupliGroup so objects can access the groups they instance.
This is very confusing.
Since in object has
ob.setDupliGroup() # Enable/Disable Dupligroup
ob.getDupliGroup() # see if its enabled.
ob.dupliGroup # the group data this object is instancing.

Not yet added
ob.groups # Groups that use this object.
2006-03-18 17:24:59 +00:00
Campbell Barton
dc90a417cb Slight change, when moving the active object out of localview, keep it the activew object. Face Select mode, vpain etc need to complain if act ob isnt visible before the modes are activated. 2006-03-18 15:53:06 +00:00
Campbell Barton
bfe42eea43 Moved declerations to the top of the skope so as to work with MSVC?
started removeing // from constant.h to shut GCC's -pedantic up. realized // are used everywhere.
2006-03-18 15:23:02 +00:00
Campbell Barton
7b37efb35f Added Blender.Group module
The plans for the new Python API are too far off to have this module conform.

Needs testing with MSVC 6
2006-03-18 14:47:26 +00:00
Ton Roosendaal
148bc0a2e8 Tsk! A 'new' for filehandle wasn't combined with a 'delete', which is
probably causing the leakage issues we have exr in linux.
2006-03-18 14:45:15 +00:00
Ton Roosendaal
73da80e757 We're now doing final conversions... float exrs to dpx amd png. Found a
couple of bugs in the new float support in sequencer;

- when effects have float buffer input, the effect strip itself only got
  byte buffers assigned, which bypassed the float versions of effects
- the float version of cross effect used ints to fade... should be float
- tests if an effect should be recalculated didn't check for float yet
- display of float buffer in sequencer preview showed black when no
  byte rect was in imbuf

Peter; we need this urgent, so I commit now.. check if this is according
to how you thought floatbuffers to work? thanks!
2006-03-16 20:42:00 +00:00
Geoffrey Bantle
e4439dd050 2 New tools, 'Loop to region' and 'Region to loop'
-> Loop to Region
Examines the current set of selected edges and seperates them into groups
 of 'loops' that each bisect the mesh into two parts. Then for each loop it
selects the smaller 'half' of the mesh.

Example images:
http://www.umsl.edu/~gcbq44/looptoregion2a.jpg
http://www.umsl.edu/~gcbq44/looptoregion2b.jpg

This tool handles multiple loops fine as is shown by these images:
http://www.umsl.edu/~gcbq44/looptoregion1a.jpg
http://www.umsl.edu/~gcbq44/looptoregion1b.jpg

Furthermore it handles 'holes' just fine as well:
http://www.umsl.edu/~gcbq44/looptoregion3a.jpg
http://www.umsl.edu/~gcbq44/looptoregion3b.jpg

-> Region to Loop

This is the 'logical inverse' of loop to region.

Example:
http://www.umsl.edu/~gcbq44/regiontoloop1a.jpg
http://www.umsl.edu/~gcbq44/regiontoloop1b.jpg

Both features can be accessed by the 'Edge Menu' in EditMode (CTRL-E).
2006-03-15 20:53:41 +00:00
Ton Roosendaal
e2660f614d Dang... on background rendering (renderfarm) the user preset for temp dir
isn't set. Hardcoded it to /tmp/ now. Have put on list this requires a
better solution (same issue open for yafray afaik)
2006-03-15 20:41:08 +00:00
Ton Roosendaal
b8cde0000f Bugfix: In sequencer, duplicating effects crashed due to calling a NULL
callback.
2006-03-15 18:16:25 +00:00
Ton Roosendaal
578ab76bd4 Bugfix: when compositor reads incomplete renders, when using the new
render option "save result to disk" and ESC from rendering, it crashed...

Note; reading partially saved exr files still crash... but that's an issue
within the openexr lib. I've mailed the openexr dev list for assistance
how to properly close a partial saved tile-file.
2006-03-15 10:44:58 +00:00
Ton Roosendaal
6bc3f0f85e Silly copy/paste error enabled the 'save render to file' option always...
now the button works as meant to be.

Still working on the feature though... I noticed exr files dont read
back when only part was saved (on user break). Working...
2006-03-15 10:18:33 +00:00
Ton Roosendaal
e91dddc923 Bugfix: Node editor, ALT+G "UnGroup" crashed when group was editable.
Now it exits this editing mode, and ungroups nicely.
2006-03-14 21:58:16 +00:00
Ton Roosendaal
ea9866a75f Memory saving for large renders:
New option "Save Buffers", in first Output panel of renderbuttons, will not
allocate all render buffers, but instead save the rendered tiles to exr.
For each scene rendered, a single exr file then is created.
After rendering, the files get read, and only then the memory allocation is
done.

The exr files are saved in the temp dir (from user settings), and have
names derived from the filename+scene name. That way these buffers remain
relatively unique, and can be re-used later too.

Saving all render-layers and passes in a single file (as F3 command) will
be done later. Also reading back the current muli-layer exr files is not
supported yet (will read black). The purpose is that these files then can
be used as input for the Compositor.

One fun thing I added; after rendering once with this option, close
Blender, and restart it. If you have a Composite set up press 'R' on an
active RenderResult node. This will refresh the node(s) and load the exr,
so you can composite again without a re-render.
2006-03-14 21:29:42 +00:00
Ton Roosendaal
6401244afd Crashfix in compositing RenderLayer that doesn't exist... can happen on
appending a scene, which used again another scene to do compomagic with. :)
2006-03-14 20:01:53 +00:00
Ton Roosendaal
fe3506f6d4 WIP commit on getting the 'render result layers' saved in a single
file. Previous fix accidentally committed parts of that... :)

Note: it is currently disabled still... will commit the real version
soon.
2006-03-14 17:48:40 +00:00
Ton Roosendaal
e3fb99ad70 Urgh... the commit to free texture images always also did it for preview... 2006-03-14 17:44:19 +00:00
Ton Roosendaal
705beae517 Made 'free texture images' default for a while... gives too many errors
for stressed artists who forget it. Will rewind later. :)
2006-03-14 13:26:33 +00:00
Ton Roosendaal
0b80330384 CTRL+C copy menu now has "Copy UV orco" for curves/surfaces 2006-03-14 11:29:06 +00:00
Ton Roosendaal
ba12d909c9 When faces are extremely small (like 0.01 size of pixel), the UV calculus
for faces can give inaccuracies resulting in UV values in the hundreds
range. The UV values now are being clipped.

This should fix weird 'shooting lines' for vectorblur on hair renders.
2006-03-14 10:56:46 +00:00
Ton Roosendaal
e294808fdc Restored syntax for function calls in sequence.c.
Schlaile; do you have a weird texteditor setting or so? It breaks up
function calls in a very strange way, with each argument of a call
on a new line. That's not code that way, that's movie credits! :)

(Check the diff below to see)
2006-03-14 09:54:40 +00:00
Ton Roosendaal
b86d85f80b Interpolated scaling for float buffers in Imbuf still went wrong...
leftover bugs of first migration to floats in imbuf. :)

As extra I've reshuffled the mainloops for scaling, it's now twice as
fast.
2006-03-14 09:40:55 +00:00
Ton Roosendaal
4a673d1d9b Autosmooth fix: if original Mesh has same amount of faces and vertices
as the one resulting from Modifiers, it uses that data to calculate
autosmooth for. This prevents weird stuff on rendering softbody for
example.
2006-03-13 18:16:23 +00:00
Johnny Matthews
f913a53b0a A small alteration for C syntax, code before vars (MSVC complained about this). 2006-03-13 14:44:49 +00:00
Nathan Letwory
50b34df348 ==BPy==
* move declaration to start of function. Again I repeat: these *have* to
  be at the start. GCC users should check themselves always, as GCC allows
  this kind of atrocities :)

  /Nathan
2006-03-13 14:43:20 +00:00
Nathan Letwory
36a4af22c3 ==SCons==
* These changes bring cross-compiling Blender for Windows on Linux one step
  closer to reality. The 'biggest' change is in makesdna SConscript to make
  sure a linux native makesdna is built, that can be run, too. Next to that
  proper checks for env['OURPLATFORM']=='linuxcross' are added in various
  places.

  Switch change in pluginapi.c was necessary, and AFAIK it should work like
  that also on WIN32, if not, slap me.

  Note: everything *compiles* now nicely, it is just that the final *linking*
  doesn't work (yet). Anyone who fixes this will be the
  hero of cross-compilers :)
2006-03-13 11:42:49 +00:00
Ton Roosendaal
34a5739a8a Two fixes in renderpipe...
- Renderwin still used a thread-unsafe malloc, in the header text print

- Setting clipping flags in vertices for parts required a mutex lock after
  all... I thought it would go fine, but noticed on renders with small
  amounts of faces that sometimes faces disappear from a render.
  (was doing movie credits, so all faces are visible! Otherwise it would
  have hardly been noticable...)
2006-03-13 11:01:17 +00:00
Jean-Luc Peurière
2dfc4b9a2f fix for bug #3930 Colour picker broken - HSV sliders
Note : this part of code was quite a mess with things called twice when
not needed, tests for not updating when we want to, and hsv sliders not
handled properly.

I tried to figure what was useful and what was not but cannot garantee i
spotted everything or even fixed it the most proper way, the event callback
nesting making hard to figure what really happen.

However it does work again now
2006-03-13 02:22:48 +00:00
Campbell Barton
3649c806a3 Scene unlinking didnt set the python objects scene to NULL,causing memory errors if accessing the data after the scene was unlinked.
Also a few functions segfulted if scene was unlinked, added more checking.

First commit from win32, hope line endings are ok.
2006-03-13 02:02:19 +00:00
Ton Roosendaal
6c1856f2a7 More bugs in float imbuf scaling code... an x and y were mixed up, causing
memory troubles.
2006-03-12 21:26:34 +00:00
Ton Roosendaal
bf1032a80f Scaling code in imbuf didn't like float buffers enough yet 2006-03-12 19:53:23 +00:00
Ton Roosendaal
e058a506fd Forgot Cineon lib in Makefile :) 2006-03-12 19:48:51 +00:00
Ton Roosendaal
afc3d1ade3 Sequencer now outputs float buffers to render too, when available. 2006-03-12 19:00:48 +00:00
Nathan Letwory
3be24f8fef ==SCons==
* cineon support enabled for SCons (part 2 of fix)
2006-03-12 15:23:56 +00:00
Nathan Letwory
f3cede8e9f ==SCons==
* first part of cineon fix commit - after next commit it'll compile also with SCons
2006-03-12 15:23:00 +00:00
Ton Roosendaal
0e44aa60b2 Half fix for colorpicker: after using sliders, the redraw callback was
too late... moved it one line up. :)

Still unknown; why doesn't HSV color field not redraw?
2006-03-12 14:51:33 +00:00
Ton Roosendaal
de0262e4c8 New: Import/Export of Cineon and DPX image files. The first is Kodak's
standard for film scanning, 10 bits/channel and logarithmic. DPX is
derived from Cineon as the ANSI/SMPTE industry standard.
DPX supports 16 bits color/channel, linear as well as logarithmic.

Code has been gratefully copied from CinePaint and was integrated in
Blender by Joe Eagar.

According to CinePaint's dev Robin Rowe the DPX code defaults to log
colorspace. Can't find in the code clues yet how to enable/disable that.
However, tests with write/read of DPX seems to show no visible loss by
log conversion code. Might be because it uses the entire 16 bit range...

CinePaint dpx files have been succesfully imported in a Quantel IQ HD/2K
finishing/grading set without problem, so for now I guess we can
use it! :)

Changes in code: added tests for image magic numbers before entering
the actual reading code. Prevents error prints, and makes it faster too.
(Note; this because Blender doesn't check for extensions, but calls
reading functions on every file until one accepts it. :)
2006-03-12 14:11:23 +00:00
Ton Roosendaal
bd151b30ab Pressing Tkey in empty action window crashed... bad pointer handling. 2006-03-12 13:03:40 +00:00
Ton Roosendaal
8a8c70c63a A couple of render improvements;
- Bug fix: the upper tile in a collumn for Panorama render didn't put the
  mainthread to sleep properly. Now panorama renders 25% faster if you had
  set Y-Parts to 4.

- Enabling Compositing in Scene for first time now adds a "Composite" node
  too, so render output gets applied.
- An attempt to render with "Do Composite" without "Composite" node will
  throw an error and stops rendering. In background mode it will just not
  render at all, and print errors.
- Errors that prevent rendering now give a popup menu again.
- Having MBlur or Fields option on will now normally render, but with an
  error print in console (not done yet...)
2006-03-12 11:51:56 +00:00
Ton Roosendaal
4e4cd9407d Added security to vectorbuffer code... before it gets used, it checks
for leftover initialized max-speed values, and clears it. Also gives
a giant print then... I want to know when it happens, and howto redo!

(error print = "tsk tsk! PASS_VECTOR_MAX left in buffer...")
2006-03-11 23:10:13 +00:00
Ton Roosendaal
bad09bd2f9 And now the studio is rendering panoramas... finding out that vectorblur
also could use correction for it.
The current perspective projected blur would look in 180 degree view like
this:

http://www.blender.org/bf/p2.jpg
(circle of planes rotating around camera)

After some fight with my rusty highschool gonio I got it fixed; nice
cylindrical projected speedvectors:

http://www.blender.org/bf/p1.jpg
2006-03-11 21:46:19 +00:00
Brecht Van Lommel
58daa8a370 ==UV Editor==
Ctrl+RMB in local sticky mode now selects as if in sticky mode. This used
to work only in non-sticky mode, but now with local sticky as default,
it's nice to have this functionality working there also.
2006-03-11 21:09:32 +00:00
Ton Roosendaal
6b6511b54c Fix for messy commits in attempt to fix groups wire colors...
- if you add new theme colors, you need to initialize them correctly and
  add that in the usiblender.c version patching for saved themes
- the code for detecting group membership was highly confusing
- group colors were even used for non-groups

Further; I didnt add group theme colors yet, that's not a bug. It's a todo
item I preferred to tackle with having a decent wirecolor system once.
2006-03-11 18:51:41 +00:00
Ken Hughes
f7cccc36d4 Bugfix #3995: NMesh.GetRawFromObject() would segfault sometimes if object
was in editmode, due to undefined derivedmesh data.
2006-03-11 18:18:32 +00:00
Brecht Van Lommel
5c2805f3cb Fix for bug #3739:
Drawing of multiple materials in texture mode, if there is no texface,
didn't use correct materials.
2006-03-11 17:15:10 +00:00
Brecht Van Lommel
f9b1eb52ad Fix for bug #3997:
Rotating UV coordinates with snapping was image aspect ratio 'corrected'
for non square images. Only snapping for translation should be affected
by the aspect ratio.
2006-03-11 16:39:07 +00:00
Brecht Van Lommel
7d5be54fec Fix for bug #3802: Display problems with modifiers and uv face select
The bug reported here was already fixed some weeks ago, but there were
more issues. Modifier display in face select and paint modes was never
properly finished.

This fixes some small drawing update glitches, and only allows modifiers
that preserve a mapping to the original mesh to be applied. Otherwise
selection and painting isn't even possible.
2006-03-11 16:13:10 +00:00
Ken Hughes
5f550b4ceb ===Python API===
A bug fix and an enhancement:
   * fixed bug when adding or deleting faces from a mesh which has
     vertexColors; mesh->mcol was not being updated
   * changed edges.extend() and faces.extend() to accept integer vertex
     indices in addition to MVerts; this should make scripts simpler and
     in general make things run faster
2006-03-11 16:00:07 +00:00
Ton Roosendaal
85ac48c782 With the commit last week to have curve bevels nice circular (when no
front/back is selected), the UV coordinates for curves should also be
corrected.
This commit re-uses the same code as for Nurbs, to make sure UV coordinates
wrap around nicely.

BUT! I've noticed that Daniel's commit of august in this code actually
broke this UV correction... in his craze to cleanup old code, he missed
the actual functionality. Meaning that in 2.40 and 2.41, "UV orco" texture
coordinates wrap around ugly in Nurbs Surfaces, something that was fixed
in NaN days.

Got no time for tracker now... but I'm sure it's in there! :)
2006-03-11 12:34:50 +00:00
Tom Musgrove
dd210051a4 ==oops==
on reading the function looks like it is instead meant to select isolated edges and verts - doh! so changing back to previous...
2006-03-11 03:23:57 +00:00
Tom Musgrove
38b3660b4a ==bug fix==
3773 - toolbox function name of 'select - non-triangles/quads'

changed to 'select - non-triangle/quad faces'

for clarity (user expected it to select verts and edges from the name)
2006-03-11 02:44:44 +00:00
Ken Hughes
04ce5e8efe Bugfix: Object.link() was not correctly handling object/datablock material
counting, causing "Error Totblock" messages on exit due to memory not being
freed.  Added a call to test_object_materials() after the new data is linked.
2006-03-11 01:17:21 +00:00
Ken Hughes
93c3a6f784 Bugfix #3898: Scene.unlink() was not decrementing the datablock user count. 2006-03-11 01:14:33 +00:00
Nathan Letwory
9f73fe008c ==SCons==
* Small CVS surgery, winblender_scons.rc renamed to winblender.rcscons on repository
  and change also in this SConscript. In case it was not yet clear as why there is a second
  resource file with the same icons: the SCons RES() function needs the paths to be able
  to generate the proper resource object. Change suggested by Joseph Eagar to prevent
  problems with the Makefiles.
2006-03-10 22:50:27 +00:00
Ken Hughes
c35e8426fe ===Python API===
Additions to BezTriple API: complete get/set access to all BezTriple settings
(knot and handles points, handle types, tilt/alfa, hide, weight and selection
status).
2006-03-10 21:39:14 +00:00
Ken Hughes
2a4dc7654c Bugfix #3895: Call to PyString_FromString() wasn't being Py_DECREF()'ed,
causing a memory leak.
2006-03-10 21:05:30 +00:00
Nathan Letwory
52dfa31cb8 ==SCons==
+ Joseph Eagar provided a patch that re-enables the application icon for Blender. Hurray!
2006-03-10 20:47:34 +00:00
Joilnen Leite
1c5aa14c5d fix for bug 3970
.
2006-03-10 19:49:25 +00:00
Joilnen Leite
e932576bb7 fix bug 3970
.
2006-03-10 19:47:36 +00:00
Joilnen Leite
0a6c3993bf fix for bug 3970
.
2006-03-10 18:52:49 +00:00
Campbell Barton
96a6e5637e Fixed a mistake where the hrad/tail radius UI numinput didnt check weather the bobne was connected before using the parents tail value for its head. 2006-03-10 02:55:18 +00:00
Ton Roosendaal
7c23e08270 Vectorblur fix:
To be able to make good masks, it is important to separate the non moving
pixels from the moving ones. With fixes I did 2 weeks ago, a floating
point inaccuracy causes speed vectors to be not always zero perfectly...
and the masks to get badly shaped.

It was clearly visible on moving objects over a non-moving background.
Current commit includes minimal threshold to force speed to zero. Images
are nice and smooth again. :)

Bad:
http://www.blender.org/bf/vb1.jpg
Good again:
http://www.blender.org/bf/vb2.jpg
2006-03-09 22:50:36 +00:00
Geoffrey Bantle
a6ed488b74 -> Path Select Tool
Rewrote path select tool to use binary heap implementation from BLI_heap.h. Incredible speedup! Thanks to Brecht for the tip.
2006-03-09 22:44:14 +00:00
Ton Roosendaal
bbfc41b246 Commit from campbell of march 5 crashes when no object was active and you
do a move to layer...
2006-03-09 22:05:53 +00:00
Tom Musgrove
72d92b6b1a ==compile fix==
ffmpeg compile fix for cygwin by Peter
2006-03-09 20:14:18 +00:00
Mika Saari
a95362f147 Fixed bug "Bug Tracker item #3988", where <builtin> TTF (datatoc_bfont_ttf)
wasn't handled as UTF-8 font but like normal <builtin> font. This caused
Blender to crash.
2006-03-09 16:57:19 +00:00
Ton Roosendaal
d918fcd055 Uncommitted change of Campbell 9 days ago... the rest of the logic
editor now screws up... smells like a bug in alignment code, will need
to be checked on.

(Campbell: you sure checked the buttons before committing this? ;)
2006-03-09 15:56:08 +00:00
Ton Roosendaal
4953b17be2 Improved CTRL+G grouping menu; it now offers a choice to add to any
existing group, using a 2nd menu.
2006-03-09 15:18:53 +00:00
Ton Roosendaal
610a813c0c Bugfix... very ancient one even. When you use multiple screens in a project
with each having different scenes, changing screens didn't call the proper
set_scene() call, which left quite some stuff improperly initialized.

With depsgraph code even causes crashing.
2006-03-09 12:48:13 +00:00
Ton Roosendaal
dd91048c06 AO did not include own material rgb in calculus, causing too bright AO.
Error caused by WIP on rendering passes.
2006-03-09 12:20:00 +00:00
Ton Roosendaal
89fe29055b When imbuf has both float and byte rects, the scale-fast function crashed. 2006-03-09 11:25:20 +00:00
Ton Roosendaal
ef346ebd33 <sob>dropping OpenGL float buffer drawing... it seems that this isn't
a well supported feature for glDrawPixels(), especially on ATIs crashes
happen with it irregularly. (note; drawing float is a regular opengl 1.0
feature...).

Now all scanline/part updates in renderwindow is converted to 32 bits
before drawing, also the in the UV Image window only 32 bits RGBA is drawn.

What is still float: drawing the final image after render in renderwindow,
and drawing the Z or Alpha in renderwindow and UV image.

Of course we need to test this first. :) Will await reports...
2006-03-09 10:13:37 +00:00
Tom Musgrove
aa31da2abf ==compile fix==
added RE_RenderLayer to stubs.c so we can compile gameengine
2006-03-09 00:34:49 +00:00
Ton Roosendaal
973b442075 Compositing goodie: ESC now works to stop, but it will finish the node it
was working on.
2006-03-08 21:12:48 +00:00
Ton Roosendaal
0bc3e9639b Baking all selected softbody: press ctrl+b in 3d window! 2006-03-08 17:45:32 +00:00
Ton Roosendaal
b05269adc2 <blush>Nice work on renderlayer control yesterday, but... then you should
also change this line in creator.c dude!</blush>
2006-03-08 17:27:20 +00:00
Ton Roosendaal
5d1f64fc19 Bugfix: Sofbody baking included the 'start frame' for the object in
calculus, causing empty keys in the bake, and crashes.
2006-03-08 17:00:48 +00:00
Ton Roosendaal
2858229e9f Compositor now checks for cyclic nodes too, and skips them while executing.
This prevents eternal loops. It prints error message in console.

Note that the Shader nodes dont need this, since they're just executed in
presorted order. The compositing nodes use threading, with a call asking
for the next job... if this includes cyclic nodes, the 'next job' will
always return  NULL.
2006-03-08 13:06:32 +00:00
Ton Roosendaal
8d345b916d Test with render window not drawing in frontbuffer anymore. Only enabled
now for OSX though... that's where we can verify if the irregular crashes
will stop (ATI issue, nvidia seems to be OK)

If ATI users for other platforms want to check; just extend the two
#ifdefs I added for frontbuffer drawing. Note; the syntax then becomes

#if defined(__APPLE__) || defined(_YOUR_PLATFORM_)
2006-03-08 12:28:46 +00:00
Ton Roosendaal
2db9b8fe7f Quick feature: "Around Individual Centers" now works in editmode mesh, but
only in Face-Select mode. It then uses for rotate and scaling the face
center itself as reference.

Code uses a loop-in-loop to find the face that belongs to the vertex...
means it will be slow with operations on 10k or more faces. Acceptable
for now, will make it nicer later. :)
2006-03-08 11:07:49 +00:00
Geoffrey Bantle
d51a6020c8 -> Path Select Tool
Added a new tool to the 'W-Key' popup menu in mesh editmode, 'Path Select'.
When exactly two vertices are selected, 'Path Select' will find the shortest
path of vertices between them. There are two methods for determining
the shortest path, one that finds the path with shortest physical
distance, and one that finds the path with shortest topological distance.

Examples:

Original Selection
http://www.umsl.edu/~gcbq44/pathselect.jpg

Path Select - Edge Length
http://www.umsl.edu/~gcbq44/pathselect-shortestphysical.jpg

Path Select - Topological
http://www.umsl.edu/~gcbq44/pathselect-topological.jpg

The tool uses a straightforward implementation of Dijsktra's algorithm
and may be a bit slow on extremely large meshes. As a speedup you can
hide the parts of the mesh that you are not working on and they will
not be searched.
2006-03-08 03:28:17 +00:00
Ton Roosendaal
c2fffa60b1 Small fix for surviving changes in library data.
In case an armature object lost its object-data, it crashed in trying
to link the pose data.
2006-03-07 21:50:26 +00:00
Ton Roosendaal
d0011f3318 Compositing workflow goodie; each 'render result' node now has a button
option to re-render that specific node. Also works for nodes using other
scenes.
2006-03-07 21:26:37 +00:00
Peter Schlaile
48f6e94036 Fixes a small warning, when compiling without ffmpeg 2006-03-07 20:28:05 +00:00
Peter Schlaile
327d413eb3 this patch features several cleanups and bugfixes for the sequencer:
- blur works again (this was a serious bug in gamwarp...)
- seperates all sequence effects into a seperate file with a clean interface
- thereby fixing some obscure segfaults
- seperates the scope views into a seperate file
- adds float support to all effects and scope views
- removes a bad level call to open_plugin_seq
- FFMPEG seeking improved a lot.
- FFMPEG compiles with debian sarge version cleanly
- Makes hdaudio seek and resample code really work
2006-03-07 20:01:12 +00:00
Ton Roosendaal
9ce587e211 Quickfix: appending scenes from a file, won't expand the other scenes
when used in a compositor node... this is quite useless, and invokes
importing all data.
2006-03-07 14:47:41 +00:00
Ton Roosendaal
800e6400dc CTRL+C Copy Menu now includes modifiers for Curve objects. 2006-03-07 13:29:25 +00:00
Ton Roosendaal
aa1d8162be Curves with bevel, but without front/back or extrude depth, now render
as a full circle instead of 2 halves.
2006-03-06 21:44:08 +00:00
Ton Roosendaal
29f60690e5 Render option "Single Layer" now keeps the already rendered other layers,
and after rendering restores them. Also means this option works for
compositing now.
2006-03-06 13:50:07 +00:00
Campbell Barton
e0f9c69a2c quick fix for Python armature CVS making bones with no layers, therefor being invisible.
Should realy have Bone/Layer access through python.
2006-03-06 02:07:39 +00:00
Campbell Barton
d16254cc2c Rather then just complaining it cant be done, made M move objects out of the current localview.
This is quicker then switching to non localview, de-selecting and going back into localview.
  Test by pressing Mkey in localview.
2006-03-06 01:11:56 +00:00
Ton Roosendaal
8da71e806e Added CTRL+L link copy and SHIFT+L link select for group-duplicators. 2006-03-05 22:31:32 +00:00
Ricki Myers
8ba4f45ec6 Removes warning in drawtext.c 2006-03-05 19:56:31 +00:00
Ricki Myers
7cf600be30 Adds menu item in text editor under format menu to convert whitespace to
Spaces or to tabs.
Adds function void convert_tabs(struct SpaceText *st, int tab)
int tab is eather 0 or 1; 1 if converting to tabs
I was going to make this auto run when running a script but did not know what that would do to the GE or any thing else.
2006-03-05 19:50:14 +00:00
Jean-Luc Peurière
f325da228c fix for bug #3655
adding a DAG update like in other implantations of the call supress
the crash on remove double.

added the undo push too to be consistant
2006-03-05 18:34:49 +00:00
Ton Roosendaal
fd1d3779d0 Fix for appending data from other files: if this appended data
again was linking from another file, this relationship was not
corrected (lib_indirect -> lib_extern), so also not saved in a file.
2006-03-05 17:35:06 +00:00
Andrea Weikert
f6cd40ee40 === code cleanup ===
Replacing strcpy with BLI_strncpy where it's safe.
Was part of patch #2840 - thanks Eric Forsythe.
2006-03-05 16:36:32 +00:00
Chris Want
58f4fcfd6e Some C conpilers only want variables to be initialized with constants,
and will not allow variables to be initialized with the contents of
other variables.
2006-03-05 14:56:51 +00:00
Ton Roosendaal
6d6f539d03 Ungrouping a Node in Compositor left uiBlock pointers unchanged in
nodes, causing crashes evidently. :)
2006-03-05 14:37:46 +00:00
Ton Roosendaal
a5a26170b2 Also fixed memory print for background render to survive > 2 gig (unsigned) 2006-03-04 22:35:28 +00:00
Ton Roosendaal
2cabdfa37b Dupli-Group fix: when using multiple instances of groups, with groups on
different layers, the layer flags of objects got mixed up on selection.

This caused groups to become unselectable or uneditable, also the original
group...
2006-03-04 17:05:28 +00:00
Ken Hughes
ae32a538dd ===Python API===
Taking a hint from Hos, started adding some (hopefully) better examples into
the documentation for creating and manipulating meshes.
2006-03-04 00:04:45 +00:00
Geoffrey Bantle
932717da38 -> Silly mistake in loop_multiselect() in editmesh_mods.c, called EM_select_flush() instead of EM_selectmode_flush()... Oops! 2006-03-03 18:00:33 +00:00
Joilnen Leite
8afc4cf192 fix for bug 3903
.
2006-03-03 17:45:23 +00:00
Ton Roosendaal
524a2d24ac New copy option in CTRL+C menu: copy autosmooth settings. 2006-03-02 22:54:12 +00:00
Ton Roosendaal
3d2aa2815d Accidentally mixed up a true and false statement for detecting if halos
need panorama clipping or regular clip, causing halos to not render
without panorama...
2006-03-02 16:09:30 +00:00
Campbell Barton
0caa0ddb82 Fixed mistake where BLI_countlist(&(lb)) should be BLI_countlist(lb) 2006-03-02 01:00:13 +00:00
Ton Roosendaal
a85d160a3e Feature: Sofbody bake "Local"
Sofbody simulation happens in global coordinate space, and this was also
used for baking softbodies. Too bad you cannot re-use or further animate
the baked softbody then... :)

If you now use the new "Local" button in the Bake menu, it will allow to
animate or move the baked object.
2006-03-01 23:45:25 +00:00
Ton Roosendaal
a8afa6dc20 Proper syntax for freeing an allocated array in silly c++ :) 2006-03-01 21:18:31 +00:00
Brecht Van Lommel
b9861d2a80 Array modifier patch by Ben Batt! (#3788)
This modifier allows to make arrays of meshes, with multiple offset types:
- constant offset
- offset relative to object width
- offset with scale and rotation based on another object

The number of duplicates can be computed based on a fixed count, fixed length
or length of a curve. Duplicate vertices can be automatically merged.

Nice docs and example files available in the wiki:
http://mediawiki.blender.org/index.php/BlenderDev/ArrayModifier
2006-03-01 15:30:10 +00:00
Geoffrey Bantle
13a1a4c15e -> Vertex Group/Weight support in removedoublesflag()
Remove doubles didn't previously deal with vertex groups/weights properly. Now it averages the weights of vertices when they are doubles and share the same group. Verts that get merged but don't belong to all the same groups are dealt with as well.
2006-03-01 03:33:45 +00:00
Kent Mein
fc9615f15e reverted the looping vs switch statement. I don't know what I was thinking
in doing this in the first place.  (1 conditional vs 1 per loop duh)
Thanks for calling me on this Alexander.

(I didn't actually benchmark it to see but its pretty obvious which is less
work for the computer.)

Kent
2006-02-28 23:58:17 +00:00
Ton Roosendaal
3ecee5f154 Complex issue in group duplicators... since they can duplicate entire
animation systems, all transforms of all duplicated group members have
to be set first, before drawing or converting for render. This because
then still deformation can be calculated.
2006-02-28 20:43:21 +00:00
Kent Mein
59aced7a50 Fix for bug #3886
Basically the check for a type of jpeg was messed up.
I added a imb_is_a_jpeg function since I was working on that bit and
it makes it a little more similar to the other filetypes.

I also changed a switch statement that had the same loop for all
cases, just moved the loop outside of the switch statement.

Kent
2006-02-28 18:30:16 +00:00
Ton Roosendaal
21df108cb9 Saving OpenEXR half didn't free allocated half buffer... silly c++ memory
management!
2006-02-28 16:45:52 +00:00
Ton Roosendaal
b1c7f7f0f7 Urm... Kent's commit to fix a bug broke the other nodes that use the
same composit3_pixel_processor() function. gcc even gives nice warning:

node_composite.c: In function `node_composit_exec_mix_rgb':
node_composite.c:1437: warning: passing arg 9 of `composit3_pixel_processor' from incompatible pointer type

floats were read as pointer...
2006-02-28 16:24:25 +00:00
Peter Schlaile
5a8fd7d809 - Now the cache limitor also frees the float-planes 2006-02-28 13:07:02 +00:00
Geoffrey Bantle
3662ce0045 -> Loop MultiSelect
Added new function in editmesh_mods.c, "loop multiselect" and can be
accessed via the CTRL-E popup menu in editmode. It is used to select
multiple edge loops/rings based upon the current selection set. It does
this simply by looping through a list of currently selected edges and
calls 'edge_loop_select' or 'edge_ring_select' for each one. This can
be used to build large selection sets quickly, as can be seen in
the following example images...

step 1 - http://www.umsl.edu/~gcbq44/multiselectA.jpg
step 2 - http://www.umsl.edu/~gcbq44/multiselectB.jpg
step 3 - http://www.umsl.edu/~gcbq44/multiselectC.jpg

-> Misc

While I was in there I fixed a couple of existing issues as well...

- "Select Less" now gets a proper undo push.
- countall() wasn't being called after inclusive selection mode conversion
- some strange formatting in EM_convertsel() in editmesh_lib.c fixed.
2006-02-28 02:28:45 +00:00
Kent Mein
4de6d54eec Fix for bug #3967.
It still needs some work but at least now it doesn't crash.

Basically it changed composit3_pixel_processor so that its using full
vector instead of first element (fac variable in the code).
In reality though its just pushing where its looking at the first element
of the vector to another function (do_mix_rgb)
which is calling ramp_blend with fac[0].

Kent
2006-02-27 21:38:57 +00:00
Ton Roosendaal
23f9960db9 Restored the free_imbuf_seq_except() in sequencer, to free all memory
of sequencer, except current frame. Apparently the cache limitor doesnt
work for floatbuffers yet... and while rendering, I prefer to have all
memory available for the render itself.

Schlaile; you might check on what is wrong, in case imbufs have have
a rect_float or zbuf_float, the cache doesnt work yet?
2006-02-27 19:36:42 +00:00
Campbell Barton
833e0be7bf Added a few more button align's 2006-02-27 16:30:53 +00:00
Ton Roosendaal
f68b0ddb2a Recoded Panorama rendering.
The old implementation was added quite hackish (talking about 10 yr ago).
You also had to make a small image slice, which was extended Xparts in
size. That also required to adjust the camera angle. Very clumsy.

Now; when enabling the Panorama option, it will automatically apply the
panorama effect on the vertically aligned tiles. You can just enable or
disable the "Pano" button, to get a subtle lens effect like this:

(without pano)
http://www.blender.org/bf/rt.jpg
(with pano)
http://www.blender.org/bf/rt1.jpg

For Panorama render, the minimum slice size has been hardcoded to be 8
pixels. The XParts button goes up to 512 to allow that. In practice,
rendering 64 slices will already give very good images for a wide angle
lens of 90 degrees, the curvature of straight lines then is equal to
a circle of 256 points.
Rendering a full 360 degree panorama you do by creating an extreme wide
angle camera. The theory says camera-lens 5 should do 360 degrees, but
for some reason my tests reveil it's 5.1... there's a rounding error
somewhere, maybe related to the clipping plane start? Will look at that
later. :)

Also note that for each Xpart slice, the entire database needs to be
rotated around camera to correct for panorama, on huge scenes that might
give some overhead.

Threaded render goes fine for Panorama too, but it can only render the
vertically aligned parts in parallel. For the next panorama slice it has
to wait for all threads of the current slice to be ready.

On reading old files, I convert the settings to match as closely as
possible the new situation.
Since I cannot bump up the version #, the code detects for old panorama
by checking for the image size. If image width is smaller than height, it
assumes it's an old file (only if Panoroma option was set).
2006-02-27 12:39:36 +00:00
Campbell Barton
534ee9e190 Made vertex clear work for selected faces from the menu, to be the same as Shift+K.
Also makde Shift+K work in weightpaint mode.
2006-02-27 12:34:53 +00:00
Nils Thuerey
9a36e9b651 Sorry for the big commit, but I've been fixing many of these
issues in parallel... So this commit contains: an update of
the solver (e.g. moving objects), integration of blender IPOs,
improved rendering (motion blur, smoothed normals) and a first particle
test. In more detail:

Solver update:
- Moving objects using a relatively simple model, and not yet fully optimized - ok
  for box falling into water, water in a moving glass might cause trouble. Simulation
  times are influenced by overall no. of triangles of the mesh, scaling meshes up a lot
  might also cause slowdowns.
- Additional obstacle settings: noslip (as before), free slip (move along wall freely)
  and part slip (mix of both).
- Obstacle settings also added for domain boundaries now, the six walls of the domain are
  obstacles after all as well
- Got rid of templates, should make compiling for e.g. macs more convenient,
  for linux there's not much difference. Finally got rid of parser (and some other code
  parts), the simulation now uses the internal API to transfer data.
- Some unnecessary file were removed, the GUI now needs 3 settings buttons...
  This should still be changed (maybe by adding a new panel for domain objects).

IPOs:
- Animated params: viscosity, time and gravity for domains. In contrast
  to normal time IPO for Blender objects, the fluidsim one scales the time
  step size - so a constant 1 has no effect, values towards 0 slow it down,
  larger ones speed the simulation up (-> longer time steps, more compuations).
  The viscosity IPO is also only a factor for the selected viscosity (again, 1=no effect).
- For objects that are enabled for fluidsim, a new IPO type shows up. Inflow
  objects can use the velocity channels to animate the inflow. Obstacles, in/outflow
  objects can be switched on (Active IPO>0) and off (<0) during the simulation.
- Movement, rotation and scaling of those 3 types is exported from the normal
  Blender channels (Loc,dLoc,etc.).

Particles:
- This is still experimental, so it might be deactivated for a
  release... It should at some point be used to model smaller splashes,
  depending on the the realworld size and the particle generation
  settings particles are generated during simulation (stored in _particles_X.gz
  files).
- These are loaded by enabling the particle field for an arbitrary object,
  which should be given a halo material. For each frame, similar to the mesh
  loading, the particle system them loads the simulated particle positions.
- For rendering, I "abused" the part->rt field - I couldnt find any use
  for it in the code and it seems to work fine. The fluidsim particles
  store their size there.

Rendering:
- The fluidims particles use scaled sizes and alpha values to give a more varied
  appearance. In convertblender.c fluidsim particle systems use the p->rt field
  to scale up the size and down the alpha of "smaller particles". Setting the
  influence fields in the fluidims settings to 0 gives equally sized particles
  with same alpha everywhere. Higher values cause larger differences.
- Smoothed normals: for unmodified fluid meshes (e.g. no subdivision) the normals
  computed by the solver are used. This is basically done by switching off the
  normal recalculation in convertblender.c (the function calc_fluidsimnormals
  handles other mesh inits instead of calc_vertexnormals).
  This could also be used to e.g. modify mesh normals in a modifier...
- Another change is that fluidsim meshes load the velocities computed
  during the simulation for image based motion blur. This is inited in
  load_fluidsimspeedvectors for the vector pass (they're loaded during the
  normal load in DerivedMesh readBobjgz). Generation and loading can be switched
  off in the settings. Vector pass currently loads the fluidism meshes 3 times,
  so this should still be optimized.

Examples:
- smoothed normals versus normals from subdividing once:
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_1smoothnorms.png
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_2subdivnorms.png
- fluidsim particles, size/alpha influence 0:
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_3particlesnorm.png
  size influence 1:
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_4particlessize.png
  size & alpha influence 1:
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/v060227_5particlesalpha.png
- the standard drop with motion blur and particles:
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/elbeemupdate_t2new.mpg
  (here's how it looks without
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/elbeemupdate_t1old.mpg)
- another inflow animation (moving, switched on/off) with a moving obstacle
  (and strong mblur :)
  http://www10.informatik.uni-erlangen.de/~sinithue/temp/elbeemupdate_t3ipos.mpg

Things still to fix:
- rotating & scaling domains causes wrong speed vectors
- get rid of SDL code for threading, use pthreads as well?
- update wiki documentation
- cool effects for rendering would be photon maps for caustics,
  and motion blur for particles :)
2006-02-27 11:45:42 +00:00
Campbell Barton
b7ff45f914 new emptys now have default settings for new emptys. 2006-02-27 06:00:00 +00:00
Campbell Barton
9e0d2837d5 Applied JMS's Patch. for better Python Dupli Access.
Made some fixes and changes.
* The matricies returned were wrapped. Wrapping Display Mesh matricies segfaulted sometimes. - Made a copy instead.
* Added 1 missing epydoc from the patch.
* Renamed getDupliMatrices to getDupliObjects, and changed to return a list of (object, matrix) tuples instead of just the matrix. This is much more usefull because it allows python to know what objects are used for dupliGroups and for dupliverts where there is more then 1 child. also cleaned up this function a bit.
2006-02-27 04:05:55 +00:00
Chris Want
9a21866aec pthreads for Makefiles/cygwin (don't forget to update lib/windows). 2006-02-27 00:03:18 +00:00
Nathan Letwory
d9f9e76500 ==SCons==
+ SCons support for pthreads-win32. Library will be committed shortly into
  lib/windows, so be sure to check commit list and update that as well
  when the pthread lib is available.
2006-02-25 14:53:27 +00:00
Ton Roosendaal
66e1c90d0f Bugfix: CTRL+select on a Bone, while in editmode Curve, crashed. 2006-02-25 12:49:35 +00:00
Ton Roosendaal
02a931ac4f Replacing SDL threads with pthread.
For some reason I thought SDL thread handling would be much simpler... but
the migration to posix pthread went very smooth and painless. Less code
even, and I even notice a slight performance increase!

All threading code is still wrapped in blenlib/intern/threads.c
Only real change was making the callback functions to return void pointer,
instead of an int.

The mutex handling is also different... there's no test anymore if a
mutex was initialized, which is a bit confusing. But it appears to run
all fine still. :)

Nathan Letwory has been signalled already to provide the Windows pthread
library and make/scons linking. For MSVC we might need help from someone
else later though.
2006-02-25 11:56:08 +00:00
Ton Roosendaal
d5096f48b1 forgot note for last commit;
There's one 'volatile' warning in pipeline.c still, should be harmless...
it is bad code to be rewritten soon.
2006-02-24 10:21:40 +00:00
Ton Roosendaal
7930c40051 Made the most critical variables in render pipeline "volatile", especially
the ones that get changed within threads, to communicate with the main
thread.

(Part of the long quest to get threaded render safe, especially in Linux)
2006-02-24 10:20:31 +00:00
Ton Roosendaal
d99d73ad03 restored SDL_WaitThread() again, SDL_KillThread() is not OK. 2006-02-23 23:12:33 +00:00
Ton Roosendaal
1612f6b392 Buttons could crash on wrong scene layer index... not sure how that index
can get wrong, but secure code is always OK. :)
2006-02-23 21:38:48 +00:00
Nathan Letwory
0ec3791d2d ==SCons==
* Add check for WITH_BF_OPENEXR to ensure WITH_OPENEXR is specified when
  needed. Now workyworky again
2006-02-23 21:37:29 +00:00
Ton Roosendaal
ecdfa5374a Work in progress commit on saving OpenEXR with all render-layers and
passes in single file. Code is currently disabled, commit is mainly to
have a nicer method of excluding OpenEXR dependency from render module.
This should compile with disabled WITH_OPENEXR too.

Reason why EXR is great to include by default in Blender is its feature
to store unlimited layers and channels, and write this tile based. I
need the feature for saving memory; while rendering tiles, all full-size
buffers for all layers and passes are kept in memory now, which can go
into 100s of MB easily.
The code I commit now doesn't allocate these buffers while rendering, but
saves the tiles to disk. In the end is it read back. Overhead for large
renders (like 300 meg buffers) is 10-15 seconds, not bad.

Two more interesting aspects:
- Blender can save such multi-layer files in the temp directory, storing
it with .blend file name and scene name. That way, on each restart of Blender,
or on switching scenes, these buffers can be read. So you always see what was
rendered last. Also great for compositing work.
- This can also become an output image type for rendering. There's plenty of
cases where you want specific layers or passes saved to disk for later use.

Anyhoo, finishing it is another days of work, and I got more urgent stuff
now!
2006-02-23 20:57:31 +00:00
Ton Roosendaal
d9aac9d9b8 Bugfix for very very ancient envmap error. When you scale the envmap
object the OSA filtersize inverse scaled as well. Made small scaled
envmap objects far to blurry.
2006-02-23 20:18:29 +00:00
Stephen Swaney
977c201bc0 patch #3830 Fix for commenting a block of text with highlight enabled
Highlighting would not update when you un/commented a block of code.
Contributed by Ricki Myers (themyers).
2006-02-23 16:27:41 +00:00
Ton Roosendaal
f146e0e04e Composite: Image node now supports "start frame" values up to 10k. 2006-02-23 15:39:01 +00:00
Campbell Barton
6e12747b71 Added UI numeric access to bone radius (for envelopes), needed to accsess the other day to make bones the same radius and had to guess.
See the edit bone properties.

Just added a comment to DNA_armature_types.h about rad_head and rad_tail override, if a parant exists.
2006-02-23 14:45:59 +00:00
Ton Roosendaal
2c1a328f58 Tweak for Speed vector calculus for Ztransp render layer; it used to mask
out moving transparent pixels by checking for alpha>0.95, now it also
checks the solid layer (if present), and if there's no solid face in a
pixel, the speed vector gets also added and used for transparent pixels.

This solves the 'ugly' hard outlines for vectorblur of moving hair.

Before:
http://www.blender.org/bf/h1.jpg
After:
http://www.blender.org/bf/h2.jpg
2006-02-23 11:16:16 +00:00
Campbell Barton
8ab274ee30 Moved to brush cursors hotspot to be at the tip of the brush. 2006-02-23 04:38:33 +00:00
Chris Want
a30dc3866c Some issues compiling on Irix:
+ the code in writemovie.c no longer compiles (since the renderer
refactor). I have #if 0-ed it.

+ OpenGL on Irix doesn't have GL_ARB_vertex_program

+ mmap on Irix doesn't like MAP_ANON.

+ If using the MipsPro 7.3 compiler, the variable MIPS73_ISOHEADERS
can be set to point to the directory with those weird C++ headers
that don't have .h in the name
2006-02-22 23:34:12 +00:00
Chris Want
fc9ba4b323 In some directories (e.g. source/blender/src) there are so many files
now that the command to put the object files into an archive is
exceeding 20k characters, which is a problem for some operating systems.
To avoid this, this modification causes make to change directories before
archiving, to avoid having to specify full file paths to the files
being archived.

If this causes problems on some systems, let me know and I'll find an
alternative.
2006-02-22 23:26:26 +00:00
Ton Roosendaal
ef257c2519 Composite: filter node now includes image edge in calculation, the outer
pixels even had alpha zero...
2006-02-22 22:23:30 +00:00
Chris Want
ab4f3e4f91 'inline' in C isn't very portable (probably should be made a macro). 2006-02-22 22:05:13 +00:00
Ton Roosendaal
38f0343ae8 Brought back "mapping to translucency" for materials, was temporal replaced
with tests with material layer mapping...
2006-02-22 20:57:21 +00:00
Ton Roosendaal
ef8ec0e4a1 Composite fix: Blur node with option "Bokeh" didn't survive on very small
filtersizes (below 2 pixels). This because Bokeh actually does 2 peaks...

 /\  /\
/  \/  \

I've added some fixes in the filter calculus though, and made sure that
on size 1 at least the image gets copied straight away.
Also fixed error, Bokeh shifted image 1 pixel up.

Todo; make filters become real floats in size...
2006-02-22 20:13:52 +00:00
Geoffrey Bantle
99269c1f32 "Select Random" in editmode for meshes did not do an undo_push... This was
pretty annoying so I fixed it.
2006-02-22 18:35:12 +00:00
Geoffrey Bantle
30437b47ed Fixes small problem with my last commit and MSVC compilers, originally pointed
out on commiters ML here:
http://projects.blender.org/pipermail/bf-committers/2006-February/013677.html
2006-02-22 14:14:43 +00:00
Campbell Barton
2878386546 Added lighten/darken paint modes, works in vertex paint mode and weight paint mode.
Usefull for painting in areas with ~0.5 values without overwriting existing 1.0 weights.
2006-02-22 13:18:30 +00:00
Erwin Coumans
c2782ce10e added 'disable sleeping' option for rigidbodies. + bugfix of out of sync wheels for vehicle 2006-02-22 06:58:05 +00:00
Geoffrey Bantle
dcb751725e [Two Sections here; First is the log that *should* have been included
to my previous commit (whoops). The second part covers the changes I
have made to the code since then (all related to merge tools code).]

# Part One: Complete Log for Commit from 2/13/06

-> Upgraded merge tools.

The new merge tools add several options to blenders Merge submenu,
accessed via the WKEY whilst in Editmode for meshes. The new options
depend on current mode:

- Vertex mode: "At First" and "At Last"

When choosing "At First" or "At last" it will merge all selected
vertices at the first or last selected vertex.

(Note: Blender now keeps track of the last and first verts selected in
editMode (G.editMesh->lastvert and G.editMesh->firstvert
pointers. This meant additions were made to the undomesh code in
editmesh.c as well).

- Edge mode: "Collapse Edges"

When choosing this option, Blender examines the current set of
selected edges and groups them according whether or not they are
topologically connected. It then goes through each group and merges
them one by one to a single point.

- Face Mode: "Collapse Faces"

Works the same as "Collapse Edges", only works on groups of
topologically connected faces.

-> Inclusive selection mode conversion.

This feature extends the ability of blenders selection mode
conversions. Currently when you change selection modes from a "lower
order" mode to a "higher order" one (vertex->edge, vertex->face or
edge->face) blender only selects elements in the new mode whose
elements were completely selected in the previous mode.

This patch does not change blenders default behavior but offers
implicit selection mode conversion as an alternative. To access it,
hold either the left or right CTRL keys and click on a selection mode
in the view 3d selection mode header buttons. This can be accessed via
the CTRL-TAB selection mode switching as well, simply hold CTRL while
clicking the mode you want or entering its number on the keypad.

In some programs, such as Wings and Mirai, it has been demonstrated
that it can also be very useful to exploit selection mode switching to
implicitly select previously unselected elements as well. For instance
switching selection mode from vertex to edges will select all edges
currently associated with the currently selected vertices. The same
behavior is applied to switching between vertex->face and
edge->face. By exploiting this sort of selection conversion complex
selection sets can be built quicker.

Furthermore I modified blenders UndoMesh code to make selection mode
switching "undo coherent". Aside from its relevance to inclusive
selection mode conversion, this really counts as a "bug" in my
mind. Previously selection mode switch could cause the selection state
of the mesh to be invalid when certain modeling operations were
undone. An example of this would be "edge subdivide-> switch to face
mode-> undo"; you end up with edges selected while still in face mode!


# Part Two: Log for this Commit

-> Code Cleanup

As per Ton's request I reformatted all my code, changed variable names
and eliminated my use of "LinkNode" structs and replaced them with
"ListBase" instead. There should be no warnings while compiling now
either.

-> Remove doubles bug

Fixed small problem in removedoublesflag() in editmesh_tools.c that
caused editface structs to get their UV's scrambled. Vertex colors
might not be safe though? Need to investigate later.

-> Small bug in in the the code for merge last/first

It could cause a crash when exiting editmode, switching meshes, then
entering editmode again. "lastvert" and "firstvert" pointers are now
set to NULL whenever exiting editmode now (see load_editmesh() in
editmesh.c). I will find a better solution to this *soon*...

-> All merge tools now UV aware (optional)

The default behavior is to leave UVs alone, but if you hold CTRL while
clicking on the menu entry, UV's are merged. This works fine in most
situations, although some investigation into how to best handle
merging of UVs at the border of UV islands needs to be done.

This last item brings up a point about the current state of the
interface: several functions accessed through the WKEY menu now use
the CTRL modifier to change how they behave (This convention has been
in place for a while, see subdivide for example). Unfortunately there
is no way to communicate the way modifier keys change the behavior of
certain functions to the user. This makes such options invisible for
all intents and purposes...
2006-02-22 02:17:56 +00:00
Ton Roosendaal
ecaee2e3c8 Fix for very old annoyance; when an object is deformed far away from its
object center, it doesn't generate displaylist (or derivedmesh). This
error showed especially on loading files, and you had to advance frame,
zoom out or press Numpad-9 to see stuff.
2006-02-21 22:42:33 +00:00
Ton Roosendaal
4a7409186f Fix for crashing border select in FaceSelect mode. This was part of the
exr & floatbuffer merge of january 9... faulty code I didn't check.
2006-02-21 22:11:46 +00:00
Chris Want
96a21d5924 Making blender compile with Makefiles if WITH_OPENEXR is false. 2006-02-21 21:24:06 +00:00
Campbell Barton
ab4bca8db9 Tracked a redrawing crash down to drawtext.c - was doing ... % 0 causeing a devide by zero, just check for a zero value. 2006-02-21 15:49:45 +00:00
Ton Roosendaal
b9eb5620b5 Bug in Composite AddAlpha node. The option premul added alpha wrong. 2006-02-21 12:41:48 +00:00
Ton Roosendaal
a2a2ad98e2 Carefully went over all scanline updating while rendering, to ensure only
updates are allowed to draw when a part is within a scanline rendering
loop. Might solve threads issues with opengl...
2006-02-21 10:47:08 +00:00
Erwin Coumans
e3b840d086 exposed a few more tuning paramters 2006-02-21 07:08:23 +00:00
Erwin Coumans
5913414bf4 enabled vehicle/updated scons file (Makefile/projectfiles needs updating) 2006-02-21 06:08:18 +00:00
Erwin Coumans
90e5a9aa14 Reorganized Bullet physics files, added preliminary vehicle simulation files (disabled).
Requires some changes to projectfiles/makefiles/scons, for the added and removed files!
2006-02-21 05:36:56 +00:00
Ton Roosendaal
a6e7ff5ee9 Very silly typo in code caused Preview Window for Compositor to copy
Z values wrong... :)
2006-02-20 21:11:02 +00:00
Ton Roosendaal
ec47d960dc Compositor: new node "Z Combine", to combine two images with comparing
depth values. Current version doesn't make nice AA though... that I
check on next.
2006-02-20 18:33:55 +00:00
Ton Roosendaal
11a5d80420 Group duplicators, using linked groups, and which itself again were
linked, did not expand group.
2006-02-20 17:44:21 +00:00
Ton Roosendaal
04ec4a2530 Compositor upgrade;
- Links now can be made between any socket type. The nodes recognize amount
  of channels, and will convert types if needed.
  Conversions from RGBA to 1 channel will use the 'RGB to BW' formula.

  Also note that conversions only happen when required. So you can blur an
  alpha channel, filter it, and put this in a 1-channel socket without any
  conversion to happen, which saves memory & cpu time.

  http://www.blender.org/bf/rt.jpg

  The blur nodes don't accept Vector input yet... But filter does.

- RGB Curve Nodes now have the premultiply option resored, 2 x faster

- Fixed some confusing code in Node Group handling... much stabler now
2006-02-20 13:43:40 +00:00
Ton Roosendaal
24adc4f645 Hrms... theeth indeed cleaned up code, but it should also work! Didn't
compiling show the warnings?
2006-02-20 10:06:50 +00:00
Nathan Letwory
29a5fbc6b7 ==SCons==
* add -pthread compile switch for linux2 platforms to be on the safe side.
2006-02-19 22:21:45 +00:00
Ton Roosendaal
21be45b66e Another attempt to solve linux issues.... now threads get killed in
end instead of using SDL_WaitThread from example code...
2006-02-19 21:34:23 +00:00
Ton Roosendaal
1e95376410 Changing a glFLush() in glFinish() for drawing info text in renderwindow...
seems to be a reason for opengl crashes with thread render?
2006-02-19 20:53:07 +00:00
Martin Poirier
012f56c3d6 Patch: [ #3283 ] strcat --> sprintf
Less yuckiness!
2006-02-19 18:41:33 +00:00
Martin Poirier
da6b87abb1 Path: [ #2789 ] Add a "copy size" constraint
At long last!
This new constraint is pretty simple. Following in the footsteps of such giants as Copy Loc and Copy Rot, it lets you constrain the size of an object/bone to another object/bone, with per axis restrictions.
2006-02-19 17:42:20 +00:00
Ton Roosendaal
c7b472a54e Composite: Added "Fac" input for AlphaOver, so you can control amount. 2006-02-19 17:25:51 +00:00
Ton Roosendaal
0c1a1a855c Fix for Colorband node, it skipped calculus when 1 output was unused :) 2006-02-19 16:33:19 +00:00
Ton Roosendaal
130c41c7ba More compositing goodies.
- Texture Node
Allows to use any Blender Texture block as input for masks or color
blending. The texture node doesn't generate a real image, but adjusts to
the size as mapped with during an operation. So it won't work to use it
as Image input for Blur or Filter nodes.

Note; the Vector inputs for this node only work with manual input now!

- Translation Node
Give any image an offset in X or Y direction

For the Texture node to work, I needed to move the central 'pixel
processor' up one level... to allow differently sized images to merge
and allow 'procedural images' without size.

Temporal image of the day: http://www.blender.org/bf/rt.jpg
2006-02-19 14:55:16 +00:00
Brecht Van Lommel
f624730d26 Warning fix in subsurf_ccg.c. Also changed subsurf UV vertex and edge
handles to be more consistent.
2006-02-19 11:37:50 +00:00
Ton Roosendaal
427339fd0b Adding new SpotLamps should get 'buffers' set to 1. Was in the do_version()
check, but not in adding lamps... this will fix crashing shadowbuffers.
2006-02-18 19:35:53 +00:00
Ton Roosendaal
d128c19081 Added mask input for new Hue/Saturation Node. 2006-02-18 17:07:30 +00:00
Ton Roosendaal
7117d7f2c3 The regular warning fix update; includes two variables that were used
without initialization.

For Brecht:

source/blender/blenkernel/intern/subsurf_ccg.c:329: warning: left-hand operand of comma expression has no effect

This line I don't understand...
2006-02-18 16:21:32 +00:00
Ton Roosendaal
f4ddc2fde2 Quick change in Hue/Saturation Node: made the central Hue value 0.5, to
make applying changes easier. Saturation slider goes to 2.0 now.

Fix: rendering compositing nodes without scene crashed in header stats
drawing.
2006-02-18 15:57:46 +00:00
Ton Roosendaal
1ea9099474 - Restored "dither" option for conversion from float -> byte images.
This now is a post-process option only (used to be in render).
  It is only handled within the Imbuf/ module, on conversions from float
  to byte rect, which atm mostly happens on saving images.

- Small fix: when using Scene RenderLayer nodes, the speed vectors for
  these nodes were not created when that scene had "Do Composite" off.
2006-02-18 14:35:43 +00:00
Ton Roosendaal
7425a8fcaa Small tweak to get openexr compiling in scons 2006-02-18 14:26:38 +00:00
Ton Roosendaal
387f9a7c6d Four-in-one commit:
(NOTE: new include dependency in Render module, might need MSVC update!
It has to include the imbuf/intern/openexr/ directory in search path)

-> New Composite node: "Hue Saturation".
Works like the former 'post process' menu. There's no gamma, brightness or
multiply needed in this node, for that the Curves Node functions better.

-> Enabled Toolbox in Node editor
This now also replaces the SHIFT+A for adding nodes. The nodes are
automatically added to the menus, using the 'class' category from the
type definition.

Current classes are (compositor examples):

Inputs: RenderResult, Image
Outputs: Composite, Viewer
Color Ops: RGB Curves, Mix, Hue Saturation, AlphaOver
Vector Ops: Normal, Vector Curves, Map Value
Filters: Filter, Blur, VectorBlur
Convertors: ColorRamp, RGBtoBW, Separate RGBA, Separate HSVA, Set Alpha
Generators: RGB, Value, Time
Groups: the list of custom defined nodes

-> OpenEXR tile saving support
Created an API for for saving tile-based Images with an unlimited amount
of layers/channels. I've tested it for 'render result' now, with the idea
that this can (optionally) replace the current inserting of tiles in the
main result buffers. Especially with a lot of layers, the used memory for
these buffers can easily go into the 100s of megs.
Two other advantages:
- all 'render result' layers can be saved entirely in a single file, for
  later use in compositing, also for animation output.
- on each render, per scene, a unique temp file can be stored, allowing
  to re-use these temp files on starting Blender or loading files, showing
  the last result of a render command.

The option is currently disabled, needs more work... but I had to commit
this because of the rest of the work I did!

-> Bug fix
The Image node didn't call an execute event when browsing another image.
2006-02-18 13:28:44 +00:00
Ken Hughes
69d00bccaa ===Python API===
Bugfix: make face and edge .extend() methods check that input vertices are
from the same mesh.  Fixes a bug found by Cam.
2006-02-17 17:50:54 +00:00
Ton Roosendaal
6f62023850 - Added option 'convert to premul' to AlphaOver node in Compositor
- Fixed mix mode "Overlay", it was missing a multiplication with 2 :)
- small bugix in Matts nodes commit, wrong pointers transfered to coltobw()
2006-02-17 15:44:46 +00:00
Matt Ebb
90fa460d2a 3 very simple new composite nodes that I wanted for working with here. Hope the code is ok,
they work ok in testing here and get done what I need, any checks or fixes are welcome.

* Separate RGBA: Separates an input RGBA image into its R, G, B and A channels
* Separate HSVA: Separates an input RGBA image into H, S, V and A channels
* Set Alpha: Takes an input RGBA image and an alpha value channel and combines them
into a single RGBA image channel. You can also set the alpha for the entire image
with the number field when there's no input alpha channel. TODO: Allow input alpha
channel with no input image, in order to output a solid colour, with alpha.
2006-02-17 13:51:55 +00:00
Ken Hughes
7592c09c2b ===Python API===
Allow object.setMatrix() to accept 3x3 matrices by extending to a 4x4
internally.  Also check the dimensions of the new matrix and throw an
exception if not a 3x3 or 4x4.
2006-02-16 20:09:32 +00:00
Ton Roosendaal
fe036a0538 Added new malloc type in our MEM module; using the unix feature 'mmap'.
In Orange we've been fighting the past weeks with memory usage a lot...
at the moment incredible huge scenes are being rendered, with multiple
layers and all compositing, stressing limits of memory a lot.
I had hoped that less frequently used blocks would be swapped away
nicely, so fragmented memory could survive. Unfortunately (in OSX) the
malloc range is limited to 2 GB only (upped half of address space).
Other OS's have a limit too, but typically larger afaik.

Now here's mmap to the rescue! It has a very nice feature to map to
a virtual (non existing) file, allowing to allocate disk-mapped memory
on the fly. For as long there's real memory it works nearly as fast as
a regular malloc, and when you go to the swap boundary, it knows nicely
what to swap first.

The upcoming commit will use mmap for all large memory blocks, like
the composit stack, render layers, lamp buffers and images. Tested here
on my 1 GB system, and compositing huge images with a total of 2.5 gig
still works acceptable here. :)

http://www.blender.org/bf/memory.jpg
This is a silly composit test, using 64 MB images with a load of nodes.
Check the header print... the (2323.33M) is the mmap disk-cache in use.

BTW: note that is still limited to the virtual address space of 4 GB.

The new call is:
MEM_mapalloc()

Per definition, mmap() returns zero'ed memory, so a calloc isn't required.

For Windows there's no mmap() available, but I'm pretty sure there's an
equivalent. Windows gurus here are invited to insert that here in code! At
the moment it's nicely ifdeffed, so for Windows the mmap defaults to a
regular alloc.
2006-02-16 17:51:01 +00:00
Ton Roosendaal
7f4b01ccf0 Rendering tricks for improving workflow:
- Button option "Single" in render-layer panel will enable to only render
  the currently indicated render-layer. It will also skip compositing.

- Brought back the 'Local View' render. This will only render the visible
  objects, but with lights from the original view-layers.
  To make the option useful, it also temporal enables 'Single', which has
  the a disadvantage that you need to set the correct render-layer.

  It is a bit a tricky option though... since its quite invisble and
  confusing for people who don't know the feature. This might become either
  a button in 3d header, or use a popup requester to confirm, or... will
  need to think over!

At least; both options display in render window a text to denote the option.
2006-02-16 12:27:46 +00:00
Brecht Van Lommel
32a9c7b493 ==UV Editor==
Small ABF stability improvement, do some angle clamping during iteration,
fixes a particular model that went wrong.
2006-02-15 22:33:55 +00:00
Brecht Van Lommel
9fedbd6c51 ==Python==
Small bug reported on irc, matrix.translationPart didn't check bounds
properly (needed to use || instead of &&). Also fixed similar bugs in
rotationPart and rich compare.
2006-02-15 22:31:43 +00:00
Ton Roosendaal
55610ac7c1 We found out memory got fragmented a lot for creating speed vectors on
large scenes... this because it has to make 3 entire databases to find
the vertex-speed to previous and next frame. Even though most of the
prev/next database was freed, the parts I kept were spread all over
memory.

This commit copies from the prev/next database only the two screen aligned
speed vectors and stores that in temporal per-object structs. Even whilst
it takes more memory, it then can free the entire database, making space
for the next database to be built.
Tests reveiled it saves quite some... well, if you want to believe the
'virtual memory' total unix gives... :)
2006-02-15 19:55:29 +00:00
Ton Roosendaal
8d0a2c4192 Added printing stats back in commandline renders. Prints now a full 'log',
using 1 line per part rendered. Might go back to 1 line again, but at this
moment I need the logs for debugging.
Same prints are active now for UI rendering. Just temporal :)
2006-02-15 15:22:49 +00:00
Ton Roosendaal
9ef9d66a26 - Preview render (buttons) was executing the 'data ipos', causing inserting
keys with IKEY in buttons to not work.

- Crash in opengl while rendering was caused by the fact that scanline
  updates are drawn in the main thread, whilst the actual render thread
  then can already be doing different stuff.
  Especially with many layers & passes it's getting confusing easily :)

  Convention now is that scanline render updates only happen while the
  thread is looping over scanlines. As soon as it reached the last, no
  drawing happens, not even to update the last segment.
  This isnt a problen, since any finished tile is drawn again entirely.
2006-02-15 09:35:01 +00:00
Jean-Luc Peurière
8bc0060835 added proper casts to get things compiling with gcc 4.0 Os X 2006-02-14 23:52:47 +00:00