Commit Graph

29 Commits

Author SHA1 Message Date
Campbell Barton
1658a28a58 - Python console argument '--python-console', option so you can start blender and drop into a python console, (useful for debugging some problems on a renderfarm over ssh)
- Also made it so sys.stdin isnt overwritten anymore, instead the interactive consoel overwrites while it executes and restores after.

- removed hope folder from sphinx patch path
2010-05-30 14:05:58 +00:00
Campbell Barton
247b7249bd [#21682] help() doesn't work in the console
replace pydoc's pager function so the console's input isnt used.
2010-03-21 14:56:26 +00:00
Campbell Barton
f8a4683b72 pep8 warnings 2010-03-14 23:26:17 +00:00
Campbell Barton
9ce5be3706 workaround for [#21486] Python debuger pdb don't work
setting sys.stdin to None is done so python wont lock blender when it tries to read from the input. - help() from the console does this.
Running blender with -d keeps the stdin so python debugging can work. add info in the help message about this.

eventually it might be best to replace sys.stdin with our own object which interacts with the console but this is not trivial.
2010-03-08 12:29:58 +00:00
Campbell Barton
0e18035f82 remove so-called security patch,
this has been used by various projects but needs to be justified since it wont remove paths that also resolve to the CWD, "." for instance.
2010-02-28 17:11:42 +00:00
Campbell Barton
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
Campbell Barton
fd3842f3a2 Mathutils doc improvements + other small things
- bpy.app moved into PyStructSequence (used by sys.float_info)
- added buildinfo into bpy.app.build_*
- bpy.ui removed (wasnt used)
- include external example files in Mathutils docs (only Mathutils and Vector are currently written)
- added support to auto document PyStructSequence's
- CMake had "'s inside all its strings.
2010-01-31 21:52:26 +00:00
Campbell Barton
95069f2909 pep8 changes 2010-01-31 14:46:28 +00:00
Campbell Barton
18ea9b6443 move bpy.load_scripts --> bpy.utils.load_scripts
added sequencer strip length display in seconds
2010-01-28 11:48:06 +00:00
Campbell Barton
478dc000b3 * Mathutils attributes documented - http://www.blender.org/documentation/250PythonDoc/Mathutils.html
* Vector.difference() needed normalized vectors
* bpy.DEUBG -> bpy.app.debug
2010-01-27 21:33:39 +00:00
Campbell Barton
3b09e73e58 - bugfix (user supplied fix) [#20745] makesrna with rename error.
- error with last commit, length had an index arg.
2010-01-22 14:59:01 +00:00
Campbell Barton
c6979aa0f4 continue when there are errors on reloading scripts 2010-01-22 14:43:08 +00:00
Campbell Barton
0568f608c4 Patch from Jochen Schmitt, (various distro's had patched this)
- modify the path in python rather then C
- filter returns an object in python 3, set using slice.

also import sys as _sys so it doesnt appier in aytocompleation.
2010-01-20 19:26:23 +00:00
Campbell Barton
e723b060fc python script reloading (f8)
- reload modules from types that are not directly included. for example wm.py uses classes from modules/rna_prop_ui.py which wasnt reloaded.
- script paths were being added to sys.path multiple times.

note: now the second reload gives a crash right away but this is a bug elsewhere.
2010-01-18 10:02:55 +00:00
Campbell Barton
f6c79c553b [#20646] 2.5 does not load python scripts with multiple dots in the filename
- not a bug so add a warning if people add scripts with invalid names like this.
2010-01-12 10:04:03 +00:00
Campbell Barton
04d0261c37 new python submodule. eg.
from bpy.app import binary_path, version, version_string, home

can add constant variables from blender here as needed (maybe functions too... bpy.app.memory_usage() ?)
2010-01-02 23:14:01 +00:00
Campbell Barton
98f1d6957e new python module constants
* bpy.home - result of BLI_gethome()
* bpy.version - BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION
* bpy.version_string, as above, formatted: "%d.%02d (sub %d)"
2009-12-28 10:00:04 +00:00
Campbell Barton
944a4f2a3f pep8 edits, removed MakeCursor.py and rna_array.py, not important to make pep8 2009-12-26 09:36:50 +00:00
Campbell Barton
a1656300ba script for automating pep8 checks.
On ubuntu/debian install these tools...

   sudo apt-get install pylint pyflakes python-setuptools python-pip
   sudo pip install pep8

then run from blenders source dir...
   python release/test/pep8.py

This searches for the comments "# <pep8 compliant>" and "# <pep8-80 compliant>", running the checking tools on these scripts only.

* some minor pep8 corrections too.
2009-12-13 13:59:16 +00:00
Campbell Barton
5ebe54f470 pep8 edits and fix some warnings 2009-12-05 22:03:07 +00:00
Campbell Barton
651336d5df fixes for automatic tests and some errors in last commit 2009-12-05 20:45:51 +00:00
Campbell Barton
33c444f965 User Script support added back.
- the scripts path set in the user preferences or ~/.blender/scripts/ui (io, op, io etc..) will be used to load scripts.
- the default home dir part probably only works in *nix os's

- Added a missing sync callback to vector.toTuple()
2009-11-30 22:32:04 +00:00
Campbell Barton
e9db9f2a91 - made properties in the view3d panel only show when there are some properties available since this the option to add props isnt in this panel
- remove print on startup
2009-11-23 13:06:26 +00:00
Campbell Barton
771406df94 - hide members of bpy from dir() and autocomp.
- path functions bpy.utils.script_paths(), bpy.utils_preset_paths(subdir)
- further simplified presets, use a generic draw function for preset menus and define the preset subdir and operator in the class
2009-11-22 11:23:19 +00:00
Campbell Barton
1dfbf3a9f6 - aspectx wasnt saved in the render preset
- define a preset base class
- cleanup some comments and whitespace
2009-11-21 23:55:14 +00:00
Campbell Barton
3f10b91235 operator properties were not the correct type 2009-11-19 16:15:22 +00:00
Campbell Barton
d04f94d0c6 skip rna property & function lookups for members starting with "_" (since makesrna disallows this)
added a way profile python startup in bpy/__init__.py, if'd out by default.
2009-11-14 23:11:46 +00:00
Campbell Barton
5a322bd67c F8 reload works again, script errors are printed but dont stop loading every other script 2009-11-13 11:10:29 +00:00
Campbell Barton
4c7dc3e5c5 changes python initialization
- bpy is now a python package, this makes it easier to add utility modules and adjust python startup which was previously using verbose Py/C api. Access should not be any slower since both C and Python modules use dictionary access.
- loop over scripts and load via python (currently F8 reload isnt working, will add back shortly)
- the C module is kept but renamed to _bpy and not meant for direct access from anything but the bpy package.
- bpy_types.py is an exception since it runs before the bpy package is initialized.
2009-11-13 09:28:05 +00:00