Commit Graph

26 Commits

Author SHA1 Message Date
Campbell Barton 6fc8a74886 Cleanup: trailing space for blenkernel 2018-06-17 17:05:51 +02:00
Bastien Montagne 400e8c6449 Cleanup: readfile: cleanup a bit error messages.
Printing those twice is already not so nice, but at least let's try to print same thing,
and avoid repetition of 'ERROR' in it.
2015-11-13 15:26:22 +01:00
Campbell Barton 617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
Sergey Sharybin 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
Campbell Barton 418011907c remove nan copyrights from code added since blender become opensource (copy paste errors), also remove BKE_script.h 2013-07-02 10:14:59 +00:00
Brecht Van Lommel a9facca899 Fix OS X build error with Quicktime, need <stdio.h> for FILE usage. 2013-02-26 00:49:38 +00:00
Campbell Barton 3fc0d2691d include a stacktrace in the crashlog text written by the segfault handler. 2013-01-11 01:30:44 +00:00
Brecht Van Lommel b3802d0041 Fix build error on Mac, bool needs an #include. 2013-01-10 17:46:23 +00:00
Campbell Barton 18536e201f add a segfault handler that writes out the info log into a crash file alongside the blend file. 2013-01-10 16:37:48 +00:00
Campbell Barton 9892736206 code cleanup: header cleanup and remove some duplicate defines. 2012-05-12 20:39:39 +00:00
Campbell Barton ee6aaafd31 code cleanup: typos and set gcc attributes for string formatting. 2012-04-25 06:06:40 +00:00
Brecht Van Lommel b53cbb4e01 Fix #30512: external render saved render result after reporting error. 2012-03-12 11:32:23 +00:00
Campbell Barton 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
Campbell Barton 4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Campbell Barton 2e5eb41522 pedantic warning cleanup, also remove texspace_edit() since its been added using a different method. 2011-02-27 08:31:10 +00:00
Nathan Letwory 22638e22ea doxygen: blenkernel under core as module. 2011-02-18 13:05:18 +00:00
Campbell Barton 0271ad6322 Give functions that use printf style formatting GCC format attributes so if incorrect formatting is used the compiler will warn of this.
found & fixed 2x incorrect formatting args.
2010-12-04 11:44:56 +00:00
Matt Ebb 21d112c36f Reworked the non-blocking reports display in the info header:
* Now it displays the last report from the global list, not just from operators
* Rather than disappearing when a new operator is run, it stays until it times 
out or a new report is added
* Fun animated transitions ;)
http://mke3.net/blender/devel/2.5/reports_header.mov

Now need to investigate report usage with popups. Ideally we can have most
 reports non-blocking, so they're less intrusive, only popping up for dire errors.
Problem is many things in Blender right now are marked as RPT_ERROR 
when probably RPT_WARNING is more appropriate. Should probably keep 
RPT_ERROR for things that demand immediate attention.
2010-06-03 07:27:55 +00:00
Campbell Barton 081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
Campbell Barton deb180e37f - Scrollbars for the console (use View2D functions)
- Set View2D operators not to register, got in the way a lot with the console.
- Made autocomplete Ctrl+Enter so Tab can be used.
- Should work with python 2.5 now. (patch from Vilda)
- Moved report struct definitions into DNA_windowmanager_types.h, could also have DNA_report_types.h however the reports are not saved, its just needed so the report list can be used in the wmWindowManager struct. Fixes a crash reported by ZanQdo.
- Store the report message length in the report so calculating the total height including word wrap is not so slow.
2009-07-16 22:47:27 +00:00
Campbell Barton 2f74b5a260 Console Space Type
* interactive console python console.
* display reports and filter types. defaults to operator display so you can see the python commands for tools as you use them,
  eventually it should be possible to select commands and make macto/tools from them.

Example use of autocomp.  b<tab>, bpy.<tab>, bpy.<tab>, bpy.data.<tab> etc.

basic instructions are printed when opening the console.

Details...
* Console exec and autocomp are done with operators written in python.
* added CTX_wm_reports() to get the global report list.
* The window manager had a report ListBase but reports have their own struct, switched to allocate and assign when initializing the WM since the type is not available in DNA.
* changed report types flags for easier display filtering.
* added report type RPT_OPERATOR
* logging operators also adds a python-syntax report into CTX_wm_reports() so they can be displayed in the console as well as calling a notifier for console to redraw.
* RnaAPI context.area.tag_redraw() to redraw the current area from a python operator.

Todo...
* better interactions with the console, scrolling, copy/paste.
* the text displayed doesnt load back.
* colors need to be themed.
* scroll limit needs to be a user pref.
* only tested with cmake and scons.
2009-07-16 00:50:27 +00:00
Brecht Van Lommel 37864a4273 2.5
Image Window
* Unpack operator now works.
* Some small layout code tweaks.

Info Window Header
* Moved to python UI code.
* template_running_jobs, template_operator_search added.
* Ported external data operators: pack/unpack all, make
  paths relative/absolute, find/report missing files.

Also
* Report RPT_INFO too, not only warnings and errors.
* Run UI handle functions after RNA and Operators.
* Rename particle system add/remove operators, to not
  include "slot", that's only there for materials because
  that's what they are called now in RNA.
2009-06-30 19:20:45 +00:00
Campbell Barton 5d23eaa8f4 python support for reporting with operators.
* errors in python called operators are raised as errors
* Python defined operators errors are reported as errors (not full traceback yet)
* added BKE_reports_string, same as BKE_reports_print but it returns a string rather then printing it.
* WM_operator_name_call optionally takes an initialized report struct
2009-01-02 07:54:38 +00:00
Brecht Van Lommel 0a8a00cd10 2.5: Error reporting
* Added a report list to operator, to which they can report errors and
  warnings. When the operator ends, it will display them with a popup. For
  python these should become exceptions when calling operators.
* Added a function to make a popup menu from a report list.
* Also added a utility function to prepend a string before the reports to
  indicate what they relates to. Also made the report functions used
  BLI_dynstr to simplify the code.
* Made file reading and writing report errors to the user again using this
  system, also replacing the left over uncommented bad level error() calls.
2008-12-29 13:38:08 +00:00
Brecht Van Lommel d9de6fca6c 2.5: Change blenloader module to use the Report system for reporting errors. 2008-12-19 00:50:21 +00:00
Brecht Van Lommel ecc4e55b66 2.5
Context API

This adds the context API as described here. The main practical change
now is that C is not longer directly accessible but has to be accessed
through accessor functions. This basically adds the implementation of
the API and adaption of existing code with some minor changes. The next
task of course is to actually use this design to cleanup of bad level
calls and global access, in blenkernel, blenloader.

http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Context

Error, Warning and Debug Info Reporting

This adds the error reporting API as described here. It should help
clean up error() calls in non-ui code, but eventually can become used
for gathering messages for a console window, and throwing exceptions
in python scripts when an error happens executing something.

http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Reports
2008-12-18 02:56:48 +00:00