Commit Graph

68 Commits

Author SHA1 Message Date
289c5de7d8 Fix T38359: incorrect display of material slot with pinned particle settings.
Just hide it in this case, the material slot is not really valid without an
object in the context.
2014-01-29 16:50:37 +01:00
Bastien Montagne
c7ac0edb34 Fix T38359: Not a bug, but better to grey out Material selector of particles when using Object or Group render type (since we always use duplicated objects' materials in this case!). 2014-01-25 09:01:32 +01:00
Andrew Buttery
9151f5d227 UI: Add a "New" button for the particle system, consistent to other areas like materials, world and textures.
Differential Revision: https://developer.blender.org/D171
2014-01-12 00:39:39 +01:00
Thomas Dinges
7eab49f8d9 Interface / Particles: Fix bad alignment in Rotation panel, sub layout missed the flag. 2013-12-13 10:54:44 +01:00
Geoffroy Krantz
9174f22b3c Particles: change material picking from index number in UI to menu with materials.
Also fix material slot index not being properly initialized to 1, this got clamped
from zero only on drawing the UI.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D55
2013-12-07 12:26:58 +01:00
Thomas Dinges
61a28ef764 Interface: Remove some more name fields, not needed anymore with list rename.
Also small alignment tweaks to Keying Sets UI, looks better when the 2 columns have the same alignment.
2013-11-24 15:14:45 +01:00
Campbell Barton
1ea47c9af9 Code Cleanup: style, spelling and pep8 edits 2013-11-20 03:40:10 +11:00
Sergey Sharybin
023b25b57e Fix #37106: Hair Length vanishes when Advanced is enabled
Seems to be just a missing case from r34687.

Could not see a reason why hair length is to be hidden in
advanced settings mode.
2013-10-17 10:42:47 +00:00
Thomas Dinges
0cbdac99b8 Interface:
* More compact and better looking Vertex Groups panel (Particle System).
* Smaller uiLists for Cycles as well.
2013-10-13 23:45:41 +00:00
Thomas Dinges
f79eff2984 Interface / Template Lists:
* Reduce the space of more lists, should be all in bl_ui/
2013-10-13 23:24:37 +00:00
Thomas Dinges
6e86760de2 Interface / Template lists:
* Make the gap for the filtering options slightly bigger, so 1 row doesn't look so cluttered.
* Default Render Layer and Particle System list in the Properties Editor to 1 row as well, to save space.
2013-10-13 23:04:39 +00:00
Bastien Montagne
5b83a89c81 Followup to r59434 : py UI scripts edits.
Notes:
* Made those edits by full checking of py files, so I should have spoted most needed edits, yet it remains quite probable I missed a few ones, we'll fix if/when someone notice it...
* Also made some cleanup "on the road"!
2013-08-23 20:41:21 +00:00
Brecht Van Lommel
bb15701f86 Particles: patch #35205 by Jakub Zolcik
The Emission panel now has a Use Modifier Stack option to emit particles from
the mesh with modifiers applied. Previously particles would only be emitted from
faces that exist in the original mesh. There are some caveats however:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.68/Tools#Particles
2013-05-27 17:11:05 +00:00
Joshua Leung
fa02cccf2a Bugfix [#35075] Physics Panel of Particles Fluid is Truncated
Some RNA Properties were not updated in UI scripts after a recent refactoring
there removing "use_" prefix from some of the boolean properties (strangely
though, while every other property attached to SPHFluidSettings.flag has gone
from "use_factor_blah" to "factor_blah", use_factor_density still keeps the old
prefix).
2013-04-25 10:05:49 +00:00
Campbell Barton
53917c4e3a rna attribute consistency edits, use common prefix for booleans. 2013-04-23 07:06:29 +00:00
Sergey Sharybin
e4ecdebb87 Fix #34667: trail_count option missing for Particle (emitter) System Render Panel "Path" UI
Patch from Josh Wedlake, many thanks!
2013-03-22 09:54:43 +00:00
Bastien Montagne
5c5b753779 Fix [#34300] Slider for list of particle systems (keyed particles) is not doing anything. Navigating a list of more than 5 elements requires keyboard.
Systematically adding some custom id to template_list using default UI_UL_list class, this one is commoly used more than once in an area, yielding collision issues if they do not have a custom id...
2013-02-18 13:30:40 +00:00
Bastien Montagne
d0f4a2396b Actually, UI scripts should not use directly pgettext, but rather the iface or tooltip variants. Added those to bpy.app.translations, and used pgettext_iface.
(Did not add those when I created that module, because I did not thought we would actually need them in usual UI code, but turned out I was wrong).

Also made some optimizations in those py gettext funcs, when i18n is disabled at build time, no need to do pyobject -> cstring -> pyobject conversions!.
2013-02-10 10:29:38 +00:00
Campbell Barton
3b8a0f3d67 use import rather then assignment for loading '_' into scripts. 2013-02-10 09:56:05 +00:00
Bastien Montagne
c0fa16f2c9 Another fix for r54414 (cleaner to "import" pgettext once at top of files, also now using usual '_' shortcut). 2013-02-10 09:09:26 +00:00
Campbell Barton
5d4df1a999 pep8 cleanup 2013-02-10 08:54:10 +00:00
Bastien Montagne
82c86af7f7 Bunch of fixes for py ui messages (all those using 'formating' were not translated previously, now they use bpy.app.translations.pgettext). Also pleas avoid complex py statements in 'text' values (like 'text="foo" if cond else "bar"'), thes make message extraction script fails!
And another "final point in UI message" removal!
2013-02-09 18:26:40 +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
Alex Fraser
f276b3a3cd Adding a new SPH solver that is more physically accurate. See patch #29681
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-14 04:57:26 +00:00
Alex Fraser
9a848c1a9d Can now set a lower bound on the number of subframes (i.e. an upper bound on the time step size) for fluid simulations. Previously, the "subframes" parameter was not available when the adaptive time step was enabled; now they can both be set. The two settings can be used together to greatly increase simulation stability. 2012-12-12 22:42:55 +00:00
Campbell Barton
9982b283e6 fix for asserts added in own recent commit with more strict type-checking
- BMO_slot_copy now only copies compatible elements.

other minor changes
- don't use text.format(...), convention for UI scripts is C style string formatting.
- rename bmo_edgenet_prepare --> bmo_edgenet_prepare_exec
- float/double warning in bevel.
2012-11-27 02:34:40 +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
Brecht Van Lommel
97ee630dcd Fix #32201: particle size compatibility broken for object/group duplication.
After 2.63 there was a bugfix to take object scale into account for the duplicated
objects, but this breaks compatibility on earlier files. Now there is an option to
control if the scale should be used or not.

Scale is used by default on newer files, and not used on older ones.
2012-08-22 13:10:43 +00:00
Campbell Barton
b0371f053c style cleanup 2012-08-17 18:36:20 +00:00
Campbell Barton
2a140e93c1 style cleanup 2012-07-04 21:41:05 +00:00
Sergey Sharybin
a558eed3e4 Fix #31838: Console error with particle Child Simplification is enabled.
Patch by Philipp Oeser, thanks!
2012-06-18 12:29:44 +00:00
Campbell Barton
15eb3452ec style cleanup: pep8, also quiet compiler warning. 2012-04-20 18:50:18 +00:00
Thomas Dinges
b0b64b2d80 Particle System UI:
* Negate label in the Vertex Groups panel was misleading to the string buttons, rather then the check boxes. Fixed it by having 2 columns.
Not ideal still, but better! :)

Issue reported by Tobias Kummer. Thanks!
2012-04-09 11:38:43 +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
Janne Karhu
fcd5550a42 Some advanced particle rotation modes and reorganization of the rotation panel:
- More angular velocity modes to support creative effects.
- Renamed "Initial Rotation" to "Initial Orientation" to better reflect the functionality
- Renamed "Spin" angular velocity mode to "Velocity".
- Organized the rotation panel a bit better.
- Also some better names and tooltips for the different rotation values.
2012-03-20 01:00:28 +00:00
Janne Karhu
709ca0ece9 "Fix" for [#30098] Particle rotation wrong / explode modifier
- The main problem was that in order to be accurate all particle
  rotations have to be calculated incrementally so the only working
  solution is to store rotations to the point cache (previously
  this was only done for dynamic rotations). This can nearly double
  the point cache size so it's not ideal to have this as a default
  as in many cases you don't care about particle rotations.
- Particle rotation panel now has a new "enable" checkbox that
  enables rotation calculations and the storing of rotations to
  point cache.
- Old files will have rotations enabled via do_versions so that in
  the worst case old files will only get bigger point caches, but no
  sudden loss of particle rotations.
2012-03-18 21:33:00 +00:00
Bastien Montagne
ebe01d06bc Misc picky edits to UI messages. 2012-01-23 22:57:46 +00:00
Campbell Barton
c99975e24f pep8 edits 2012-01-01 08:52:54 +00:00
Daniel Stokes
0be004bb2f Cleaning up some issues that found their way into the python ui files with the first Cucumber merge. 2011-12-20 07:39:30 +00:00
Thomas Dinges
a17f4dfda6 First fix after Cucumber merge starts.
* Restore COMPAT_ENGINES for particle panel, caused error on startup. (Cycles needs it)
2011-12-20 06:26:03 +00:00
Dalai Felinto
32b23b9f74 Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting

[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]


Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593

36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)

37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.

37157:
Making the bake options available in Blender Game

37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)

37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.

[37517: committed previously]

37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API

39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]

