Commit Graph

3192 Commits

Author SHA1 Message Date
b68c911931 fix for mistake checking engines on load. 2011-04-13 00:51:48 +00:00
d78220549b fix for compile issue on MSVC 2008 due to macro expansion differences with gcc. 2011-04-12 17:58:54 +00:00
771390793f fix for crash when pressing 'Copy Startup Settings', was using out of date main database. 2011-04-12 17:18:02 +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
70cd0803ab add new subtype PROP_COORDS, for generic coordinates that are not to be changed by units. 2011-04-08 13:32:56 +00:00
6b3f5ecd18 change to fcurve keyframe coords broke simplify addon since the property
was no longer wrapped by python as a vector. now fixed size float arrays
with PROP_NONE subtype are wrapped as vectors since its convenient to
have x/y access.
2011-04-08 01:40:54 +00:00
696e7a311a include needed for windows 2011-04-06 06:29:10 +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
ca254dd37b add option WITH_BUILTIN_GLEW, so linux packagers can disable to use their own glew library. 2011-04-05 23:31:01 +00:00
4ea7e562f8 rename mathutils.Vector/Quaternion difference() method to rotation_difference() since its too vague when applied to vectors. 2011-04-04 05:17:23 +00:00
0298d223cc quiet various warnings, also disable -Wdouble-promotion with cmake since it gives warnings with variable length args. 2011-04-03 10:04:16 +00:00
371a7b477d Fix register method order. Was broken when Campbell moved it to the C implementation.
register has to be called AFTER the type is registered while unregister has to be called BEFORE it's unregistered.
2011-04-02 14:58:58 +00:00
f1b42a129f add angle wrapping functions: angle_wrap_rad(), angle_wrap_deg().
use with mathutils.
2011-04-02 03:05:49 +00:00
3ddbb36fa7 modification to api docs so release point to:
http://www.blender.org/documentation/blender_python_api_2_57b_release

Development versions point to:
   http://www.blender.org/documentation/blender_python_api_2_57_0

