Commit Graph

98 Commits

Author SHA1 Message Date
7f2d1f651c ==== blenlib ====
- added replacement BLI_snprintf for snprintf to avoid MSVC specific #defines for snprintf.
- BLI_snprintf also ensures trailing zero, so helps preventing buffer overflows
2007-03-19 19:34:04 +00:00
Ken Hughes
83e72cc813 Fix various gcc warning, unused variables and incorrect type passed to
*printf functions.
2007-03-17 14:46:04 +00:00
c7ad7cd1b0 === bugfix ===
[ #6077 ] Scripts in sub-sub-folders of Blender's scripts folder won't run.
[ #5572 ] Scripts in sub-folders of Blender's scripts folder won't run
- I've added a function in blenlib to join two strings with a path separator in between.
- Willian, Campbell, please check if commit in BPY_menus is ok and test - thanks!
2007-02-28 21:37:14 +00:00
e53c5058b4 === bugfix ===
filename and path issues:
[ #6107 ] Animation crashes when ouput folder does not exist
- using the Windows drive as default and only then degrading to the
  Blender installation drive and then the first valid drive.
- in case of degrading added error message print to console to make it
  transparent
[ #6106 ] fluids - no default path
- setting the default path to U.tempdir where Blender stores temporary files
2007-02-28 20:11:10 +00:00
Stephen Swaney
5cb958f305 broken build!
FILE_MAX undefied in util.c
implicit method def Armature_CreatePyObject() in Armature.
2007-02-22 10:20:27 +00:00
f12d312275 === bugfix ===
- path without volume name still caused error when used as name for relative base
- could happen with name in .Blog file saved by older blender version
- fix for [ #6065 ] Blender refuses to save any renders
2007-02-21 20:00:03 +00:00
253432bfc7 The Big Image refactor!
Please read:
http://www.blender3d.org/cms/Imaging.834.0.html

Or in short:

- adding MultiLayer Image support
- recoded entire Image API
- better integration of movie/sequence Images

Was a whole load of work... went down for a week to do this. So, will need
a lot of testing! Will be in irc all evening.
2006-12-20 17:57:56 +00:00
20ac94e8f0 Two hours of fixing details based on Klocwork source review. Useful report,
although it has a lot of noise. Not to mention our bad string code gives
a load of warnings.

I've reviewed specifically:
- file reading/write
- dna and library code
- node system
- entire render module

Done a couple of files in src/ too, seemed to be nice errors.
2006-12-01 19:52:04 +00:00
7de24b7ea8 MSVC compiler is non-posix for some string operations...
Created a BLI_strcasestr and used existing BLI_strcasecmp in code now.
2006-11-07 16:27:31 +00:00
ecfdda30cd - fix for relative path: BLI_strncpy needs to be passed len+1 !
(introduced by my last patch - ouch)
2006-10-02 16:11:57 +00:00
5277232d42 FIX: [ #4944 ] Shift F4 menu folders are freezed
- code for adding 'c:\' on Windows missed fact that BLI_convertstringcode is also used for databrowse.
- now only replacing when path starts with '/', which isn't the case with databrowse
2006-09-16 11:42:37 +00:00
2ee42ac01e Huge commit: VERSE
- All code is in #ifdef ... #endif
 - Only make build system is supported and you have to add:
    export WITH_VERSE=true
   to user-def.mk file
 - Blender can share only mesh objects and bitmaps now
 - More informations can be found at wiki:
    http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlender
    http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlenderUserDoc

  I hope, that I didn't forget at anything
2006-08-20 15:22:56 +00:00
ffe630b452 Fixes for:
[ #4337 ] Cant refresh the C:\
[ #4710 ] Wrong paths in file selector under user prefs
[ #4353 ] Using ^ char + click on Open/Load = Blender crash

Details:

Fixes for root paths like C:\ on Windows, where Blender still used '/'.

Also contains fixes for relative paths:
- no relative paths for the default dirs (forced to absolute)
- message if using relative paths when .blend file hasn't been saved.

Lastly also added '.' for refresh in root paths. Windows
FindFirstFile/FindNextFile also return '.' and '..', but not in root paths like C:\
2006-08-20 14:41:13 +00:00
05166d0a35 === bugfix ===
Fixing case where BLI_make_file_string reads one byte before passed in string when the string is empty.
Leftover from patch tracker item #2740 - thanks Andrew Zabolotny.
Also fixed the part that made sure exactly one slash is appended at the end of the dir - comment wasn't telling what the code did here :)
2006-02-11 15:02:23 +00:00
Chris Want
dc2cab13bd Strangely, the BLI_timestr() function returns nonsense on linux for
ia64. It appears that if I get rid of the fmod expression, and
use integer math I get the right values. Hopefully this isn't a
problem for anybody.
2006-02-01 20:16:50 +00:00
042d612df2 Giant commit!
A full detailed description of this will be done later... is several days
of work. Here's a summary:

Render:
- Full cleanup of render code, removing *all* globals and bad level calls
  all over blender. Render module is now not called abusive anymore
- API-fied calls to rendering
- Full recode of internal render pipeline. Is now rendering tiles by
  default, prepared for much smarter 'bucket' render later.
- Each thread now can render a full part
- Renders were tested with 4 threads, goes fine, apart from some lookup
  tables in softshadow and AO still
- Rendering is prepared to do multiple layers and passes
- No single 32 bits trick in render code anymore, all 100% floats now.

Writing images/movies
- moved writing images to blender kernel (bye bye 'schrijfplaatje'!)
- made a new Movie handle system, also in kernel. This will enable much
  easier use of movies in Blender

PreviewRender:
- Using new render API, previewrender (in buttons) now uses regular render
  code to generate images.
- new datafile 'preview.blend.c' has the preview scenes in it
- previews get rendered in exact displayed size (1 pixel = 1 pixel)

3D Preview render
- new; press Pkey in 3d window, for a panel that continuously renders
  (pkey is for games, i know... but we dont do that in orange now!)
- this render works nearly identical to buttons-preview render, so it stops
  rendering on any event (mouse, keyboard, etc)
- on moving/scaling the panel, the render code doesn't recreate all geometry
- same for shifting/panning view
- all other operations (now) regenerate the full render database still.
- this is WIP... but big fun, especially for simple scenes!

Compositor
- Using same node system as now in use for shaders, you can composit images
- works pretty straightforward... needs much more options/tools and integration
  with rendering still
- is not threaded yet, nor is so smart to only recalculate changes... will be
  done soon!
- the "Render Result" node will get all layers/passes as output sockets
- The "Output" node renders to a builtin image, which you can view in the Image
  window. (yes, output nodes to render-result, and to files, is on the list!)

The Bad News
- "Unified Render" is removed. It might come back in some stage, but this
  system should be built from scratch. I can't really understand this code...
  I expect it is not much needed, especially with advanced layer/passes
  control
- Panorama render, Field render, Motion blur, is not coded yet... (I had to
  recode every single feature in render, so...!)
- Lens Flare is also not back... needs total revision, might become composit
  effect though (using zbuffer for visibility)
- Part render is gone! (well, thats obvious, its default now).
- The render window is only restored with limited functionality... I am going
  to check first the option to render to a Image window, so Blender can become
  a true single-window application. :)
  For example, the 'Spare render buffer' (jkey) doesnt work.
- Render with border, now default creates a smaller image
- No zbuffers are written yet... on the todo!
- Scons files and MSVC will need work to get compiling again

OK... thats what I can quickly recall. Now go compiling!
2006-01-23 22:05:47 +00:00
014aa7261e Orange branch: OpenEXR finally in Blender!
Credits go to Gernot Ziegler, who originally coded EXR support, and to
Austin  Benesh for bringing it further. Kent Mein provided a lot of code
for integrating float buffers in Blender imbuf and ImBuf API cleanup,
and provided Make and Scons and static linking.

At this moment; the EXR libraries are a *dependency*, so you cannot get
the Orange branch compiled without having OpenEXR installed. Get the
(precompiled or sources) stuff from www.openexr.com. Current default is
that the headers and lib resides in /user/local/

Several changes/additions/fixes were added:

- EXR code only supported 'half' format (16 bits per channel). I've added
  float writing, but for reading it I need tomorrow. :)
- Quite some clumsy copying of data happened in EXR code.
- cleaned up the api calls already a bit, preparing for more advanced
  support
- Zbuffers were saved 16 bits, now 32 bits
- automatic adding of .exr extensions went wrong

Imbuf:

- added proper imbuf->flags and imbuf->mall support for float buffers, it
  was created for *each* imbuf. :)
- found bugs for float buffers in scaling and flipping. Code there will
  need more checks still
- imbuf also needs to be verified to behave properly when no 32 bits
  rect exists (for saving for example)

TODO:

- support internal float images for textures, backbuf, AO probes, and
  display in Image window

Hope this commit won't screwup syncing with bf-blender... :/
2006-01-09 00:40:35 +00:00
f88a0a6efd Orange: more relative path code cleanup. Introduced a new call in the
blenlib to correctly convert a relative path to a clean new path:

BLI_cleanup_dir(const char *relabase, char *name);

Only works for directories now.
2005-12-14 13:21:32 +00:00
e58eecbea5 Fix: reading library files with option "Relative Paths" set, whilst library
was read already AND relative, caused the path for libraries to corrupt...

Error caused big headaches in studio Orange... :)
2005-12-11 22:03:04 +00:00
629d954ef3 Fix for #3316: do not convert slashes in the relname in BLI_make_file_string
Also fixed signature to const char* to indicate which parameters can be changed
to make it a bit safer, because constant strings are passed into this function
and changing them caused a crash.
2005-11-05 13:09:43 +00:00
3c5b54ba6b disabled my previous fix, because of a reported crash when constant strings are passed so testbuilds can go on. Will provide propper fix later 2005-11-02 07:16:00 +00:00
6eb47e98c3 Fix for item #3316 : make sure that BLI_make_file_string converts all
slashes in the filenames to the system preferred direction.
Leaving unix slashes caused the error in the Python module
blender.Get('filename')
2005-11-01 20:25:23 +00:00
76b7d3b402 Fix for correct handling of relative filenames.
Now relative filenames that are not below the .blend file
in the directory hierarchy can be used.

CAUTION: 
  The relative filenames are not updated if the blend file
  is moved to another dir or saved into another dir (save as)
  We will rely on the smartness of the users for this.

my first official commit - thanks Ton!
2005-10-24 20:52:51 +00:00
410512e265 Patch provided by Shaul Kedem: Compressed files are back!
He even made a nice doc in wiki:
http://wiki.blender.org/bin/view.pl/Blenderdev/Blendgz

Usage: set the option "Compress File" in the main "File" pulldown menu.
This setting is a user-def, meaning it is not changed on reading files.
If you want it default, save it with CTRL+U.

The longest debate went over the file naming convention. Shaul started
with .blend.gz files, which gave issues in Blender because of the code
hanging out everywhere that detects blender files, and that appends the
.blend extension if needed.

Daniel Dunbar proposed to just save it as .blend, and not bother users
with such details. This is indeed the most elegant solution, with as
only drawback that old Blender executables cannot read it.
This drawback isn't very relevant at the moment, since we're heading
towards a release that isn't upward compatible anyway... the recode
going on on Meshes, Modfiers, Armatures, Poses, Actions, NLA already
have upward compatibility issues.
We might check - during the next month(s) - on a builtin system to
warn users in the future when we change things that make a file risky
to read in an older release.
2005-07-27 19:46:06 +00:00
Nathan Letwory
f73183ae49 * fix for bug #2720 2005-06-10 13:12:59 +00:00
Nathan Letwory
b7cc5b790a * Check path for NULL. Fixes potential crash on non-win32 systems at startup, but also future passes of null. 2005-05-20 12:37:48 +00:00
Nathan Letwory
1071d4a16e This commit fixes two related issues:
1:
* when a blendfile gets loaded, paths are corrected with OS specific slashes (see blender.c)
* made available BLI_char_switch(char *string, char from, char to)
* made available BLI_clean(char *string);. This function should be called whenever you're doing path stuff, so paths are correctly saved, and thus avoiding other path functions stopping to work

2:
* relative paths work now in sequencer too (due to slash mess that didn't work all too well).
2005-05-20 12:18:11 +00:00
3144d64076 - fix unused variable warning 2005-04-02 18:20:03 +00:00
24c9f65056 - got tired of str[n]casecmp not declared warnings
- added BLI_str[n]casecmp, use instead of regular versions
 - rewrote BLI_str[n]casecmp to not be stupid
2005-04-02 15:36:57 +00:00
85b9f7ccfb - switch some code to using BLI_strncpy (with right string lengths!) 2005-03-28 18:37:19 +00:00
b4ff308709 bug fix for #2096:
- switched strcpy calls to strncpy using FILE_MAXDIR & FILE_MAXFILE to prevent buffer overruns.  Non-windows code left untouched. :)
2005-03-28 15:29:59 +00:00
b2288bca09 Applied correct '\\' for file paths on Windows (thanks Elubie!) 2005-03-03 20:40:48 +00:00
d12960dd2d fix for potential crasher. we were returning pointer to a local var 2004-12-12 13:29:54 +00:00
c90ffd49e0 - changed sequence for finding HOME on Win32. Sequence is now as
shown at http://www.blender3d.org/cms/Installation_Policy.352.0.html

   Still TODO:  update NSIS installer script to suit the change.
2004-07-11 21:54:18 +00:00
00b44d4db2 - nasty memory corruption on windows for getting home directory
- check to make sure $HOME/.blender exists before returning that
    as the home
2004-05-10 20:35:46 +00:00
9936d28382 - switched a strcat and strcpy pair... doh! (well spotted b-ix!)
- appended "./blender" to %HOME% return for Win32. Is consistant now
  with the other returns for Win.
2004-05-06 21:40:38 +00:00
255cd235a3 - Returned multi-user support on Win2k/XP.
Now uses 'Application Data/Blender Foundation/Blender' instead of old
  "Not A Number" dir.

- Updated windows installer to make this change transparent for the
  users. It copies /.blender to the new location and displays a short
  message to advise them of the change
  (http://homepages.nildram.co.uk/~aphex/installer_msg.jpg).

- Installer also includes fix for opening blend files from explorer (patch provided by Valentin Ungureanu (vung) - thanks!)

Note to CVS users on Win2k/XP:  Although blender will continue to work
without changes, you should ideally copy the /.blender dir to
<app data>/Blender Foundation/Blender for the sake of correctness :)
2004-04-20 19:12:48 +00:00
6d68c41e62 last minute commit -- saving .b.blend files on Windows for users
who have set a %HOME% environment var now works again.
Patch provided by Bill Baxter, plus an additional fix for Win9x.

There is still work to be done with this after the 2.32 release...
2004-01-29 20:30:05 +00:00
Nathan Letwory
1126706d2e - [win32] now really using the directory Blender is installed in. My patch was kinda incomplete, but aphex_ (Simon) was kind enough to point out the lines to edit :) 2004-01-07 21:03:11 +00:00
b5e0a7b401 Nathan Letwory's patch for Bug #458 (Fileselect bug) 2003-12-01 14:27:06 +00:00
066df297b5 - fixed a bug when saving user defaults (Win32 only)
(the first save didn't store paths or font settings!)

This is something I broke back at 2.28a :)
I'm suprised there were no bug reports on this, but it's fixed now! ;)
2003-10-25 14:09:18 +00:00
80f3d5863e - Transition period for Windows... Part 2! :) 2003-08-12 20:37:45 +00:00
258bc61e2a - Fix bug #250:
Blender no longer uses the windows dir as %HOME%
  This also fixes the ".blanguage not found" errors when
  double-clicking .blend files. (Win32)

  Needs testing at Win2k/XP!!!
2003-08-11 18:53:23 +00:00
936f7541c4 moved #include <sys/param.h> inside #ifdef __APPLE__ 2003-05-12 17:13:12 +00:00
23e8e19f5c added function to get the full path to the application bundle on os x 2003-05-12 14:59:08 +00:00
695c968825 - translations for comments in blender lib files 2003-04-26 16:02:26 +00:00
d0e346d544 updated .c files to include:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

Just need to finish cpp files now :)

Kent
--
mein@cs.umn.edu
2002-11-25 12:02:15 +00:00
Hans Lambermont
12315f4d0e Initial revision 2002-10-12 11:37:38 +00:00