Commit Graph

3453 Commits

Author SHA1 Message Date
c62d33c540 patch: [#29382] Arbitrary Length Array Function Additions and Modifications
from Andrew Hale (trumanblending), with some edits to use these in mathutils.Vector added.

Added Functions:
- dot_vn_vn - Dot product of two arrays
- normalize_vn_vn - Normalize an array and store the result in a second array
- normalize_vn - Normalize an array inplace

Renamed Functions:
Some functions have been renamed to make them consistent with the naming conventions used by fixed length array functions.
- fill_vni to fill_vn_i
- fill_vn to fill_vn_fl
2011-11-24 04:12:16 +00:00
676c2924d9 fix [#29319] bus error with python with link_append and {}
patch from Emil Brink
2011-11-22 14:05:08 +00:00
e5f40a1aac - pyapi mathutils.geometry.intersect_plane_plane
- isect_plane_plane_v3 uses better method
- minor refactor - arg name changes & some args as const.
2011-11-20 05:56:21 +00:00
4924abaad6 replace fabs with fabsf where both input and output are floats. 2011-11-19 01:10:05 +00:00
92ed90d2fa pyapi feature from 2.4x
allow collection subscript to contain the library or None.

eg:

  bpy.data.objects["Mesh", "/subsurf_test.blend"]

  bpy.data.scenes["Scene", None]

  # also works with get()
  bpy.data.armatures.get(("some_armature", "//some_lib.blend"), None)
2011-11-17 08:47:34 +00:00
db44a92a11 pydrivers: 'frame' is now in the driver namespace,
- no need to link to scenes when using a frame from the pydriver, this made linking rigs for eg, quite messy.
- advantage that we get subframe values (where scenes from was fixed to a whole number).
2011-11-17 07:08:09 +00:00
ba7fbf6ae7 formatting edits & doc correction, no functional changes. 2011-11-16 03:56:34 +00:00
6a340c1eb0 py/rna api was calling RNA_property_type more often then needed (no functional change) 2011-11-15 11:56:54 +00:00
4de917326b de-duplicate some idproperty py api code, also improve some exception messages. 2011-11-15 10:19:44 +00:00
d4d80ee0a1 rename IDProp.c/h to idprop_py_api, since it was same name as BKE idprop.c with case changed. 2011-11-15 09:28:15 +00:00
8623935aa8 pass a pointer to IDP_New's IDPropertyTemplate rather then a copy. 2011-11-15 09:22:52 +00:00
2ab1732613 support for non-null terminated byte strings in id properties (as a subtype of IDP_STRING types) 2011-11-15 09:12:10 +00:00
d6c1009195 bytestring support for py/rna - this is so py can access data which
isn't meant to be accessed as unicode text.
2011-11-15 07:09:41 +00:00
0b1066af8e fix [#29251] Properties options={'SKIP_SAVE'} not working, patch attached
patch from Domino Marama (domino)
2011-11-14 15:05:41 +00:00
c993ee678a new math utility function isect_plane_plane_v3 2011-11-13 16:28:52 +00:00
963e39e417 formatting edits only - no functional changes 2011-11-13 09:38:53 +00:00
72a7101576 include invalid type name in mathutils error messages. 2011-11-13 09:20:04 +00:00
817b6cb9a8 mathutils.geometry.distance_point_to_plane(pt, plane_co, plane_no) - utility function, BLI math version too. 2011-11-12 10:06:56 +00:00
e84c0980a3 correct indentation and some whitespace edits (no functional changes) 2011-11-11 13:09:14 +00:00
094c9799f9 quiet -Wdouble-promotion warnings 2011-11-11 12:00:08 +00:00
e4269043b4 Moving i18n code to BLF_translation.h
This way, we will be able to use it in non-UI parts of the code too.
2011-11-09 14:13:17 +00:00
Nathan Letwory
c9bca51e76 Add compiles support for Cycles.
No CUDA compiling yet, will be added later.
2011-11-08 20:40:02 +00:00
dca15b215d Cycles: svn merge -r41613:41627 ^/trunk/blender 2011-11-07 17:13:32 +00:00
5ef9039b7e Cycles: svn merge -r41531:41613 ^/trunk/blender 2011-11-07 15:23:08 +00:00
85540d5aa7 more macro --> BLI math lib, mainly replace VECCOPY in render and blenkernel. 2011-11-06 16:38:21 +00:00
e5647ea196 py operators - don't use the screen as an operators ID anymore, screen's don't store operator instances and operator functions have access to the context if they need the current screen.
also add some more py api file descriptions.
2011-11-05 08:40:07 +00:00
2b939904ab documentation - brief descriptions for bpy api files. 2011-11-05 08:21:12 +00:00
62f2218554 macro formatting & remve some unused code. 2011-11-05 05:44:52 +00:00
057bf2a02b misc doc edits
- remove recently added sphinx reference workaround.
- tested doxygen, correct some warnings, set tab width and added pymathutils group.
- added convenience target 'make doc_doxy'
2011-11-05 01:48:10 +00:00
942d2fe3b7 Cycles: svn merge -r41467:41531 ^/trunk/blender 2011-11-04 20:21:40 +00:00
87cd81b162 - added docs and examples for bpy.app.handlers
- correct error in own last commit for BKE_screen_find_big_area()
2011-11-04 04:27:46 +00:00
665f602f15 python string conversion
- use _PyUnicode_AsStringAndSize where possible
- use %R for PyErr_Format(...) rather then running repr on the object explicitly 
- use const char
2011-11-03 14:09:18 +00:00
dff93ddecc hopefully fix msvc build error 2011-11-03 12:01:18 +00:00
9a4e1e0f0a Cycles: updates to follow code committed to trunk. 2011-11-03 10:18:58 +00:00
5eef937436 modify previous api feature to tag functions as permanent, use nicer decorator style, eg:
# --------

import bpy
from bpy.app.handlers import persistent

@persistent
def my_func(scene):
    pass

bpy.app.handlers.frame_change_pre.append(my_func)
2011-11-03 09:13:47 +00:00
e2393d1109 ability to have permanent callbacks that stay active when new blend files are loaded.
this works by tagging functions, eg:

  def my_func(scene):
      pass

  bpy.app.handlers.permanent_tag(my_func, True)  # <-- important bit
  bpy.app.handlers.frame_change_pre.append(my_func)
2011-11-03 06:53:52 +00:00
723e129252 Depsgraph/Python: callbacks and properties to detect datablock changes
* Adds two new python handlers: scene_update_pre() and scene_update_post()
  These run before and after Blender does a scene update on making modifications
  to the scene.
* Datablocks now have an is_updated property. This will be set to true in the
  above callbacks if the datablock was tagged to be updated. This works for the
  most common datablocks used for rendering: object, material, world, lamsp,
  texture, mesh, curve.
* Datablock collections also have an is_updated property. If this is set, it
  means one datablock of this type was added, removed or modified. It's also
  useful as a quick check to avoid looping over all datablocks.
* RenderEngine.view_update() can also check these properties, for interactive
  viewport rendering.

http://wiki.blender.org/index.php/Dev:2.6/Source/Render/UpdateAPI
2011-11-02 20:56:52 +00:00
2f453773f6 Cycles: svn merge -r41266:41467 ^/trunk/blender 2011-11-02 16:17:05 +00:00
e29aa363f2 new math function: Quaternion.to_axis_angle().
add in safety checks for inf/nan values which could happen in some cases.
2011-11-02 09:13:04 +00:00
32b34d631a Space types:
* Some cleanup, removed references to already deleted *_header.c files.
* Marked SpaceScript as deprecated and removed header. Will keep space for now though, as some script operators are there and Campbell might want to re-use the space later.
2011-11-01 20:14:58 +00:00
ea2f7c907c == Removal of SpaceSound ==
* Removed old, unused Space Sound space
* Removed data struct and Theme settings
* Old files with an open Audio window will be loaded as Info Space
2011-11-01 19:48:45 +00:00
785de4cbfc == Cleanup of SpaceImasel ==
* removed struct for SpaceType and all usages
* SPACE_IMASEL in enum nees to be kept to identify it in old files
* it is replaces with SPACE_EMPTY on load, which is overridden by SPACE_INFO which has same struct members
* also removed theme settings
2011-11-01 18:27:09 +00:00
797d2bbd88 use_verify option to defvert_sync_mapped and defvert_sync was flipped, also minor edits to defvert_verify_index() - no functional change. 2011-10-31 06:13:20 +00:00
9905094f5d fix own error r41191 getting id property string lengths. 2011-10-31 01:50:04 +00:00
0d63bb005f replace VECCOPY and QUATCOPY with inline funcs. 2011-10-28 12:40:15 +00:00
565fcd8907 fix for error in gpu.export_shader() was missing *4 (only writing 1/4 of the colorband) 2011-10-28 08:53:00 +00:00
4b635d1631 use generic path remapping when making all library data local, previously only image paths were getting corrected, now all paths will (scene image seq strips, pointcache etc) 2011-10-28 04:44:59 +00:00
699030ceb6 use const for readonly strings and set some functions to static 2011-10-27 14:41:26 +00:00
31d401613d bpath
- loop over all sequence images and pointcache
- option not to loop over library / packed data, expose in bpy.utils.blend_paths()
2011-10-27 03:40:12 +00:00
cd852ce1a1 - remove bpath iterator and replace all uses with visitor.
- added flag to optionally receive all paths as absolute.
2011-10-27 01:25:07 +00:00