Blender Git Commits

Blender Git "master" branch commits.

Page: 4727 / 5574

April 12, 2009, 07:02 (GMT)
Simplified modelview matrix copy
Revision dcb07e3 by Joshua Leung
April 12, 2009, 06:47 (GMT)
Action Editor: Selection tools cleanup

* Cleaned up the code for selecting keyframes
* Click-column-select (Alt-RMB) now works

* Also, moved a function used in both Action/DopeSheet and Graph editors to the Animation module
April 12, 2009, 06:41 (GMT)
use long long rather then int for storing game logic properties.

There were also some problems with int to python conversion
- assigning a PyLong to a KX_GameObject from python would raise an error
- PyLong were coerced into floats when used with internal CValue arithmetic

Changes...
- PyLong is converted into CIntValue for coercing and assigning from python
- CValue's generic GetNumber() function returns a double rather then a float.
- Print an error when a PyType cant be coerced into a CValue

Tested with python, expressions and property sensor.

April 11, 2009, 20:58 (GMT)
BGE Py API
- setting the scene attributes would always add to the scenes custom dictionary.
- new CListValue method from_id(id)

so you can store a Game Objects id and use it to get the game object back.

ob_id = id(gameOb)
...
gameOb = scene.objects.from_id(ob_id)

This is useful because names are not always unique.

Revision e0d794b by gsr b3d
April 11, 2009, 19:04 (GMT)
Slight improvements in release creation.
Version string is compatible with all previous releases, but report
subversion if not 0.
Keep distribution dir so you can run from there without needed of unpack,
and make messages and cmds be in sync.
April 11, 2009, 16:17 (GMT)
Added back importing UI scripts rather then running,
The bug was todo with bpy.data and bpy.types becoming invalid, temporary fix is to re-assign them to the bpy module before running python operators or panels.
will look into a nicer way to get this working.

Revision 91d6e68 by Shaul Kedem
April 11, 2009, 16:10 (GMT)
changed parts x parts y and threads to be minimum of 1, thnx DingTo
April 11, 2009, 15:59 (GMT)
bugfix from Moguri, AddReplica wasnt setting the light layer from the parent
Revision c848ea9 by Elia Sarti
April 11, 2009, 15:46 (GMT)
2.5 / RNA
API, added support for return values for RNA_function_call_direct and completed the code. Didn't test it though.

Returns works exact the same way as other parameters for format strings except you put a R in front of it. For instance for a function that accepts two vectors and returns a vector you use a format like "f[4]f[4]Rf[4]".
I'm thinking about allowing arbitrary white space in the format string (or use comas as separators) to make it more readable.
The return format *must* always come last and of course the corresponding argument you pass to the function has to be a pointer so that it can be filled with the return value.
April 11, 2009, 15:05 (GMT)
Python Api
own error with refcounting and raise an error when bpy.types cant generate a subtype (though it shouldn't happen)
April 11, 2009, 14:43 (GMT)
2.5

Styles/fonts will be saved in userdef, but not yet... forgot to
zero pointers on read, causing crash on .B.blend read saved in 2.5

Revision 8132ca6 by Elia Sarti
April 11, 2009, 13:24 (GMT)
hem.. other small fix
Revision 288f772 by Elia Sarti
April 11, 2009, 12:44 (GMT)
2.5 / RNA
Committing quick RNA function calling RNA_function_call_direct* functions set à la fprintf.

It works like this (with ptr being an RNA pointer to some ID):

RNA_function_call_direct_lookup(ptr, "rename", "s", "MyCamera");

the format specifier would not be strictly needed but I prefer to keep this as it gives nice error handling in case some RNA function changes.
Format strings are very easy and similar to python ones:
"b" for booleans
"i" for integers
"f" for floats
"s" for strings
"e" for enums (using int values)
"O" for pointers (using O as in py, we can change to P)
"N" special NULL parameter, valid to skip optional parameters
For bools, ints and floats you can use a special format specifier with [n] where n is the size of an array of that type. For instance "f[4]" to set a location/vector (it expects a pointer to float* holding the array).

Return values still have to be implemented.
Also I know the name is a bit long maybe we can cut it up at RNA_call_direct or simply RNA_call.
April 11, 2009, 10:01 (GMT)
undo previous commit, changing running the script to importing it somehow made it crash when running the class functions. will look into this further.
Revision 59578bf by Joseph Eagar
April 11, 2009, 08:26 (GMT)
as per discussion with ton, the editmesh accessors now live
in blenkernel.
Revision fc02e98 by Joshua Leung
April 11, 2009, 06:48 (GMT)
Drivers: Errors + UI Tweaks

* Invalid drivers are now tagged accordingly and are not evaluated until they are manually refreshed using the 'Update Dependencies' button
* Drivers with errors have a error warning shown in their UI
* Rearranged the UI buttons a bit for drivers, adding support for a 'remove' driver button.
April 11, 2009, 05:46 (GMT)
Changed the script UI registration to import rather then run each python script,
this means it caches the compiled pyc files after importing fro the first time.

My times for importing 501 buttons_objects.py files were.
- running each as a script 1.9sec
- importing for the first time 1.8sec
- importing a second time (using pyc files) 0.57sec

Also added "bpy" to sys.modules so it can be imported.

April 11, 2009, 02:18 (GMT)
UI:
* Added very basic loading of .py files on startup to define panels.
It now executes all .py files in .blender/ui on startup. Right now
this contains the object buttons, the C code for it is commented out.

These files should get embedded in the blender executable as well
eventually, that's a bit more complicated so this works for now.

* For scons and cmake it seems to copy & find the files OK, for make
only "make release" works (same with scripts/ folder it seems).

* Added BLI_gethome_folder function in BLI_util.h. This is adapted
from bpy_gethome, and gives the path to a folder in .blender like
scripts or ui.

There's plenty of things to figure out here about paths, embedding,
caching, user configs ...

April 11, 2009, 01:52 (GMT)
UI:
* Template slots are no longer specified per item, but are
a state now, set with uiTemplateSlot.
* Some renaming of Layout functions for consistency.
* Fix for roundbox in stack template, now is always behind
the other buttons.
* Improved python API for layout:
http://www.pasteall.org/5008/python

April 11, 2009, 01:45 (GMT)
RNA: python support for REQUIRED flag for function parameters.

By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021