Commit Graph

111 Commits

Author SHA1 Message Date
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
e417e011d5 Code cleanup: file operations merged into single header, some function names
made less cryptic and changed to indicate if they work on files or directories.
2011-10-22 15:35:49 +00:00
74017cb020 header cleanup and typo's 2011-10-22 01:53:35 +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
15bf56c696 changes to relative path option
- initialize the relative_path option in ED_fileselect_get_params(), saves initializing within every operators own init functions, some even trying to initialize a non existing property.
- don't set the operator default from the user preferece, operator property defaults should be static else python scripts for eg can get different defaults depending on user settings, this also wont get updated when user-defaults are edited so generally confusing & not good practice.
2011-10-12 00:15:19 +00:00
388eae9a81 minor edits
- use TRUE/FALSE rather than 1/0
- WM_operator_properties_create_ptr rather than WM_operator_properties_create since the pointers available.
- remove redundant strlen()
2011-10-05 12:20:38 +00:00
7058a8e2ae fix [#28809] Fileselect strange icon display. 2011-10-05 07:57:33 +00:00
8dbc7a3ba3 Merging r40345 through r40365 from trunk into soc-2011-garlic 2011-09-19 15:47:05 +00:00
f157a543c6 /blender/editors: Removed final points in UI strings and messages.
Plus a few cuts in very long lines…
2011-09-19 12:26:20 +00:00
Xiao Xiangquan
77926a7f9d select uiStyle according to UserDef and update lang-packs 2011-07-16 18:28:24 +00:00
Xiao Xiangquan
b429af10d0 merge from trunk #37722 2011-06-24 03:30:50 +00:00
a48a4270dc fix for PLY import using directory only select, operators which define 'files' but not 'filename' or 'filepath' would use the directory selector.
also made code less confusing.
2011-06-21 04:03:26 +00:00
fd24c99b5d directory only filesel for operators which don't have a filepath or filename property. 2011-06-16 15:01:22 +00:00
53939ee4e9 Fix: correct spacing for file select items, using font size + dpi. 2011-06-07 15:33:01 +00:00
08f44adba9 file selector now scales with DPI better 2011-06-05 14:00:06 +00:00
16ba377026 fix for a crash with the following steps.
- open file sel
- save user defaults
- new file
- ctrl+u (crash)

wasn't type checking the space file, passed info space to ED_fileselect_exit().
2011-04-25 09:28:52 +00:00
210ee1ade4 whitespace only, no functional change mixed tabs/spaces --> tabs. 2011-04-21 13:11:51 +00:00
1c6956a4d6 quiet msvc/mingw compiler warnings. 2011-04-10 09:37:04 +00:00
4c44a1fc04 quiet warnings. 2011-04-03 13:17:07 +00:00
a73c3fe5c9 subsurf, derived mesh and other misc files: floats were being implicitly promoted to doubles, adjust to use floats. 2011-03-27 17:22:04 +00:00
e73a2020dd == filebrowser == Code cleanup
* Separate out selection flags from file type flags, was bothering me since forever ;)
* Also renamed ACTIVEFILE to SELECTED_FILE to better reflect actual usage in code.
* Fix crash introduced with last commit, better check for valid selection
2011-03-20 11:16:59 +00:00
eb53b0fb4c quiet warning for GCC 2011-03-14 22:16:35 +00:00
41c27cd6ef == filebrowser ==
Cleanup of selection code.
Also fixed bug where selection outside the tiles was clamped and file in last column was selected.
2011-03-14 19:56:13 +00:00
c7fccc84bf use NULL rather then 0 for pointer assignments & comparison, modifier, imbuf & editors. 2011-03-05 10:29:10 +00:00
Nathan Letwory
95100afc12 doxygen: blender/editors tagged. 2011-02-27 20:29:51 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
59f1640ae5 warning cleanup.
- fix mistake with grease pencil UI (&& was intended but & used).
- use (void) rather then () across _all_ blenders code.
- a few minor edits, don't shadow stack variables in roll calculation & avoid running memset() for VBO vertex map.
2011-02-13 15:02:21 +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
8227b3d463 remove/comment unused vars
also removed unnecessary NULL checks (where the pointer was used later without checking).
2011-01-13 04:53:55 +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
63f131803c == filebrowser ==
* removed now unused function file_string_width_shortened.
2010-11-14 10:53:49 +00:00
2e84732228 == filebrowser ==
* drawing code cleanup.
* list drawing code now uses uiStyleFontDraw like buttons etc.
2010-11-14 10:48:36 +00:00
030253cdf6 fix for building, also use const char in more places. 2010-11-11 07:51:12 +00:00
d475448bdd == filebrowser ==
Added two user preferences for filebrowser:

