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
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2017-06-14Make whole ID copying code use const source pointer.Bastien Montagne
Noisy change, but safe, and better do it sooner than later if we are to rework copying code. Also, previous commit shows this *is* useful to catch some mistakes.
2016-07-21Refactor/deduplicate even more make_local code (and fix part of T48907).Bastien Montagne
Turns out most BKE_foo_make_local datablock-specific functions are actually doing exactly the same thing, only two currently need special additional operations (object and brush ones). So added a BKE_id_make_local_generic instead of copying same code over and over. Also, changed a bit how make_local works in case we are localizing a whole library. We need to do the 'remap' step (from old linked ID to new local one) in the second loop, otherwise we miss some dependencies. This fixes main part of T48907.
2016-07-14Add option to id_make_local to force localization of datablock, even if not ↵Bastien Montagne
used locally. Will be used by link/append code.
2016-07-10Cleanup/Refactor: pass Main pointer to all ID copy functions.Bastien Montagne
Also allows us to get rid of a few _copy_ex() versions...
2016-07-09Refactor/enhance BKE_lattice_make_local(), and add BKE_lattice_copy_ex() ↵Bastien Montagne
that takes a Main as parameter. Now using modern features from libquery/libremap areas. Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2015-10-20First step to handle missing libs/datablocks when reading a file.Bastien Montagne
Idea is, instead of ignoring completely missing linked datablocks, to create void placeholders for them. That way, you can work on your file, save it, and find again your missing data once lib becomes available again. Or you can edit missing lib's path (in Outliner), save and reload the file, and you are done. Also, Outliner now shows broken libraries (and placeholders) with a 'broken lib' icon. Future plans are also to be able to relocate missing libs and reload them at runtime. Code notes: - Placeholder ID is just a regular datablock of same type as expected linked one, with 'default' data, and a LIB_MISSING bitflag set. - To allow creation of such datablocks, creation of datablocks in BKE was split in two step: + Allocation of memory itself. + Setting of all internal data to default values. See also the design task (T43351). Reviewed by @campbellbarton, thanks a bunch! Differential Revision: https://developer.blender.org/D1394
2015-08-17Lattice min_max: add a version of the func using lattice's final DispList,Philipp Oeser
and use it for bbox computing. Revision: https://developer.blender.org/D1462
2015-08-13Add real boundbox support to lattice, and update armature one.Philipp Oeser
* draw lattice boundingboxes in 3dView [if "show_bounds" is used -- an option previously pretty useless for lattices] * give proper values for lattice objects ".bound_box" in bpy * give proper values for armature objects ".bound_box" in bpy * lets users use "Dimensions" [in 3dView Transform panel] on lattices and armatures * remove redundant calculations in "boundbox_armature()" Armatures boundingboxes were already drawn in 3dView, if "show_bounds" was used. Based on report T45735: Lattice's bounding_box doesn't update, and a comment in code by @campbellbarton ("later we may want to add dimensions for lattice, armature etc too"). Revision: https://developer.blender.org/D1460
2015-05-12Depsgraph: Add evaluation callbacks for granular nodes updateSergey Sharybin
This commit only adds callbacks which then later be used with major dependency graph commit, keeping the upcoming commit more clean to follow. Should be no functional changes so far still.
2014-09-01Support more object types scene-scale (on creation)Campbell Barton
- lamp - camera - font - empty & effector Also fix inconsistency with apply transform (modified shape-keys for meshes but not curve/lattice)
2014-03-15Code cleanup: use r_ prefix for return argsCampbell Barton
2014-02-24Fix T38755: Crash when having cyclic dependency and curve deformSergey Sharybin
Issue was caused by undefined object update order and in some cases NULL pointer will be de-referenced. Added on-demand curve path calculation, just the same creepy call of BKE_displist_make_curveTypes(). This violates DAG and might end up in a difficult to troubleshoot race condition if there'll be some issues with how dependencies are calculated in DAG, but this is the easiest and safest way to solve the bug at this stage,
2014-02-05Fix compilationSergej Reich
2014-02-05Scanfill: malloc arrays and zero init membersCampbell Barton
2014-02-05Code cleanup: use bool for static methodsCampbell Barton
2014-02-03Code cleanup: use bools where possibleCampbell Barton
2014-01-13Remove direct displist creation from curve deformSergey Sharybin
This solves threading conflict which happens when having multiple objects using Curve Deform modifier with the same curve datablock. This conflict was caused by the fact that curve_deform_verts() used to temporary override curve's flags to make it path is there. Actually, it was setting CU_FOLLOW flag temporary which was only used where_on_path() (only in terms that this temporary assignment only affected this function) but it is now commented out for a while, so no reason to set this flag temporary, If it's ever to be done, we'll need to pass flags as an additional function argument. For the path creation i've extended DegNode structure which now holds extra bits which indicates what additional data depending on the graph topology is to be evaluated. Currently this is only used to indicate that curve needs path to be evaluated regardless to cu->flag state. This is so Curve Deform modifier is always happy. In the future this flag might also be used to indicate whether bmesh verts are to update (see recent commit to 3-vertex parent crash fix) or to indicate that the object is the motherball etc.
2013-12-09Lattice API: add BKE_lattice_index_flip, BKE_lattice_bitmap_from_flagCampbell Barton
2013-08-19Make lattice deform safe for threadingSergey Sharybin
Lattice deformation used to store some runtime data inside of lattice datablock itself. It's something which is REALLY bad. Ideally DNA shouldn't contain and runtime data. For now solved it in a way that initialization of lattice deform will create a structure which contains lattice object for which deformation is calculating and that runtime data which used to be stored in lattice datablock itself. It works really fine for mesh deform modifier, but there's still runtime data stored in particle system DNA, It didn't look something easy to be solved, so leaving this as-is for now. -- svn merge -r58277:58278 -r58795:58796 ^/branches/soc-2013-depsgraph_mt
2013-06-24lattice: use functions rather then defines, also added a function to get uvw ↵Campbell Barton
from an index. - BKE_lattice_index_from_uvw() - BKE_lattice_index_to_uvw()
2013-06-10patch [#35631] Active element for LatticeCampbell Barton
by Kevin Mackay (yakca) Was one of our TODO's from the wiki.
2013-02-05Fix #34040: Moving Normal Node with enabled Cycles Material Preview crashesSergey Sharybin
Issue was caused by couple of circumstances: - Normal Map node requires tesselated faces to compute tangent space - All temporary meshes needed for Cycles export were adding to G.main - Undo pushes would temporary set meshes tessfaces to NULL - Moving node will cause undo push and tree re-evaluate fr preview All this leads to threading conflict between preview render and undo system. Solved it in way that all temporary meshes are adding to that exact Main which was passed to Cycles via BlendData. This required couple of mechanic changes like adding extra parameter to *_add() functions and adding some *_ex() functions to make it possible RNA adds objects to Main passed to new() RNA function. This was tricky to pass Main to RNA function and IMO that's not so nice to pass main to function, so ended up with such decision: - Object.to_mesh() will add temp mesh to G.main - Added Main.meshes.new_from_object() which does the same as to_mesh, but adds temporary mesh to specified Main. So now all temporary meshes needed for preview render would be added to preview_main which does not conflict with undo pushes. Viewport render shall not be an issue because object sync happens from main thread in this case. It could be some issues with final render, but that's not so much likely to happen, so shall be fine. Thanks to Brecht for review!
2013-02-01Fix #34070: set origin operator did not work for lattice objects.Brecht Van Lommel
2012-12-11define the size of matrix args for both rows/cols.Campbell Barton
2012-10-15code cleanup: define sizes of vectors for function args and use C style commentsCampbell Barton
2012-05-13code cleanup: header cleanup and remove some duplicate defines.Campbell Barton
2012-05-05code cleanup: naming - pose/armature/image Campbell Barton
also use ..._find_name(..., name) rather then ..._find_named(..., name) --- both were used.
2012-05-05code cleanup: function naming, use BKE_*type* prefix.Campbell Barton
2012-04-28code cleanup: Campbell Barton
- replace inline face UV center calc. - use const float[3] for mesh and uv functions. - remove unused define
2012-03-26Patch: [#30652] Influence slider for Lattice ModifierThomas Dinges
* This patch adds a influence slider for the lattice modifier, which affects the strength of the deformation. Patch by Patrick Boelens (senshi), thanks a lot!
2012-02-17unify include guard defines, __$FILENAME__Campbell Barton
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-01minor cleanup made while looking into bug report (having vector size in ↵Campbell Barton
comments is silly, may as well have in declaration)
2011-11-05use (const char*) rather than (char*) where possible.Campbell Barton
also removed some unused function definitons.
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-02-18doxygen: blenkernel under core as module.Nathan Letwory
2010-11-17use 'const char *' by default with RNA functions except when the value is ↵Campbell Barton
flagged as PROP_THICK_WRAP. Also use const char in many other parts of blenders code. Currently this gives warnings for setting operator id, label and description since these are an exception and allocated beforehand.
2010-06-28Fix #20965: metaballs partticles and volume material crash renderingSergey Sharybin
Fix #21187: 2.5svn26947 - particles + meta sphere = crash in rendering Use separated displists for mballs in view3d and render stuff. Do not recalculate displist for view3d while rendering - mball.c uses several global variables which shouldn't be accepted from parallel threads.
2010-03-22spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text)Campbell Barton
2010-02-12correct fsf addressCampbell Barton
2009-01-132.5Ton Roosendaal
- restored three more C files: editlattice, editkey and editgroup - editmode lattice working, (mouse select works) - accidentally removed yesterday 3d cursor drawing - removed global editLatt entirely now.
2009-01-072.5Ton Roosendaal
More globals discovered; lattice deform stored static deform array and a matrix. Tsk!
2009-01-042.5Ton Roosendaal
Think global, act local! The old favorite G.scene gone! Man... that took almost 2 days. Also removed G.curscreen and G.edbo. Not everything could get solved; here's some notes. - modifiers now store current scene in ModifierData. This is not meant for permanent, but it can probably stick there until we cleaned the anim system and depsgraph to cope better with timing issues. - Game engine G.scene should become an argument for staring it. Didn't solve this yet. - Texture nodes should get scene cfra, but the current implementation is too tightly wrapped to do it easily.
2008-11-04Simple warning fixesAndre Susano Pinto
2008-11-04Added Lattice vgroup support to shrinkwrap and simple deform modifier.Andre Susano Pinto
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!
2007-11-16Long outstanding feature request: "Multi Modifier"Ton Roosendaal
This allows to mix between the result of 2 modifiers, with both using the same input state. This is useful for having a mesh deform and armature deform working together. However! This functionality could have been presented better... this is actually Node editor stuff! Now it works by adding a "MM" button, next to the "overall vgroup" option. If MM is pressed, the input of this modifier is the same as the input of the previous modifier. Only the armature modifier has this option now...
2007-07-29Armature CrazySpace ImprovementBrecht Van Lommel
=============================== An improved CrazySpace correction is now used for Armature modifiers that use vertex groups, and that are the first enabled modifiers in the stack. This is a a specific case, but also a common one. http://www.blender.org/development/current-projects/changes-since-244/skinning/ Implementation Notes: - The quaternion crazyspace correction is still used for modifiers other than the armature modifier. - Modifiers can now provide a deform matrix per vertex to be used for crazyspace correction, only the armature modifier implements this now.
2007-03-11made all data adding functions accept a name such as add_mesh or add_curve, ↵Campbell Barton
previously only some datatypes adding functions accepted a name. also updated the Bpy.py epydocs
2006-10-31Two wonderful new NLA & Armature editing features!Ton Roosendaal
- FORWARD CYCLING & MATCHING Up to no now, adding multiple actions in NLA with walkcycles required to animate them standing still, as if walking on a conveyor belt. The stride option then makes the object itself move forward, trying to keep the foot stuck on the floor (with poor results!). This option now allows to make walk cycles moving forward. By indicating a reference Offset Bone, the NLA system will use that bone to detect the correct offset for the Armature Pose to make it seamlessly going forward. Best of all, this option works as for cyclic Action Strips as well as for individual Action Strips. Note that for individual strips, you have to set the strip on "Hold". (Might become automatic detected later). Here's an example edit image for NLA: http://www.blender.org/bf/nla_match-cycle.jpg And the animation for it: http://download.blender.org/demo/test/2.43/0001_0150_match.avi Blender file: http://download.blender.org/demo/test/2.43/mancandy_matching.blend Using this kind of cycling works pretty straightforward, and is a lot easier to setup than Stride Bones. To be further tested: - Blending cycles - matching rotation for the bones as well. - ACTION MODIFIERS (motion deformors) The above option was actually required for this feature. Typically walk cycles are constructed with certain Bones to be the handles, controlling for example the torso or feet. An Action Modifier allows you to use a Curve Path to deform the motion of these controlling bones. This uses the existing Curve Deformation option. Modifiers can be added per Action Strip, each controlling a channel (bone) by choice, and even allows to layer multiple modifiers on top of each other (several paths deforming motion). This option is using the dependency graph, so editing the Curve will give realtime changes in the Armature. The previous walkcycle, controlled by two curves: http://download.blender.org/demo/test/2.43/0001_0150_deform.avi Blender file: http://download.blender.org/demo/test/2.43/mancandy_actiondeform.blend Action Modifiers can be added in the NLA Properties Panel. Per Modifier you have to indicate the channel and a Curve Object. You can copy modifiers from one strip to another using CTRL+C (only copies to active Object strips). Setting up a correct Curve Path has to be carefully done: - Use SHIFT+A "Curve Path" in top view, or ensure the path is not rotated. - make sure the center point of the Curve Object is at the center of the Armature (or above) - move the first point of the curve to the center point as well. - check if the path starts from this first point, you can change it using (in Curve EditMode) the option Wkey -> "Switch Direction" - Make sure alignment uses the correct axis; if the Armature walks into the negative Y direction, you have to set in Object Buttons, "Anim settings" Panel, the correct Track option. (Note; option will probably move to the Modifier later). This is a good reason to make such paths automatic (on a command). Is on the todo list. Also note this: - the Curve Path extends in beginning and ending, that's (for now) the default, and allows to use multiple paths. Make sure paths begin and end horizontal. - Moving the Curve in Object Mode will change the "mapping" (as if the landscape a character walks over moves). Moving the Curve in Edit Mode will change the actual position of the deformation. - Speed (Ipos) on paths is not supported yet, will be done. - The Curve "Stretch" deform option doesn't work. - Modifiers are executed *after* all actions in NLA are evaluated, there's no support yet for blending multiple strips with Modifiers. - This doesn't work yet for time-mapping... This commit is mostly for review by character animators... some details or working methods might change. This feature can also be used for other modifiers, such as noise (Perlin) or the mythical "Oomph" (frequency control) and of course Python. Special thanks to Bassam & Matt for research & design help. Have fun!