Commit Graph

73 Commits

Author SHA1 Message Date
3c86a1932f Code cleanup: add BLI_testextensie_n, replacing multuple calls to BLI_testextensie
also use attributes for BLI path functions
2014-01-31 03:30:05 +11:00
d45ea33ff1 Fix T37591: 'Extensions' option ignored for movies. 2013-11-25 16:59:10 +11:00
ddb3ad9092 Code Cleanup: replace shorts with ints for path code. 2013-11-24 16:20:04 +11:00
91a24654dd Code Cleanup: whitespace / formatting 2013-11-24 15:23:38 +11:00
35b61a7512 Move GCC attributes into a centraized defines
Instead of having ifdef __GNUC__ all over the headers
to use special compiler's hints use a special file where
all things like this are concentrated.

Makes code easier to follow and allows to manage special
attributes in more efficient way.

Thanks Campbell for review!
2013-09-01 15:01:15 +00:00
bd2f6c5907 default blend file name setting (untitled.blend) length check wasn't correct, move to generic function BLI_ensure_filename(). 2013-08-29 05:34:58 +00:00
ec3fce8e27 add api function BLI_path_append to add to a path (and ensure a seperator), replaces BLI_join_dirfile when the dir and the destimation were the same. 2013-07-24 21:25:06 +00:00
3c722f037a Fix for own mistake in r57555 :-(
Add include to autoexec.c instead of BLI_path_util.h

Thanks Bastien Montagne for the hint.
2013-06-18 19:09:49 +00:00
f2abb213d2 Compile fix for r57554 missing include "BLI_string.h" in BLI_path_util.h 2013-06-18 18:42:29 +00:00
64d161de87 style cleanup:
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
2013-03-26 07:29:01 +00:00
08aef8a7c8 code cleanup: move doxy docs from headers into source. also replace strncpy();str[len]=0 with BLI_strncpy() in BLI_stringdec(). 2013-03-24 01:51:54 +00:00
16b82845ee code cleanup: add 'const' to headers to quiet msvc warnings, also remove (char *) casts that aren't needed now we're on Python3.3 2013-03-17 18:30:31 +00:00
384948908a patch [#34103] path_util_split_dirstring.patch, path_util_split_dirstring_2.patch, path_util_split_dirstring_3.patch
from Lawrence D'Oliveiro (ldo)

Get rid of BLI_splitdirstring, replace with calls to BLI_split_dirfile, BLI_split_dir_part and BLI_split_file_part as appropriate.
2013-03-05 06:26:10 +00:00
34233e7fd6 patch [#34103] path_util_cleanups.patch
from Lawrence D'Oliveiro (ldo)

- Better argument name for BLI_cleanup_path and BLI_cleanup_file
- remove redundant BLI_add_slash already done by BLI_cleanup_dir
2013-03-05 04:35:14 +00:00
f44b54d2a7 patch [#34103]
from Lawrence D'Oliveiro (ldo)

More use of bool type, necessitating adding inclusion of BLI_utildefines.h, or moving it up in the inclusion order if it was already included, in various places
- storage.c: make some variables only used in bli_builddir local to that
- storage.c: BLI_file_descriptor_size should allow 0 as a valid file descriptor
- path_util.c: make pointers to non-reentrant storage returned from folder routines const, necessitating making variables holding these returned pointers const elsewhere as well
- path_util.c: BLI_string_to_utf8 closes iconv context in case of conversion error
-  blf_lang.c: fill_locales routine now has its own "languages" local variable to construct paths (was stealing internal storage belonging to BLI_get_folder before)
2013-03-05 03:17:46 +00:00
0d5b028d43 patch [#34103] use boolean in path functions and add comments.
path_util_1.patch from Lawrence D'Oliveiro (ldo)
2013-03-04 19:27:51 +00:00
013a176c52 patch [#34103] use booleans for extensions testing.
bli_testextensie.patch - from Lawrence D'Oliveiro (ldo)
2013-03-04 18:36:37 +00:00
fb989c2a65 code cleanup: don't alloca zero size and remove paranoid NULL checks (checked all uses and there not needed). 2012-12-24 14:59:15 +00:00
1ab6306177 minor edits
- add BLENDER_QUIT_FILE define.
- use const for passing rcti's in widget drawing.
2012-12-13 02:40:49 +00:00
12b642062c Holiday coding log :)
Nice formatted version (pictures soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability

Short list of main changes:

- Transparent region option (over main region), added code to blend in/out such panels.
- Min size window now 640 x 480
- Fixed DPI for ui - lots of cleanup and changes everywhere. Icon image need correct size still, layer-in-use icon needs remake.
- Macbook retina support, use command line --no-native-pixels to disable it
- Timeline Marker label was drawing wrong
- Trackpad and magic mouse: supports zoom (hold ctrl)
- Fix for splash position: removed ghost function and made window size update after creation immediate
- Fast undo buffer save now adds UI as well. Could be checked for regular file save even...
  Quit.blend and temp file saving use this now.
- Dixed filename in window on reading quit.blend or temp saves, and they now add a warning in window title: "(Recovered)"
- New Userpref option "Keep Session" - this always saves quit.blend, and loads on start.
  This allows keeping UI and data without actual saves, until you actually save.
  When you load startup.blend and quit, it recognises the quit.blend as a startup (no file name in header)
- Added 3D view copy/paste buffers (selected objects). Shortcuts ctrl-c, ctrl-v (OSX, cmd-c, cmd-v). 
  Coded partial file saving for it. Could be used for other purposes. Todo: use OS clipboards. 
- User preferences (themes, keymaps, user settings) now can be saved as a separate file.
  Old option is called "Save Startup File" the new one "Save User Settings".
  To visualise this difference, the 'save startup file' button has been removed from user preferences window. That option is available as CTRL+U and in File menu still.
- OSX: fixed bug that stopped giving mouse events outside window.
  This also fixes "Continuous Grab" for OSX. (error since 2009)
2012-12-12 18:58:11 +00:00
3bb17bd64a fix for crash in sequencer introduced with recent cache addition,
- running undo with metastrips would crash immediately.
- freeing a strip without a scene would crash (clipboard does this).
2012-09-06 04:45:25 +00:00
aaafa0c2fe code cleanup: move file string defines into BLI_path_utils.h, BKE_utildefines is now unused but keep incase we want to add defines there later. 2012-09-03 22:04:14 +00:00
635db3b306 code cleanup: add utility function BLI_path_is_rel() 2012-08-29 10:32:38 +00:00
5455cadb3d fixed function name: BLI_rebase_path, reworked description, added enum bli_rebase_state for defined return values 2012-06-22 15:38:49 +00:00
0b7593a3dc finish cleanup for plugins 2012-05-29 10:31:42 +00:00
9892736206 code cleanup: header cleanup and remove some duplicate defines. 2012-05-12 20:39:39 +00:00
e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
95670e03a0 style cleanup / comment formatting for bli/bke/bmesh 2012-03-03 20:19:11 +00:00
7bbf4b7831 style cleanup
- spelling - turns out we had tessellation spelt wrong all over.
- use \directive for doxy (not @directive)
- remove BLI_sparsemap.h - was from bmesh merge IIRC but entire file commented and not used.
2012-03-02 16:05:54 +00:00
2b7ca2304a unify include guard defines, __$FILENAME__
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-17 18:59:41 +00:00
dc1b3d88b8 fix [#29098] File save dialog cannot handle extra periods in file name 2011-10-31 00:23:42 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
88473fd49a Code cleanup: remove BLI_exist, now there is only BLI_exists. One function just
called the other, they did the same thing.
2011-10-21 22:33:41 +00:00
00735ed9e4 Code cleanup: don't use btempdir/bprogdir/bprogname globals anymore, but wrap
in BLI_ functions.
2011-10-21 17:37:38 +00:00
ef218c75ed - add convenience functions BLI_split_dir_part / BLI_split_file_part, which just call BLI_split_dirfile().
- add a fixed value for bprogdir (the dir of bprogname), since it was being used for resource lookups.
2011-10-21 02:13:36 +00:00
317b649bb2 fix for buffer overrun with BLI_split_dirfile(...), was simple to do since many places don't check for filename lengyj of 79 chars which is the limit for the file selector.
Add max dir and file length args.
2011-10-15 03:56:05 +00:00
d369a6aaaf Windows installer and Path changes, fixing various issues:
* Windows installer not working for non-admin users and multiple users
* Addon scripts not installing next to user configuration
* Portable install not being taken into account in all places

The main problem was the windows installer was installing system scripts in
AppData next to the user configuration directory, which is not shared between
users. Now these are installed in ProgramFiles, and only addon scripts added
by the users go to AppData.

On all platforms, addon scripts were sometimes getting installed between
system scripts, because the scripts folder in the executable directory was
given precedence over the user configuration folder, that is no longer done
now. So addons now behave like user configuration, they are preserved even
if you download a newer build of the same blender version.

If you have an installation of 2.57 on windows, the addon install location
will not change until we do the version bump to 2.58, to avoid conflicts with
the existing the installed 2.57 version.

The old behavior of giving precedence to the local folder was done to support
portable install, where all configuration is written to the local folder. This
is now implemented differently: if and only if a "config" folder exists in the
local folder, portable install will be assumed, and files will only be written
to that local folder.
2011-05-27 09:57:53 +00:00
6e39d908a9 quiet compiler warnings for -Wundef 2011-05-22 04:25:31 +00:00
0a2a138d86 remove player runtime writing functions, this is now an addon. 2011-05-03 08:45:40 +00:00
02fbaede8f workaround [#27203] Crashes with some high-res image thumbnail generation
skip generating thumbs for images over 100mb.
also pass string lengths as size_t rather then int for path_util.c functions.
2011-05-02 10:22:49 +00:00
f8c09b37d4 api changes needed for for copying old settings to new.
- py: bpy.utils.resource_path('USER', 2, 56)
- C: BLI_get_folder_version(id, major, minor, check);
2011-04-11 13:56:58 +00:00
1c6956a4d6 quiet msvc/mingw compiler warnings. 2011-04-10 09:37:04 +00:00
a7507e945d fix [#26803] Libs paths are case sensitive in windows
use case insensitive path comparison on windows: BLI_path_cmp
2011-04-06 06:03:48 +00:00
d6ca95b1a3 fix [#26451] Little problem when selecting relative output path
BLI_path_rel() no longer strips trailing slashes.
2011-03-11 00:30:51 +00:00
a12315e4ec use const char for return values of getenv(). 2011-02-26 15:28:56 +00:00
Nathan Letwory
b97ad119b9 doxygen: add blenlib under core as module. 2011-02-18 13:58:08 +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
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
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