Commit Graph

81 Commits

Author SHA1 Message Date
Nathan Letwory
7900b5949f doxygen: blender/blenlib tagged. 2011-02-27 20:37:56 +00:00
2e5eb41522 pedantic warning cleanup, also remove texspace_edit() since its been added using a different method. 2011-02-27 08:31:10 +00:00
a12315e4ec use const char for return values of getenv(). 2011-02-26 15:28:56 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
9ef0eed4b6 build python module without binreloc, add dummy argv[0] to initialize bprogname. 2011-02-21 13:13:08 +00:00
d17df68c24 - clear some warnings
- rename layout.operator_enums -> operator_enum (since we have operator_menu_enum, only called in 4 places)
2011-02-18 06:07:41 +00:00
51d78b43de Fixing compiling on windows 2011-02-13 06:19:15 +00:00
867fc4b463 enforce string limits (reported by pedantic checking tools & some developers).
mostly replace strcpy with BLI_strncpy and multiple strcat's with a BLI_snprintf().
also fix possible crash if CWD isnt available.
2011-02-13 03:21:27 +00:00
6e47ffcc0d fix for uninitialized value in BLI_path_cwd() if PWD wasn't defined and the CWD was longer then 160. 2011-02-12 10:37:37 +00:00
92672d0c1c quiet some clang warnings. 2011-02-12 05:12:26 +00:00
c7834e0e6e And here's a decent fix for correctly recognizing the the
.blend1 etc backups. 
Proves again that lazy coders only make bad code :) 

Implementation note:
The filewindow now recoginizes .blend version backups as
a special type, so filtering for .blend files themselves
ignores it. However, they're recognized correctly as valid
.blend files, and draw an icon as .blend file when filtering 
is off. Can become a distinct icon if we want...
2011-01-30 13:12:03 +00:00
9d0b8486c8 Stupid error in commit to allow .blend1 and .blend2 being dropped in
window caused .blend itself to be not seen :) Mea Maxima Culpa!
2011-01-30 12:26:16 +00:00
ff58fc3e86 Todo list fix: .blend backup files are recognized as such now;
for drop inside Blender window and icons. (.blend1, .blend2, etc).
2011-01-29 17:47:22 +00:00
8f21a43535 split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
2011-01-07 18:36:47 +00:00
2f366d1544 use BLI_strnlen rather then strlen when comparing against fixed lengths. 2010-12-05 23:50:55 +00:00
fa4bbbb249 Maintenance,
- remove some redundant declarations
- changed VertexTangent and Path structs to avoid compiler alignment padding.
2010-12-04 13:00:28 +00:00
263830f000 Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for 'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
2010-12-03 17:05:21 +00:00
1e245cc589 option to write images to a files on single frame renders, this isn't accessed by the UI at the moment, but could eventually be used for saving test-renders.
The main reason to have this is so renders can be scripted to write to a specific file without having to do annoying tricks like set a dummy start/end frame range, render an animation and work out the current frame image will be written to, then rename after rendering.

Also made some 'char *' args into 'const char *'
2010-11-16 14:40:46 +00:00
7f96852176 fix for creating movie paths with non utf8 names.
button test if non utf8 chars are allowed was inverted.
2010-11-16 08:53:55 +00:00
ed61900e5e - avoid loop within loop for unique naming function (even though it wasnt likely to run often).
- off by 1 error with outliner naming length. was 1 too short.
2010-11-07 09:33:10 +00:00
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