This way updates to api docs after release wont overwrite release docs.
2011-04-01 15:13:58 +00:00
a4193184bf - bpy.app.release so python scripts can check if the release is stable or not.
- edited pose bone matrix description.
2011-04-01 14:04:26 +00:00
cd9b42871c remove bpy python api from blenderplayer, it was being linked but not initialized/available. 2011-03-31 15:28:53 +00:00
66a1259153 fix for crash when running blender with define WITH_PYTHON_SAFETY & no startup.blend was found.
was calling python function when python was not initialized.
2011-03-31 04:43:26 +00:00
bfadd7c9aa modify error when python is not found so as not to confuse users who don't build blender.
+ minor edits.
2011-03-30 07:21:41 +00:00
206e5b7179 print warning on windows/mac when bundled python is not found, suggesting to build the 'install' target. 2011-03-30 06:27:39 +00:00
f4ba9495c5 fix [#26667] Can't import scripts when using blenderplayer
- move import override initialization to bpy_internal_import.c so the player and blender can both call.
- remove ineffectual & unused sandboxing code.
2011-03-29 16:12:25 +00:00
9b9c4184c8 misc nodes & editors: floats were being implicitly promoted to doubles, adjust to use floats.
+ minor update to demo_mode
2011-03-28 17:08:33 +00:00
bf1e2ce41e color gamma (such as theme colors), were not being wrapped by python as 'mathutils.Color' types 2011-03-28 13:47:39 +00:00
9c8f1e2ef4 imbuf, mathutils & readfile: floats were being implicitly promoted to doubles, adjust to use floats. 2011-03-27 17:12:59 +00:00
587bbc4213 fix [#26616] Line of code make Blender crash 2011-03-27 06:56:37 +00:00
a21f46b6d4 new function RNA_warning(), replaces printf with function which may be called via python.
Now this gives the line number of the scripts thats running, eg:

uiItemFullO: unknown operator 'some.operator'
/c/bin/2.56/scripts/startup/bl_ui/space_view3d_toolbar.py:73
2011-03-25 04:36:10 +00:00
b510019602 fix for incorrect prints with RNA errors (own fault, CONTAINER_RNA_ID was incorrect) & close keymap file after running. 2011-03-25 01:55:00 +00:00
f87b37b3ef allow unregistered rna classes to have rna properties assigned before registration.
this is useful for the register() class method which is called before the class gets structRNA assigned.

eg:

class MyClass(bpy.types.PropertyGroup):
    @classmethod
    def register(cls):
        cls.name = StringProperty()  # assigned but registration is delayed.
2011-03-23 12:44:22 +00:00
1b80538fea fix [#25688] undocumted functions in pyapi
expose collection function docs.
2011-03-22 04:28:51 +00:00
2299d674f4 operators called from python were not getting their reports back into python errors.
eg:
- console calls operator
- operator calls report
- report went into header rather them back into the console as an error.
2011-03-22 02:38:39 +00:00
f3686b5885 py/api registration:
move calls to the classes register/unregister function into register_class() / unregister_class() and add docs.

also other minor changes:
- remove face sorting keybinding, was Ctrl+Alt+F, this is quite and obscure feature and face order normally doesn't matter, so access from Face menu is enough.
- add commented out call to mesh.validate() in addon template since its useful to correct incomplete meshes during development.
2011-03-22 01:38:26 +00:00
790e47768a fix for crash when running WM_OT_read_factory_settings() from a script and then importing. 2011-03-20 07:23:17 +00:00
cadc1218c8 C, style changes (mostly white space edits), no functional change. 2011-03-19 11:12:48 +00:00
197e903efc fix for [#26524] Api autocomplete more errors
problem was caused by change in python behavior, now hasattr(val, attr) only suppresses attribute exceptions.
2011-03-17 04:43:58 +00:00
3ac925b7d1 fix own error - missing NULL check [#26523] Crash when load factory settings ( linked to rigify add-on ? ) 2011-03-16 22:25:31 +00:00
dc5a78ac25 fix own error [#26522] Api autocomplete return many errors
collections were getting __call__ attribute from the StructRNA, now ignore all starting with '_'
2011-03-16 21:58:45 +00:00
fe529d43fe fix for building on some configurations. 2011-03-15 01:48:01 +00:00
f2b1645a75 fix/disallow [#26502] segmentationfault on pressing button to browse existing images for UV window
creating RNA within draw functions can free existing RNA, crashing blender when this is already used in the UI.
disallowing this so it raises a python exception.

This was being used to dynamically generate addon categories so for now they are hard coded and we need proper enum-functions for python to do this.
2011-03-14 23:02:47 +00:00
2d1ef275f2 bpy.types.libraries.load sphinx doc & examples (doc system needed some updates).
http://www.blender.org/documentation/blender_python_api_2_56_3/bpy.types.BlendDataLibraries.html#bpy.types.BlendDataLibraries.load
2011-03-14 10:31:50 +00:00
4a747bebf4 fix [#26489] Auto completion in console broken
own mistake in r35492.
2011-03-14 05:39:07 +00:00
e8174fb3cd move mathutils api changelog into wiki. 2011-03-14 05:03:53 +00:00
9ec2dfe0df add dir() function for library objects, also was missing call to clear temp flag on exceptions. 2011-03-14 01:00:41 +00:00
25a2eb4675 py/library api: raise an error if a requested member isn't found. 2011-03-13 01:15:14 +00:00
60a2994435 SVN maintenance. 2011-03-13 00:26:46 +00:00
8c526e79e3 library loading api.
this is not well suited to RNA so this is a native python api.

This uses:
  bpy.data.libraries.load(filepath, link=False, relative=False)

however the return value needs to use pythons context manager, this means the library loading is confined to a block of code and python cant leave a half loaded library state.


eg, load a single scene we know the name of:
  with bpy.data.libraries.load(filepath) as (data_from, data_to):
      data_to.scenes = ["Scene"]


eg, load all scenes:
  with bpy.data.libraries.load(filepath) as (data_from, data_to):
      data_to.scenes = data_from.scenes


eg, load all objects starting with 'A'
  with bpy.data.libraries.load(filepath) as (data_from, data_to):
      data_to.objects = [name for name in data_from.objects if name.startswith("A")]

As you can see gives 2 objects like 'bpy.data', but containing lists of strings which can be moved from one into another.
2011-03-12 16:06:37 +00:00
90d42e114c py/rna: BPy_reports_to_error() now takes the exception type as an argument and returns -1 as an error value 2011-03-12 15:18:08 +00:00
c678bd2d7d py/rna, ability to have python static methods in collections. 2011-03-12 14:32:30 +00:00
d7257a983f bugfix [#26454] WITH_PYTHON_SAFETY crash. 2011-03-11 02:43:30 +00:00
e5ee4faad3 update for blender as a py module & python 3.2 2011-03-09 04:58:44 +00:00
65273cf82f - correct python3.1 warning message.
- for new shadow only enum, use humanly readable RNA enum values.
- update cmake unix example for custom python.
2011-03-08 22:11:15 +00:00
471c0c1afb py-api utf8/filepaths:
in function PyC_UnicodeAsByte(), replace code copied from python with PyUnicode_EncodeFSDefault(), new in py3.2.
2011-03-08 01:28:10 +00:00