Commit Graph

41 Commits

Author SHA1 Message Date
Campbell Barton
97d62f0183 style cleanup 2013-01-15 23:15:32 +00:00
Campbell Barton
d984c46701 remove type checks on drawing uiList's,
if the list is given the wrong item then the script needs to be fixed, better not fail silently.

left in checks as commented out asserts.
2012-12-28 10:45:59 +00:00
Bastien Montagne
7504cf34b4 This commit frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!

This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!

To make all this work, other changes were also necessary:

* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.

* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.

* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.

* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
  Note: not sure whether we should add that one to all UILayout's prop funcs?

Note: will update addons using template list asap.
2012-12-28 09:20:16 +00:00
Daniel Genrich
cb634b9100 Google Summer of Code project: "Smoke Simulator Improvements & Fire".
Documentation & Test blend files:
------------------
http://wiki.blender.org/index.php/User:MiikaH/GSoC-2012-Smoke-Simulator-Improvements

Credits:
------------------
Miika Hamalainen (MiikaH): Student / Main programmer

Daniel Genrich (Genscher): Mentor / Programmer of merged patches from Smoke2 branch
Google: For Google Summer of Code 2012
2012-10-10 13:18:07 +00:00
Campbell Barton
9fa36b12cc style cleanup: pep8 2012-10-08 08:28:05 +00:00
Sergej Reich
221a787822 Don't show physics properties in game engine conext
Also rename fluid panels to be more consistent with other simulations
2012-06-08 15:24:28 +00:00
Campbell Barton
c93c8bda3d replace relative imports with absolute imports so scritps can be executed directly (live editing). 2012-04-04 14:39:52 +00:00
Bastien Montagne
b3a0a33791 "Fix" [#30431] UI string spelling & similar fixes.
All suggested changes looked good to me, thx to Michael Färber for this list of changes!
2012-03-02 21:14:37 +00:00
Campbell Barton
1f74789d12 Correct mathutils documentation, also correct some python spelling errors and add makefile target check_spelling 2012-02-08 04:37:37 +00:00
Miika Hamalainen
25a5915650 Dynamic Paint:
* Added "Project" option also for "Volume + Proximity" brush type.
2012-01-19 11:13:41 +00:00
Miika Hamalainen
4d9197866b Dynamic Paint:
* Added per surface options "influence scale" and "radius scale" for tweaking brush settings individually for each surface.
* Added option to completely disable drying. This should be nice for indefinitely spreading paint etc.
* Improved paint mixing algorithm.
* "Paint effects" now work in relative mesh space instead of global. This means that effect speed remains same for identical shapes regardless of their size.
* Complete rewrite of "spread effect" algorithm. It now works much better in all test cases done. Old algo sometimes produced artifacts and stopped spreading too early.
* Adjustments / rewrite on some parts of dripping algorithm to make it work better with transparent paint.
* Added a new "color dry" setting. It can be used to define wetness level when paint colors start to shift to surface "background". Lower values can be useful to prevent spreading paint from becoming transparent as it dries, while higher (default) values give better results in general.
* Fix: If multiple displace/wave surfaces were used simultaneously, displace was applied using wrong normal.

Please note that due to these changes in "paint effects" system older save files may require some tweaking to match results from previous versions.
2012-01-16 17:18:07 +00:00
Brecht Van Lommel
2345efc6c5 Patch #29336: renaming UV (Texture) Layer to UV Map in the user interface,
by Gaia Clary.

Rationale: the name was confusing and not always used consistently, and this
map itself is not something that can be layered, rather the map can be used
as texture coordinates in some layered setup.

The original intent was to indicate this contained more than just UV's, but
the game engine settings have already been moved out, and apparently users
didn't really get this from the name anyway.
2011-11-23 17:25:25 +00:00
Campbell Barton
4d9766aacf minor cleanup
- remove / comment unused python vars
- replace mul_v3_fl(somevec, -1.0f); with negate_v3(somevec);
2011-11-16 16:38:37 +00:00
Campbell Barton
ea02534722 missed these while rna renaming. 2011-11-15 10:49:02 +00:00
Campbell Barton
972debc7eb make rna naming for dynamic paint consistent with existing names & conventions. 2011-11-14 07:07:59 +00:00
Campbell Barton
11a7a406fb DPAINT_OT_output_toggle operator was using an index option for what was really a toggle between 2 values, changed its index option to an enum.
if a value other than 1/0 was given it would use an uninitialized pointer too (compiler warning, review should pick up this stuff).

also renamed some RNA attrs:
 output_name --> output_name_a
 output_name2 --> output_name_b
 do_output1 --> use_output_a
 do_output2 --> use_output_b
 do_smudge --> use_smudge
 max_velocity --> velocity_max
2011-11-14 06:46:07 +00:00
Miika Hamalainen
4ef2089097 Dynamic Paint:
* Renamed "Sharp" proximity falloff to "Constant".
* Added a new "Negate Volume" option for "Volume + Proximity" brush.
* Possible fix for random particle clipping errors.
2011-11-11 10:46:26 +00:00
Campbell Barton
11947f1a67 pep/style edits & quiet some warnings 2011-11-11 03:28:46 +00:00
Thomas Dinges
cea9c518d5 Dynamic Paint UI:
* Code cleanup, changed some splits to row's, much nicer when you only use 2 properties in a row.
* if > elif
* Removed some duplicated code for an if/elif/else check

Did some minor separator() changes too.
2011-11-10 20:31:50 +00:00
Thomas Dinges
9e3deee808 2.6 Physics UI Files:
* Remove redundant check for md, this is already done in the super class poll.
2011-11-10 19:10:23 +00:00
Miika Hamalainen
1b4a54ad73 Merge with trunk r41701 2011-11-09 15:46:53 +00:00
Miika Hamalainen
0a37e6ab97 Dynamic Paint:
* Redesigned alpha blending and paint drying algorithms. Now it gives much better results when using low brush alpha or when surface has initial color set.
* Fix: "Slow" dissolve/dry was scaled incorrect when using substeps. Also adjusted time to better match non-"slow" setting.
* Fixed possible issues when using image textured brush.
* Fix: particle brush panel was no longer visible since last commit.
* Adjusted default surface values.
* Some more code cleanup.
2011-10-31 13:01:06 +00:00
Miika Hamalainen
fae903e263 Dynamic Paint:
* More code changes pointed by Brecht in codereview.
* Some user interface improvements.
* Updating brush settings now also updates canvas preview.
2011-10-28 14:46:09 +00:00
Miika Hamalainen
30cba27987 Dynamic Paint:
* Some changes and cleanup pointed on the codereview.
2011-10-22 16:16:14 +00:00
Miika Hamalainen
8bf78d7f56 Dynamic Paint:
* Fix: Wave "timescale" also changed simulation behavior. Now different timescale values will lead to nearly identical results, just slower or faster.
* Added "Displace Factor" setting for vertex displace surfaces. You can use it to adjust final displace strength or use negative values to paint bumps.
* Added clamp/map value to wave image sequence output settings.
* RNA description tweaking.
* General code tweaking.
2011-10-13 20:00:22 +00:00
Miika Hamalainen
9e9b26b8ba Dynamic Paint:
* Brush ui still had references to old "Non-Closed" property.

Note that old Dynamic Paint saves no longer work in carrot revisions 40411 and later due to new modifiers that were added into trunk. :(
2011-09-20 18:16:44 +00:00
Miika Hamalainen
9de082dbf4 Dynamic Paint:
* Enabled modifier "Apply" button since it can now be used to apply displacement or output layers to the mesh.
* Default surface output names are now unique in case canvas has multiple surfaces of same type.
* Merged "face aligned" and "non-closed" brush options to a single "Project" toggle, available for "Proximity" brushes.
* Added more icons to user interface selections.
* Increased default proximity distance.
* Set proximity falloff ramp to only affect alpha by default.
* Removed some no longer required render ext. functions.
* Fix: geometry node vertex alpha didn't work unless "Vertex Color Paint/Light" was enabled from material.
2011-09-10 08:55:44 +00:00
Miika Hamalainen
79ef35889f Dynamic Paint:
* Added "Initial Color" setting for surfaces. You can for example set color from UV mapped texture or from vertex colors.
* Added clamping option for "wave" brushes.
* Merged smudge and drip adjacency search code. This fixes some issues with drip effect and makes code easier to maintain.
* Some adjustments to the bounding box generation code.
* OpenMP is now completely disabled if no compile flag is set.
* Wetness values are now properly clamped on vertex surfaces. No more black dots on >1.0 wetness.
* Textured brushes now use same function calls as internal renderer, instead of modified duplicates.
* Moved operator code to editors/physics/.
* Re-enabled some particle brush optimizations.
* Fixed sometimes incorrect volume brush influence.
* Fixed possible crash when using a brush that uses "Voxel Data" texture simultaneously with material preview or render.
* Fixed texture mapping issues for "Object Center" brush.
* Fixed possible crash/corruption when duplicating brush object that uses color ramps.
* Other tweaking and code cleanup.
2011-09-05 16:04:15 +00:00
Miika Hamalainen
0bb7ddad97 Dynamic Paint:
* Added option to preview surface wetmap instead of paint.
* Changed default paint color to blue for better visibility.
* Fix: Random sized particles didn't work anymore.
* Fix: Particle initial velocity issues when using canvas substeps and a particle brush.
2011-08-28 16:36:47 +00:00
Miika Hamalainen
5b71334484 Dynamic Paint:
* Bake calculation memory is now freed if surface is deactivated or baked.
* Fixed possibly incorrect brush influence when using "Non-Closed" brush setting.
* Added new rna property descriptions.
* Added some comments and general code cleanup.
2011-08-21 19:03:47 +00:00
Miika Hamalainen
5467df14ca Dynamic Paint:
* Added a new "color spread" slider for "spread" effect to adjust how much colors get mixed.
* Improved smudge behavior on "wet" paint.
* Displace can now be set "incremental". This way it's added on top of previous displace.
* Added "displace clamp" setting. You can use it to limit maximum amount of displace.
* Fix: velocity data wasn't always initialized, this could lead to no effect at all or crash.
* Fix: Vertex color rendering near zero alpha values was still incorrect.
2011-08-05 09:31:35 +00:00
Miika Hamalainen
f4c93eb580 Dynamic Paint:
* Smudge now works properly with substeps.
* Velocity brush speed clamping now works for all brush types.
* Small tweaking on velocity brush ui.
2011-08-04 07:09:21 +00:00
Miika Hamalainen
8394f65d4a Dynamic Paint:
* Object velocity can now be used to determine brush influence and color.
* Brushes can now be set to "smudge" existing paint.
* Added new operators to easily add and remove surface output mesh data layers from Dynamic Paint ui.
* Fixed drip effect algorithm to work properly on forces pointing towards surface.
* Adjusted drip effect speed.
* Drip effect can now use canvas velocity and acceleration to influence drip direction.
* Fixed texture mapping for material enabled brushes.
* "Object Center" type brushes can now use "material color" as well.
* Improved surface partitioning grid generation algorithm.
* Fixed possible invalid brush collision detection when OpenMP enabled.
* Fixed incorrect random sized particle displace/wave influence.
* Fixed "Object Center" brush color ramp falloff.
* Fixed invalid zero alpha sampling when rendering vertex colors.
* Lots of smaller tweaking.
2011-08-03 18:31:48 +00:00
Miika Hamalainen
f8f1cbd17f Dynamic Paint:
* Canvas and brush can be now enabled simultaneously. This way it's possible for two canvases to interact.
* Added basic anti-aliasing support for vertex surfaces.
* 3D-view color preview now works even when there's subsurf modifier after Dynamic Paint in modifier stack.
* Added a new brush option to use proximity from object center.
* Default surface frame range now use scene's start and end values.
* Improved ray checks for volume brushes.
* Added new "non-closed" option for volume brushes. This way it's possible to use planar meshes as "volume" brushes with predefined ray direction.
* New carrot branch splash image by CGEffex.
* Improved brush affection code.
* Lots of smaller improvements.
* Fixed: Weight paint didn't work with particles.
* Fixed: Point cache didn't work for non-wave surfaces anymore since last commit.
2011-07-08 11:03:37 +00:00
Miika Hamalainen
901f24716b Dynamic Paint:
* Some ui and rna tweaking.
* Effects ui panel is no longer visible for non-paint surfaces.
2011-07-03 14:01:57 +00:00
Miika Hamalainen
9ae663154f * Added a new surface type "Waves" that simulates simple 2D wave motion.
* Optimized adjacency point searching for vertex surfaces.
* Separated adjacency code from effect system.
* Overall code cleaning and tweaking.
2011-07-02 18:06:39 +00:00
Miika Hamalainen
cb12648656 Dynamic Paint:
* Fixed memory leak when baking image sequences.
* Fixed sub-steps when brush was controlled by a parent object.
* Added option to select active outputs for paint surfaces.
* Improved color mixing algorithm.
* Improved memory allocation behavior.
* Memory is now freed even in case of errors.
* Removed "initial color" setting, as it's better to adjust color from material.

* "Paint effects" system:
** Converted to use new data structures.
** Works now with any number of surrounding points.
** Re-implemented support for UV-image surfaces.
** Added support for vertex surfaces too.
** Improved color handling.
** Improved movement stability.
** "Drip" effect uses now Blender's force fields instead of just z-directional gravity like before. Now each surface point can have different force influence.
2011-06-27 07:30:58 +00:00
Miika Hamalainen
40d4f34e82 Dynamic Paint:
* Added vertex weight painting.
* Added dissolve/fade setting for every surface type.
* Restored image format and displace type selection for image sequences.
* Fixed a possible crash when OpenMP enabled.
* Attempt to fix surface rna paths.
* Fixed compile warnings.
2011-06-18 18:41:20 +00:00
Miika Hamalainen
71211818be Dynamic Paint:
* Image sequence anti-aliasing works again.
* Vertex color viewport preview now works with GLSL and textured view modes too.
* Added a new "inverse" setting for "volume + proximity" brush. With it brush only has effect within volume but effect is lower near the mesh surface.
2011-06-17 18:04:56 +00:00
Miika Hamalainen
3de22dec26 Dynamic Paint:
Committed changes from previous weeks, biggest changes are:
* Canvas can now have multiple "surfaces" that each can have specific format, type and settings.
* Renewed UI to support this new system.
* Aside from old "image sequence" output format, Dynamic Paint can now work on vertex level as well. Currently vertex paint and displace are supported.
* Integrated vertex level painting with Point Cache.
* Added viewport preview for Point Cache surfaces.

Due to massive amount of changes, old Dynamic Paint saves are no longer supported. Also some features are temporarily missing or may not work properly.
2011-06-16 10:41:00 +00:00
Miika Hamalainen
3b41ab432b Applied Dynamic Paint 1.18f patch as a codebase for GSoC. 2011-05-24 07:08:58 +00:00