Commit Graph

43 Commits

Author SHA1 Message Date
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
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
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
276e5f7095 formatting edits & remove debug print. 2011-10-13 01:29:08 +00:00
9d13224e1a fix [#28807] Drivers breaking by undo 2011-10-05 07:28:59 +00:00
3b09c331fa Adding noise module by default in driver_namespace
http://www.pasteall.org/blend/8677
2011-09-05 05:42:49 +00:00
e5e6f91856 fix [#28114] Render Crash
existing check for driver to use GIL was not thread safe and could cause, details in the report.

This bug was caused by a check to avoid hanging, a fix for [#27683] that worked in 2.4x because the UI didn't use python to draw while rendering.

Apply a different fix for [#27683], when calling an operator, call PyEval_SaveThread(), then PyEval_RestoreThread() so the GIL can be aquired by threads started by the operator - in this case bake starting a thread that evaluates drivers.
2011-08-04 01:56:36 +00:00
d5984b2d50 fix [#27683] Blender hangs when baking a particle system when a driver is present 2011-07-09 17:41:39 +00:00
619df86fad panel headers were not scaling with DPI properly 2011-06-05 12:47:17 +00:00
50d24425ce py/drivers disable dont interning strings, no need really since this isnt done on every execution. 2011-06-05 08:18:37 +00:00
d46da5a09d mathutils support for color arithmetic, also some minor whitespace edits. 2011-06-02 08:29:16 +00:00
210ee1ade4 whitespace only, no functional change mixed tabs/spaces --> tabs. 2011-04-21 13:11:51 +00:00
cadc1218c8 C, style changes (mostly white space edits), no functional change. 2011-03-19 11:12:48 +00:00
Nathan Letwory
5a760e22fc doxygen: blender/python tagged. 2011-02-27 20:10:08 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
ba0d167d2a more vars made static 2011-02-14 18:20:10 +00:00
3b0c2accc6 support building with python3.2 2011-01-18 21:39:50 +00:00
96b646c68d edits for BPY_extern.h functions, no functional changes
- remove unused code.
- BPY_run_python_script() split in 2, BPY_filepath_exec, BPY_text_exec
- renamed funcs.
2011-01-05 02:08:54 +00:00
33a5a69d25 fix for own error with mathutils.geometry argument parsing.
also raise ValueError when the vector size is incorrect rather then type error.
2011-01-03 12:11:05 +00:00
263830f000 Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for 'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
2010-12-03 17:05:21 +00:00
02cc80691d python access to driver namespace, rather then have a textblock defined for drivers allow scripts to add functions directly.
- bpy.app.driver_namespace, read-only dictionary, edit in-place.
- reset on file load and new file.
- on errors the namespace used to be reset, this should not be needed.

simple example.

  def driverFunc(val):
    return val * val
  bpy.app.driver_namespace['driverFunc'] = driverFunc

... now all drivers can access this function.
2010-11-27 02:39:51 +00:00
54e6fc1519 remove math and m module names from python driver namespace. (all math functions are merged into the local namespace) 2010-06-25 21:24:59 +00:00
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
88743740b8 dont use a thread for baking in background mode, its not really any advantage since it starts a single thread that runs a loop. 2010-05-18 14:38:25 +00:00
ace1c998c4 warning cleanup, also made voxel.c and volumetric.c use BM_INLINE define rather then having their own ifdefs in each file. 2010-04-24 10:08:07 +00:00
1e9bf0cfdb spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text) 2010-03-22 09:30:00 +00:00
42ac4a3e7d Fix syntax for ID keyword. 2010-03-21 01:14:04 +00:00
1cf95d2494 Keying Set Fixes:
* 'Export Keying Set' operator works again - a change in the previous commit broke the created code
* Relative Keying Sets don't get their paths shown 
* Keying Set paths show options for inserting keyframes too now

---

Another attempt at fixing compile troubles, and removed some commented out + obsolete stuff.
2010-03-16 10:18:19 +00:00
e7fad67fab Compile fix for MSVC
- missing #define for finite and isnan
2010-03-15 18:52:22 +00:00
5576b3aabf disallow 'nan' for button input and pydriver's 2010-03-14 21:04:02 +00:00
431db9d478 remove unused includes 2010-03-14 16:06:43 +00:00
820570031e was using wrong global flag for python script disabling in recent commit. 2010-02-27 12:01:10 +00:00
15db857628 rename flag for auto script execution since scriptlinks are no more. 2010-02-27 01:47:46 +00:00
4e931482f4 option to set the blend file as from a 'Trusted Source' on load. 2010-02-27 01:27:22 +00:00
3f5786a00e added support for proxies as drivers back. 2010-02-23 17:56:45 +00:00
0dd58a27e9 - py-drivers were not using the name lookup cache.
- use manager context for keymap script.
2010-02-23 16:40:55 +00:00
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
d3a718dc2f fix for own but in recent driver optimization [#20580] Driver Crasher rev [25763]
recalculate names when needed
2010-01-06 22:42:13 +00:00
52a2b82852 speedup for driver execution, use PyUnicode_InternFromString() for variable names, cache hash and string -> unicode conversion for driver variables. 2010-01-05 10:54:54 +00:00
a9861e3381 Durian Request: Drivers Recode
Highlights:
* Support for Multi-Target Variables
This was the main reason for this recode. Previously, variables could only be used to give some RNA property used as an input source to the driver a name. However, this meant that effects such as Rotational Difference couldn't be used in conjunction with other effects and/or settings to achieve the powerful results. Now, a variable can take several input targets, perform some interesting operations on them, and spit out a representative value based on that.

* New Variable Types
With the introduction of multi-target variables, there are now 3 types of variable that can be used: single property (i.e. the only type previously), Rotational Difference (angle between two bones), and Distance (distance between two objects or bones).

* New Driver Types
In addition to the existing 'Average', 'Sum', and 'Expression' types, there is now the additional options of 'Minimum' and 'Maximum'. These take the smallest/largest value that one of the variables evaluates to.

* Fix for Driver F-Curve colouring bug 
Newly added drivers did not get automatically coloured in the Graph Editor properly. Was caused by inappropriate notifiers being used.


Notes:
* This commit breaks existing 2.5 files with drivers (in other words, they are lost forever). 
* Rigify has been corrected to work with the new system. The PyAPI for accessing targets used for the variables could still be made nicer (using subclassing to directly access?), but that is left for later.
* Version patching for 2.49 files still needs to be put back in place.
2010-01-04 21:15:45 +00:00
a41131db24 - added editbone.matrix, readonly, utility property that calculates the matrix from the bone roll
- spine fixes
- arm now uses the average Z axis to place the poll target
2009-12-09 14:25:56 +00:00
bee5775702 split out driver functions into its own file 2009-12-08 22:35:03 +00:00