40552: space_logic.py (* fixed an error in space_logic.py *)

40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me



########################################################
code left behind (to be included in next commit):
########################################################
		{
			/* Initialize default values for collision masks */
			Object *ob;
			for(ob=main->object.first; ob; ob=ob->id.next)
				ob->col_group = ob->col_mask = 1;
		}
2011-12-20 03:11:56 +00:00
Thomas Dinges
01b0cc7f21 UI/RNA:
* Code cleanup.
2011-11-20 00:32:39 +00:00
Campbell Barton
11947f1a67 pep/style edits & quiet some warnings 2011-11-11 03:28:46 +00:00
Campbell Barton
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Campbell Barton
67c15da97d docs / clenup (no functional code changes)
- added API examples for mathutils.Color/Euler/Quaternion/Matrix.
- corrected own bad spelling matricies --> matrices.
- minor pep8 edits.
- update CMake ignore file list.
2011-10-17 02:20:53 +00:00
Janne Karhu
8fae0c6d7e Particle dupliobject rotation changes:
There has been quite a bit of fuss about particle dupliobject rotation in 2.59, so here are some changes to make things work a bit more consistently and predictably in 2.60.

Much of the confusion has been about what the "Initial rotation" for particles actually means. Simply put it's just a vector that that the particles (and the dupliobjects) are aligned to and around which they can be rotated with the phase controls. I've now renamed these controls under a label "Rotation axis".

