Commit Graph

61 Commits

Author SHA1 Message Date
20b16e4074 de-duplicate unique naming logic, was used in 7 different places, convert into a function call. 2010-11-07 08:49:07 +00:00
daa4feaaea bugfix [#24477] Can easily create bones with duplicate names
- fixed this error 7 different functions (deform groups, uv layers & similar).
- support for numbers over 999.
- renamed splitIDname() to BLI_split_name_num(), moved to BLI_path_utils
2010-11-01 07:19:41 +00:00
d9a7358b4c bugfix [#24462] UV Layouts saved as PNG results in two files (one is 0 KB, other has corrupted filename) 2010-11-01 01:46:26 +00:00
a49d1c20f1 Convenience defines SEP and ALTSEP (python has these), move BLI_*_slash function into path_util.h since these are not fileops. 2010-10-27 06:41:48 +00:00
Nathan Letwory
a293f76cdf Use DEBUG instead of NDEBUG 2010-10-18 06:52:10 +00:00
02d0084db9 changes to path searching
- don't search CWD/foldername anymore, only CWD/2.54/foldername, since this is the new default build systems use.
- local source paths (./release/scripts) are now treated as system path, otherwise when this is used you cant test ~/.blender/2.54/scripts at the same time.
2010-10-03 21:13:52 +00:00
ab8aa13b82 bugfix [#24087] Blender can not install add-ons unless running with root priviledges
now addon path is created using the same path functions and selecting where to save the startup.blend

also made some minor changes to path handling funcs.
2010-10-03 20:00:22 +00:00
b0b5db57da build systems have been updated, remove use of ~/.blender/ directly, ~/.blender/*version*/ instead. 2010-10-03 16:16:00 +00:00
Nathan Letwory
8ca75a36a0 Move copying of %TEMP% to U.tempdir after slash adding. Otherwise path is handled wrong when opening filebrowser for it. 2010-09-28 00:14:02 +00:00
Nathan Letwory
76b1a27f96 Use content of %TEMP% also in U.temp_dir instead of /tmp/ on Windows. Internal btempdir uses that anyway, so less confusing. 2010-09-27 23:28:45 +00:00
99643037ca new utility function BLI_testextensie_glob
uses fnmatch to match strings like "*.foo;*.bar;*.blend?"
2010-09-24 06:20:43 +00:00
6717b75ecd bugfix [#23783] /../ prefix stops going up a dir
also fix for recent addition to operator check(), when the file selector is loaded with no operator.
2010-09-17 15:11:12 +00:00
6827ac7e0d bugfix [#23263] Changing view crashes blender 2010-08-12 03:37:45 +00:00
Dalai Felinto
73f1d88be2 Bugfix for:[23234] Blender File Browser - Back Button does work with first directory entered?
For !WIN32 systems the fix was in ED_fileselect_set_params
(basically adding the first folder in the sfile->folders_prev list)

For WIN32:
I talked with Nathan (Jesterking) and he agreed that the fix in path_util.c was required too. Without that BLI_path_abs was always making WIN32 paths ending with \ to end with \\
(e.g. C:\Blender\ --> C:\Blender\\)
And this was making the folder to fail ISDIR tests.
2010-08-09 22:54:40 +00:00
50c3da699d minor cleanup, minimal functional change.
replace some long duplicated, ifdef'd if statements for image extension.
- new function: BLI_testextensie_array(), can take an array of extensions.
- define extension arrays: imb_ext_image, imb_ext_movie, imb_ext_sound - we could have more of these.
- removed amiga extensions iff and lbm
2010-08-03 12:34:42 +00:00
51bd50f746 == installation paths ==
Hopefully last fix for path issues for this release
* The config folder should also be searched for in the 'local' path for local installations
(This code was already there, but removed in revision 30440)
2010-07-21 05:49:48 +00:00
e4756f4c33 2.5: installation paths, local directories (in the same folder as executable)
are now considered system rather than user directories, as you would expect
these to override any system directory for local installations.
2010-07-17 15:42:01 +00:00
ca3f3317b2 == installation paths ==
* rename BLI_gethome to BLI_getDefaultDocumentFolder to better reflect how this function is used
* replaced BLI_gethome with getenv("HOME") on Linux and Mac where it retrieves location of bookmarks that are inserted as system bookmarks. BLI_gethome was a thin wrapper around these and in this case the user's home directory is what is actually wanted.
2010-07-16 16:02:07 +00:00
615db01b01 == installation paths ==
* fix for autosave location -> shouldn't use BLI_gethome anymore
* this frees BLI_gethome of having to emulate the local->user->system search path and can now be truly considered as 'home/default location for .blend files'
* removed setting the default G.sce from read_history, was out of context there.
* fix for creating user dir, leftover from previous commit.

jesterKing, please review -> if there are any issues I will fix or revert.
2010-07-15 21:39:47 +00:00
05fb497f75 == installation paths ==
remove deprecated python BLI_gethome_folder calls

Patch by Brecht, thanks a lot
2010-07-15 20:02:53 +00:00
7a3ff66575 == installation paths ==
* fix case where environment variable was used without subfolder
* some small cleanup
2010-07-15 19:42:36 +00:00
cfa5580843 Fix for use of path environment variables, was not appending subfolder. 2010-07-15 15:03:42 +00:00
5daf9354d2 change some references to .B.blend, .Blog to new names 2010-07-15 11:51:43 +00:00
ee9437f794 Fix for #22818: blender doesn't find a systemwide installed python.
What happens is that blender looks for a directory "python" in the same
place as the executable for local installations, but that also means when
you have /usr/bin/blender it will look for /usr/bin/python, which is an
executable. Now it checks if it is actually a directory and not a file.
2010-07-14 10:44:34 +00:00
75a0301c7d == installation paths ==
separate define for the user and system blender directory name,
on Linux the directories should be named /usr/share/blender and ~/.blender.

Platform maintainers should still check if that's ok.
2010-07-11 16:28:28 +00:00
Nathan Letwory
ce0ff001ac Ensure that local installations (also known as portable installations) are possible again.
For user config and data files, first check the 'local' location (where the executable is located), and only then the actual user locations (whatever the convention for the OSes; $HOME, %APPDATA%, etc).
2010-07-10 11:09:26 +00:00
Nathan Letwory
bb626c3963 give an actually existing buffer instead of potential NULL 2010-07-06 06:43:21 +00:00
Nathan Letwory
78adaa6bc7 * use blender_decimal_version() in places where '.blender/' was still being used
* simplify the NSIS file creation (and add those files back).

NOTE: The installer is still pretty much WIP, tomorrow more improvements.
2010-07-05 19:59:27 +00:00
4135f1310c Patch [#22339] File/installation paths changes
Update after discussions on IRC:
* operating system specific path retrieval is moved back to GHOST, nothing blender specific here though
* cleaned up path functions a bit to remove #ifdefs
* removed Cocoa from blenlib again

TODO:
* Matt, Damien, please check and correct the functions for Cocoa and Carbon, could only put back existing code but needs adjustment
* finish GHOST_getBinaryDir - this should replace the BLI_where_am_i eventually as well as BLI_getInstallationPath on Windows and get_install_dir for the blenderplayer runtime
* It would probably be nice to define GHOST_getTempDir as well and move those out
* more cleanups...

NOTE:
Things are likely broken for macs
2010-07-04 21:14:59 +00:00
15de21e438 fix for 2 bugs in own recent commits,
- 29881 broke BLI_stringdec in some cases.
- poll function for view home crashed view menu because the rv3d isnt available (still needs fixing).
2010-07-04 17:14:06 +00:00
574d307635 fairly sure this is a typo, matt/elubie please check 2010-07-04 16:47:58 +00:00
790491b0f0 Fix for paths commit from Andrea:
For Mac, there was no code supporting Carbon. Added a stubs function
to make it compile, but it doesn't work yet properly.
2010-07-04 16:34:24 +00:00
ca81aa704e Patch [#22339] File/installation paths changes
Patch Tracker: http://projects.blender.org/tracker/?func=detail&aid=22339&group_id=9&atid=127

This patch implements the proposal outlined here:
http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal

Original patch by Matt Ebb.
Contributions by Nathan Letwory, Damien Plisson and Andrea Weikert

NOTE:
This is a work in progress commit, some work still needs to be done on the SCons and CMake files for this to work properly, but at least should compile and the files should be created in the right directory.

Commit discussed on IRC with Ton and Campbell.
2010-07-04 15:35:23 +00:00
15be7b215f - changes to the sequencer so new strips use the data name.
- removed the name option for the sequence operators.
2010-07-02 20:09:42 +00:00
1cb7dc55b4 sequencer numpad keys for zoom levels 2010-06-17 14:22:54 +00:00
dd3513e362 Fix Bug #22324
Blender crashes when wiring an image input to an image output in the
compositor (not the same image)

The string to keep the full path was usign FILE_MAXDIR, when
has to be both, FILE_MAXDIR + FILE_MAXFILE (240, like FILE_MAX).
2010-06-16 16:42:40 +00:00
ed338da8c9 - WITH_CXX_GUARDEDALLOC working again
- CMake building without python or fluidsim working again (broke in recent commit)
- remove BLI_short_filename(), it wasnt used anywhere.
2010-06-06 01:15:44 +00:00
4da179749e - [#22492] [29159] commit breaks importing of script file that has a reload to self in it
broke when including the blend path in the modules filename.       

- new function BLI_path_basename(), matches pythons os.path.basename().
  replace a number of cases where BLI_split_dirfile was being used to get the filename only.
2010-06-05 21:19:59 +00:00
c0a32f2f65 search for scripts in the release directory relative to the blender binary. 2010-06-03 13:31:50 +00:00
566c92fff7 fix for buffer overrun with making a path relative.
would only happen when the names of the path and the relative location matched which isnt likely but happened today when Soenke somehow made a file link to its self.
2010-06-03 13:05:45 +00:00
008863daec Merge image related changes from the render branch. This includes the image
tile cache code in imbuf, but it is not hooked up to the render engine.


Imbuf module: some small refactoring and removing a lot of unused or old code
(about 6.5k lines).

* Added a ImFileType struct with callbacks to make adding an file format type,
  or making changes to the API easier.
* Move imbuf init/exit code into IMB_init()/IMB_exit() functions.
* Increased mipmap levels from 10 to 20, you run into this limit already with
  a 2k image.
* Removed hamx, amiga, anim5 format support.
* Removed colormap saving, only simple colormap code now for reading tga.
* Removed gen_dynlibtiff.py, editing this is almost as much work as just
  editing the code directly.
* Functions removed that were only used for sequencer plugin API:
  IMB_anim_nextpic, IMB_clever_double, IMB_antialias, IMB_gamwarp,
  IMB_scalefieldImBuf, IMB_scalefastfieldImBuf, IMB_onethird, IMB_halflace,
  IMB_dit0, IMB_dit2, IMB_cspace
* Write metadata info into OpenEXR images. Can be viewed with the command
  line utility 'exrheader'

For the image tile cache code, see this page:
http://wiki.blender.org/index.php/Dev:2.5/Source/Imaging/ImageTileCache
2010-05-07 15:18:04 +00:00
93f420b666 correct typo's 2010-04-25 15:24:18 +00:00
394537715d string number decoding didnt check for win32 slash & minor adjustments to some other path funcs (no functional change). 2010-04-23 23:01:50 +00:00
27fa482714 Fix for bug in r28320, sizeof(pointer) was breaking path functions 2010-04-22 01:06:59 +00:00
0430572dee bugfix [#22098] Binreloc buffer overrun
from Dan Eicher (dna)

there are many of these in blender however this case could happen quite easily.
2010-04-21 07:59:16 +00:00
8f1500da00 remove config.h references, was added for automake build system rev around 124-126 but isnt used by any build systems now. 2010-04-18 10:28:37 +00:00
3c6a0274b9 cleanup
* removed code that could lead to Blender writing in the Windows directory - is very old cruft and doesn't work on recent versions of Windows anymore and rightly so :)
2010-03-31 18:02:56 +00:00
1e9bf0cfdb spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text) 2010-03-22 09:30:00 +00:00
07b547980d remove unused includes for blenlib, left ifdef's for non linux os's alone. 2010-03-20 18:52:03 +00:00
1708ac0723 rename some functions to use easier to understand names.
'BLI_makestringcode' --> 'BLI_path_rel'
'BLI_convertstringcwd' --> 'BLI_path_cwd'
'BLI_convertstringframe' --> 'BLI_path_frame'
'BLI_convertstringframe_range' --> 'BLI_path_frame_range'
'BLI_make_cwdpath' --> 'BLI_path_cwd'
2010-03-09 17:36:23 +00:00