1. Hide Recent Locations
Requested by Kernon Dillon. Reason: People doing video tutorials might not want to expose the name of other projects they are working on.

2. Open Filebrowser in thumbnail view for images and movies
Requested by Sebastian König at the Blender Conference. Reason: In the past (and most likely still) some corrupt images or movies could crash the filebrowser when generating thumbnails. (crashes in ffmpeg, libtiff, libjpg). While many of those were solved, artists in a production environment might want to use this setting to prevent any crashes.

NOTE: the second setting should probably be set next time we create a new default startup.blend. Until then users need to switch this on manually in the User Preferences.
2010-11-06 18:54:15 +00:00
5b0e1520cf == filebrowser ==
Center Text underneath the icons in thumbnail view. (Small request from Sergey)
2010-11-06 17:03:11 +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
4d37cf90b9 remove G.sce, use G.main->name instead.
Both stored the filename of the blend file, but G.sce stored the last opened file.
This will make blender act differently in some cases since a relative path to the last opened file will no longer resolve (which is correct IMHO since that file isnt open and the path might not even be valid anymore).

Tested linking with durian files and rendering to relative paths when no files is loaded however we may need to have some operators give an error if they are used on the default startup.blend.
2010-10-18 06:41:16 +00:00
e5fbd93cec editors/space_* build without unused args warnings 2010-10-16 08:03:28 +00:00
80f6ca9850 fix for own error with recent patch edits, globbing wasnt being cleared so importing an OBJ would keep *.obj when opening a blend. 2010-09-25 08:29:25 +00:00
6a4b9298c8 patch [#23968] filter_filetypes property to allow operators to filter by file extensions in the file selector
modified the patch to store the string internally rather then an array of allocated string pointers, less hassle with memory allocation.
changed to use fnmatch, so *.foo is needed (not .foo as with the patch)
2010-09-24 07:05:43 +00:00
Nathan Letwory
a06c46d8dd Apply patch [#23846] Fix for [#23698] in File Browser system. Properly removes handler and sfile when File selector disapears.
Patch by Alexander Kuznetsov
Reported by Chidozie Oku

From patch description:
"
Handler is now released on every exit from File Selector. For example pressing ctrl-up and then changing editor type
to another also releases the handler.

When an area is changed from SPACE_FILE, ED_fileselect_exit is called for clean up. It takes function of freeing folder
list and files (before it was done in cancel or exec functions) because they must be released on every exit anyway.
op!=null means cancel or exec was not executed so a handler was not released. ED_fileselect_exit then releases the handler
without changing screens.
"

Thanks!
2010-09-17 22:12:23 +00:00
d1759639dc - remove unused includes IMB_*, BIF_* & MEM_*
- remove MEM_guardedalloc.h from header files (include directly)
2010-08-16 05:46:10 +00:00
ad4fc20ec9 moved idcode functions into their own file (was added as a todo in the comments), these were mixed in with file reading code - BLO_readfile.h bot these functions are not spesific to reading. 2010-08-10 15:14:19 +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
f2d77e4496 remove unused includes from editors/space_* 2010-08-08 08:14:07 +00:00
213a45bed8 changes to file selector so 'directory' property from an operator is used when available.
also made some other changes to the path functions used.
2010-07-02 17:44:57 +00:00
c2f36a4d6a naming changes
path -> filepath (for rna and operators, as agreed on with elubie)
 path -> data_path (for windowmanager context functions, this was alredy used in many places)
2010-06-14 03:52:10 +00:00
5be1fd3592 == filebrowser ==
- smooth scrolling to editable button after new directory is created
(for now scrolling starts as soon as the mouse moves back to the file list area, for Matt to check if immediate scrolling is possible)

- fix for autocomplete directory, show first matching part if directory doesn't exist, otherwise won't work for directories starting with the same prefix like textures_walls and textures_grass for example.
2010-05-08 21:02:22 +00:00
14b41f9078 bugfix [#22276] filemanager autocompleate based on current path
also added autocomp to filename in fileselector
2010-05-07 23:34:03 +00:00