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
2016-03-03PyAPI: API for selectively writing data-blocksCampbell Barton
Useful for writing asset-libraries to a file, eg. `bpy.data.libraries.write(filepath, datablocks, relative_remap=False, fake_user=False)`
2016-02-15Cleanup: reorganize BKE ID tagging functions.Bastien Montagne
BKE_main_id_tag_/BKE_main_id_flag_ were horrible naming now that we split those into flags (for presistent one) and tags (for runtime ones). Got rid of previous 'tag_' functions behavior (those who were dedicated shortcuts to set/clear LIB_TAG_DOIT), so now '_tag_' functions affect tags, and '_flag_' functions affect flags.
2016-01-04added new "Fake User" option for appending objects, this sets a fake user on ↵Martin Felke
each newly appended item except Groups and Objects.
2015-12-27Split id->flag in two, persistent flags and runtime tags.Bastien Montagne
This is purely internal sanitizing/cleanup, no change in behavior is expected at all. This change was also needed because we were getting short on ID flags, and future enhancement of 'user_one' ID behavior requires two new ones. id->flag remains for persistent data (fakeuser only, so far!), this also allows us 100% backward & forward compatibility. New id->tag is used for most flags. Though written in .blend files, its content is cleared at read time. Note that .blend file version was bumped, so that we can clear runtimeflags from old .blends, important in case we add new persistent flags in future. Also, behavior of tags (either status ones, or whether they need to be cleared before/after use) has been added as comments to their declaration. Reviewers: sergey, campbellbarton Differential Revision: https://developer.blender.org/D1683
2015-10-15Cleanup: BLO_read: linking API arg order and name.Bastien Montagne
linking API funcs would use 'name, idcode', when all other code here uses (more sensible) 'idcode, name'. Also, use 'name' arg name when we expect a bare name, without the prepended ID code, and 'idname' arg name when we expect a complete ID name. And here too, idcode shall be short, not int!
2015-10-12Cleanup & rework of BLO_linking code.Bastien Montagne
This commits does mostly two things: * Get rid of bContext parameter: I can see no real good reason to pass such a high-level data to such low-level code... It also makes it more difficult to call when you do not have a context available. * Cleanup the instantiating part. Last point is the most risky - previous code was sometimes quite confusing and hard to follow, from tests nothing behaves differently in new code, but some hidden corner case may show up. Anyway, no change in behavior is expected from this commit, if it happens please file a bugreport!
2015-10-12Cleanup in BLO API: rename 'append' funcs to 'link', since none do append, ↵Bastien Montagne
but only linking of datablocks!
2015-08-04Use PyC_ParseBool to parse boolsCampbell Barton
This could cause problems since they could be any int, then passed directly to internal functions that assume bools.
2015-01-06PyAPI: add utilities PyTuple_SET_ITEMS, Py_INCREF_RETCampbell Barton
Setting all values of a tuple is such a common operation that it deserves its own macro. Also added Py_INCREF_RET to avoid confusing use of comma operator.
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-01-30Fix for crash linking node groups through bpy.data.libraryCampbell Barton
Defer creating the Python objects until after appending is finished because NodeTree's types are not initialized until then.
2013-12-30Main API: refactor naming, use BKE_main_ prefix and add main arg.Campbell Barton
2013-04-05code cleanup: include orderCampbell Barton
2013-03-25code cleanup:Campbell Barton
- remove unused defines. - quiet some shadow warnings. - bevel, ifdef out some asserts that are too common. - style
2013-03-10patch [#34103] check_for_dupid.patchCampbell Barton
from Lawrence D'Oliveiro (ldo) - more comments - more uses of bool type - define symbol for length of in_use array in check_for_dupid
2013-01-07code cleanup: warnings and use stdbool for bpy* funcs.Campbell Barton
2012-09-15quiet -Wmissing-prototypes warnings, and enable this warning by default for ↵Campbell Barton
C with gcc. helps for finding unused functions and making functions static, also did some minor code cleanup.
2012-07-08use gcc attrubutes to warn on unused return values and arguments which ↵Campbell Barton
shouldnt be NULL. also remove IDP_AppendArray's return value which wasnt the new item in the array (which is odd/misleading), but wasnt used anywhere either.
2012-06-05style cleanupCampbell Barton
2012-05-20code cleanup:Campbell Barton
- style - multi-line ifs move braces onto new lines. - iterators - convert some to macros, other split up and move brace.
2012-03-27style cleanup: py apiCampbell Barton
2012-03-18spelling cleanupCampbell Barton
2012-03-17style cleanup: py/capiCampbell Barton
2011-12-26formatting edits only to use more consisted styleCampbell Barton
2011-11-30fix [#29462] libraries.load can't have link=False when relative=TrueCampbell Barton
was doing an unnecessary (and incorrect) library lookup.
2011-11-26minor bpy api editsCampbell Barton
- strict check for rna properties - formatting edits (120 line width) - use PyDoc_STRVAR macros for getset docstrings
2011-11-05py operators - don't use the screen as an operators ID anymore, screen's ↵Campbell Barton
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-05documentation - brief descriptions for bpy api files.Campbell Barton
2011-10-28use generic path remapping when making all library data local, previously ↵Campbell Barton
only image paths were getting corrected, now all paths will (scene image seq strips, pointcache etc)
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-10-15spelling corrections in comments and quiet warningCampbell Barton
2011-10-13formatting edits & remove debug print.Campbell Barton
2011-08-05change BLO_library_append_begin to take a main argument rather then a ↵Campbell Barton
context, means the BGE doesnt need to make a new empty context just to pass as an arg. added doxygen description too. this quiets the print when the BGE does linking.
2011-06-02mathutils support for color arithmetic, also some minor whitespace edits. Campbell Barton
2011-05-27split BLO_library_append_named_part into 2 function, one that adds objects ↵Campbell Barton
into the scene and another that just links/appends.
2011-05-24use PyDoc_STRVAR macro, so its possible to build without docstrings.Campbell Barton
2011-05-24loading data with bpy.data.libraries.load(), now swaps out the strings in ↵Campbell Barton
the list to load with the actual datablocks, this is convenient because it saves the script author having to find them after. also raise warnings rather then errors if the datablock can't be found.
2011-05-10minor cleanup: make functions static, use NULL for pointer comparisons,Campbell Barton
also fixed a possible bug assigning incorrect DPX function types to imbuf.
2011-04-30whitespace edits for bpy api, split some really long lines.Campbell Barton
2011-03-19C, style changes (mostly white space edits), no functional change.Campbell Barton
2011-03-15fix for building on some configurations.Campbell Barton
2011-03-14bpy.types.libraries.load sphinx doc & examples (doc system needed some updates).Campbell Barton
http://www.blender.org/documentation/blender_python_api_2_56_3/bpy.types.BlendDataLibraries.html#bpy.types.BlendDataLibraries.load
2011-03-14add dir() function for library objects, also was missing call to clear temp ↵Campbell Barton
flag on exceptions.
2011-03-13py/library api: raise an error if a requested member isn't found.Campbell Barton
2011-03-13SVN maintenance.Guillermo S. Romero
2011-03-12library loading api.Campbell Barton
this is not well suited to RNA so this is a native python api. This uses: bpy.data.libraries.load(filepath, link=False, relative=False) however the return value needs to use pythons context manager, this means the library loading is confined to a block of code and python cant leave a half loaded library state. eg, load a single scene we know the name of: with bpy.data.libraries.load(filepath) as (data_from, data_to): data_to.scenes = ["Scene"] eg, load all scenes: with bpy.data.libraries.load(filepath) as (data_from, data_to): data_to.scenes = data_from.scenes eg, load all objects starting with 'A' with bpy.data.libraries.load(filepath) as (data_from, data_to): data_to.objects = [name for name in data_from.objects if name.startswith("A")] As you can see gives 2 objects like 'bpy.data', but containing lists of strings which can be moved from one into another.