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-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-10Refactor/enhance BKE_particlesettings_make_local().Bastien Montagne
Now using modern features from libquery/libremap areas. Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
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-06-23Fix T48658: Cycles render & render preview corrupts particlesCampbell Barton
Replaces `G.is_rendering` with `use_render_params` argument. This is needed for Cycles, which attempts to restore render-preview settings from particles, after it gets its own particle data, but fails to restore because `G.is_rendering` was being checked in psys_cache_paths (and other places).
2016-03-19BLI_kdopbvh: Pass center to to range callbackCampbell Barton
Useful when BLI_bvhtree_range_query callback calculates a new position to measure from.
2016-02-02Fix T46382: Crash sharing particle system with clump or rough curvesSergey Sharybin
Made those curves local to thread evaluation now, so there is no threading conflict accessing them from evaluation threads anymore.
2016-01-07Cleanup: remove unused scene argCampbell Barton
2016-01-04Fix T47038: Particles in Particle Edit Mode get added in completely wrong ↵Bastien Montagne
location. It also fixes another issue (crash) related to symmetric editing. Quite involved, we (try to!) fix complete broken logic of parts of particle code, which would use poly index as tessface one (or vice-versa). Issue most probably goes back to BMesh integration time... This patch mostly fixes particle editing mode: - Adding/removing particles when using generative modifiers (like subsurf) should now work. - Adding/removing particles with a non-tessellated mesh (i.e. one having ngons) should also mostly work. - X-axis-mirror-editing particles over ngons does not really work, not sure why currently. - All this in both 'modes' (with or without using modifier stack for particles). Tech side: - Store a deformed-only DM in particle modifier data. - Rename existing DM to make it clear it's a final one. - Use deformed-only DM's tessface2poly mapping to 'solve' poly/tessface mismatches. - Make (part of) mirror-editing code able to use a DM instead of raw mesh, so that we can mirror based on final DM when editing particles using modifier stack (mandatory, since there is no way currently to find orig tessface from an final DM tessface index). Note that this patch is not really nice and clean (current particles are beyond hope on this side anyway), it's more like some urgency bandage. Whole crap needs complete rewrite anyway, BMesh's polygons make it really hard to work with current system (and looptri would not help much here). Also, did not test everything possibly affected by those changes, so it needs some users' testing & validation too. Reviewers: psy-fi Subscribers: dfelinto, eyecandy Maniphest Tasks: T47038 Differential Revision: https://developer.blender.org/D1685
2015-10-08Add id looper for particlesystem.Bastien Montagne
2015-08-28Partial fix of T44881: Fix for missing particles update when changing seedSergey Sharybin
Was only visible with new dependency graph. Changing emit_from still doesn't behave fully reliably tho, that needs some closer investigation.
2015-07-31Replace MFace w/ vert-tri's for collision modifierCampbell Barton
Note that the collision modifier doesn't have any use for Loop indices, so to avoid duplicating the loop array too, MVertTri has been added which simply stores vertex indices (runtime only).
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.
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2015-03-25Fix T43694, by Krzysztof Rećko (chrisr), reviewed in D1177.Lukas Tönne
Added some guards to prevent clumping to non existing particles. Also, adjusted threaded child path evaluation, so each child is evaluated once - previously virtual parents were done twice.
2015-02-20RNA: correct bool callbacksCampbell Barton
2015-02-14Revert "Fix T43471, based on patch submitted by @sean_loh."Lukas Tönne
This reverts commit b2b54b0902045ec4f0c1a4cae3209be863878f5b. The patch breaks particle distribution even in simple cases, not worth doing this for keeping a hackish loophole open.
2015-02-12Fix T43471, based on patch submitted by @sean_loh.Lukas Tönne
Particle textures always override timing information of particles. Previously particle times could be scripted, but now these changes are discarded by the texture evaluation function. The patch disables texture overriding when no textures are defined, this way at least some old scripts can keep working.
2015-01-20Fix for particle system copy: This has to make sure the ORIGSPACE dataLukas Tönne
layer is available. Otherwise particle mapping to the new mesh cannot work with subdivided and constructively-modified meshes.
2015-01-20New texture influence option for particle kink amplitude (as opposed toLukas Tönne
frequency).
2015-01-20Renaming "Kink" texture influence to "Kink Frequency" to be moreLukas Tönne
specific.
2015-01-20Another crappy approach to spirals on hairs, crazy expensive though.Lukas Tönne
Conflicts: source/blender/blenkernel/intern/particle.c
2015-01-20Optional clumping noise feature for simulating twisted hair strands.Lukas Tönne
This adds another level of clumping on child hairs. When enabled, child hairs chose a secondary clumping target using a Voronoi pattern. This adds visual detail on a smaller scale, which is useful particularly when the number of parents is relatively small. Natural fibres behave in a similar way when they become sticky and intertwined. Hairs close to each other form a first twisted strand, then combine into larger strands. Similar features can be found in ropes: http://en.wikipedia.org/wiki/Hair_twists http://en.wikipedia.org/wiki/Rope Conflicts: source/blender/blenloader/intern/versioning_270.c
2015-01-20Curve-based control for "roughness" (noise displacement) of child hair.Lukas Tönne
2015-01-20Curve-based control for child path tapering.Lukas Tönne
This is an alternative method to the current fixed function with a clump factor and "shape" parameter. This function is quite limited and does not give the desired result in many cases (e.g. long, parallel rasta strands are problematic). So rather than trying to add more parameters there is now a fully user-defined optional curve for setting the tapering shape.
2015-01-20Reorganizing hair child code a little bit to make it not totally insane.Lukas Tönne
This contains a few pieces of code for a future "modifier" system that would allow more flexible combination of effects. Eventually a node system is the way to go, but the current code makes that impossible.
2015-01-20Separate context freeing from task freeing in threaded particle updatesLukas Tönne
to prevent double-freeing/invalid mem access. This can happen with the "virtual parents" feature, which generates both parent and child paths. Each task free function also freed the shared context, leading to double freeing.
2015-01-20Moved render simplification function for particle distribution into theLukas Tönne
distribution code.
2015-01-20Removed unused variable.Lukas Tönne
2015-01-20Moved particle code for distributions into own file to make hackingLukas Tönne
easier. This code is badly broken and needs to be replaced, but at least having a workable code structure might help with quick hacks to fix the worst cases.
2015-01-20Use the generic task scheduler for threaded particle tasks, i.e.Lukas Tönne
distribution and path caching for child particles. This gives a significant improvement of viewport playback performance with higher child particle counts. Particles previously used their own threads and had a rather high limit for threading. Also threading apparently was disabled because only 1 thread was being used ...
2015-01-04cleanup: use 'coords' abbreviation for functions.Campbell Barton
2014-10-29Fix T42294: Bullet rigidbody point cache reading was using uninitializedLukas Tönne
key values for velocity.
2014-07-02Fix T40815: Particle birth times not initialized correctly.Lukas Tönne
In rB78c491e the `initialize_particle` function was split into 2 parts for particle texture initialization. The texture init part however also initializes birth times, which is now missing in the main init function in some cases (notably when setting start/end directly without a subsequent time step).
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2014-03-07Fix for own commit: particle rng arrays should be declared extern in theLukas Tönne
header.
2014-03-07Removing ParticleSystem->frand arrays to avoid memory corruption issuesLukas Tönne
in threaded depgraph updates and effector list construction. Gathering effectors during depgraph updates will call the psys_check_enabled function. This in turn contained a DNA alloc call for the psys->frand RNG arrays, which is really bad because data must be immutable during these effector constructions. To avoid such allocs the frand array is now global for all particle systems. To avoid correlation of pseudo-random numbers the psys->seed value is complemented with random offset and multiplier for the actual float array. This is not ideal, but work sufficiently well (given that random numbers were already really limited and show repetition quite easily for particle counts > PSYS_FRAND_COUNT).
2014-02-05Fix T35247: Particle texture behaves incorrectly after changing the number ↵Sergey Sharybin
of particles Root of the issue goes to the order of particle initialization which does texture evaluation (which does depend on particle coordinate) and particle birth coordinate calculation. So basically what happened is: * Changing number of particles re-allocated all the particles, which sets their coordinate to (0,0,0) * Texture evaluation used this non-initialized coordinate * Coordinates were calculated for particles Reshuffled code a bit so now texture evaluation happens after particles. coordinate calculation. Basically moved texture evaluation to particle reset function. Reset happens after initialization anyway and it does know particle coordinates. Also, if reset is being called without init then it's also kind of logical to re-evaluate texture because particle coordinates might change.
2014-02-05Fix T38476: incorrect hair draw type after editing particle system in edit mode.Brecht Van Lommel
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-25Fix particle hair display percentage not properly getting restored afterBrecht Van Lommel
rendering. This used to happen in an unneeded frame change update which was removed. For heavy particle systems this could have a bad impact on viewport performance after rendering.
2013-05-19Fix #35407: different particle behavior compared to 2.66, reverted part of ↵Brecht Van Lommel
56073.
2013-04-16Random number generator: replace a bunch of usage of the global random numberBrecht Van Lommel
generator with a local one. It's not thread safe and will not give repeatable results, so in most cases it should not be used. Also fixes #34992 where the noise texture of a displacement modifier was not properly random in opengl animation render, because the seed got reset to a fixed value by an unrelated function while for final render it changed each frame.
2013-04-03code cleanup: unused functionsCampbell Barton
2013-03-26style cleanup:Campbell Barton
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
2013-02-19Fix for [#34099] Particles leaking from moving meshesAlex Fraser
This was caused by a floating point precision error. During collision detection, Newton-Raphson iteration is used to find the exact time of the collision. But when using subframes, the initial Newton step was too small. Now the initial step is given in absolute units. When subframes = 0, this should behave almost the same as before. Thanks to Janne Karhu, Lukas Toenne and Ton Roosendaal for their help with this patch, and to AutoCRC for funding.
2013-02-02style cleanupCampbell Barton
2013-01-19style cleanupCampbell Barton
2012-12-14Adding a new SPH solver that is more physically accurate. See patch #29681Alex Fraser
http://projects.blender.org/tracker/index.php?func=detail&aid=29681&group_id=9&atid=127 The solver was mostly implemented by John Mansour at VPAC, with help from me and with funding from the AutoCRC. The SPH formulation is due to Gingold and Monaghan, and the smoothing kernel is due to Wendland. This solver does not replace the old one; it is available as an option. Note that the new solver uses different units than the old one. The patch page has a couple of attachments that can be used to test the new solver, particularly sphclassical_dam_s0.01_grav.blend (ignore the earlier tests). The simulation in that file compares well with a physical experimental dam break; details in a paper by Changhong Hu and Makoto Sueyoshi, also referred to on that page.
2012-12-11define the size of matrix args for both rows/cols.Campbell Barton