Age | Commit message (Collapse) | Author |
|
value is given to them
- dont import math as math and m, just import all members directly. (from math import *)
- was adding __builtins__ twice to the namespace
- account for unlikely but possibly failier to import math.
|
|
|
|
|
|
|
|
|
|
blender paths.
|
|
changed some malloc to MEM_mallocN while trying to track down a memory leak.
|
|
|
|
- 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.
|
|
access Matrix.is_negative
renamed Mathutils attribute wrapped -> is_wrapped
|
|
around incorrectly in r24435 before that. freeptr in BPy_StructRNA
was uninitialized when creating bpy.context.
|
|
written from scratch by Daniel Salazar (zanqdo). added own modifications.
New property type
bpy.props.FloatVectorProperty(), only difference with float is it takes a 'size' argument and optional 'default' sequence of floats.
moved bpy.props.* functions out of bpy_rna.c into their own C file.
|
|
set, Py_SetPythonHome seems insufficient. Not sure why this is needed or if there is a better solution, but couldn't find another one.
|
|
- fix for problem where proxy objects could enter editmode but not exit
|
|
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() ?)
|
|
* 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)"
|
|
* added renamed files in revision 25337
* renamed BLI_util.h -> BLI_path_util.h for consistency
* cleanup of #includes: removed BLI_blenlib.h in favour of direct includes of the needed headerfiles in a few places.
* removed debug print in sequencer.c
* added missing include in blenkernel/blender.c -> bad dependency, needs to be fixed still
|
|
|
|
can't handle (bug # 20258)
OSX allow file/directory names to contain ':' (displayed as '/' in Finder), and current Python lib (3.1.1) has trouble with those when importing modules.
Added warning message to help user understand why Blender start fails in this case.
|
|
approx 15-25x speedup
|
|
could not redo the bug on my system, fix suggested by Yomgui on blendercoders.
|
|
- set __file__ when running scripts (filename or textblock name)
|
|
|
|
|
|
|
|
The advantage with this is that global property definitions are not needed to add a property to an object.
to avoid confusion these are accessed like a dictionary (closely matching how the BGE accesses properties)
ob["mySetting"] = 1.0
bone["foo"] = {"one":1, "two":2.1, "three":"Three"}
if "foo" in bone: print("prop found...")
At the moment these can also be accessed as attributes, will be changed shortly. eg.
bone.foo == bone["foo"]
|
|
- 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.
|
|
crash on windows due to incompatible FILE struct between
Blender and python library, which is why it was not used
in 2.4x, so apply the same workaround now.
|
|
are present.
Also, error messages were mixed up, wrong type and not present where inversed.
|
|
|
|
- python defined classes will be used when available (otherwise automaically generated metaclasses are made as before)
- use properties rather then functions for python defined rna class's
- call the classes getattr AFTER doing an RNA lookup, avoids setting and clearing exceptions for most attribute lookups, tested UI scripts are ~25% faster.
- extending rna py classes this way is a nicer alternative to modifying the generated metaclasses in place.
Example class
--- snip
class Object(bpy.types.ID):
def _get_children(self):
return [child for child in bpy.data.objects if child.parent == self]
children = property(_get_children)
--- snip
The C initialization function looks in bpy_types.py for classes matching RNA structure names, using them when available.
This means all objects in python will be instances of these classes.
Python properties/funcs defined in ID py class will also be available for subclasses for eg. (Group Mesh etc)
|
|
- made the console banner printing function into a python operator (includes sys.version)
- added 'C' into the consoles default namespace for convenience
|
|
|
|
pythons sys which is bundled now
|
|
returns true
this means you can do...
C = {"selected_editable_objects":bpy.data.objects}
...when defining pythons context, without doing list(bpy.data.objects)
|
|
The aim of this is to avoid having to set the selection each time before running an operator from python.
At the moment this is set as a python dictionary with string keys and rna values... eg.
C = {}
C["active_object"] = bpy.data.objects['SomeOb']
bpy.ops.object.game_property_new(C)
# ofcourse this works too..
bpy.ops.object.game_property_new({"active_object":ob})
# or...
C = {"main":bpy.data, "scene":bpy.data.scenes[0], "active_object":bpy.data.objects['SomeOb'], "selected_editable_objects":list(bpy.data.objects)}
bpy.ops.object.location_apply(C)
|
|
python.
|
|
* The python 'math' library is now included in the py-namespace used to evaluate button expressions. So it is now possible to do 'radians(somevalue)' to get a rotation value that Blender can understand...
* Shapekey path getting function now uses the appropriate wrapper for grabbing the pointer to the ID block for the ShapeKey
* Made the Graph Editor's minimum zoom size finer...
|
|
eg.
for v in me.verts: print(v.index)
added calc_edges as an option eg.
mesh.update(calc_edges=True)
This is needed when adding faces to an existing mesh which create new edges.
|
|
|
|
- added bpy.sys as a python module - with bpy.sys.expandpath()
- moved bpy.ops into scripts/modules
- moved autocomplete into its own module from space_console.py
|
|
- moved release/io and release/ui into release/scripts/io, ui
- updated scons, cmake, make
When porting 2.4x scripts back, use a command like this so as not to loose the commit history...
svn cp https://svn.blender.org/svnroot/bf-blender/branches/blender2.4/release/scripts/raw_import.py release/scripts/io/import_raw.py
|
|
for now set the sys.stdin to None, this gives an error on input() or help() but better then locking up blender.
Would be nice to support for the blender console to be used as a stdin but this isnt so simple.
also quiet some warnings.
|
|
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Unix_FHS
for scons WITH_BF_FHS enabled an alternative layout eg.
scons WITH_BF_FHS=1 BF_INSTALLDIR="/usr/local"
for CMake just run "make install" after make (CMAKE_INSTALL_PREFIX is used for the base path)
Currently only scripts use both the system and user path correctly, other areas of blender have their own path code inline with lots of ifdefs, needs to be carefully updated.
|
|
PYTHONPATH
|
|
too (undefined function, assuming int, etc.)
This compiled fine with scons/msvc and scons/mingw (gcc 4.4.0). Please test and report any problems.
|
|
|
|
python modules on load.
BLI_exist vs BLI_exists (fun times were had by all)
|
|
getValue() rather than setValue()
- added GPL header to bpy_interface.c from 2.4x's BPY_interface.c
- warning fixes
|
|
reloading on - F8)
|