In 2.59 and previous versions the dupliobject's global x-axis was aligned to the particle rotation axis for non-hair particles. This meant that the object's own rotation (in addition to the particle rotation) could effect the dupliobjects' rotations. This old behavior can still be used with the "Rotation" option in the particle render panel when object/group is set as the visualization. This option is also activated automatically for old files to maintain backwards compatibility.

Now the default dupliobject rotations ignore the object's own rotation completely and align the object's tracking axis to the particle rotation axis. The tracking axis can be found under the Object tab -> Animation Hacks panel.

In 2.58 the way of calculating the rotation for hair didn't work as intended and enabled many non-functional combinations of options. For this reason I removed most of the rotation options for hair in 2.59. Now the options have been reimplemented better and the dupliobject's tracking axis is aligned to the hair direction by default (Rotation axis = Velocity / Hair). All the other axis options work too along with the phase controls.
2011-10-16 16:14:36 +00:00
Campbell Barton
fbdfdfefd8 use BLI_snprintf rather than sprintf for interface functions 2011-09-26 16:53:04 +00:00
Alex Fraser
558b646216 Committing patch #27442: Adaptive time step for fluid particles. The number of
subframes can now be altered automatically while an SPH (fluid particle)
simulation is running.
2011-09-25 11:51:28 +00:00
Campbell Barton
f4c56a879d remove use of gettext: _("...") style translation now its handled by rna. 2011-09-21 15:18:38 +00:00