Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-08-13minor changes to rna/python.Campbell Barton
- raise an exception when python calls is_property_set(name) or is_property_hidden(name) and the property does not exist. - added BLI_findstring_ptr(), which finds a named item in a listbase where that name is a pointer to a string. - replaced inline for loops with calls to BLI_findstring_ptr() and IDP_GetPropertyFromGroup().
2010-06-12modify my last commit to fix [#22486] add_actuator crashes when name is ↵Campbell Barton
bigger than 32 chars Throwing an exception if the strings too long means scripts need to be aware of string lengths and changing a string length in RNA can too easily break scripts. Instead honor the string length in RNA_property_string_set()
2010-03-22spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text)Campbell Barton
2010-03-21removed unused includes, except for physics and particle related filesCampbell Barton
2010-03-21Fix syntax for ID keyword.Guillermo S. Romero
2010-02-15Proxy ID property syncingCampbell Barton
This means pose bones on proxy poses can have their own values as long as the name and type matches that of the library pose bone. without this the only way to add new values on a pose bone proxy is to protect in the lib, reload the proxy blend and save.
2010-02-12correct fsf addressCampbell Barton
2010-01-22Fix bug in IDP_ReplaceGroupInGroup (it would sometimes add the same property ↵Martin Poirier
twice). Also simplify some other loops.
2010-01-05IDGroup utility function to copy a group inside another oneMartin Poirier
2009-11-18ID properties that are displayed via RNA can now define their own UI settings,Campbell Barton
only implimented min/max precision & step. at the moment there is no way to edit these other then via python example of setting UI limits... >>> C.object['foo'] = 0.5 >>> C.object['_RNA_UI'] = {'foo': {'step': 0.5, 'soft_max': 10.0, 'soft_min': 0.0, 'precision': 2, 'description': 'Some setting'}} Also fixed typo's: precission -> precision
2009-08-182.5: RNA, defining enums, pointers and collections properties is nowBrecht Van Lommel
possible from python, but it's still work in progress. Pointers and collections are restricted to types derived from IDPropertyGroup (same as for operators), because RNA knows how to allocate/deallocate those. Collections have .add() and .remove(number) functions that can be used. The remove function should be fixed to take an other argument than a number. With the IDPropertyGroup restriction, pointers are more like nested structs. They don't have add(), remove() yet, not sure where to put them. Currently the pointer / nested struct is automatically allocated in the get() function, this needs to be fixed, rule is that RNA get() will not change any data for thread safety. Also, it is only possible to add properties to structs after they have been registered, which needs to be improved as well. Example code: http://www.pasteall.org/7201/python
2009-06-222.5: warning fixesBrecht Van Lommel
Mostly harmless ones, except for one about "gzopen64" being undeclared. This needs some defines in BLI_storage.h to be set before <unistd.h> is included. Might fix a crash in compressed file reading, though I'm not sure since it's hard to repeat the crash consistently.
2009-01-292.5:Brecht Van Lommel
* Automatic shortcut keys in menus now compare operator properties as well. Implemented IDP_EqualsProperties for this. * I imagine all these compares may be a bit slow, for this case it's not so bad though because it only happens for one menu when it is opened.
2009-01-232.5: multiple small fixesBrecht Van Lommel
- wm draw method is now initialized correct when reading older files, but the SDNA bug causing the problem is still unsolved. is due to // char pad[8]; not being recognized as commented. - triple buffer proxy texture test follows spec better now, was disabling triple buffer unnecessarily on some drivers. - some cmake compile fixes related to sequencer pthread usage and removed bad level calls lib for player. - show outliner header buttons in oops mode as well until that can be switched in the UI. - fix region data free issue for tooltips - warning fixes
2008-12-31RNABrecht Van Lommel
* Store RNA collections different in ID properties, using a generic ID property array, using the patch provided by Joe. * Fix bug accessing registered operator properties in the wm from the outliner. * In the outliner, only use the RNA icon for RNA data, and use dot again for unknown icon. * Also, show pointer properties data in the second column, and auto expand two levels when opening them. * Added small RNA_struct_defined_properties function to get only the defined properties without builtin and undefined id properties (for py operators).
2008-12-26RNA:Brecht Van Lommel
* Added support for using pointers + collections as operator properties, but with the restriction that they must point to other type derived from ID property groups. The "add" function for these properties will allocate a new ID property group and point to that. * Added support for arrays with type IDP_GROUP in ID properties. * Fix bug getting/setting float array values. Example code for collections, note the "OperatorMousePath" type is defined in rna_wm.c and has a float[2] property named "loc". Defining the operator property: prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath); Adding values: PointerRNA itemptr; float loc[2] = {1, 1}, RNA_collection_add(op->ptr, "path", &itemptr); RNA_float_set_array(&itemptr, "loc", loc); Iterating: RNA_BEGIN(op->ptr, itemptr, "path") { float loc[2]; RNA_float_get_array(&itemptr, "loc", loc); printf("Location: %f %f\n", loc[0], loc[1]); } RNA_END;
2008-11-13Merge of trunk into blender 2.5:Brecht Van Lommel
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r12987:17416 Issues: * GHOST/X11 had conflicting changes. Some code was added in 2.5, which was later added in trunk also, but reverted partially, specifically revision 16683. I have left out this reversion in the 2.5 branch since I think it is needed there. http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16683 * Scons had various conflicting changes, I decided to go with trunk version for everything except priorities and some library renaming. * In creator.c, there were various fixes and fixes for fixes related to the -w -W and -p options. In 2.5 -w and -W is not coded yet, and -p is done differently. Since this is changed so much, and I don't think those fixes would be needed in 2.5, I've left them out. * Also in creator.c: there was code for a python bugfix where the screen was not initialized when running with -P. The code that initializes the screen there I had to disable, that can't work in 2.5 anymore but left it commented as a reminder. Further I had to disable some new function calls. using src/ and python/, as was done already in this branch, disabled function calls: * bpath.c: error reporting * BME_conversions.c: editmesh conversion functions. * SHD_dynamic: disabled almost completely, there is no python/. * KX_PythonInit.cpp and Ketsji/ build files: Mathutils is not there, disabled. * text.c: clipboard copy call. * object.c: OB_SUPPORT_MATERIAL. * DerivedMesh.c and subsurf_ccg, stipple_quarttone. Still to be done: * Go over files and functions that were moved to a different location but could still use changes that were done in trunk.
2008-10-08fix for a bug where getting ID props would rename the datablock (including ↵Campbell Barton
its type), then crash. http://blenderartists.org/forum/showthread.php?p=1228670#post1228670
2008-10-06one-liner fix for id property duplication bugJoseph Eagar
2008-10-05Fix for bug #17762: id property double type did not get copied correct.Brecht Van Lommel
2008-09-29resolve some compiler warnings with intel c/c++ compilerCampbell Barton
* subsurf code had a lot of unused variables, removed these where they are obviously not needed. commented if they could be useful later. * some variables declorations hide existing variables (many of these left), but fixed some that could cause confusion. * removed unused vars * obscure python memory leak with colorband. * make_sample_tables had a loop running wasnt used. * if 0'd functions in arithb.c that are not used yet. * made many functions static
2008-07-24added support for doubles to the id property code, and made the python code ↵Joseph Eagar
use them by default
2008-04-17Patch from GSR that a) fixes a whole bunch of GPL/BL licenseChris Want
blocks that were previously missed; and b) greatly increase my ohloh stats!
2008-02-23=ID Property Bugfix=Joseph Eagar
There was an extraneous line causing ID property groups to have the wrong length, causing crashes in code that relied on it. This commit both fixes that and adds a version check to fix group lengths for older .blends. The subversion was incremented to 15 for this change.
2008-02-11IDP_CopyGroup wasn't copying the length, thanks Caedes for finding this oneCampbell Barton
2008-01-07Patch to change license to GPL only, from GSR.Chris Want
2007-12-24Blenkernel for 2.5 project, changes mainly are because of disablingTon Roosendaal
bad level calls. (which is not finished at all)
2007-07-10=ID Property update=Joseph Eagar
ID Properties weren't being duplicated (by shift-D or any of the other duplication functions). So now ID properties are duplicated in the main copy_libblock function, which (as far as I can check) covers all ID-contained ID properties. I also updated the constraint system to copy pyconstraint ID properties on shift-D. This would probably be a good thing to add to the stable branch, btw.
2007-06-18== PyConstraints ==Joshua Leung
At last! The ability to code constraints in Python. This opens up many interesting rigging possibilities, as well as making prototyping constraints easier. * A PyConstraint script must begin with the line #BPYCONSTRAINT * It must also define a doConstraint function, which performs the core actions of the constraint. * PyConstraints use IDProperties to store custom properties for each PyConstraint instance. The scripter can choose which of these ID-Properties to expose to a user to control the behaviour of the constraint. This must be done using the Draw.PupBlock method. Credits to Joe Eager (joeedh) for coding the original patch on which this is based. I've made heavy revisions to large parts of the patch. For more detailed information, and some demo scripts, see the following page: http://aligorith.googlepages.com/pyconstraints2
2007-05-22=ID Properties=Joseph Eagar
The code for preserving ID properties was apparently not working. Fixed that by adding a new function, IDP_ReplaceInGroup, that automatically handles overriding a property in a group while preserving the property order. Its odd though that the previous fix I had wasn't working :/
2007-04-20=ID Properties bugfix= Joseph Eagar
The array resizing function, meant to be used with strings, didn't work. This is because the id property size table had the wrong value for strings.
2006-12-17=IDProperties Python update= Joseph Eagar
Updated id properties interface as per discussed in python meeting. Basically, id properties are now entirely accessed through the dict-like interface if IDGroupType. Also, tp_getsetters are used throughout the code now. Using the dict interface allowed for a major cleanup of the wrapping code. The biggest change is that ID properties are no longer wrapped in a structure with .type .name and .data members; instead when you get properties from the group it returns the direct value. Ints, strings and floats return simple python types, while arrays and groups return special wrappers though. This means to detect the type of an ID property, you have to use type(). For string and int types this is easy; for group and array types (which of course have their own wrappers) you use type() with Blender.IDGroupType or Blender.IDArrayType. Update of epydocs plus a temporary gui script will be forthcoming; the gui script will be removed before release as of course by then we'll have a built-in gui for id properties.
2006-12-06=IDProperties C-API tiny update= Joseph Eagar
IDP_GroupIterNext returned void* rather then IDProperty*. Made it IDProperty*. BTW, any people out there interested in using IDProperties from the C side, feel free to email me comments and (especially!) file bugreports assigned to me in the tracker. :)
2006-12-01=IDProperties bugfix= Joseph Eagar
Another bug from the tracker, reported by Mike Stramba. A duplicated Py_XDECREF in the wrong place made assigning arrays from Vector objects not work. Also, fixed nasty bug in C API of idproperties (the function to look up a property from a group was broken). Fixed a memory leak too. In addition, made "del group['property']" delete properties from group; previously this would just crash (or at least it should have). Added a small addition to the example in the epydocs for IDGroup.
2006-11-30=IDProperties bugfix= Joseph Eagar
Fixed the bug of "print type(property)" crashed blender; just needed to add PyType_Ready init code for all ID property python types; I made a function IDProp_Init_Types and put code to call it in types_initAll(). Also added GPL/BL headers to idproperty files.
2006-11-17=ID Properties Python Update= Joseph Eagar
IDProperties now have a sanity check to prevent different ID properties in the same group from having the same name. The appropriate code has been added to the python bindings to catch this and raise an error.
2006-11-17=ID Properties Update= Joseph Eagar
This commit adds file reading/writing of ID properties to all ID types, and also adds python access for NMesh, Mesh, Scene and Image. Note that the file reading code might need some more work for certain future/planned features to save right. Also I updated a few comments in idprop.c.
2006-11-17=ID Properties= Joseph Eagar
This commit adds supports for per-ID properties to blender. See http://mediawiki.blender.org/index.php/BlenderDev/ID_Property for more information on how it all works. ID properties are accesable by python; but note that bindings have only been added to Object and Material thus far. However adding more bindings is easy and I plan on adding several more hopefully within an hour of this inital commit. A generic UI panel is also planned, that will go wherever its needed; for example in the material buttons, editing buttons, etc. I'll likely submit the initial code for that as a patch, though, so matt and ton and others can go over it and make sure it's all good. :) VERY important, if you intend to use ID properties please go to http://mediawiki.blender.org/index.php/BlenderDev/PropertyStandards and start writing the appropriate standards for it.