Commit Graph

3462 Commits

Author SHA1 Message Date
f62ad8f69b remove header text:
"The Blender Foundation also sells licenses for use in proprietary software under the Blender Licens"

also remove NaN references from files that have been added since blender went opensource.
2011-11-29 10:54:47 +00:00
53d14a78b5 missed removing these files 2011-11-29 10:34:23 +00:00
f95d7c9e66 patch [#29421] Python Noise Module Updates
from Andrew Hale (trumanblending)

Tracker description
*******************

The current python noise module included with Blender has yet to be updated to the new Py API. This patch does so, with the following major points:

- The noise module has now been moved to a submodule of mathutils, it can be accessed by mathutils.noise. It was moved from it's own module as it will now return mathutils types and also have greater visibility to the user.
- All functions which return vectors will now return mathutils.Vector types to be consistent with the rest of the API. Previously (x, y, z) tuples were returned.
- A different implementation of random_unit_vector is now used, this allows 2D, 3D and 4D vectors to be returned. Previously only 3D was possible.
- Some function names have been changed to remove ambiguities and make naming consistent within the module. noise.vector is now noise.noise_vector and noise.vl_vector is now noise.variable_lacunarity
- Doc strings have been updated to be compatible with auto docs.
- Code style and internal naming has been changed to match the conventions in other mathutils code.

Thanks,
Andrew
2011-11-29 10:28:52 +00:00
3db309ee50 fix for own error with id props when adding byte strings 2011-11-26 17:22:11 +00:00
d52a811052 minor bpy api edits
- strict check for rna properties
- formatting edits (120 line width)
- use PyDoc_STRVAR macros for getset docstrings
2011-11-26 15:18:30 +00:00
6736576f6d replace FILE_MAXDIR + FILE_MAXFILE with FILE_MAX 2011-11-26 04:07:38 +00:00
491526e5ed add null check, crashes py 3.3 which isn't released but adding the check is harmless 2011-11-26 02:33:57 +00:00
6e28ac2d7b pep8 edits and avoid naming conflicts with python builtins 2011-11-24 19:36:12 +00:00
3b9b6051d9 rename mathutils constructors to match other parts of the bpy/api (no functional changes) 2011-11-24 04:45:36 +00:00
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