Commit Graph

6532 Commits

Author SHA1 Message Date
Campbell Barton
9cf9ce75af 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.
2006-03-21 22:16:41 +00:00
Ton Roosendaal
8383c44a85 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.
2006-03-21 11:29:03 +00:00
Ton Roosendaal
b746e27c82 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.
2006-03-20 20:52:04 +00:00
Andrea Weikert
a89905d6fa === 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
2006-03-20 17:25:42 +00:00
Ton Roosendaal
e469e4875f Cineon/DPX export didn't survive when Blender gave it negative colors.
Was missing test for it before turning it into unsigned short.
2006-03-20 16:53:13 +00:00
Campbell Barton
99dbcaa2f1 Fixed an error in the help printout and set out the formats that are not supported on all os's. 2006-03-20 16:24:00 +00:00
Ken Hughes
4fcd19013b Fix various gcc warnings. 2006-03-19 20:45:50 +00:00
Ton Roosendaal
ee5d54c0fa Threshold for non-flat quad detection was too wide still. Causing errors
of quads filling in in octrees...
2006-03-19 20:14:16 +00:00
Ton Roosendaal
cf0408a4f6 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
2006-03-19 17:50:53 +00:00
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
Campbell Barton
528ea06531 Updated to use Blender.sys.exists() which now uses BLI_exist rather then stat. 2006-03-19 13:31:44 +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
Campbell Barton
f356eac8a4 Update box unpack with faster python use
Update image loader, optional arg for not autocreating the image. - aslo removed some stuff that shouldent have been left in.
  Workaround for a bug in Blender.sys.exists()... should fix soon.
2006-03-18 11:41:07 +00:00
Nathan Letwory
8d9629cef9 ==SCons==
* The documentation for BF_QUICKDEBUG et al, missing from previous commit. Also
  provided by Joseph Eagar.
2006-03-17 16:42:43 +00:00
Nathan Letwory
b92c2197ec ==SCons==
* Applied patch #4012 by Joseph Eagar. The patch provides a way to quickly assign a list
  of libraries to build with debug symbols. Usage:

  scons BF_QUICKDEBUG=src,bf_blenkernel,bf_blenlib
2006-03-17 16:38:39 +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
Nathan Letwory
fd54be1d46 ==SCons==
* Link to png_st. Jens reported linking with dynamic lib crashed, but with static doesn't.
2006-03-16 19:16:26 +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
c8d295080c mmap allocs now fall back on regular malloc when mmap fails. 2006-03-15 15:06:53 +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
Campbell Barton
afc8dec921 Small updates to import images in win32. 2006-03-14 20:28:02 +00:00
Campbell Barton
afeba9462e Support win32 paths. 2006-03-14 20:27:27 +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
Stephen Swaney
c538f3e19f tweak SCons to use Split() to parse BF_DEBUG_FLAGS and BF_PROFILE_FLAGS
properly when they have multiple options.
2006-03-14 18:28:47 +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
Nathan Letwory
cf6c497d6f ==SCons==
* CC and CXX for linux2
2006-03-14 12:20:04 +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
Jens Ole Wund
ca6aca0c07 restoring minimum debug build on msvc6 projects
-no GE
-no OpenExr / hum.. may be that's why storing a PNG does not crash
2006-03-14 08:49:41 +00:00
Jean-Luc Peurière
868874bd10 security patch #3910 provided by Joerg Sonnenberger on Os X
file opening
2006-03-13 18:27:51 +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