2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2009-01-02 13:47:33 +00:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-01-02 13:47:33 +00:00
|
|
|
*
|
|
|
|
* Contributor(s): Blender Foundation (2008).
|
|
|
|
*
|
2011-09-25 11:51:28 +00:00
|
|
|
* Adaptive time step
|
|
|
|
* Copyright 2011 AutoCRC
|
|
|
|
*
|
2009-01-02 13:47:33 +00:00
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
*/
|
|
|
|
|
2011-02-27 20:20:01 +00:00
|
|
|
/** \file blender/makesrna/intern/rna_particle.c
|
|
|
|
* \ingroup RNA
|
|
|
|
*/
|
|
|
|
|
2009-06-03 23:22:43 +00:00
|
|
|
#include <stdio.h>
|
2009-01-02 13:47:33 +00:00
|
|
|
#include <stdlib.h>
|
2012-04-06 05:53:01 +00:00
|
|
|
#include <limits.h>
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2011-02-12 14:38:34 +00:00
|
|
|
#include "DNA_material_types.h"
|
2011-03-23 10:57:45 +00:00
|
|
|
#include "DNA_meshdata_types.h"
|
2009-09-10 22:32:33 +00:00
|
|
|
#include "DNA_modifier_types.h"
|
2010-08-10 05:41:51 +00:00
|
|
|
#include "DNA_cloth_types.h"
|
2009-01-02 13:47:33 +00:00
|
|
|
#include "DNA_particle_types.h"
|
2009-03-26 13:56:32 +00:00
|
|
|
#include "DNA_object_force.h"
|
2009-06-03 23:22:43 +00:00
|
|
|
#include "DNA_object_types.h"
|
2009-06-05 23:59:33 +00:00
|
|
|
#include "DNA_scene_types.h"
|
2009-07-20 23:52:53 +00:00
|
|
|
#include "DNA_boid_types.h"
|
2011-02-12 14:38:34 +00:00
|
|
|
#include "DNA_texture_types.h"
|
2009-06-05 23:59:33 +00:00
|
|
|
|
2013-03-07 02:44:55 +00:00
|
|
|
#include "RNA_define.h"
|
|
|
|
#include "RNA_enum_types.h"
|
|
|
|
|
2013-03-25 08:29:06 +00:00
|
|
|
#include "BLF_translation.h"
|
|
|
|
|
2013-03-07 02:44:55 +00:00
|
|
|
#include "rna_internal.h"
|
|
|
|
|
2009-06-05 23:59:33 +00:00
|
|
|
#include "WM_types.h"
|
2009-06-21 10:16:52 +00:00
|
|
|
#include "WM_api.h"
|
2009-01-02 13:47:33 +00:00
|
|
|
|
2013-09-11 21:27:14 +00:00
|
|
|
#ifdef RNA_RUNTIME
|
|
|
|
static EnumPropertyItem part_from_items[] = {
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
{PART_FROM_VERT, "VERT", 0, "Verts", ""},
|
|
|
|
{PART_FROM_FACE, "FACE", 0, "Faces", ""},
|
|
|
|
{PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
2013-09-11 21:27:14 +00:00
|
|
|
#endif
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
|
2013-09-11 21:27:14 +00:00
|
|
|
#ifndef RNA_RUNTIME
|
|
|
|
static EnumPropertyItem part_reactor_from_items[] = {
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
{PART_FROM_VERT, "VERT", 0, "Verts", ""},
|
|
|
|
{PART_FROM_FACE, "FACE", 0, "Faces", ""},
|
|
|
|
{PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
|
2011-03-09 14:18:33 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
2013-09-11 21:27:14 +00:00
|
|
|
#endif
|
2011-03-09 14:18:33 +00:00
|
|
|
|
2013-09-11 21:27:14 +00:00
|
|
|
static EnumPropertyItem part_dist_items[] = {
|
2011-03-09 14:18:33 +00:00
|
|
|
{PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
|
|
|
|
{PART_DISTR_RAND, "RAND", 0, "Random", ""},
|
|
|
|
{PART_DISTR_GRID, "GRID", 0, "Grid", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2013-09-11 21:27:14 +00:00
|
|
|
#ifdef RNA_RUNTIME
|
|
|
|
static EnumPropertyItem part_hair_dist_items[] = {
|
2011-03-09 14:18:33 +00:00
|
|
|
{PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
|
|
|
|
{PART_DISTR_RAND, "RAND", 0, "Random", ""},
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
2013-09-11 21:27:14 +00:00
|
|
|
#endif
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
|
2013-09-11 21:27:14 +00:00
|
|
|
static EnumPropertyItem part_draw_as_items[] = {
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
{PART_DRAW_NOT, "NONE", 0, "None", ""},
|
|
|
|
{PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
|
|
|
|
{PART_DRAW_DOT, "DOT", 0, "Point", ""},
|
|
|
|
{PART_DRAW_CIRC, "CIRC", 0, "Circle", ""},
|
|
|
|
{PART_DRAW_CROSS, "CROSS", 0, "Cross", ""},
|
|
|
|
{PART_DRAW_AXIS, "AXIS", 0, "Axis", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2013-09-11 21:27:14 +00:00
|
|
|
#ifdef RNA_RUNTIME
|
|
|
|
static EnumPropertyItem part_hair_draw_as_items[] = {
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
{PART_DRAW_NOT, "NONE", 0, "None", ""},
|
|
|
|
{PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
|
|
|
|
{PART_DRAW_PATH, "PATH", 0, "Path", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
2013-09-11 21:27:14 +00:00
|
|
|
#endif
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
|
2013-09-11 21:27:14 +00:00
|
|
|
static EnumPropertyItem part_ren_as_items[] = {
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
{PART_DRAW_NOT, "NONE", 0, "None", ""},
|
|
|
|
{PART_DRAW_HALO, "HALO", 0, "Halo", ""},
|
|
|
|
{PART_DRAW_LINE, "LINE", 0, "Line", ""},
|
|
|
|
{PART_DRAW_PATH, "PATH", 0, "Path", ""},
|
|
|
|
{PART_DRAW_OB, "OBJECT", 0, "Object", ""},
|
|
|
|
{PART_DRAW_GR, "GROUP", 0, "Group", ""},
|
|
|
|
{PART_DRAW_BB, "BILLBOARD", 0, "Billboard", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2013-09-11 21:27:14 +00:00
|
|
|
#ifdef RNA_RUNTIME
|
|
|
|
static EnumPropertyItem part_hair_ren_as_items[] = {
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
{PART_DRAW_NOT, "NONE", 0, "None", ""},
|
|
|
|
{PART_DRAW_PATH, "PATH", 0, "Path", ""},
|
|
|
|
{PART_DRAW_OB, "OBJECT", 0, "Object", ""},
|
|
|
|
{PART_DRAW_GR, "GROUP", 0, "Group", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
2013-09-11 21:27:14 +00:00
|
|
|
#endif
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
|
2009-01-02 13:47:33 +00:00
|
|
|
#ifdef RNA_RUNTIME
|
2009-02-18 21:28:04 +00:00
|
|
|
|
2011-01-07 18:36:47 +00:00
|
|
|
#include "BLI_math.h"
|
|
|
|
|
2009-06-05 23:59:33 +00:00
|
|
|
#include "BKE_context.h"
|
2009-09-10 22:32:33 +00:00
|
|
|
#include "BKE_cloth.h"
|
2009-11-04 12:09:02 +00:00
|
|
|
#include "BKE_deform.h"
|
2009-06-05 23:59:33 +00:00
|
|
|
#include "BKE_depsgraph.h"
|
2011-03-23 10:57:45 +00:00
|
|
|
#include "BKE_DerivedMesh.h"
|
|
|
|
#include "BKE_cdderivedmesh.h"
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
#include "BKE_effect.h"
|
2013-12-07 01:51:44 +01:00
|
|
|
#include "BKE_material.h"
|
2009-09-10 22:32:33 +00:00
|
|
|
#include "BKE_modifier.h"
|
2009-06-05 23:59:33 +00:00
|
|
|
#include "BKE_particle.h"
|
2009-08-29 15:20:36 +00:00
|
|
|
#include "BKE_pointcache.h"
|
2011-02-12 14:38:34 +00:00
|
|
|
#include "BKE_texture.h"
|
2009-06-05 23:59:33 +00:00
|
|
|
|
2010-06-11 10:46:47 +00:00
|
|
|
/* use for object space hair get/set */
|
2012-03-18 09:27:36 +00:00
|
|
|
static void rna_ParticleHairKey_location_object_info(PointerRNA *ptr, ParticleSystemModifierData **psmd_pt,
|
|
|
|
ParticleData **pa_pt)
|
2010-06-09 01:17:51 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
HairKey *hkey = (HairKey *)ptr->data;
|
2010-06-09 01:17:51 +00:00
|
|
|
Object *ob = (Object *)ptr->id.data;
|
|
|
|
ModifierData *md;
|
2012-03-05 23:30:41 +00:00
|
|
|
ParticleSystemModifierData *psmd = NULL;
|
2010-06-09 01:17:51 +00:00
|
|
|
ParticleSystem *psys;
|
|
|
|
ParticleData *pa;
|
|
|
|
int i;
|
2010-06-11 10:46:47 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
*psmd_pt = NULL;
|
|
|
|
*pa_pt = NULL;
|
2010-06-11 10:46:47 +00:00
|
|
|
|
2011-09-25 07:42:43 +00:00
|
|
|
/* given the pointer HairKey *hkey, we iterate over all particles in all
|
|
|
|
* particle systems in the object "ob" in order to find
|
2012-05-12 11:01:29 +00:00
|
|
|
* - the ParticleSystemData to which the HairKey (and hence the particle)
|
|
|
|
* belongs (will be stored in psmd_pt)
|
|
|
|
* - the ParticleData to which the HairKey belongs (will be stored in pa_pt)
|
2011-09-25 07:42:43 +00:00
|
|
|
*
|
|
|
|
* not a very efficient way of getting hair key location data,
|
|
|
|
* but it's the best we've got at the present
|
|
|
|
*
|
|
|
|
* IDEAS: include additional information in pointerRNA beforehand,
|
|
|
|
* for example a pointer to the ParticleStstemModifierData to which the
|
|
|
|
* hairkey belongs.
|
|
|
|
*/
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (md = ob->modifiers.first; md; md = md->next) {
|
2011-09-25 07:42:43 +00:00
|
|
|
if (md->type == eModifierType_ParticleSystem) {
|
2012-03-05 23:30:41 +00:00
|
|
|
psmd = (ParticleSystemModifierData *) md;
|
2011-09-25 07:42:43 +00:00
|
|
|
if (psmd && psmd->dm && psmd->psys) {
|
|
|
|
psys = psmd->psys;
|
2012-03-05 23:30:41 +00:00
|
|
|
for (i = 0, pa = psys->particles; i < psys->totpart; i++, pa++) {
|
2011-09-25 07:42:43 +00:00
|
|
|
/* hairkeys are stored sequentially in memory, so we can
|
|
|
|
* find if it's the same particle by comparing pointers,
|
|
|
|
* without having to iterate over them all */
|
|
|
|
if ((hkey >= pa->hair) && (hkey < pa->hair + pa->totkey)) {
|
|
|
|
*psmd_pt = psmd;
|
|
|
|
*pa_pt = pa;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-06-09 01:17:51 +00:00
|
|
|
}
|
2010-06-11 10:46:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void rna_ParticleHairKey_location_object_get(PointerRNA *ptr, float *values)
|
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
HairKey *hkey = (HairKey *)ptr->data;
|
2010-06-11 10:46:47 +00:00
|
|
|
Object *ob = (Object *)ptr->id.data;
|
|
|
|
ParticleSystemModifierData *psmd;
|
|
|
|
ParticleData *pa;
|
|
|
|
|
|
|
|
rna_ParticleHairKey_location_object_info(ptr, &psmd, &pa);
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (pa) {
|
2011-04-04 13:47:28 +00:00
|
|
|
DerivedMesh *hairdm = (psmd->psys->flag & PSYS_HAIR_DYNAMICS) ? psmd->psys->hair_out_dm : NULL;
|
2011-03-23 10:57:45 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (hairdm) {
|
2011-03-23 10:57:45 +00:00
|
|
|
MVert *mvert = CDDM_get_vert(hairdm, pa->hair_index + (hkey - pa->hair));
|
|
|
|
copy_v3_v3(values, mvert->co);
|
|
|
|
}
|
|
|
|
else {
|
2011-04-04 13:47:28 +00:00
|
|
|
float hairmat[4][4];
|
|
|
|
psys_mat_hair_to_object(ob, psmd->dm, psmd->psys->part->from, pa, hairmat);
|
|
|
|
copy_v3_v3(values, hkey->co);
|
|
|
|
mul_m4_v3(hairmat, values);
|
2011-03-23 10:57:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
zero_v3(values);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-04-04 13:47:28 +00:00
|
|
|
static void rna_ParticleHairKey_location_object_set(PointerRNA *ptr, const float *values)
|
2011-03-23 10:57:45 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
HairKey *hkey = (HairKey *)ptr->data;
|
2011-04-04 13:47:28 +00:00
|
|
|
Object *ob = (Object *)ptr->id.data;
|
2011-03-23 10:57:45 +00:00
|
|
|
ParticleSystemModifierData *psmd;
|
|
|
|
ParticleData *pa;
|
|
|
|
|
|
|
|
rna_ParticleHairKey_location_object_info(ptr, &psmd, &pa);
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (pa) {
|
2011-04-04 13:47:28 +00:00
|
|
|
DerivedMesh *hairdm = (psmd->psys->flag & PSYS_HAIR_DYNAMICS) ? psmd->psys->hair_out_dm : NULL;
|
2011-03-23 10:57:45 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (hairdm) {
|
2011-03-23 10:57:45 +00:00
|
|
|
MVert *mvert = CDDM_get_vert(hairdm, pa->hair_index + (hkey - pa->hair));
|
|
|
|
copy_v3_v3(mvert->co, values);
|
|
|
|
}
|
|
|
|
else {
|
2011-04-04 13:47:28 +00:00
|
|
|
float hairmat[4][4];
|
|
|
|
float imat[4][4];
|
|
|
|
|
|
|
|
psys_mat_hair_to_object(ob, psmd->dm, psmd->psys->part->from, pa, hairmat);
|
|
|
|
invert_m4_m4(imat, hairmat);
|
|
|
|
copy_v3_v3(hkey->co, values);
|
|
|
|
mul_m4_v3(imat, hkey->co);
|
2011-03-23 10:57:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
zero_v3(hkey->co);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-12-28 14:21:30 +00:00
|
|
|
static void rna_ParticleHairKey_co_object(HairKey *hairkey, Object *object, ParticleSystemModifierData *modifier, ParticleData *particle,
|
|
|
|
float n_co[3])
|
|
|
|
{
|
|
|
|
|
|
|
|
DerivedMesh *hairdm = (modifier->psys->flag & PSYS_HAIR_DYNAMICS) ? modifier->psys->hair_out_dm : NULL;
|
|
|
|
if (particle) {
|
|
|
|
if (hairdm) {
|
|
|
|
MVert *mvert = CDDM_get_vert(hairdm, particle->hair_index + (hairkey - particle->hair));
|
|
|
|
copy_v3_v3(n_co, mvert->co);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
float hairmat[4][4];
|
|
|
|
psys_mat_hair_to_object(object, modifier->dm, modifier->psys->part->from, particle, hairmat);
|
|
|
|
copy_v3_v3(n_co, hairkey->co);
|
|
|
|
mul_m4_v3(hairmat, n_co);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
zero_v3(n_co);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-09-20 05:30:37 +00:00
|
|
|
static void rna_Particle_uv_on_emitter(ParticleData *particle, ReportList *reports,
|
|
|
|
ParticleSystemModifierData *modifier, float r_uv[2])
|
2012-12-28 14:21:30 +00:00
|
|
|
{
|
|
|
|
/*psys_particle_on_emitter(psmd, part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, co, nor, 0, 0, sd.orco, 0);*/
|
|
|
|
|
|
|
|
/* get uvco & mcol */
|
|
|
|
int num = particle->num_dmcache;
|
|
|
|
int from = modifier->psys->part->from;
|
|
|
|
|
2013-09-20 05:30:37 +00:00
|
|
|
if (!CustomData_has_layer(&modifier->dm->loopData, CD_MLOOPUV)) {
|
|
|
|
BKE_report(reports, RPT_ERROR, "Mesh has no UV data");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
DM_ensure_tessface(modifier->dm); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */
|
|
|
|
|
2012-12-28 14:21:30 +00:00
|
|
|
if (num == DMCACHE_NOTFOUND)
|
|
|
|
if (particle->num < modifier->dm->getNumTessFaces(modifier->dm))
|
|
|
|
num = particle->num;
|
|
|
|
|
|
|
|
/* get uvco */
|
2013-09-20 05:30:37 +00:00
|
|
|
if (r_uv && ELEM(from, PART_FROM_FACE, PART_FROM_VOLUME)) {
|
2012-12-28 14:21:30 +00:00
|
|
|
|
|
|
|
if (num != DMCACHE_NOTFOUND) {
|
2013-09-20 05:30:37 +00:00
|
|
|
MFace *mface;
|
|
|
|
MTFace *mtface;
|
|
|
|
|
|
|
|
mface = modifier->dm->getTessFaceData(modifier->dm, num, CD_MFACE);
|
|
|
|
mtface = (MTFace *)CustomData_get_layer_n(&modifier->dm->faceData, CD_MTFACE, 0);
|
|
|
|
|
|
|
|
if (mface && mtface) {
|
|
|
|
mtface += num;
|
|
|
|
psys_interpolate_uvs(mtface, mface->v4, particle->fuv, r_uv);
|
|
|
|
return;
|
|
|
|
}
|
2012-12-28 14:21:30 +00:00
|
|
|
}
|
|
|
|
}
|
2013-09-20 05:30:37 +00:00
|
|
|
|
|
|
|
r_uv[0] = 0.0f;
|
|
|
|
r_uv[1] = 0.0f;
|
2012-12-28 14:21:30 +00:00
|
|
|
}
|
|
|
|
|
2013-09-20 06:20:07 +00:00
|
|
|
static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *object,
|
2013-01-30 21:17:38 +00:00
|
|
|
int particle_no, int step, float n_co[3])
|
2012-12-28 14:21:30 +00:00
|
|
|
{
|
|
|
|
ParticleSettings *part = 0;
|
|
|
|
ParticleData *pars = 0;
|
|
|
|
ParticleCacheKey *cache = 0;
|
2012-12-29 15:55:37 +00:00
|
|
|
int totchild = 0;
|
|
|
|
int path_nbr = 0;
|
2012-12-28 14:21:30 +00:00
|
|
|
int totpart;
|
|
|
|
int max_k = 0;
|
2013-01-29 12:32:43 +00:00
|
|
|
int step_nbr = 0;
|
2012-12-28 14:21:30 +00:00
|
|
|
|
|
|
|
if (particlesystem == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
part = particlesystem->part;
|
|
|
|
pars = particlesystem->particles;
|
|
|
|
|
2013-01-30 21:17:38 +00:00
|
|
|
if (particlesystem->renderdata) {
|
2013-01-29 12:32:43 +00:00
|
|
|
step_nbr = part->ren_step;
|
|
|
|
totchild = particlesystem->totchild;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
step_nbr = part->draw_step;
|
|
|
|
totchild = (int)((float)particlesystem->totchild * (float)(part->disp) / 100.0f);
|
|
|
|
}
|
|
|
|
|
2012-12-28 14:21:30 +00:00
|
|
|
if (part == NULL || pars == NULL || !psys_check_enabled(object, particlesystem))
|
|
|
|
return;
|
|
|
|
|
2012-12-29 15:55:37 +00:00
|
|
|
if (part->ren_as == PART_DRAW_OB || part->ren_as == PART_DRAW_GR || part->ren_as == PART_DRAW_NOT)
|
2012-12-28 14:21:30 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
/* can happen for disconnected/global hair */
|
|
|
|
if (part->type == PART_HAIR && !particlesystem->childcache)
|
|
|
|
totchild = 0;
|
|
|
|
|
|
|
|
totpart = particlesystem->totpart;
|
|
|
|
|
|
|
|
if (particle_no >= totpart + totchild)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (part->ren_as == PART_DRAW_PATH && particlesystem->pathcache)
|
2013-01-29 12:32:43 +00:00
|
|
|
path_nbr = (int)pow(2.0, step_nbr);
|
2012-12-28 14:21:30 +00:00
|
|
|
|
2012-12-29 15:55:37 +00:00
|
|
|
if (particle_no < totpart) {
|
2012-12-28 14:21:30 +00:00
|
|
|
|
|
|
|
if (path_nbr) {
|
|
|
|
cache = particlesystem->pathcache[particle_no];
|
|
|
|
max_k = (int)cache->steps;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
|
|
|
|
if (path_nbr) {
|
2012-12-29 15:55:37 +00:00
|
|
|
cache = particlesystem->childcache[particle_no - totpart];
|
2012-12-28 14:21:30 +00:00
|
|
|
|
|
|
|
if (cache->steps < 0)
|
|
|
|
max_k = 0;
|
|
|
|
else
|
|
|
|
max_k = (int)cache->steps;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*strands key loop data stored in cache + step->co*/
|
|
|
|
if (path_nbr) {
|
2012-12-29 15:55:37 +00:00
|
|
|
if (step >= 0 && step <= path_nbr) {
|
2013-01-14 13:05:01 +00:00
|
|
|
if (step <= max_k) {
|
2012-12-29 15:55:37 +00:00
|
|
|
copy_v3_v3(n_co, (cache + step)->co);
|
2013-01-14 13:05:01 +00:00
|
|
|
mul_m4_v3(particlesystem->imat, n_co);
|
|
|
|
mul_m4_v3(object->obmat, n_co);
|
|
|
|
}
|
2012-12-28 14:21:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-12-07 01:51:44 +01:00
|
|
|
|
2014-01-29 16:50:37 +01:00
|
|
|
static EnumPropertyItem *rna_Particle_Material_itemf(bContext *C, PointerRNA *UNUSED(ptr),
|
2014-01-04 18:08:43 +11:00
|
|
|
PropertyRNA *UNUSED(prop), bool *r_free)
|
2013-12-07 01:51:44 +01:00
|
|
|
{
|
2014-01-29 16:50:37 +01:00
|
|
|
Object *ob = CTX_data_pointer_get(C, "object").data;
|
2013-12-07 01:51:44 +01:00
|
|
|
Material *ma;
|
|
|
|
EnumPropertyItem *item = NULL;
|
|
|
|
EnumPropertyItem tmp = {0, "", 0, "", ""};
|
|
|
|
int totitem = 0;
|
|
|
|
int i;
|
|
|
|
|
2014-01-29 16:50:37 +01:00
|
|
|
if (ob && ob->totcol > 0) {
|
2013-12-10 13:44:46 +11:00
|
|
|
for (i = 1; i <= ob->totcol; i++) {
|
2013-12-07 01:51:44 +01:00
|
|
|
ma = give_current_material(ob, i);
|
|
|
|
tmp.value = i;
|
|
|
|
tmp.icon = ICON_MATERIAL_DATA;
|
|
|
|
if (ma) {
|
|
|
|
tmp.name = ma->id.name + 2;
|
|
|
|
tmp.identifier = tmp.name;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
tmp.name = "Default Material";
|
|
|
|
tmp.identifier = tmp.name;
|
|
|
|
}
|
|
|
|
RNA_enum_item_add(&item, &totitem, &tmp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
tmp.value = 1;
|
|
|
|
tmp.icon = ICON_MATERIAL_DATA;
|
|
|
|
tmp.name = "Default Material";
|
|
|
|
tmp.identifier = tmp.name;
|
|
|
|
RNA_enum_item_add(&item, &totitem, &tmp);
|
|
|
|
}
|
|
|
|
|
|
|
|
RNA_enum_item_end(&item, &totitem);
|
2014-01-04 18:08:43 +11:00
|
|
|
*r_free = true;
|
2013-12-07 01:51:44 +01:00
|
|
|
|
|
|
|
return item;
|
|
|
|
}
|
|
|
|
|
2013-09-20 05:30:37 +00:00
|
|
|
static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem, ReportList *reports,
|
|
|
|
ParticleSystemModifierData *modifier, ParticleData *particle,
|
|
|
|
int particle_no, int uv_no,
|
|
|
|
float r_uv[2])
|
2012-12-28 14:21:30 +00:00
|
|
|
{
|
|
|
|
ParticleSettings *part = 0;
|
|
|
|
int totpart;
|
|
|
|
int totchild = 0;
|
|
|
|
int num;
|
|
|
|
|
2013-09-20 05:30:37 +00:00
|
|
|
if (!CustomData_has_layer(&modifier->dm->loopData, CD_MLOOPUV)) {
|
|
|
|
BKE_report(reports, RPT_ERROR, "Mesh has no UV data");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
DM_ensure_tessface(modifier->dm); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */
|
|
|
|
|
2012-12-28 14:21:30 +00:00
|
|
|
/* 1. check that everything is ok & updated */
|
|
|
|
if (particlesystem == NULL)
|
|
|
|
return;
|
|
|
|
|
2012-12-29 15:55:37 +00:00
|
|
|
part = particlesystem->part;
|
2012-12-28 14:21:30 +00:00
|
|
|
|
2013-01-30 21:17:38 +00:00
|
|
|
if (particlesystem->renderdata) {
|
2012-12-28 14:21:30 +00:00
|
|
|
totchild = particlesystem->totchild;
|
2013-01-30 21:17:38 +00:00
|
|
|
}
|
|
|
|
else {
|
2013-01-29 12:32:43 +00:00
|
|
|
totchild = (int)((float)particlesystem->totchild * (float)(part->disp) / 100.0f);
|
2013-01-30 21:17:38 +00:00
|
|
|
}
|
2012-12-28 14:21:30 +00:00
|
|
|
|
|
|
|
/* can happen for disconnected/global hair */
|
|
|
|
if (part->type == PART_HAIR && !particlesystem->childcache)
|
|
|
|
totchild = 0;
|
|
|
|
|
|
|
|
totpart = particlesystem->totpart;
|
|
|
|
|
|
|
|
if (particle_no >= totpart + totchild)
|
|
|
|
return;
|
|
|
|
|
|
|
|
/* 3. start creating renderable things */
|
|
|
|
/* setup per particle individual stuff */
|
2012-12-29 15:55:37 +00:00
|
|
|
if (particle_no < totpart) {
|
2012-12-28 14:21:30 +00:00
|
|
|
|
|
|
|
/* get uvco & mcol */
|
|
|
|
num = particle->num_dmcache;
|
|
|
|
|
|
|
|
if (num == DMCACHE_NOTFOUND)
|
|
|
|
if (particle->num < modifier->dm->getNumTessFaces(modifier->dm))
|
|
|
|
num = particle->num;
|
|
|
|
|
2013-09-20 05:30:37 +00:00
|
|
|
if (r_uv && ELEM(part->from, PART_FROM_FACE, PART_FROM_VOLUME)) {
|
2012-12-28 14:21:30 +00:00
|
|
|
if (num != DMCACHE_NOTFOUND) {
|
|
|
|
MFace *mface = modifier->dm->getTessFaceData(modifier->dm, num, CD_MFACE);
|
2013-01-23 17:15:45 +00:00
|
|
|
MTFace *mtface = (MTFace *)CustomData_get_layer_n(&modifier->dm->faceData, CD_MTFACE, uv_no);
|
2012-12-28 14:21:30 +00:00
|
|
|
mtface += num;
|
|
|
|
|
2013-09-20 05:30:37 +00:00
|
|
|
psys_interpolate_uvs(mtface, mface->v4, particle->fuv, r_uv);
|
2012-12-28 14:21:30 +00:00
|
|
|
}
|
|
|
|
else {
|
2013-09-20 05:30:37 +00:00
|
|
|
r_uv[0] = 0.0f;
|
|
|
|
r_uv[1] = 0.0f;
|
2012-12-28 14:21:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
2012-12-29 15:55:37 +00:00
|
|
|
ChildParticle *cpa = particlesystem->child + particle_no - totpart;
|
2012-12-28 14:21:30 +00:00
|
|
|
|
|
|
|
num = cpa->num;
|
|
|
|
|
|
|
|
/* get uvco & mcol */
|
|
|
|
if (part->childtype == PART_CHILD_FACES) {
|
2013-09-20 05:30:37 +00:00
|
|
|
if (r_uv && ELEM(PART_FROM_FACE, PART_FROM_FACE, PART_FROM_VOLUME)) {
|
2012-12-28 14:21:30 +00:00
|
|
|
if (cpa->num != DMCACHE_NOTFOUND) {
|
|
|
|
MFace *mface = modifier->dm->getTessFaceData(modifier->dm, cpa->num, CD_MFACE);
|
2013-01-29 12:32:43 +00:00
|
|
|
MTFace *mtface = (MTFace *)CustomData_get_layer_n(&modifier->dm->faceData, CD_MTFACE, uv_no);
|
2012-12-28 14:21:30 +00:00
|
|
|
mtface += cpa->num;
|
|
|
|
|
2013-09-20 05:30:37 +00:00
|
|
|
psys_interpolate_uvs(mtface, mface->v4, cpa->fuv, r_uv);
|
2012-12-28 14:21:30 +00:00
|
|
|
}
|
|
|
|
else {
|
2013-09-20 05:30:37 +00:00
|
|
|
r_uv[0] = 0.0f;
|
|
|
|
r_uv[1] = 0.0f;
|
2012-12-28 14:21:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
ParticleData *parent = particlesystem->particles + cpa->parent;
|
|
|
|
num = parent->num_dmcache;
|
|
|
|
|
|
|
|
if (num == DMCACHE_NOTFOUND)
|
|
|
|
if (parent->num < modifier->dm->getNumTessFaces(modifier->dm))
|
|
|
|
num = parent->num;
|
|
|
|
|
2013-09-20 05:30:37 +00:00
|
|
|
if (r_uv && ELEM(part->from, PART_FROM_FACE, PART_FROM_VOLUME)) {
|
2012-12-28 14:21:30 +00:00
|
|
|
if (num != DMCACHE_NOTFOUND) {
|
|
|
|
MFace *mface = modifier->dm->getTessFaceData(modifier->dm, num, CD_MFACE);
|
2013-01-29 12:32:43 +00:00
|
|
|
MTFace *mtface = (MTFace *)CustomData_get_layer_n(&modifier->dm->faceData, CD_MTFACE, uv_no);
|
2012-12-28 14:21:30 +00:00
|
|
|
mtface += num;
|
|
|
|
|
2013-09-20 05:30:37 +00:00
|
|
|
psys_interpolate_uvs(mtface, mface->v4, parent->fuv, r_uv);
|
2012-12-28 14:21:30 +00:00
|
|
|
}
|
|
|
|
else {
|
2013-09-20 05:30:37 +00:00
|
|
|
r_uv[0] = 0.0f;
|
|
|
|
r_uv[1] = 0.0f;
|
2012-12-28 14:21:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-01-30 21:17:38 +00:00
|
|
|
static void rna_ParticleSystem_mcol_on_emitter(ParticleSystem *particlesystem, ParticleSystemModifierData *modifier,
|
|
|
|
ParticleData *particle, int particle_no, int vcol_no,
|
|
|
|
float n_mcol[3])
|
2013-01-04 12:44:38 +00:00
|
|
|
{
|
2013-01-30 21:17:38 +00:00
|
|
|
ParticleSettings *part;
|
2013-01-04 12:44:38 +00:00
|
|
|
int totpart;
|
|
|
|
int totchild = 0;
|
|
|
|
int num;
|
|
|
|
MCol mcol = {255, 255, 255, 255};
|
|
|
|
|
|
|
|
/* 1. check that everything is ok & updated */
|
|
|
|
if (particlesystem == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
part = particlesystem->part;
|
|
|
|
|
2013-01-30 21:17:38 +00:00
|
|
|
if (particlesystem->renderdata) {
|
2013-01-04 12:44:38 +00:00
|
|
|
totchild = particlesystem->totchild;
|
2013-01-30 21:17:38 +00:00
|
|
|
}
|
|
|
|
else {
|
2013-01-29 12:32:43 +00:00
|
|
|
totchild = (int)((float)particlesystem->totchild * (float)(part->disp) / 100.0f);
|
2013-01-30 21:17:38 +00:00
|
|
|
}
|
2013-01-04 12:44:38 +00:00
|
|
|
|
|
|
|
/* can happen for disconnected/global hair */
|
|
|
|
if (part->type == PART_HAIR && !particlesystem->childcache)
|
|
|
|
totchild = 0;
|
|
|
|
|
|
|
|
totpart = particlesystem->totpart;
|
|
|
|
|
|
|
|
if (particle_no >= totpart + totchild)
|
|
|
|
return;
|
|
|
|
|
2013-01-30 21:17:38 +00:00
|
|
|
/* 3. start creating renderable things */
|
2013-01-04 12:44:38 +00:00
|
|
|
/* setup per particle individual stuff */
|
|
|
|
if (particle_no < totpart) {
|
|
|
|
|
|
|
|
/* get uvco & mcol */
|
|
|
|
num = particle->num_dmcache;
|
|
|
|
|
|
|
|
if (num == DMCACHE_NOTFOUND)
|
|
|
|
if (particle->num < modifier->dm->getNumTessFaces(modifier->dm))
|
|
|
|
num = particle->num;
|
|
|
|
|
|
|
|
if (n_mcol && ELEM(part->from, PART_FROM_FACE, PART_FROM_VOLUME)) {
|
|
|
|
if (num != DMCACHE_NOTFOUND) {
|
|
|
|
MFace *mface = modifier->dm->getTessFaceData(modifier->dm, num, CD_MFACE);
|
2013-01-05 15:36:03 +00:00
|
|
|
MCol *mc = (MCol *)CustomData_get_layer_n(&modifier->dm->faceData, CD_MCOL, vcol_no);
|
2013-01-04 12:44:38 +00:00
|
|
|
mc += num * 4;
|
|
|
|
|
|
|
|
psys_interpolate_mcol(mc, mface->v4, particle->fuv, &mcol);
|
|
|
|
n_mcol[0] = (float)mcol.b / 255.0f;
|
|
|
|
n_mcol[1] = (float)mcol.g / 255.0f;
|
|
|
|
n_mcol[2] = (float)mcol.r / 255.0f;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
n_mcol[0] = 0.0f;
|
|
|
|
n_mcol[1] = 0.0f;
|
|
|
|
n_mcol[2] = 0.0f;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
ChildParticle *cpa = particlesystem->child + particle_no - totpart;
|
|
|
|
|
|
|
|
num = cpa->num;
|
|
|
|
|
|
|
|
/* get uvco & mcol */
|
|
|
|
if (part->childtype == PART_CHILD_FACES) {
|
|
|
|
if (n_mcol && ELEM(PART_FROM_FACE, PART_FROM_FACE, PART_FROM_VOLUME)) {
|
|
|
|
if (cpa->num != DMCACHE_NOTFOUND) {
|
|
|
|
MFace *mface = modifier->dm->getTessFaceData(modifier->dm, cpa->num, CD_MFACE);
|
2013-01-29 12:32:43 +00:00
|
|
|
MCol *mc = (MCol *)CustomData_get_layer_n(&modifier->dm->faceData, CD_MCOL, vcol_no);
|
2013-01-04 12:44:38 +00:00
|
|
|
mc += cpa->num * 4;
|
|
|
|
|
|
|
|
psys_interpolate_mcol(mc, mface->v4, cpa->fuv, &mcol);
|
|
|
|
n_mcol[0] = (float)mcol.b / 255.0f;
|
|
|
|
n_mcol[1] = (float)mcol.g / 255.0f;
|
|
|
|
n_mcol[2] = (float)mcol.r / 255.0f;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
n_mcol[0] = 0.0f;
|
|
|
|
n_mcol[1] = 0.0f;
|
|
|
|
n_mcol[2] = 0.0f;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
ParticleData *parent = particlesystem->particles + cpa->parent;
|
|
|
|
num = parent->num_dmcache;
|
|
|
|
|
|
|
|
if (num == DMCACHE_NOTFOUND)
|
|
|
|
if (parent->num < modifier->dm->getNumTessFaces(modifier->dm))
|
|
|
|
num = parent->num;
|
|
|
|
|
|
|
|
if (n_mcol && ELEM(part->from, PART_FROM_FACE, PART_FROM_VOLUME)) {
|
|
|
|
if (num != DMCACHE_NOTFOUND) {
|
|
|
|
MFace *mface = modifier->dm->getTessFaceData(modifier->dm, num, CD_MFACE);
|
2013-01-29 12:32:43 +00:00
|
|
|
MCol *mc = (MCol *)CustomData_get_layer_n(&modifier->dm->faceData, CD_MCOL, vcol_no);
|
2013-01-04 12:44:38 +00:00
|
|
|
mc += num * 4;
|
|
|
|
|
|
|
|
psys_interpolate_mcol(mc, mface->v4, parent->fuv, &mcol);
|
|
|
|
n_mcol[0] = (float)mcol.b / 255.0f;
|
|
|
|
n_mcol[1] = (float)mcol.g / 255.0f;
|
|
|
|
n_mcol[2] = (float)mcol.r / 255.0f;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
n_mcol[0] = 0.0f;
|
|
|
|
n_mcol[1] = 0.0f;
|
|
|
|
n_mcol[2] = 0.0f;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-05 13:33:54 +00:00
|
|
|
static void rna_ParticleSystem_set_resolution(ParticleSystem *particlesystem, Scene *scene, Object *object, int resolution)
|
2013-01-29 12:32:43 +00:00
|
|
|
{
|
2013-02-05 13:33:54 +00:00
|
|
|
if (resolution == eModifierMode_Render) {
|
|
|
|
ParticleSystemModifierData *psmd = psys_get_modifier(object, particlesystem);
|
|
|
|
float mat[4][4];
|
|
|
|
|
|
|
|
unit_m4(mat);
|
2013-01-29 12:32:43 +00:00
|
|
|
|
|
|
|
psys_render_set(object, particlesystem, mat, mat, 1, 1, 0.f);
|
|
|
|
psmd->flag &= ~eParticleSystemFlag_psys_updated;
|
|
|
|
particle_system_update(scene, object, particlesystem);
|
|
|
|
}
|
2013-02-05 13:33:54 +00:00
|
|
|
else {
|
|
|
|
if (particlesystem->renderdata)
|
|
|
|
psys_render_restore(object, particlesystem);
|
|
|
|
}
|
2013-01-29 12:32:43 +00:00
|
|
|
}
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static void particle_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr, short flag)
|
2009-06-05 23:59:33 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
if (ptr->type == &RNA_ParticleSystem) {
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
2009-06-21 10:16:52 +00:00
|
|
|
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
psys->recalc = flag;
|
2009-06-21 10:16:52 +00:00
|
|
|
|
2010-12-05 18:59:23 +00:00
|
|
|
DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
|
2009-06-21 10:16:52 +00:00
|
|
|
}
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
else
|
2012-05-12 11:01:29 +00:00
|
|
|
DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA | flag);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
|
2012-05-12 11:01:29 +00:00
|
|
|
WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL);
|
2009-06-05 23:59:33 +00:00
|
|
|
}
|
2009-12-08 17:23:48 +00:00
|
|
|
static void rna_Particle_redo(Main *bmain, Scene *scene, PointerRNA *ptr)
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
{
|
2009-12-08 17:23:48 +00:00
|
|
|
particle_recalc(bmain, scene, ptr, PSYS_RECALC_REDO);
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
}
|
2009-06-05 23:59:33 +00:00
|
|
|
|
2009-12-08 17:23:48 +00:00
|
|
|
static void rna_Particle_redo_dependency(Main *bmain, Scene *scene, PointerRNA *ptr)
|
2009-11-04 03:01:39 +00:00
|
|
|
{
|
2013-02-21 19:33:04 +00:00
|
|
|
DAG_relations_tag_update(bmain);
|
2009-12-08 17:23:48 +00:00
|
|
|
rna_Particle_redo(bmain, scene, ptr);
|
2009-11-04 03:01:39 +00:00
|
|
|
}
|
|
|
|
|
2009-12-08 17:23:48 +00:00
|
|
|
static void rna_Particle_reset(Main *bmain, Scene *scene, PointerRNA *ptr)
|
2009-06-05 23:59:33 +00:00
|
|
|
{
|
2009-12-08 17:23:48 +00:00
|
|
|
particle_recalc(bmain, scene, ptr, PSYS_RECALC_RESET);
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
}
|
2009-06-05 23:59:33 +00:00
|
|
|
|
2009-12-08 17:23:48 +00:00
|
|
|
static void rna_Particle_change_type(Main *bmain, Scene *scene, PointerRNA *ptr)
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
particle_recalc(bmain, scene, ptr, PSYS_RECALC_RESET | PSYS_RECALC_TYPE);
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
}
|
2009-06-21 10:16:52 +00:00
|
|
|
|
2009-12-08 17:23:48 +00:00
|
|
|
static void rna_Particle_change_physics(Main *bmain, Scene *scene, PointerRNA *ptr)
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
particle_recalc(bmain, scene, ptr, PSYS_RECALC_RESET | PSYS_RECALC_PHYS);
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
}
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
|
2009-12-08 17:23:48 +00:00
|
|
|
static void rna_Particle_redo_child(Main *bmain, Scene *scene, PointerRNA *ptr)
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
{
|
2009-12-08 17:23:48 +00:00
|
|
|
particle_recalc(bmain, scene, ptr, PSYS_RECALC_CHILD);
|
2009-06-05 23:59:33 +00:00
|
|
|
}
|
|
|
|
|
2010-08-15 08:53:28 +00:00
|
|
|
static ParticleSystem *rna_particle_system_for_target(Object *ob, ParticleTarget *target)
|
|
|
|
{
|
|
|
|
ParticleSystem *psys;
|
|
|
|
ParticleTarget *pt;
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (psys = ob->particlesystem.first; psys; psys = psys->next)
|
|
|
|
for (pt = psys->targets.first; pt; pt = pt->next)
|
|
|
|
if (pt == target)
|
2010-08-15 08:53:28 +00:00
|
|
|
return psys;
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2013-02-21 19:33:04 +00:00
|
|
|
static void rna_Particle_target_reset(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
|
2009-07-12 23:38:47 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
if (ptr->type == &RNA_ParticleTarget) {
|
2012-05-12 11:01:29 +00:00
|
|
|
Object *ob = (Object *)ptr->id.data;
|
|
|
|
ParticleTarget *pt = (ParticleTarget *)ptr->data;
|
2012-03-05 23:30:41 +00:00
|
|
|
ParticleSystem *kpsys = NULL, *psys = rna_particle_system_for_target(ob, pt);
|
2009-07-20 23:52:53 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (pt->ob == ob || pt->ob == NULL) {
|
2012-05-12 11:01:29 +00:00
|
|
|
kpsys = BLI_findlink(&ob->particlesystem, pt->psys - 1);
|
2009-07-20 23:52:53 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (kpsys)
|
2009-07-20 23:52:53 +00:00
|
|
|
pt->flag |= PTARGET_VALID;
|
|
|
|
else
|
|
|
|
pt->flag &= ~PTARGET_VALID;
|
|
|
|
}
|
|
|
|
else {
|
2012-03-05 23:30:41 +00:00
|
|
|
if (pt->ob)
|
2012-05-12 11:01:29 +00:00
|
|
|
kpsys = BLI_findlink(&pt->ob->particlesystem, pt->psys - 1);
|
2009-07-20 23:52:53 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (kpsys)
|
2009-07-20 23:52:53 +00:00
|
|
|
pt->flag |= PTARGET_VALID;
|
|
|
|
else
|
|
|
|
pt->flag &= ~PTARGET_VALID;
|
|
|
|
}
|
2009-07-12 23:38:47 +00:00
|
|
|
|
|
|
|
psys->recalc = PSYS_RECALC_RESET;
|
|
|
|
|
2010-12-05 18:59:23 +00:00
|
|
|
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
2013-02-21 19:33:04 +00:00
|
|
|
DAG_relations_tag_update(bmain);
|
2009-07-12 23:38:47 +00:00
|
|
|
}
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
|
2012-05-12 11:01:29 +00:00
|
|
|
WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL);
|
2009-07-12 23:38:47 +00:00
|
|
|
}
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static void rna_Particle_target_redo(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
2009-07-12 23:38:47 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
if (ptr->type == &RNA_ParticleTarget) {
|
2012-05-12 11:01:29 +00:00
|
|
|
Object *ob = (Object *)ptr->id.data;
|
|
|
|
ParticleTarget *pt = (ParticleTarget *)ptr->data;
|
2010-08-15 08:53:28 +00:00
|
|
|
ParticleSystem *psys = rna_particle_system_for_target(ob, pt);
|
2009-07-12 23:38:47 +00:00
|
|
|
|
|
|
|
psys->recalc = PSYS_RECALC_REDO;
|
|
|
|
|
2010-12-05 18:59:23 +00:00
|
|
|
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
2012-05-12 11:01:29 +00:00
|
|
|
WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL);
|
2009-07-12 23:38:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-12-08 17:23:48 +00:00
|
|
|
static void rna_Particle_hair_dynamics(Main *bmain, Scene *scene, PointerRNA *ptr)
|
2009-09-10 22:32:33 +00:00
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
Object *ob = (Object *)ptr->id.data;
|
|
|
|
ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
2009-09-10 22:32:33 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (psys && !psys->clmd) {
|
2012-05-12 11:01:29 +00:00
|
|
|
psys->clmd = (ClothModifierData *)modifier_new(eModifierType_Cloth);
|
2009-09-10 22:32:33 +00:00
|
|
|
psys->clmd->sim_parms->goalspring = 0.0f;
|
2012-05-12 11:01:29 +00:00
|
|
|
psys->clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_GOAL | CLOTH_SIMSETTINGS_FLAG_NO_SPRING_COMPRESS;
|
2009-09-10 22:32:33 +00:00
|
|
|
psys->clmd->coll_parms->flags &= ~CLOTH_COLLSETTINGS_FLAG_SELF;
|
2009-12-08 17:23:48 +00:00
|
|
|
rna_Particle_redo(bmain, scene, ptr);
|
2009-09-10 22:32:33 +00:00
|
|
|
}
|
|
|
|
else
|
2012-05-12 11:01:29 +00:00
|
|
|
WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, NULL);
|
2010-12-13 09:39:14 +00:00
|
|
|
|
|
|
|
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
2009-09-10 22:32:33 +00:00
|
|
|
}
|
2009-06-27 15:41:47 +00:00
|
|
|
static PointerRNA rna_particle_settings_get(PointerRNA *ptr)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
2010-08-15 08:53:28 +00:00
|
|
|
ParticleSettings *part = psys->part;
|
2009-06-27 15:41:47 +00:00
|
|
|
|
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_ParticleSettings, part);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void rna_particle_settings_set(PointerRNA *ptr, PointerRNA value)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
2010-10-05 09:32:35 +00:00
|
|
|
int old_type = 0;
|
2009-06-27 15:41:47 +00:00
|
|
|
|
2010-10-05 09:32:35 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (psys->part) {
|
2010-10-05 09:32:35 +00:00
|
|
|
old_type = psys->part->type;
|
2009-06-27 15:41:47 +00:00
|
|
|
psys->part->id.us--;
|
2010-10-05 09:32:35 +00:00
|
|
|
}
|
2009-06-27 15:41:47 +00:00
|
|
|
|
|
|
|
psys->part = (ParticleSettings *)value.data;
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (psys->part) {
|
2009-06-27 15:41:47 +00:00
|
|
|
psys->part->id.us++;
|
2009-07-20 23:52:53 +00:00
|
|
|
psys_check_boid_data(psys);
|
2012-03-05 23:30:41 +00:00
|
|
|
if (old_type != psys->part->type)
|
2010-10-05 09:32:35 +00:00
|
|
|
psys->recalc |= PSYS_RECALC_TYPE;
|
2009-07-20 23:52:53 +00:00
|
|
|
}
|
2009-06-27 15:41:47 +00:00
|
|
|
}
|
2009-12-08 17:23:48 +00:00
|
|
|
static void rna_Particle_abspathtime_update(Main *bmain, Scene *scene, PointerRNA *ptr)
|
2009-07-04 03:50:12 +00:00
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *settings = (ParticleSettings *)ptr->data;
|
2009-07-04 03:50:12 +00:00
|
|
|
float delta = settings->end + settings->lifetime - settings->sta;
|
2012-03-05 23:30:41 +00:00
|
|
|
if (settings->draw & PART_ABS_PATH_TIME) {
|
2009-07-04 03:50:12 +00:00
|
|
|
settings->path_start = settings->sta + settings->path_start * delta;
|
|
|
|
settings->path_end = settings->sta + settings->path_end * delta;
|
|
|
|
}
|
|
|
|
else {
|
2012-05-12 11:01:29 +00:00
|
|
|
settings->path_start = (settings->path_start - settings->sta) / delta;
|
|
|
|
settings->path_end = (settings->path_end - settings->sta) / delta;
|
2009-07-04 03:50:12 +00:00
|
|
|
}
|
2009-12-08 17:23:48 +00:00
|
|
|
rna_Particle_redo(bmain, scene, ptr);
|
2009-07-04 03:50:12 +00:00
|
|
|
}
|
2009-02-17 21:07:01 +00:00
|
|
|
static void rna_PartSettings_start_set(struct PointerRNA *ptr, float value)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *settings = (ParticleSettings *)ptr->data;
|
2009-02-17 21:07:01 +00:00
|
|
|
|
|
|
|
/* check for clipping */
|
2012-03-05 23:30:41 +00:00
|
|
|
if (value > settings->end)
|
2009-02-17 21:07:01 +00:00
|
|
|
value = settings->end;
|
|
|
|
|
2012-04-21 12:51:47 +00:00
|
|
|
/*if (settings->type==PART_REACTOR && value < 1.0) */
|
2012-03-05 23:30:41 +00:00
|
|
|
/* value = 1.0; */
|
|
|
|
/*else */
|
2009-09-17 22:00:49 +00:00
|
|
|
if (value < MINAFRAMEF)
|
2009-07-07 06:56:29 +00:00
|
|
|
value = MINAFRAMEF;
|
2009-02-17 21:07:01 +00:00
|
|
|
|
|
|
|
settings->sta = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void rna_PartSettings_end_set(struct PointerRNA *ptr, float value)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *settings = (ParticleSettings *)ptr->data;
|
2009-02-17 21:07:01 +00:00
|
|
|
|
|
|
|
/* check for clipping */
|
2012-03-05 23:30:41 +00:00
|
|
|
if (value < settings->sta)
|
2009-02-17 21:07:01 +00:00
|
|
|
value = settings->sta;
|
2009-01-02 13:47:33 +00:00
|
|
|
|
2009-02-17 21:07:01 +00:00
|
|
|
settings->end = value;
|
|
|
|
}
|
|
|
|
|
2011-03-21 10:53:29 +00:00
|
|
|
static void rna_PartSetings_timestep_set(struct PointerRNA *ptr, float value)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *settings = (ParticleSettings *)ptr->data;
|
2011-03-21 10:53:29 +00:00
|
|
|
|
2012-05-12 11:01:29 +00:00
|
|
|
settings->timetweak = value / 0.04f;
|
2011-03-21 10:53:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static float rna_PartSettings_timestep_get(struct PointerRNA *ptr)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *settings = (ParticleSettings *)ptr->data;
|
2011-03-21 10:53:29 +00:00
|
|
|
|
|
|
|
return settings->timetweak * 0.04f;
|
|
|
|
}
|
|
|
|
|
2011-02-07 11:43:33 +00:00
|
|
|
static void rna_PartSetting_hairlength_set(struct PointerRNA *ptr, float value)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *settings = (ParticleSettings *)ptr->data;
|
2011-02-07 11:43:33 +00:00
|
|
|
settings->normfac = value / 4.f;
|
|
|
|
}
|
|
|
|
|
|
|
|
static float rna_PartSetting_hairlength_get(struct PointerRNA *ptr)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *settings = (ParticleSettings *)ptr->data;
|
2011-02-07 11:43:33 +00:00
|
|
|
return settings->normfac * 4.f;
|
|
|
|
}
|
|
|
|
|
2009-02-17 21:07:01 +00:00
|
|
|
static void rna_PartSetting_linelentail_set(struct PointerRNA *ptr, float value)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *settings = (ParticleSettings *)ptr->data;
|
2009-02-17 21:07:01 +00:00
|
|
|
settings->draw_line[0] = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
static float rna_PartSetting_linelentail_get(struct PointerRNA *ptr)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *settings = (ParticleSettings *)ptr->data;
|
2009-02-17 21:07:01 +00:00
|
|
|
return settings->draw_line[0];
|
|
|
|
}
|
2013-09-20 06:20:07 +00:00
|
|
|
static void rna_PartSetting_pathstartend_range(PointerRNA *ptr, float *min, float *max,
|
|
|
|
float *UNUSED(softmin), float *UNUSED(softmax))
|
2009-07-04 03:50:12 +00:00
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *settings = (ParticleSettings *)ptr->data;
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (settings->type == PART_HAIR) {
|
2009-07-04 03:50:12 +00:00
|
|
|
*min = 0.0f;
|
2011-03-28 02:34:55 +00:00
|
|
|
*max = (settings->draw & PART_ABS_PATH_TIME) ? 100.0f : 1.0f;
|
2009-07-04 03:50:12 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
*min = (settings->draw & PART_ABS_PATH_TIME) ? settings->sta : 0.0f;
|
2012-03-05 23:30:41 +00:00
|
|
|
*max = (settings->draw & PART_ABS_PATH_TIME) ? MAXFRAMEF : 1.0f;
|
2009-07-04 03:50:12 +00:00
|
|
|
}
|
|
|
|
}
|
2009-02-17 21:07:01 +00:00
|
|
|
static void rna_PartSetting_linelenhead_set(struct PointerRNA *ptr, float value)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *settings = (ParticleSettings *)ptr->data;
|
2009-02-17 21:07:01 +00:00
|
|
|
settings->draw_line[1] = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
static float rna_PartSetting_linelenhead_get(struct PointerRNA *ptr)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *settings = (ParticleSettings *)ptr->data;
|
2009-02-17 21:07:01 +00:00
|
|
|
return settings->draw_line[1];
|
|
|
|
}
|
2009-06-03 23:22:43 +00:00
|
|
|
|
2011-01-22 20:38:27 +00:00
|
|
|
|
|
|
|
static int rna_PartSettings_is_fluid_get(PointerRNA *ptr)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *part = (ParticleSettings *)ptr->data;
|
2011-01-22 20:38:27 +00:00
|
|
|
|
|
|
|
return part->type == PART_FLUID;
|
|
|
|
}
|
|
|
|
|
2012-09-22 14:07:55 +00:00
|
|
|
static void rna_ParticleSystem_name_set(PointerRNA *ptr, const char *value)
|
2011-10-15 11:55:09 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
Object *ob = ptr->id.data;
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSystem *part = (ParticleSystem *)ptr->data;
|
2011-10-15 11:55:09 +00:00
|
|
|
|
|
|
|
/* copy the new name into the name slot */
|
|
|
|
BLI_strncpy_utf8(part->name, value, sizeof(part->name));
|
|
|
|
|
2013-03-25 08:29:06 +00:00
|
|
|
BLI_uniquename(&ob->particlesystem, part, DATA_("ParticleSystem"), '.', offsetof(ParticleSystem, name),
|
2012-03-18 09:27:36 +00:00
|
|
|
sizeof(part->name));
|
2011-10-15 11:55:09 +00:00
|
|
|
}
|
|
|
|
|
2009-07-20 23:52:53 +00:00
|
|
|
static PointerRNA rna_ParticleSystem_active_particle_target_get(PointerRNA *ptr)
|
2009-07-12 23:38:47 +00:00
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
2009-07-20 23:52:53 +00:00
|
|
|
ParticleTarget *pt = psys->targets.first;
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (; pt; pt = pt->next) {
|
|
|
|
if (pt->flag & PTARGET_CURRENT)
|
2009-07-20 23:52:53 +00:00
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_ParticleTarget, pt);
|
2009-07-12 23:38:47 +00:00
|
|
|
}
|
2009-07-20 23:52:53 +00:00
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_ParticleTarget, NULL);
|
2009-07-12 23:38:47 +00:00
|
|
|
}
|
2012-04-15 13:41:07 +00:00
|
|
|
static void rna_ParticleSystem_active_particle_target_index_range(PointerRNA *ptr, int *min, int *max,
|
2013-09-20 06:20:07 +00:00
|
|
|
int *UNUSED(softmin), int *UNUSED(softmax))
|
2009-07-12 23:38:47 +00:00
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
2012-03-05 23:30:41 +00:00
|
|
|
*min = 0;
|
2012-11-07 12:31:05 +00:00
|
|
|
*max = max_ii(0, BLI_countlist(&psys->targets) - 1);
|
2009-07-12 23:38:47 +00:00
|
|
|
}
|
|
|
|
|
2009-07-20 23:52:53 +00:00
|
|
|
static int rna_ParticleSystem_active_particle_target_index_get(PointerRNA *ptr)
|
2009-07-12 23:38:47 +00:00
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
2009-07-20 23:52:53 +00:00
|
|
|
ParticleTarget *pt = psys->targets.first;
|
2012-03-05 23:30:41 +00:00
|
|
|
int i = 0;
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (; pt; pt = pt->next, i++)
|
|
|
|
if (pt->flag & PTARGET_CURRENT)
|
2009-07-12 23:38:47 +00:00
|
|
|
return i;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2009-07-20 23:52:53 +00:00
|
|
|
static void rna_ParticleSystem_active_particle_target_index_set(struct PointerRNA *ptr, int value)
|
2009-07-12 23:38:47 +00:00
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
2009-07-20 23:52:53 +00:00
|
|
|
ParticleTarget *pt = psys->targets.first;
|
2012-03-05 23:30:41 +00:00
|
|
|
int i = 0;
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (; pt; pt = pt->next, i++) {
|
|
|
|
if (i == value)
|
2009-07-20 23:52:53 +00:00
|
|
|
pt->flag |= PTARGET_CURRENT;
|
2009-07-12 23:38:47 +00:00
|
|
|
else
|
2009-07-20 23:52:53 +00:00
|
|
|
pt->flag &= ~PTARGET_CURRENT;
|
2009-07-12 23:38:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-07-20 23:52:53 +00:00
|
|
|
static void rna_ParticleTarget_name_get(PointerRNA *ptr, char *str)
|
2009-07-12 23:38:47 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
ParticleTarget *pt = ptr->data;
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (pt->flag & PTARGET_VALID) {
|
2009-07-20 23:52:53 +00:00
|
|
|
ParticleSystem *psys = NULL;
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (pt->ob)
|
2012-05-12 11:01:29 +00:00
|
|
|
psys = BLI_findlink(&pt->ob->particlesystem, pt->psys - 1);
|
2009-07-20 23:52:53 +00:00
|
|
|
else {
|
2012-05-12 11:01:29 +00:00
|
|
|
Object *ob = (Object *) ptr->id.data;
|
|
|
|
psys = BLI_findlink(&ob->particlesystem, pt->psys - 1);
|
2009-07-20 23:52:53 +00:00
|
|
|
}
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (psys) {
|
|
|
|
if (pt->ob)
|
2012-05-12 11:01:29 +00:00
|
|
|
sprintf(str, "%s: %s", pt->ob->id.name + 2, psys->name);
|
2009-07-20 23:52:53 +00:00
|
|
|
else
|
|
|
|
strcpy(str, psys->name);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
strcpy(str, "Invalid target!");
|
2009-07-12 23:38:47 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
strcpy(str, "Invalid target!");
|
|
|
|
}
|
2010-11-23 11:15:38 +00:00
|
|
|
|
2013-05-10 17:14:07 +00:00
|
|
|
static int rna_ParticleTarget_name_length(PointerRNA *ptr)
|
|
|
|
{
|
|
|
|
char tstr[MAX_ID_NAME + MAX_ID_NAME + 64];
|
|
|
|
|
|
|
|
rna_ParticleTarget_name_get(ptr, tstr);
|
|
|
|
|
|
|
|
return strlen(tstr);
|
|
|
|
}
|
|
|
|
|
2010-11-23 11:15:38 +00:00
|
|
|
static int particle_id_check(PointerRNA *ptr)
|
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
ID *id = ptr->id.data;
|
2010-11-23 11:15:38 +00:00
|
|
|
|
|
|
|
return (GS(id->name) == ID_PA);
|
|
|
|
}
|
|
|
|
|
|
|
|
static char *rna_SPHFluidSettings_path(PointerRNA *ptr)
|
|
|
|
{
|
|
|
|
SPHFluidSettings *fluid = (SPHFluidSettings *)ptr->data;
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (particle_id_check(ptr)) {
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *part = (ParticleSettings *)ptr->id.data;
|
2010-11-23 11:15:38 +00:00
|
|
|
|
|
|
|
if (part->fluid == fluid)
|
|
|
|
return BLI_sprintfN("fluid");
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2009-08-29 15:20:36 +00:00
|
|
|
static int rna_ParticleSystem_multiple_caches_get(PointerRNA *ptr)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
2009-08-29 15:20:36 +00:00
|
|
|
|
|
|
|
return (psys->ptcaches.first != psys->ptcaches.last);
|
|
|
|
}
|
|
|
|
static int rna_ParticleSystem_editable_get(PointerRNA *ptr)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
2009-08-29 15:20:36 +00:00
|
|
|
|
2009-10-15 17:59:42 +00:00
|
|
|
return psys_check_edited(psys);
|
2009-08-29 15:20:36 +00:00
|
|
|
}
|
|
|
|
static int rna_ParticleSystem_edited_get(PointerRNA *ptr)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (psys->part && psys->part->type == PART_HAIR)
|
2009-09-10 22:32:33 +00:00
|
|
|
return (psys->flag & PSYS_EDITED || (psys->edit && psys->edit->edited));
|
2009-08-29 15:20:36 +00:00
|
|
|
else
|
|
|
|
return (psys->pointcache->edit && psys->pointcache->edit->edited);
|
|
|
|
}
|
2009-10-05 13:25:56 +00:00
|
|
|
static PointerRNA rna_ParticleDupliWeight_active_get(PointerRNA *ptr)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *part = (ParticleSettings *)ptr->id.data;
|
2009-10-05 13:25:56 +00:00
|
|
|
ParticleDupliWeight *dw = part->dupliweights.first;
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (; dw; dw = dw->next) {
|
|
|
|
if (dw->flag & PART_DUPLIW_CURRENT)
|
2009-10-05 13:25:56 +00:00
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_ParticleDupliWeight, dw);
|
|
|
|
}
|
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_ParticleTarget, NULL);
|
|
|
|
}
|
2013-09-20 06:20:07 +00:00
|
|
|
static void rna_ParticleDupliWeight_active_index_range(PointerRNA *ptr, int *min, int *max,
|
|
|
|
int *UNUSED(softmin), int *UNUSED(softmax))
|
2009-10-05 13:25:56 +00:00
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *part = (ParticleSettings *)ptr->id.data;
|
2012-03-05 23:30:41 +00:00
|
|
|
*min = 0;
|
2012-11-07 12:31:05 +00:00
|
|
|
*max = max_ii(0, BLI_countlist(&part->dupliweights) - 1);
|
2009-10-05 13:25:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static int rna_ParticleDupliWeight_active_index_get(PointerRNA *ptr)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *part = (ParticleSettings *)ptr->id.data;
|
2009-10-05 13:25:56 +00:00
|
|
|
ParticleDupliWeight *dw = part->dupliweights.first;
|
2012-03-05 23:30:41 +00:00
|
|
|
int i = 0;
|
2009-10-05 13:25:56 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (; dw; dw = dw->next, i++)
|
|
|
|
if (dw->flag & PART_DUPLIW_CURRENT)
|
2009-10-05 13:25:56 +00:00
|
|
|
return i;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void rna_ParticleDupliWeight_active_index_set(struct PointerRNA *ptr, int value)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *part = (ParticleSettings *)ptr->id.data;
|
2009-10-05 13:25:56 +00:00
|
|
|
ParticleDupliWeight *dw = part->dupliweights.first;
|
2012-03-05 23:30:41 +00:00
|
|
|
int i = 0;
|
2009-10-05 13:25:56 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (; dw; dw = dw->next, i++) {
|
|
|
|
if (i == value)
|
2009-10-05 13:25:56 +00:00
|
|
|
dw->flag |= PART_DUPLIW_CURRENT;
|
|
|
|
else
|
|
|
|
dw->flag &= ~PART_DUPLIW_CURRENT;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void rna_ParticleDupliWeight_name_get(PointerRNA *ptr, char *str)
|
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
ParticleDupliWeight *dw = ptr->data;
|
2009-10-05 13:25:56 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (dw->ob)
|
2012-05-12 11:01:29 +00:00
|
|
|
sprintf(str, "%s: %i", dw->ob->id.name + 2, dw->count);
|
2009-10-05 13:25:56 +00:00
|
|
|
else
|
|
|
|
strcpy(str, "No object");
|
|
|
|
}
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2013-05-10 17:14:07 +00:00
|
|
|
static int rna_ParticleDupliWeight_name_length(PointerRNA *ptr)
|
|
|
|
{
|
|
|
|
char tstr[MAX_ID_NAME + 64];
|
|
|
|
|
|
|
|
rna_ParticleDupliWeight_name_get(ptr, tstr);
|
|
|
|
|
|
|
|
return strlen(tstr);
|
|
|
|
}
|
|
|
|
|
2012-03-18 09:27:36 +00:00
|
|
|
static EnumPropertyItem *rna_Particle_from_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
|
2014-01-04 18:08:43 +11:00
|
|
|
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
|
2009-06-05 23:59:33 +00:00
|
|
|
{
|
2012-04-21 12:51:47 +00:00
|
|
|
/*if (part->type==PART_REACTOR) */
|
2012-03-05 23:30:41 +00:00
|
|
|
/* return part_reactor_from_items; */
|
|
|
|
/*else */
|
2012-05-12 11:01:29 +00:00
|
|
|
return part_from_items;
|
2009-06-05 23:59:33 +00:00
|
|
|
}
|
|
|
|
|
2012-03-18 09:27:36 +00:00
|
|
|
static EnumPropertyItem *rna_Particle_dist_itemf(bContext *UNUSED(C), PointerRNA *ptr,
|
2014-01-04 18:08:43 +11:00
|
|
|
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
|
2011-03-09 14:18:33 +00:00
|
|
|
{
|
|
|
|
ParticleSettings *part = ptr->id.data;
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (part->type == PART_HAIR)
|
2011-03-09 14:18:33 +00:00
|
|
|
return part_hair_dist_items;
|
|
|
|
else
|
|
|
|
return part_dist_items;
|
|
|
|
}
|
|
|
|
|
2012-03-18 09:27:36 +00:00
|
|
|
static EnumPropertyItem *rna_Particle_draw_as_itemf(bContext *UNUSED(C), PointerRNA *ptr,
|
2014-01-04 18:08:43 +11:00
|
|
|
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
|
2009-06-05 23:59:33 +00:00
|
|
|
{
|
|
|
|
ParticleSettings *part = ptr->id.data;
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (part->type == PART_HAIR)
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
return part_hair_draw_as_items;
|
2009-06-05 23:59:33 +00:00
|
|
|
else
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
return part_draw_as_items;
|
2009-06-05 23:59:33 +00:00
|
|
|
}
|
|
|
|
|
2012-03-18 09:27:36 +00:00
|
|
|
static EnumPropertyItem *rna_Particle_ren_as_itemf(bContext *UNUSED(C), PointerRNA *ptr,
|
2014-01-04 18:08:43 +11:00
|
|
|
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
|
2009-06-05 23:59:33 +00:00
|
|
|
{
|
|
|
|
ParticleSettings *part = ptr->id.data;
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (part->type == PART_HAIR)
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
return part_hair_ren_as_items;
|
2009-06-05 23:59:33 +00:00
|
|
|
else
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
return part_ren_as_items;
|
2009-06-05 23:59:33 +00:00
|
|
|
}
|
|
|
|
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
static PointerRNA rna_Particle_field1_get(PointerRNA *ptr)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *part = (ParticleSettings *)ptr->id.data;
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
|
|
|
|
/* weak */
|
2012-03-05 23:30:41 +00:00
|
|
|
if (!part->pd)
|
|
|
|
part->pd = object_add_collision_fields(0);
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
|
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_FieldSettings, part->pd);
|
|
|
|
}
|
|
|
|
|
|
|
|
static PointerRNA rna_Particle_field2_get(PointerRNA *ptr)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *part = (ParticleSettings *)ptr->id.data;
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
|
|
|
|
/* weak */
|
2012-03-05 23:30:41 +00:00
|
|
|
if (!part->pd2)
|
|
|
|
part->pd2 = object_add_collision_fields(0);
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
|
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_FieldSettings, part->pd2);
|
|
|
|
}
|
|
|
|
|
2009-11-04 12:09:02 +00:00
|
|
|
static void psys_vg_name_get__internal(PointerRNA *ptr, char *value, int index)
|
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
Object *ob = ptr->id.data;
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
2009-11-04 12:09:02 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (psys->vgroup[index] > 0) {
|
2012-05-12 11:01:29 +00:00
|
|
|
bDeformGroup *defGroup = BLI_findlink(&ob->defbase, psys->vgroup[index] - 1);
|
2009-11-04 12:09:02 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (defGroup) {
|
2009-11-04 12:09:02 +00:00
|
|
|
strcpy(value, defGroup->name);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
value[0] = '\0';
|
2009-11-04 12:09:02 +00:00
|
|
|
}
|
|
|
|
static int psys_vg_name_len__internal(PointerRNA *ptr, int index)
|
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
Object *ob = ptr->id.data;
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
2009-11-04 12:09:02 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (psys->vgroup[index] > 0) {
|
2012-05-12 11:01:29 +00:00
|
|
|
bDeformGroup *defGroup = BLI_findlink(&ob->defbase, psys->vgroup[index] - 1);
|
2009-11-04 12:09:02 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (defGroup) {
|
2009-11-04 12:09:02 +00:00
|
|
|
return strlen(defGroup->name);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
static void psys_vg_name_set__internal(PointerRNA *ptr, const char *value, int index)
|
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
Object *ob = ptr->id.data;
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
2009-11-04 12:09:02 +00:00
|
|
|
|
2012-05-12 11:01:29 +00:00
|
|
|
if (value[0] == '\0') {
|
2012-03-05 23:30:41 +00:00
|
|
|
psys->vgroup[index] = 0;
|
2009-11-04 12:09:02 +00:00
|
|
|
}
|
|
|
|
else {
|
2012-10-22 17:19:05 +00:00
|
|
|
int defgrp_index = defgroup_name_index(ob, value);
|
2009-11-04 12:09:02 +00:00
|
|
|
|
2012-10-22 17:19:05 +00:00
|
|
|
if (defgrp_index == -1)
|
2009-11-04 12:09:02 +00:00
|
|
|
return;
|
|
|
|
|
2012-10-22 17:19:05 +00:00
|
|
|
psys->vgroup[index] = defgrp_index + 1;
|
2009-11-04 12:09:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-12-03 02:24:21 +00:00
|
|
|
static char *rna_ParticleSystem_path(PointerRNA *ptr)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
2013-04-23 20:10:22 +00:00
|
|
|
char name_esc[sizeof(psys->name) * 2];
|
|
|
|
|
|
|
|
BLI_strescape(name_esc, psys->name, sizeof(name_esc));
|
|
|
|
return BLI_sprintfN("particle_systems[\"%s\"]", name_esc);
|
2010-12-03 02:24:21 +00:00
|
|
|
}
|
|
|
|
|
2011-02-12 14:38:34 +00:00
|
|
|
static void rna_ParticleSettings_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *part = (ParticleSettings *)ptr->data;
|
|
|
|
rna_iterator_array_begin(iter, (void *)part->mtex, sizeof(MTex *), MAX_MTEX, 0, NULL);
|
2011-02-12 14:38:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static PointerRNA rna_ParticleSettings_active_texture_get(PointerRNA *ptr)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *part = (ParticleSettings *)ptr->data;
|
2011-02-12 14:38:34 +00:00
|
|
|
Tex *tex;
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
tex = give_current_particle_texture(part);
|
2011-02-12 14:38:34 +00:00
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_Texture, tex);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void rna_ParticleSettings_active_texture_set(PointerRNA *ptr, PointerRNA value)
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
ParticleSettings *part = (ParticleSettings *)ptr->data;
|
2011-02-12 14:38:34 +00:00
|
|
|
|
|
|
|
set_current_particle_texture(part, value.data);
|
|
|
|
}
|
|
|
|
|
2009-11-04 12:09:02 +00:00
|
|
|
/* irritating string functions for each index :/ */
|
|
|
|
static void rna_ParticleVGroup_name_get_0(PointerRNA *ptr, char *value) { psys_vg_name_get__internal(ptr, value, 0); }
|
|
|
|
static void rna_ParticleVGroup_name_get_1(PointerRNA *ptr, char *value) { psys_vg_name_get__internal(ptr, value, 1); }
|
|
|
|
static void rna_ParticleVGroup_name_get_2(PointerRNA *ptr, char *value) { psys_vg_name_get__internal(ptr, value, 2); }
|
|
|
|
static void rna_ParticleVGroup_name_get_3(PointerRNA *ptr, char *value) { psys_vg_name_get__internal(ptr, value, 3); }
|
|
|
|
static void rna_ParticleVGroup_name_get_4(PointerRNA *ptr, char *value) { psys_vg_name_get__internal(ptr, value, 4); }
|
|
|
|
static void rna_ParticleVGroup_name_get_5(PointerRNA *ptr, char *value) { psys_vg_name_get__internal(ptr, value, 5); }
|
|
|
|
static void rna_ParticleVGroup_name_get_6(PointerRNA *ptr, char *value) { psys_vg_name_get__internal(ptr, value, 6); }
|
|
|
|
static void rna_ParticleVGroup_name_get_7(PointerRNA *ptr, char *value) { psys_vg_name_get__internal(ptr, value, 7); }
|
|
|
|
static void rna_ParticleVGroup_name_get_8(PointerRNA *ptr, char *value) { psys_vg_name_get__internal(ptr, value, 8); }
|
|
|
|
static void rna_ParticleVGroup_name_get_9(PointerRNA *ptr, char *value) { psys_vg_name_get__internal(ptr, value, 9); }
|
|
|
|
static void rna_ParticleVGroup_name_get_10(PointerRNA *ptr, char *value) { psys_vg_name_get__internal(ptr, value, 10); }
|
|
|
|
static void rna_ParticleVGroup_name_get_11(PointerRNA *ptr, char *value) { psys_vg_name_get__internal(ptr, value, 11); }
|
|
|
|
|
|
|
|
static int rna_ParticleVGroup_name_len_0(PointerRNA *ptr) { return psys_vg_name_len__internal(ptr, 0); }
|
|
|
|
static int rna_ParticleVGroup_name_len_1(PointerRNA *ptr) { return psys_vg_name_len__internal(ptr, 1); }
|
|
|
|
static int rna_ParticleVGroup_name_len_2(PointerRNA *ptr) { return psys_vg_name_len__internal(ptr, 2); }
|
|
|
|
static int rna_ParticleVGroup_name_len_3(PointerRNA *ptr) { return psys_vg_name_len__internal(ptr, 3); }
|
|
|
|
static int rna_ParticleVGroup_name_len_4(PointerRNA *ptr) { return psys_vg_name_len__internal(ptr, 4); }
|
|
|
|
static int rna_ParticleVGroup_name_len_5(PointerRNA *ptr) { return psys_vg_name_len__internal(ptr, 5); }
|
|
|
|
static int rna_ParticleVGroup_name_len_6(PointerRNA *ptr) { return psys_vg_name_len__internal(ptr, 6); }
|
|
|
|
static int rna_ParticleVGroup_name_len_7(PointerRNA *ptr) { return psys_vg_name_len__internal(ptr, 7); }
|
|
|
|
static int rna_ParticleVGroup_name_len_8(PointerRNA *ptr) { return psys_vg_name_len__internal(ptr, 8); }
|
|
|
|
static int rna_ParticleVGroup_name_len_9(PointerRNA *ptr) { return psys_vg_name_len__internal(ptr, 9); }
|
|
|
|
static int rna_ParticleVGroup_name_len_10(PointerRNA *ptr) { return psys_vg_name_len__internal(ptr, 10); }
|
|
|
|
static int rna_ParticleVGroup_name_len_11(PointerRNA *ptr) { return psys_vg_name_len__internal(ptr, 11); }
|
|
|
|
|
|
|
|
static void rna_ParticleVGroup_name_set_0(PointerRNA *ptr, const char *value) { psys_vg_name_set__internal(ptr, value, 0); }
|
|
|
|
static void rna_ParticleVGroup_name_set_1(PointerRNA *ptr, const char *value) { psys_vg_name_set__internal(ptr, value, 1); }
|
|
|
|
static void rna_ParticleVGroup_name_set_2(PointerRNA *ptr, const char *value) { psys_vg_name_set__internal(ptr, value, 2); }
|
|
|
|
static void rna_ParticleVGroup_name_set_3(PointerRNA *ptr, const char *value) { psys_vg_name_set__internal(ptr, value, 3); }
|
|
|
|
static void rna_ParticleVGroup_name_set_4(PointerRNA *ptr, const char *value) { psys_vg_name_set__internal(ptr, value, 4); }
|
|
|
|
static void rna_ParticleVGroup_name_set_5(PointerRNA *ptr, const char *value) { psys_vg_name_set__internal(ptr, value, 5); }
|
|
|
|
static void rna_ParticleVGroup_name_set_6(PointerRNA *ptr, const char *value) { psys_vg_name_set__internal(ptr, value, 6); }
|
|
|
|
static void rna_ParticleVGroup_name_set_7(PointerRNA *ptr, const char *value) { psys_vg_name_set__internal(ptr, value, 7); }
|
|
|
|
static void rna_ParticleVGroup_name_set_8(PointerRNA *ptr, const char *value) { psys_vg_name_set__internal(ptr, value, 8); }
|
|
|
|
static void rna_ParticleVGroup_name_set_9(PointerRNA *ptr, const char *value) { psys_vg_name_set__internal(ptr, value, 9); }
|
|
|
|
static void rna_ParticleVGroup_name_set_10(PointerRNA *ptr, const char *value) { psys_vg_name_set__internal(ptr, value, 10); }
|
|
|
|
static void rna_ParticleVGroup_name_set_11(PointerRNA *ptr, const char *value) { psys_vg_name_set__internal(ptr, value, 11); }
|
2009-06-05 23:59:33 +00:00
|
|
|
|
2010-06-09 01:17:51 +00:00
|
|
|
|
2009-01-02 13:47:33 +00:00
|
|
|
#else
|
|
|
|
|
2009-03-26 13:56:32 +00:00
|
|
|
static void rna_def_particle_hair_key(BlenderRNA *brna)
|
2009-02-17 21:07:01 +00:00
|
|
|
{
|
|
|
|
StructRNA *srna;
|
|
|
|
PropertyRNA *prop;
|
2012-12-28 14:21:30 +00:00
|
|
|
FunctionRNA *func;
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2009-03-26 13:56:32 +00:00
|
|
|
srna = RNA_def_struct(brna, "ParticleHairKey", NULL);
|
|
|
|
RNA_def_struct_sdna(srna, "HairKey");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Particle Hair Key", "Particle key for hair particle system");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Time", "Relative time of key over hair length");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_UNSIGNED);
|
2010-01-12 13:40:29 +00:00
|
|
|
RNA_def_property_range(prop, 0.0, 1.0);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Weight", "Weight for cloth simulation");
|
2010-06-11 10:46:47 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
|
2010-06-09 01:17:51 +00:00
|
|
|
RNA_def_property_array(prop, 3);
|
|
|
|
RNA_def_property_ui_text(prop, "Location (Object Space)", "Location of the hair key in object space");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_float_funcs(prop, "rna_ParticleHairKey_location_object_get",
|
|
|
|
"rna_ParticleHairKey_location_object_set", NULL);
|
2010-06-09 01:17:51 +00:00
|
|
|
|
2013-01-14 13:05:01 +00:00
|
|
|
prop = RNA_def_property(srna, "co_local", PROP_FLOAT, PROP_TRANSLATION);
|
2010-06-09 01:17:51 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "co");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Location",
|
2013-01-14 13:05:01 +00:00
|
|
|
"Location of the hair key in its local coordinate system, "
|
2012-03-18 09:27:36 +00:00
|
|
|
"relative to the emitting face");
|
2012-12-28 14:21:30 +00:00
|
|
|
|
|
|
|
/* Aided co func */
|
|
|
|
func = RNA_def_function(srna, "co_object", "rna_ParticleHairKey_co_object");
|
|
|
|
RNA_def_function_ui_description(func, "Obtain hairkey location with particle and modifier data");
|
|
|
|
|
|
|
|
prop = RNA_def_pointer(func, "object", "Object", "", "Object");
|
2013-09-20 05:30:37 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
|
2012-12-28 14:21:30 +00:00
|
|
|
prop = RNA_def_pointer(func, "modifier", "ParticleSystemModifier", "", "Particle modifier");
|
2013-09-20 05:30:37 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
|
2012-12-28 14:21:30 +00:00
|
|
|
prop = RNA_def_pointer(func, "particle", "Particle", "", "hair particle");
|
2013-09-20 05:30:37 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
|
2012-12-28 14:21:30 +00:00
|
|
|
|
|
|
|
prop = RNA_def_float_vector(func, "co", 3, NULL, -FLT_MAX, FLT_MAX, "Co",
|
|
|
|
"Exported hairkey location", -1e4, 1e4);
|
|
|
|
RNA_def_property_flag(prop, PROP_THICK_WRAP);
|
|
|
|
RNA_def_function_output(func, prop);
|
2009-02-17 21:07:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void rna_def_particle_key(BlenderRNA *brna)
|
|
|
|
{
|
|
|
|
StructRNA *srna;
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "ParticleKey", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Particle Key", "Key location for a particle over time");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "co");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Location", "Key location");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VELOCITY);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "vel");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Velocity", "Key velocity");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_QUATERNION);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "rot");
|
2011-04-11 01:18:25 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Rotation", "Key rotation quaternion");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_VELOCITY);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "ave");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Angular Velocity", "Key angular velocity");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Time", "Time of key over the simulation");
|
2009-02-17 21:07:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void rna_def_child_particle(BlenderRNA *brna)
|
|
|
|
{
|
|
|
|
StructRNA *srna;
|
2012-03-05 23:30:41 +00:00
|
|
|
/*PropertyRNA *prop; */
|
2009-02-17 21:07:01 +00:00
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "ChildParticle", NULL);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Child Particle",
|
|
|
|
"Child particle interpolated from simulated or edited particles");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
/* int num, parent; *//* num is face index on the final derived mesh */
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
/* int pa[4]; *//* nearest particles to the child, used for the interpolation */
|
|
|
|
/* float w[4]; *//* interpolation weights for the above particles */
|
|
|
|
/* float fuv[4], foffset; *//* face vertex weights and offset */
|
|
|
|
/* float rand[3]; */
|
2009-02-17 21:07:01 +00:00
|
|
|
}
|
|
|
|
|
2009-03-26 13:56:32 +00:00
|
|
|
static void rna_def_particle(BlenderRNA *brna)
|
2009-02-17 21:07:01 +00:00
|
|
|
{
|
|
|
|
StructRNA *srna;
|
|
|
|
PropertyRNA *prop;
|
2012-12-28 14:21:30 +00:00
|
|
|
FunctionRNA *func;
|
2009-02-17 21:07:01 +00:00
|
|
|
|
|
|
|
static EnumPropertyItem alive_items[] = {
|
2012-03-05 23:30:41 +00:00
|
|
|
/*{PARS_KILLED, "KILLED", 0, "Killed", ""}, */
|
2009-06-16 00:52:21 +00:00
|
|
|
{PARS_DEAD, "DEAD", 0, "Dead", ""},
|
|
|
|
{PARS_UNBORN, "UNBORN", 0, "Unborn", ""},
|
|
|
|
{PARS_ALIVE, "ALIVE", 0, "Alive", ""},
|
|
|
|
{PARS_DYING, "DYING", 0, "Dying", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
2009-02-17 21:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "Particle", NULL);
|
|
|
|
RNA_def_struct_sdna(srna, "ParticleData");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Particle", "Particle in a particle system");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2009-07-23 00:19:01 +00:00
|
|
|
/* Particle State & Previous State */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "state.co");
|
|
|
|
RNA_def_property_ui_text(prop, "Particle Location", "");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VELOCITY);
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "state.vel");
|
|
|
|
RNA_def_property_ui_text(prop, "Particle Velocity", "");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_VELOCITY);
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "state.ave");
|
|
|
|
RNA_def_property_ui_text(prop, "Angular Velocity", "");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_QUATERNION);
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "state.rot");
|
|
|
|
RNA_def_property_ui_text(prop, "Rotation", "");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "prev_location", PROP_FLOAT, PROP_TRANSLATION);
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "prev_state.co");
|
|
|
|
RNA_def_property_ui_text(prop, "Previous Particle Location", "");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "prev_velocity", PROP_FLOAT, PROP_VELOCITY);
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "prev_state.vel");
|
|
|
|
RNA_def_property_ui_text(prop, "Previous Particle Velocity", "");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "prev_angular_velocity", PROP_FLOAT, PROP_VELOCITY);
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "prev_state.ave");
|
|
|
|
RNA_def_property_ui_text(prop, "Previous Angular Velocity", "");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "prev_rotation", PROP_FLOAT, PROP_QUATERNION);
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "prev_state.rot");
|
|
|
|
RNA_def_property_ui_text(prop, "Previous Rotation", "");
|
|
|
|
|
|
|
|
/* Hair & Keyed Keys */
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "hair_keys", PROP_COLLECTION, PROP_NONE);
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "hair", "totkey");
|
|
|
|
RNA_def_property_struct_type(prop, "ParticleHairKey");
|
|
|
|
RNA_def_property_ui_text(prop, "Hair", "");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "particle_keys", PROP_COLLECTION, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "keys", "totkey");
|
|
|
|
RNA_def_property_struct_type(prop, "ParticleKey");
|
|
|
|
RNA_def_property_ui_text(prop, "Keyed States", "");
|
2012-03-05 23:30:41 +00:00
|
|
|
/* */
|
|
|
|
/* float fuv[4], foffset; *//* coordinates on face/edge number "num" and depth along*/
|
|
|
|
/* *//* face normal for volume emission */
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "birth_time", PROP_FLOAT, PROP_TIME);
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "time");
|
2012-03-05 23:30:41 +00:00
|
|
|
/* RNA_def_property_range(prop, lowerLimitf, upperLimitf); */
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Birth Time", "");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
|
|
|
|
/* RNA_def_property_range(prop, lowerLimitf, upperLimitf); */
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Lifetime", "");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "die_time", PROP_FLOAT, PROP_TIME);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "dietime");
|
2012-03-05 23:30:41 +00:00
|
|
|
/* RNA_def_property_range(prop, lowerLimitf, upperLimitf); */
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Die Time", "");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
|
|
|
|
/* RNA_def_property_range(prop, lowerLimitf, upperLimitf); */
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Size", "");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
/* */
|
|
|
|
/* int num; *//* index to vert/edge/face */
|
|
|
|
/* int num_dmcache; *//* index to derived mesh data (face) to avoid slow lookups */
|
|
|
|
/* int pad; */
|
|
|
|
/* */
|
|
|
|
/* int totkey; */
|
2009-02-17 21:07:01 +00:00
|
|
|
|
|
|
|
/* flag */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "is_exist", PROP_BOOLEAN, PROP_NONE);
|
2010-07-13 17:11:50 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", PARS_UNEXIST);
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
RNA_def_property_ui_text(prop, "Exists", "");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "is_visible", PROP_BOOLEAN, PROP_NONE);
|
2010-07-13 17:11:50 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", PARS_NO_DISP);
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
RNA_def_property_ui_text(prop, "Visible", "");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "alive_state", PROP_ENUM, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "alive");
|
|
|
|
RNA_def_property_enum_items(prop, alive_items);
|
|
|
|
RNA_def_property_ui_text(prop, "Alive State", "");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
/* short rt2; */
|
2012-12-28 14:21:30 +00:00
|
|
|
|
|
|
|
/* UVs */
|
|
|
|
func = RNA_def_function(srna, "uv_on_emitter", "rna_Particle_uv_on_emitter");
|
|
|
|
RNA_def_function_ui_description(func, "Obtain uv for particle on derived mesh");
|
2013-09-20 05:30:37 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
2012-12-28 14:21:30 +00:00
|
|
|
prop = RNA_def_pointer(func, "modifier", "ParticleSystemModifier", "", "Particle modifier");
|
2013-09-20 05:30:37 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
|
2012-12-28 14:21:30 +00:00
|
|
|
prop = RNA_def_property(func, "uv", PROP_FLOAT, PROP_COORDS);
|
|
|
|
RNA_def_property_array(prop, 2);
|
|
|
|
RNA_def_property_flag(prop, PROP_THICK_WRAP);
|
|
|
|
RNA_def_function_output(func, prop);
|
2009-02-17 21:07:01 +00:00
|
|
|
}
|
|
|
|
|
2009-10-05 13:25:56 +00:00
|
|
|
static void rna_def_particle_dupliweight(BlenderRNA *brna)
|
|
|
|
{
|
|
|
|
StructRNA *srna;
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "ParticleDupliWeight", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Particle Dupliobject Weight", "Weight of a particle dupliobject in a group");
|
2009-10-05 13:25:56 +00:00
|
|
|
RNA_def_struct_sdna(srna, "ParticleDupliWeight");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_ParticleDupliWeight_name_get",
|
|
|
|
"rna_ParticleDupliWeight_name_length", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Name", "Particle dupliobject name");
|
2009-10-05 13:25:56 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
RNA_def_struct_name_property(srna, prop);
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "count", PROP_INT, PROP_UNSIGNED);
|
2010-11-21 03:45:35 +00:00
|
|
|
RNA_def_property_range(prop, 0, SHRT_MAX);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Count",
|
|
|
|
"The number of times this object is repeated with respect to other objects");
|
2009-10-05 13:25:56 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
|
|
|
}
|
|
|
|
|
2010-04-04 12:29:06 +00:00
|
|
|
static void rna_def_fluid_settings(BlenderRNA *brna)
|
|
|
|
{
|
|
|
|
StructRNA *srna;
|
|
|
|
PropertyRNA *prop;
|
2012-12-14 04:57:26 +00:00
|
|
|
|
|
|
|
static EnumPropertyItem sph_solver_items[] = {
|
|
|
|
{SPH_SOLVER_DDR, "DDR", 0, "Double-Density", "An artistic solver with strong surface tension effects (original)"},
|
|
|
|
{SPH_SOLVER_CLASSICAL, "CLASSICAL", 0, "Classical", "A more physically-accurate solver"},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2010-04-04 12:29:06 +00:00
|
|
|
srna = RNA_def_struct(brna, "SPHFluidSettings", NULL);
|
2010-11-23 11:15:38 +00:00
|
|
|
RNA_def_struct_path_func(srna, "rna_SPHFluidSettings_path");
|
2010-04-04 12:29:06 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "SPH Fluid Settings", "Settings for particle fluids physics");
|
2012-12-14 04:57:26 +00:00
|
|
|
|
2010-04-04 12:29:06 +00:00
|
|
|
/* Fluid settings */
|
2012-12-14 04:57:26 +00:00
|
|
|
prop = RNA_def_property(srna, "solver", PROP_ENUM, PROP_NONE);
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "solver");
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
|
|
|
RNA_def_property_enum_items(prop, sph_solver_items);
|
|
|
|
RNA_def_property_ui_text(prop, "SPH Solver", "The code used to calculate internal forces on particles");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "spring_force", PROP_FLOAT, PROP_NONE);
|
2010-04-04 12:29:06 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "spring_k");
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 100.0f);
|
2011-01-09 19:09:41 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Spring Force", "Spring force");
|
2010-11-23 11:15:38 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2011-04-21 15:53:30 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "fluid_radius", PROP_FLOAT, PROP_NONE);
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "radius");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 20.0f);
|
2011-01-09 19:09:41 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 2.0f, 1, 3);
|
|
|
|
RNA_def_property_ui_text(prop, "Interaction Radius", "Fluid interaction radius");
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2010-04-04 12:29:06 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "rest_length", PROP_FLOAT, PROP_NONE);
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 2.0f);
|
Completely refactored sph fluid particles. Only the very core of the algorithm remains
the same, but big changes have happened both on the outside and on the inside.
New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
from a users point of view. Now there are only a few intuitive basic parameters that
define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
density and spring rest lengths so that it's easy to get stable simulations by simply
emitting particles for a few frames and adjusting the particle size (easy when the
particle size is drawn) so that the fluid appears continuous (particles are touching
eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
problem to solve with particle based fluid simulation so some compromises have to be
made. So the bigger the stiffness parameter is the less the fluid will compress under
stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
smooth out instabilities, so less viscous fluids again need more substeps to remain
stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
gravity, and high pressure areas start to come down.
* In addition to these basic parameters there are separate advanced parameters that can
either be tweaked relative to the basic parameters (or particle size) or defined
independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
can lead to small clumps of particles, so the repulsion keeps the particles better
separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to
eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
densely next to eachother.
** Spring rest length - by default this is 2 * particle size.
* There are also new options for 3d view particle coloring in the display panel to show
particle velocity and acceleration. These make it easier to see what's happening in the
fluid simulations, but can of course be used with other particles as well.
* Viscoelastic springs have some new options too. The plasticity can now be set to much
higher values for instant deletion of springs as the elastic limit is exeeded. In addition
to that there is an option to only create springs for a certain number of frames when a
particle is born. These options give new possibilities for breaking viscoelastic fluids.
New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree
implementation makes the code quite a bit cleaner and should also give a slight speed
boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
now the fluid calculations are also done using the selected integration method, so there
are again more choices in effecting simulation accuracy and stability. This change also
included a nice cleanup of the whole particle integration code.
As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
2011-03-12 12:38:11 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Rest Length", "Spring rest length (factor of particle radius)");
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2011-01-09 19:09:41 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_viscoelastic_springs", PROP_BOOLEAN, PROP_NONE);
|
2011-01-09 19:09:41 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_VISCOELASTIC_SPRINGS);
|
|
|
|
RNA_def_property_ui_text(prop, "Viscoelastic Springs", "Use viscoelastic springs instead of Hooke's springs");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_initial_rest_length", PROP_BOOLEAN, PROP_NONE);
|
2011-01-09 19:09:41 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_CURRENT_REST_LENGTH);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Initial Rest Length",
|
|
|
|
"Use the initial length as spring rest length instead of 2 * particle size");
|
2011-01-09 19:09:41 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "plasticity", PROP_FLOAT, PROP_NONE);
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "plasticity_constant");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 100.0f);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Plasticity",
|
|
|
|
"How much the spring rest length can change after the elastic limit is crossed");
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "yield_ratio", PROP_FLOAT, PROP_NONE);
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "yield_ratio");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Elastic Limit",
|
|
|
|
"How much the spring has to be stretched/compressed in order to change it's rest length");
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "spring_frames", PROP_INT, PROP_NONE);
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 100.0f);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Spring Frames",
|
|
|
|
"Create springs for this number of frames since particles birth (0 is always)");
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
|
|
|
/* Viscosity */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "linear_viscosity", PROP_FLOAT, PROP_NONE);
|
2010-04-04 12:29:06 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "viscosity_omega");
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 100.0f);
|
2011-01-09 19:09:41 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Viscosity", "Linear viscosity");
|
2010-04-04 12:29:06 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2011-04-21 15:53:30 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "stiff_viscosity", PROP_FLOAT, PROP_NONE);
|
2010-04-04 12:29:06 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "viscosity_beta");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 100.0f);
|
Completely refactored sph fluid particles. Only the very core of the algorithm remains
the same, but big changes have happened both on the outside and on the inside.
New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
from a users point of view. Now there are only a few intuitive basic parameters that
define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
density and spring rest lengths so that it's easy to get stable simulations by simply
emitting particles for a few frames and adjusting the particle size (easy when the
particle size is drawn) so that the fluid appears continuous (particles are touching
eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
problem to solve with particle based fluid simulation so some compromises have to be
made. So the bigger the stiffness parameter is the less the fluid will compress under
stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
smooth out instabilities, so less viscous fluids again need more substeps to remain
stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
gravity, and high pressure areas start to come down.
* In addition to these basic parameters there are separate advanced parameters that can
either be tweaked relative to the basic parameters (or particle size) or defined
independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
can lead to small clumps of particles, so the repulsion keeps the particles better
separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to
eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
densely next to eachother.
** Spring rest length - by default this is 2 * particle size.
* There are also new options for 3d view particle coloring in the display panel to show
particle velocity and acceleration. These make it easier to see what's happening in the
fluid simulations, but can of course be used with other particles as well.
* Viscoelastic springs have some new options too. The plasticity can now be set to much
higher values for instant deletion of springs as the elastic limit is exeeded. In addition
to that there is an option to only create springs for a certain number of frames when a
particle is born. These options give new possibilities for breaking viscoelastic fluids.
New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree
implementation makes the code quite a bit cleaner and should also give a slight speed
boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
now the fluid calculations are also done using the selected integration method, so there
are again more choices in effecting simulation accuracy and stability. This change also
included a nice cleanup of the whole particle integration code.
As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
2011-03-12 12:38:11 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 2.0f, 1, 3);
|
2012-04-14 15:44:31 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Stiff viscosity", "Creates viscosity for expanding fluid");
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2010-04-04 12:29:06 +00:00
|
|
|
|
|
|
|
/* Double density relaxation */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "stiffness", PROP_FLOAT, PROP_NONE);
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "stiffness_k");
|
2013-01-11 03:06:10 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 1000.0f);
|
2011-01-09 19:09:41 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
|
2013-01-11 03:06:10 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Stiffness", "How incompressible the fluid is (speed of sound)");
|
2010-04-04 12:29:06 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2011-04-21 15:53:30 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "repulsion", PROP_FLOAT, PROP_NONE);
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "stiffness_knear");
|
2010-04-04 12:29:06 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 100.0f);
|
Completely refactored sph fluid particles. Only the very core of the algorithm remains
the same, but big changes have happened both on the outside and on the inside.
New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
from a users point of view. Now there are only a few intuitive basic parameters that
define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
density and spring rest lengths so that it's easy to get stable simulations by simply
emitting particles for a few frames and adjusting the particle size (easy when the
particle size is drawn) so that the fluid appears continuous (particles are touching
eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
problem to solve with particle based fluid simulation so some compromises have to be
made. So the bigger the stiffness parameter is the less the fluid will compress under
stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
smooth out instabilities, so less viscous fluids again need more substeps to remain
stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
gravity, and high pressure areas start to come down.
* In addition to these basic parameters there are separate advanced parameters that can
either be tweaked relative to the basic parameters (or particle size) or defined
independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
can lead to small clumps of particles, so the repulsion keeps the particles better
separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to
eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
densely next to eachother.
** Spring rest length - by default this is 2 * particle size.
* There are also new options for 3d view particle coloring in the display panel to show
particle velocity and acceleration. These make it easier to see what's happening in the
fluid simulations, but can of course be used with other particles as well.
* Viscoelastic springs have some new options too. The plasticity can now be set to much
higher values for instant deletion of springs as the elastic limit is exeeded. In addition
to that there is an option to only create springs for a certain number of frames when a
particle is born. These options give new possibilities for breaking viscoelastic fluids.
New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree
implementation makes the code quite a bit cleaner and should also give a slight speed
boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
now the fluid calculations are also done using the selected integration method, so there
are again more choices in effecting simulation accuracy and stability. This change also
included a nice cleanup of the whole particle integration code.
As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
2011-03-12 12:38:11 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 2.0f, 1, 3);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Repulsion Factor",
|
|
|
|
"How strongly the fluid tries to keep from clustering (factor of stiffness)");
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "rest_density", PROP_FLOAT, PROP_NONE);
|
2010-04-04 12:29:06 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "rest_density");
|
2012-12-14 04:57:26 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 10000.0f);
|
Completely refactored sph fluid particles. Only the very core of the algorithm remains
the same, but big changes have happened both on the outside and on the inside.
New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
from a users point of view. Now there are only a few intuitive basic parameters that
define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
density and spring rest lengths so that it's easy to get stable simulations by simply
emitting particles for a few frames and adjusting the particle size (easy when the
particle size is drawn) so that the fluid appears continuous (particles are touching
eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
problem to solve with particle based fluid simulation so some compromises have to be
made. So the bigger the stiffness parameter is the less the fluid will compress under
stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
smooth out instabilities, so less viscous fluids again need more substeps to remain
stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
gravity, and high pressure areas start to come down.
* In addition to these basic parameters there are separate advanced parameters that can
either be tweaked relative to the basic parameters (or particle size) or defined
independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
can lead to small clumps of particles, so the repulsion keeps the particles better
separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to
eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
densely next to eachother.
** Spring rest length - by default this is 2 * particle size.
* There are also new options for 3d view particle coloring in the display panel to show
particle velocity and acceleration. These make it easier to see what's happening in the
fluid simulations, but can of course be used with other particles as well.
* Viscoelastic springs have some new options too. The plasticity can now be set to much
higher values for instant deletion of springs as the elastic limit is exeeded. In addition
to that there is an option to only create springs for a certain number of frames when a
particle is born. These options give new possibilities for breaking viscoelastic fluids.
New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree
implementation makes the code quite a bit cleaner and should also give a slight speed
boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
now the fluid calculations are also done using the selected integration method, so there
are again more choices in effecting simulation accuracy and stability. This change also
included a nice cleanup of the whole particle integration code.
As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
2011-03-12 12:38:11 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 2.0f, 1, 3);
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Rest Density", "Fluid rest density");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2010-04-04 12:29:06 +00:00
|
|
|
/* Buoyancy */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "buoyancy", PROP_FLOAT, PROP_NONE);
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "buoyancy");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 10.0f);
|
Completely refactored sph fluid particles. Only the very core of the algorithm remains
the same, but big changes have happened both on the outside and on the inside.
New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
from a users point of view. Now there are only a few intuitive basic parameters that
define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
density and spring rest lengths so that it's easy to get stable simulations by simply
emitting particles for a few frames and adjusting the particle size (easy when the
particle size is drawn) so that the fluid appears continuous (particles are touching
eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
problem to solve with particle based fluid simulation so some compromises have to be
made. So the bigger the stiffness parameter is the less the fluid will compress under
stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
smooth out instabilities, so less viscous fluids again need more substeps to remain
stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
gravity, and high pressure areas start to come down.
* In addition to these basic parameters there are separate advanced parameters that can
either be tweaked relative to the basic parameters (or particle size) or defined
independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
can lead to small clumps of particles, so the repulsion keeps the particles better
separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to
eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
densely next to eachother.
** Spring rest length - by default this is 2 * particle size.
* There are also new options for 3d view particle coloring in the display panel to show
particle velocity and acceleration. These make it easier to see what's happening in the
fluid simulations, but can of course be used with other particles as well.
* Viscoelastic springs have some new options too. The plasticity can now be set to much
higher values for instant deletion of springs as the elastic limit is exeeded. In addition
to that there is an option to only create springs for a certain number of frames when a
particle is born. These options give new possibilities for breaking viscoelastic fluids.
New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree
implementation makes the code quite a bit cleaner and should also give a slight speed
boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
now the fluid calculations are also done using the selected integration method, so there
are again more choices in effecting simulation accuracy and stability. This change also
included a nice cleanup of the whole particle integration code.
As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
2011-03-12 12:38:11 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Buoyancy",
|
|
|
|
"Artificial buoyancy force in negative gravity direction based on pressure "
|
|
|
|
"differences inside the fluid");
|
2011-04-21 15:53:30 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
Completely refactored sph fluid particles. Only the very core of the algorithm remains
the same, but big changes have happened both on the outside and on the inside.
New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
from a users point of view. Now there are only a few intuitive basic parameters that
define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
density and spring rest lengths so that it's easy to get stable simulations by simply
emitting particles for a few frames and adjusting the particle size (easy when the
particle size is drawn) so that the fluid appears continuous (particles are touching
eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
problem to solve with particle based fluid simulation so some compromises have to be
made. So the bigger the stiffness parameter is the less the fluid will compress under
stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
smooth out instabilities, so less viscous fluids again need more substeps to remain
stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
gravity, and high pressure areas start to come down.
* In addition to these basic parameters there are separate advanced parameters that can
either be tweaked relative to the basic parameters (or particle size) or defined
independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
can lead to small clumps of particles, so the repulsion keeps the particles better
separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to
eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
densely next to eachother.
** Spring rest length - by default this is 2 * particle size.
* There are also new options for 3d view particle coloring in the display panel to show
particle velocity and acceleration. These make it easier to see what's happening in the
fluid simulations, but can of course be used with other particles as well.
* Viscoelastic springs have some new options too. The plasticity can now be set to much
higher values for instant deletion of springs as the elastic limit is exeeded. In addition
to that there is an option to only create springs for a certain number of frames when a
particle is born. These options give new possibilities for breaking viscoelastic fluids.
New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree
implementation makes the code quite a bit cleaner and should also give a slight speed
boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
now the fluid calculations are also done using the selected integration method, so there
are again more choices in effecting simulation accuracy and stability. This change also
included a nice cleanup of the whole particle integration code.
As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
2011-03-12 12:38:11 +00:00
|
|
|
|
|
|
|
/* Factor flags */
|
2011-04-21 15:53:30 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "factor_repulsion", PROP_BOOLEAN, PROP_NONE);
|
Completely refactored sph fluid particles. Only the very core of the algorithm remains
the same, but big changes have happened both on the outside and on the inside.
New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
from a users point of view. Now there are only a few intuitive basic parameters that
define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
density and spring rest lengths so that it's easy to get stable simulations by simply
emitting particles for a few frames and adjusting the particle size (easy when the
particle size is drawn) so that the fluid appears continuous (particles are touching
eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
problem to solve with particle based fluid simulation so some compromises have to be
made. So the bigger the stiffness parameter is the less the fluid will compress under
stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
smooth out instabilities, so less viscous fluids again need more substeps to remain
stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
gravity, and high pressure areas start to come down.
* In addition to these basic parameters there are separate advanced parameters that can
either be tweaked relative to the basic parameters (or particle size) or defined
independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
can lead to small clumps of particles, so the repulsion keeps the particles better
separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to
eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
densely next to eachother.
** Spring rest length - by default this is 2 * particle size.
* There are also new options for 3d view particle coloring in the display panel to show
particle velocity and acceleration. These make it easier to see what's happening in the
fluid simulations, but can of course be used with other particles as well.
* Viscoelastic springs have some new options too. The plasticity can now be set to much
higher values for instant deletion of springs as the elastic limit is exeeded. In addition
to that there is an option to only create springs for a certain number of frames when a
particle is born. These options give new possibilities for breaking viscoelastic fluids.
New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree
implementation makes the code quite a bit cleaner and should also give a slight speed
boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
now the fluid calculations are also done using the selected integration method, so there
are again more choices in effecting simulation accuracy and stability. This change also
included a nice cleanup of the whole particle integration code.
As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
2011-03-12 12:38:11 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_FAC_REPULSION);
|
|
|
|
RNA_def_property_ui_text(prop, "Factor Repulsion", "Repulsion is a factor of stiffness");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2013-04-23 07:06:29 +00:00
|
|
|
prop = RNA_def_property(srna, "use_factor_density", PROP_BOOLEAN, PROP_NONE);
|
Completely refactored sph fluid particles. Only the very core of the algorithm remains
the same, but big changes have happened both on the outside and on the inside.
New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
from a users point of view. Now there are only a few intuitive basic parameters that
define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
density and spring rest lengths so that it's easy to get stable simulations by simply
emitting particles for a few frames and adjusting the particle size (easy when the
particle size is drawn) so that the fluid appears continuous (particles are touching
eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
problem to solve with particle based fluid simulation so some compromises have to be
made. So the bigger the stiffness parameter is the less the fluid will compress under
stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
smooth out instabilities, so less viscous fluids again need more substeps to remain
stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
gravity, and high pressure areas start to come down.
* In addition to these basic parameters there are separate advanced parameters that can
either be tweaked relative to the basic parameters (or particle size) or defined
independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
can lead to small clumps of particles, so the repulsion keeps the particles better
separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to
eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
densely next to eachother.
** Spring rest length - by default this is 2 * particle size.
* There are also new options for 3d view particle coloring in the display panel to show
particle velocity and acceleration. These make it easier to see what's happening in the
fluid simulations, but can of course be used with other particles as well.
* Viscoelastic springs have some new options too. The plasticity can now be set to much
higher values for instant deletion of springs as the elastic limit is exeeded. In addition
to that there is an option to only create springs for a certain number of frames when a
particle is born. These options give new possibilities for breaking viscoelastic fluids.
New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree
implementation makes the code quite a bit cleaner and should also give a slight speed
boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
now the fluid calculations are also done using the selected integration method, so there
are again more choices in effecting simulation accuracy and stability. This change also
included a nice cleanup of the whole particle integration code.
As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
2011-03-12 12:38:11 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_FAC_DENSITY);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Factor Density",
|
|
|
|
"Density is calculated as a factor of default density (depends on particle size)");
|
Completely refactored sph fluid particles. Only the very core of the algorithm remains
the same, but big changes have happened both on the outside and on the inside.
New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
from a users point of view. Now there are only a few intuitive basic parameters that
define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
density and spring rest lengths so that it's easy to get stable simulations by simply
emitting particles for a few frames and adjusting the particle size (easy when the
particle size is drawn) so that the fluid appears continuous (particles are touching
eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
problem to solve with particle based fluid simulation so some compromises have to be
made. So the bigger the stiffness parameter is the less the fluid will compress under
stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
smooth out instabilities, so less viscous fluids again need more substeps to remain
stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
gravity, and high pressure areas start to come down.
* In addition to these basic parameters there are separate advanced parameters that can
either be tweaked relative to the basic parameters (or particle size) or defined
independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
can lead to small clumps of particles, so the repulsion keeps the particles better
separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to
eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
densely next to eachother.
** Spring rest length - by default this is 2 * particle size.
* There are also new options for 3d view particle coloring in the display panel to show
particle velocity and acceleration. These make it easier to see what's happening in the
fluid simulations, but can of course be used with other particles as well.
* Viscoelastic springs have some new options too. The plasticity can now be set to much
higher values for instant deletion of springs as the elastic limit is exeeded. In addition
to that there is an option to only create springs for a certain number of frames when a
particle is born. These options give new possibilities for breaking viscoelastic fluids.
New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree
implementation makes the code quite a bit cleaner and should also give a slight speed
boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
now the fluid calculations are also done using the selected integration method, so there
are again more choices in effecting simulation accuracy and stability. This change also
included a nice cleanup of the whole particle integration code.
As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
2011-03-12 12:38:11 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "factor_radius", PROP_BOOLEAN, PROP_NONE);
|
Completely refactored sph fluid particles. Only the very core of the algorithm remains
the same, but big changes have happened both on the outside and on the inside.
New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
from a users point of view. Now there are only a few intuitive basic parameters that
define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
density and spring rest lengths so that it's easy to get stable simulations by simply
emitting particles for a few frames and adjusting the particle size (easy when the
particle size is drawn) so that the fluid appears continuous (particles are touching
eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
problem to solve with particle based fluid simulation so some compromises have to be
made. So the bigger the stiffness parameter is the less the fluid will compress under
stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
smooth out instabilities, so less viscous fluids again need more substeps to remain
stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
gravity, and high pressure areas start to come down.
* In addition to these basic parameters there are separate advanced parameters that can
either be tweaked relative to the basic parameters (or particle size) or defined
independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
can lead to small clumps of particles, so the repulsion keeps the particles better
separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to
eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
densely next to eachother.
** Spring rest length - by default this is 2 * particle size.
* There are also new options for 3d view particle coloring in the display panel to show
particle velocity and acceleration. These make it easier to see what's happening in the
fluid simulations, but can of course be used with other particles as well.
* Viscoelastic springs have some new options too. The plasticity can now be set to much
higher values for instant deletion of springs as the elastic limit is exeeded. In addition
to that there is an option to only create springs for a certain number of frames when a
particle is born. These options give new possibilities for breaking viscoelastic fluids.
New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree
implementation makes the code quite a bit cleaner and should also give a slight speed
boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
now the fluid calculations are also done using the selected integration method, so there
are again more choices in effecting simulation accuracy and stability. This change also
included a nice cleanup of the whole particle integration code.
As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
2011-03-12 12:38:11 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_FAC_RADIUS);
|
|
|
|
RNA_def_property_ui_text(prop, "Factor Radius", "Interaction radius is a factor of 4 * particle size");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "factor_stiff_viscosity", PROP_BOOLEAN, PROP_NONE);
|
Completely refactored sph fluid particles. Only the very core of the algorithm remains
the same, but big changes have happened both on the outside and on the inside.
New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
from a users point of view. Now there are only a few intuitive basic parameters that
define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
density and spring rest lengths so that it's easy to get stable simulations by simply
emitting particles for a few frames and adjusting the particle size (easy when the
particle size is drawn) so that the fluid appears continuous (particles are touching
eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
problem to solve with particle based fluid simulation so some compromises have to be
made. So the bigger the stiffness parameter is the less the fluid will compress under
stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
smooth out instabilities, so less viscous fluids again need more substeps to remain
stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
gravity, and high pressure areas start to come down.
* In addition to these basic parameters there are separate advanced parameters that can
either be tweaked relative to the basic parameters (or particle size) or defined
independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
can lead to small clumps of particles, so the repulsion keeps the particles better
separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to
eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
densely next to eachother.
** Spring rest length - by default this is 2 * particle size.
* There are also new options for 3d view particle coloring in the display panel to show
particle velocity and acceleration. These make it easier to see what's happening in the
fluid simulations, but can of course be used with other particles as well.
* Viscoelastic springs have some new options too. The plasticity can now be set to much
higher values for instant deletion of springs as the elastic limit is exeeded. In addition
to that there is an option to only create springs for a certain number of frames when a
particle is born. These options give new possibilities for breaking viscoelastic fluids.
New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree
implementation makes the code quite a bit cleaner and should also give a slight speed
boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
now the fluid calculations are also done using the selected integration method, so there
are again more choices in effecting simulation accuracy and stability. This change also
included a nice cleanup of the whole particle integration code.
As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
2011-03-12 12:38:11 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_FAC_VISCOSITY);
|
|
|
|
RNA_def_property_ui_text(prop, "Factor Stiff Viscosity", "Stiff viscosity is a factor of normal viscosity");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "factor_rest_length", PROP_BOOLEAN, PROP_NONE);
|
Completely refactored sph fluid particles. Only the very core of the algorithm remains
the same, but big changes have happened both on the outside and on the inside.
New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
from a users point of view. Now there are only a few intuitive basic parameters that
define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
density and spring rest lengths so that it's easy to get stable simulations by simply
emitting particles for a few frames and adjusting the particle size (easy when the
particle size is drawn) so that the fluid appears continuous (particles are touching
eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
problem to solve with particle based fluid simulation so some compromises have to be
made. So the bigger the stiffness parameter is the less the fluid will compress under
stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
smooth out instabilities, so less viscous fluids again need more substeps to remain
stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
gravity, and high pressure areas start to come down.
* In addition to these basic parameters there are separate advanced parameters that can
either be tweaked relative to the basic parameters (or particle size) or defined
independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
can lead to small clumps of particles, so the repulsion keeps the particles better
separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to
eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
densely next to eachother.
** Spring rest length - by default this is 2 * particle size.
* There are also new options for 3d view particle coloring in the display panel to show
particle velocity and acceleration. These make it easier to see what's happening in the
fluid simulations, but can of course be used with other particles as well.
* Viscoelastic springs have some new options too. The plasticity can now be set to much
higher values for instant deletion of springs as the elastic limit is exeeded. In addition
to that there is an option to only create springs for a certain number of frames when a
particle is born. These options give new possibilities for breaking viscoelastic fluids.
New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree
implementation makes the code quite a bit cleaner and should also give a slight speed
boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
now the fluid calculations are also done using the selected integration method, so there
are again more choices in effecting simulation accuracy and stability. This change also
included a nice cleanup of the whole particle integration code.
As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
2011-03-12 12:38:11 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_FAC_REST_LENGTH);
|
|
|
|
RNA_def_property_ui_text(prop, "Factor Rest Length", "Spring rest length is a factor of 2 * particle size");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2010-04-04 12:29:06 +00:00
|
|
|
}
|
|
|
|
|
2011-02-12 14:38:34 +00:00
|
|
|
static void rna_def_particle_settings_mtex(BlenderRNA *brna)
|
|
|
|
{
|
|
|
|
StructRNA *srna;
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
static EnumPropertyItem texco_items[] = {
|
2011-12-04 17:36:13 +00:00
|
|
|
{TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates"},
|
|
|
|
{TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"},
|
|
|
|
{TEXCO_UV, "UV", 0, "UV", "Use UV coordinates for texture coordinates"},
|
|
|
|
{TEXCO_ORCO, "ORCO", 0, "Generated", "Use the original undeformed coordinates of the object"},
|
2012-03-18 09:27:36 +00:00
|
|
|
{TEXCO_STRAND, "STRAND", 0, "Strand / Particle",
|
|
|
|
"Use normalized strand texture coordinate (1D) or particle age (X) and trail position (Y)"},
|
2012-05-12 11:01:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
2011-02-12 14:38:34 +00:00
|
|
|
|
|
|
|
static EnumPropertyItem prop_mapping_items[] = {
|
2011-12-04 17:36:13 +00:00
|
|
|
{MTEX_FLAT, "FLAT", 0, "Flat", "Map X and Y coordinates directly"},
|
|
|
|
{MTEX_CUBE, "CUBE", 0, "Cube", "Map using the normal vector"},
|
|
|
|
{MTEX_TUBE, "TUBE", 0, "Tube", "Map with Z as central axis"},
|
|
|
|
{MTEX_SPHERE, "SPHERE", 0, "Sphere", "Map with Z as central axis"},
|
2012-05-12 11:01:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
2011-02-12 14:38:34 +00:00
|
|
|
|
|
|
|
static EnumPropertyItem prop_x_mapping_items[] = {
|
|
|
|
{0, "NONE", 0, "None", ""},
|
|
|
|
{1, "X", 0, "X", ""},
|
|
|
|
{2, "Y", 0, "Y", ""},
|
|
|
|
{3, "Z", 0, "Z", ""},
|
2012-05-12 11:01:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
2011-02-12 14:38:34 +00:00
|
|
|
|
|
|
|
static EnumPropertyItem prop_y_mapping_items[] = {
|
|
|
|
{0, "NONE", 0, "None", ""},
|
|
|
|
{1, "X", 0, "X", ""},
|
|
|
|
{2, "Y", 0, "Y", ""},
|
|
|
|
{3, "Z", 0, "Z", ""},
|
2012-05-12 11:01:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
2011-02-12 14:38:34 +00:00
|
|
|
|
|
|
|
static EnumPropertyItem prop_z_mapping_items[] = {
|
|
|
|
{0, "NONE", 0, "None", ""},
|
|
|
|
{1, "X", 0, "X", ""},
|
|
|
|
{2, "Y", 0, "Y", ""},
|
|
|
|
{3, "Z", 0, "Z", ""},
|
2012-05-12 11:01:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
2011-02-12 14:38:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "ParticleSettingsTextureSlot", "TextureSlot");
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_struct_sdna(srna, "MTex");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Particle Settings Texture Slot",
|
|
|
|
"Texture slot for textures in a Particle Settings datablock");
|
2011-02-12 14:38:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "texco");
|
|
|
|
RNA_def_property_enum_items(prop, texco_items);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Texture Coordinates",
|
|
|
|
"Texture coordinates used to map the texture onto the background");
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "object");
|
|
|
|
RNA_def_property_struct_type(prop, "Object");
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
|
|
|
RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "uvname");
|
2011-11-23 17:25:25 +00:00
|
|
|
RNA_def_property_ui_text(prop, "UV Map", "UV map to use for mapping with UV texture coordinates");
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "mapping_x", PROP_ENUM, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "projx");
|
|
|
|
RNA_def_property_enum_items(prop, prop_x_mapping_items);
|
|
|
|
RNA_def_property_ui_text(prop, "X Mapping", "");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "mapping_y", PROP_ENUM, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "projy");
|
|
|
|
RNA_def_property_enum_items(prop, prop_y_mapping_items);
|
|
|
|
RNA_def_property_ui_text(prop, "Y Mapping", "");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "mapping_z", PROP_ENUM, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "projz");
|
|
|
|
RNA_def_property_enum_items(prop, prop_z_mapping_items);
|
|
|
|
RNA_def_property_ui_text(prop, "Z Mapping", "");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_enum_items(prop, prop_mapping_items);
|
|
|
|
RNA_def_property_ui_text(prop, "Mapping", "");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
|
|
|
/* map to */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_map_time", PROP_BOOLEAN, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_TIME);
|
|
|
|
RNA_def_property_ui_text(prop, "Emission Time", "Affect the emission time of the particles");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_map_life", PROP_BOOLEAN, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_LIFE);
|
|
|
|
RNA_def_property_ui_text(prop, "Life Time", "Affect the life time of the particles");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_map_density", PROP_BOOLEAN, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_DENS);
|
|
|
|
RNA_def_property_ui_text(prop, "Density", "Affect the density of the particles");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_map_size", PROP_BOOLEAN, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_SIZE);
|
|
|
|
RNA_def_property_ui_text(prop, "Size", "Affect the particle size");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_map_velocity", PROP_BOOLEAN, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_IVEL);
|
|
|
|
RNA_def_property_ui_text(prop, "Initial Velocity", "Affect the particle initial velocity");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_map_field", PROP_BOOLEAN, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_FIELD);
|
|
|
|
RNA_def_property_ui_text(prop, "Force Field", "Affect the particle force fields");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_map_gravity", PROP_BOOLEAN, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_GRAVITY);
|
|
|
|
RNA_def_property_ui_text(prop, "Gravity", "Affect the particle gravity");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_map_damp", PROP_BOOLEAN, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_DAMP);
|
|
|
|
RNA_def_property_ui_text(prop, "Damp", "Affect the particle velocity damping");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_map_clump", PROP_BOOLEAN, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_CLUMP);
|
|
|
|
RNA_def_property_ui_text(prop, "Clump", "Affect the child clumping");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_map_kink", PROP_BOOLEAN, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_KINK);
|
|
|
|
RNA_def_property_ui_text(prop, "Kink", "Affect the child kink");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_map_rough", PROP_BOOLEAN, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_ROUGH);
|
|
|
|
RNA_def_property_ui_text(prop, "Rough", "Affect the child rough");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_map_length", PROP_BOOLEAN, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_LENGTH);
|
|
|
|
RNA_def_property_ui_text(prop, "Length", "Affect the child hair length");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
|
|
|
|
|
|
|
|
|
|
|
/* influence factors */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "time_factor", PROP_FLOAT, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "timefac");
|
|
|
|
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
|
|
|
|
RNA_def_property_ui_text(prop, "Emission Time Factor", "Amount texture affects particle emission time");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "life_factor", PROP_FLOAT, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "lifefac");
|
|
|
|
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
|
|
|
|
RNA_def_property_ui_text(prop, "Life Time Factor", "Amount texture affects particle life time");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "density_factor", PROP_FLOAT, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "padensfac");
|
|
|
|
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
|
|
|
|
RNA_def_property_ui_text(prop, "Density Factor", "Amount texture affects particle density");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "size_factor", PROP_FLOAT, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "sizefac");
|
|
|
|
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
|
|
|
|
RNA_def_property_ui_text(prop, "Size Factor", "Amount texture affects physical particle size");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "velocity_factor", PROP_FLOAT, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "ivelfac");
|
|
|
|
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
|
|
|
|
RNA_def_property_ui_text(prop, "Velocity Factor", "Amount texture affects particle initial velocity");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "field_factor", PROP_FLOAT, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "fieldfac");
|
|
|
|
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
|
|
|
|
RNA_def_property_ui_text(prop, "Field Factor", "Amount texture affects particle force fields");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "gravity_factor", PROP_FLOAT, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "gravityfac");
|
|
|
|
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
|
|
|
|
RNA_def_property_ui_text(prop, "Gravity Factor", "Amount texture affects particle gravity");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "damp_factor", PROP_FLOAT, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "dampfac");
|
|
|
|
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
|
|
|
|
RNA_def_property_ui_text(prop, "Damp Factor", "Amount texture affects particle damping");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "length_factor", PROP_FLOAT, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "lengthfac");
|
|
|
|
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
|
|
|
|
RNA_def_property_ui_text(prop, "Length Factor", "Amount texture affects child hair length");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "clump_factor", PROP_FLOAT, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "clumpfac");
|
|
|
|
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
|
|
|
|
RNA_def_property_ui_text(prop, "Clump Factor", "Amount texture affects child clump");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "kink_factor", PROP_FLOAT, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "kinkfac");
|
|
|
|
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
|
|
|
|
RNA_def_property_ui_text(prop, "Kink Factor", "Amount texture affects child kink");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "rough_factor", PROP_FLOAT, PROP_NONE);
|
2011-02-12 14:38:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "roughfac");
|
|
|
|
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
|
|
|
|
RNA_def_property_ui_text(prop, "Rough Factor", "Amount texture affects child roughness");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
|
|
|
}
|
|
|
|
|
2009-03-26 13:56:32 +00:00
|
|
|
static void rna_def_particle_settings(BlenderRNA *brna)
|
2009-01-02 13:47:33 +00:00
|
|
|
{
|
|
|
|
StructRNA *srna;
|
2009-02-17 21:07:01 +00:00
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
static EnumPropertyItem type_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{PART_EMITTER, "EMITTER", 0, "Emitter", ""},
|
2012-03-05 23:30:41 +00:00
|
|
|
/*{PART_REACTOR, "REACTOR", 0, "Reactor", ""}, */
|
2009-06-16 00:52:21 +00:00
|
|
|
{PART_HAIR, "HAIR", 0, "Hair", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
2009-02-17 21:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static EnumPropertyItem phys_type_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{PART_PHYS_NO, "NO", 0, "No", ""},
|
|
|
|
{PART_PHYS_NEWTON, "NEWTON", 0, "Newtonian", ""},
|
|
|
|
{PART_PHYS_KEYED, "KEYED", 0, "Keyed", ""},
|
|
|
|
{PART_PHYS_BOIDS, "BOIDS", 0, "Boids", ""},
|
2010-04-04 12:29:06 +00:00
|
|
|
{PART_PHYS_FLUID, "FLUID", 0, "Fluid", ""},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
2009-02-17 21:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static EnumPropertyItem rot_mode_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, "NONE", 0, "None", ""},
|
|
|
|
{PART_ROT_NOR, "NOR", 0, "Normal", ""},
|
2013-07-14 10:57:43 +00:00
|
|
|
{PART_ROT_NOR_TAN, "NOR_TAN", 0, "Normal-Tangent", ""},
|
2011-10-16 16:14:36 +00:00
|
|
|
{PART_ROT_VEL, "VEL", 0, "Velocity / Hair", ""},
|
2009-06-16 00:52:21 +00:00
|
|
|
{PART_ROT_GLOB_X, "GLOB_X", 0, "Global X", ""},
|
|
|
|
{PART_ROT_GLOB_Y, "GLOB_Y", 0, "Global Y", ""},
|
|
|
|
{PART_ROT_GLOB_Z, "GLOB_Z", 0, "Global Z", ""},
|
|
|
|
{PART_ROT_OB_X, "OB_X", 0, "Object X", ""},
|
|
|
|
{PART_ROT_OB_Y, "OB_Y", 0, "Object Y", ""},
|
|
|
|
{PART_ROT_OB_Z, "OB_Z", 0, "Object Z", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
2009-02-17 21:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static EnumPropertyItem ave_mode_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, "NONE", 0, "None", ""},
|
2012-03-20 01:00:28 +00:00
|
|
|
{PART_AVE_VELOCITY, "VELOCITY", 0, "Velocity", ""},
|
|
|
|
{PART_AVE_HORIZONTAL, "HORIZONTAL", 0, "Horizontal", ""},
|
|
|
|
{PART_AVE_VERTICAL, "VERTICAL", 0, "Vertical", ""},
|
|
|
|
{PART_AVE_GLOBAL_X, "GLOBAL_X", 0, "Global X", ""},
|
|
|
|
{PART_AVE_GLOBAL_Y, "GLOBAL_Y", 0, "Global Y", ""},
|
|
|
|
{PART_AVE_GLOBAL_Z, "GLOBAL_Z", 0, "Global Z", ""},
|
2012-04-29 15:47:02 +00:00
|
|
|
{PART_AVE_RAND, "RAND", 0, "Random", ""},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
2009-02-17 21:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static EnumPropertyItem react_event_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{PART_EVENT_DEATH, "DEATH", 0, "Death", ""},
|
|
|
|
{PART_EVENT_COLLIDE, "COLLIDE", 0, "Collision", ""},
|
|
|
|
{PART_EVENT_NEAR, "NEAR", 0, "Near", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
2009-02-17 21:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static EnumPropertyItem child_type_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, "NONE", 0, "None", ""},
|
2011-01-07 11:24:34 +00:00
|
|
|
{PART_CHILD_PARTICLES, "SIMPLE", 0, "Simple", ""},
|
|
|
|
{PART_CHILD_FACES, "INTERPOLATED", 0, "Interpolated", ""},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
2009-02-17 21:07:01 +00:00
|
|
|
};
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
/*TODO: names, tooltips */
|
2009-02-17 21:07:01 +00:00
|
|
|
static EnumPropertyItem integrator_type_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{PART_INT_EULER, "EULER", 0, "Euler", ""},
|
2009-11-25 17:46:10 +00:00
|
|
|
{PART_INT_VERLET, "VERLET", 0, "Verlet", ""},
|
2009-06-16 00:52:21 +00:00
|
|
|
{PART_INT_MIDPOINT, "MIDPOINT", 0, "Midpoint", ""},
|
|
|
|
{PART_INT_RK4, "RK4", 0, "RK4", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
2009-02-17 21:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static EnumPropertyItem kink_type_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{PART_KINK_NO, "NO", 0, "Nothing", ""},
|
|
|
|
{PART_KINK_CURL, "CURL", 0, "Curl", ""},
|
|
|
|
{PART_KINK_RADIAL, "RADIAL", 0, "Radial", ""},
|
|
|
|
{PART_KINK_WAVE, "WAVE", 0, "Wave", ""},
|
|
|
|
{PART_KINK_BRAID, "BRAID", 0, "Braid", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
2009-02-17 21:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static EnumPropertyItem kink_axis_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, "X", 0, "X", ""},
|
|
|
|
{1, "Y", 0, "Y", ""},
|
|
|
|
{2, "Z", 0, "Z", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
2009-02-17 21:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static EnumPropertyItem bb_align_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{PART_BB_X, "X", 0, "X", ""},
|
|
|
|
{PART_BB_Y, "Y", 0, "Y", ""},
|
|
|
|
{PART_BB_Z, "Z", 0, "Z", ""},
|
|
|
|
{PART_BB_VIEW, "VIEW", 0, "View", ""},
|
|
|
|
{PART_BB_VEL, "VEL", 0, "Velocity", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
2009-02-17 21:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static EnumPropertyItem bb_anim_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{PART_BB_ANIM_NONE, "NONE", 0, "None", ""},
|
2011-02-12 23:25:03 +00:00
|
|
|
{PART_BB_ANIM_AGE, "AGE", 0, "Age", ""},
|
|
|
|
{PART_BB_ANIM_FRAME, "FRAME", 0, "Frame", ""},
|
2009-06-16 00:52:21 +00:00
|
|
|
{PART_BB_ANIM_ANGLE, "ANGLE", 0, "Angle", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
2009-02-17 21:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static EnumPropertyItem bb_split_offset_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{PART_BB_OFF_NONE, "NONE", 0, "None", ""},
|
|
|
|
{PART_BB_OFF_LINEAR, "LINEAR", 0, "Linear", ""},
|
|
|
|
{PART_BB_OFF_RANDOM, "RANDOM", 0, "Random", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
2009-02-17 21:07:01 +00:00
|
|
|
};
|
2009-01-02 13:47:33 +00:00
|
|
|
|
Completely refactored sph fluid particles. Only the very core of the algorithm remains
the same, but big changes have happened both on the outside and on the inside.
New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
from a users point of view. Now there are only a few intuitive basic parameters that
define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
density and spring rest lengths so that it's easy to get stable simulations by simply
emitting particles for a few frames and adjusting the particle size (easy when the
particle size is drawn) so that the fluid appears continuous (particles are touching
eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
problem to solve with particle based fluid simulation so some compromises have to be
made. So the bigger the stiffness parameter is the less the fluid will compress under
stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
smooth out instabilities, so less viscous fluids again need more substeps to remain
stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
gravity, and high pressure areas start to come down.
* In addition to these basic parameters there are separate advanced parameters that can
either be tweaked relative to the basic parameters (or particle size) or defined
independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
can lead to small clumps of particles, so the repulsion keeps the particles better
separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to
eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
densely next to eachother.
** Spring rest length - by default this is 2 * particle size.
* There are also new options for 3d view particle coloring in the display panel to show
particle velocity and acceleration. These make it easier to see what's happening in the
fluid simulations, but can of course be used with other particles as well.
* Viscoelastic springs have some new options too. The plasticity can now be set to much
higher values for instant deletion of springs as the elastic limit is exeeded. In addition
to that there is an option to only create springs for a certain number of frames when a
particle is born. These options give new possibilities for breaking viscoelastic fluids.
New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree
implementation makes the code quite a bit cleaner and should also give a slight speed
boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
now the fluid calculations are also done using the selected integration method, so there
are again more choices in effecting simulation accuracy and stability. This change also
included a nice cleanup of the whole particle integration code.
As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
2011-03-12 12:38:11 +00:00
|
|
|
static EnumPropertyItem draw_col_items[] = {
|
|
|
|
{PART_DRAW_COL_NONE, "NONE", 0, "None", ""},
|
|
|
|
{PART_DRAW_COL_MAT, "MATERIAL", 0, "Material", ""},
|
|
|
|
{PART_DRAW_COL_VEL, "VELOCITY", 0, "Velocity", ""},
|
|
|
|
{PART_DRAW_COL_ACC, "ACCELERATION", 0, "Acceleration", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2013-12-07 01:51:44 +01:00
|
|
|
static EnumPropertyItem part_mat_items[] = {
|
|
|
|
{0, "DUMMY", 0, "Dummy", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "ParticleSettings", "ID");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Particle Settings", "Particle settings, reusable by multiple particle systems");
|
2009-06-03 23:16:51 +00:00
|
|
|
RNA_def_struct_ui_icon(srna, ICON_PARTICLE_DATA);
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2011-02-12 14:38:34 +00:00
|
|
|
rna_def_mtex_common(brna, srna, "rna_ParticleSettings_mtex_begin", "rna_ParticleSettings_active_texture_get",
|
2012-03-18 09:27:36 +00:00
|
|
|
"rna_ParticleSettings_active_texture_set", NULL, "ParticleSettingsTextureSlot",
|
|
|
|
"ParticleSettingsTextureSlots", "rna_Particle_reset");
|
2011-02-12 14:38:34 +00:00
|
|
|
|
2011-01-22 20:38:27 +00:00
|
|
|
/* fluid particle type can't be checked from the type value in rna as it's not shown in the menu */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "is_fluid", PROP_BOOLEAN, PROP_NONE);
|
2011-01-22 20:38:27 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_PartSettings_is_fluid_get", NULL);
|
|
|
|
RNA_def_property_ui_text(prop, "Fluid", "Particles were created by a fluid simulation");
|
|
|
|
|
2009-02-17 21:07:01 +00:00
|
|
|
/* flag */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_react_start_end", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_REACT_STA_END);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Start/End", "Give birth to unreacted particles eventually");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_react_multiple", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_REACT_MULTIPLE);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Multi React", "React multiple times");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "regrow_hair", PROP_BOOLEAN, PROP_NONE);
|
2010-12-13 10:45:24 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_HAIR_REGROW);
|
|
|
|
RNA_def_property_ui_text(prop, "Regrow", "Regrow hair for each frame");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "show_unborn", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_UNBORN);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Unborn", "Show particles before they are emitted");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_dead", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_DIED);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Died", "Show particles after they have died");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_emit_random", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_TRAND);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Random", "Emit in random order of elements");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_even_distribution", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_EDISTR);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Even Distribution",
|
|
|
|
"Use even distribution from faces based on face areas or edge lengths");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-09-04 23:06:15 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_die_on_collision", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_DIE_ON_COL);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Die on hit", "Particles die when they collide with a deflector object");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_size_deflect", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SIZE_DEFL);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Size Deflect", "Use particle's size in deflection");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-18 21:33:00 +00:00
|
|
|
prop = RNA_def_property(srna, "use_rotations", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_ROTATIONS);
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
|
|
|
RNA_def_property_ui_text(prop, "Rotations", "Calculate particle rotations");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_dynamic_rotation", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_ROT_DYN);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-03-20 01:00:28 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Dynamic", "Particle rotations are effected by collisions and effectors");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_multiply_size_mass", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SIZEMASS);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Mass from Size", "Multiply mass by particle size");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_advanced_hair", PROP_BOOLEAN, PROP_NONE);
|
2011-02-07 11:43:33 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", PART_HIDE_ADVANCED_HAIR);
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
|
|
|
RNA_def_property_ui_text(prop, "Advanced", "Use full physics calculations for growing hair");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "lock_boids_to_surface", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_BOIDS_2D);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Boids 2D", "Constrain boids to a surface");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_hair_bspline", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_HAIR_BSPLINE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "B-Spline", "Interpolate hair using B-Splines");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_grid", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_GRID_INVERT);
|
2011-02-04 15:48:13 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Invert Grid", "Invert what is considered object and what is not");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "hexagonal_grid", PROP_BOOLEAN, PROP_NONE);
|
2011-02-13 13:50:19 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_GRID_HEXAGONAL);
|
|
|
|
RNA_def_property_ui_text(prop, "Hexagonal Grid", "Create the grid in a hexagonal pattern");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "apply_effector_to_children", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_EFFECT);
|
2011-02-07 11:43:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Effect Children", "Apply effectors to children");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "create_long_hair_children", PROP_BOOLEAN, PROP_NONE);
|
2011-01-07 11:24:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_LONG_HAIR);
|
|
|
|
RNA_def_property_ui_text(prop, "Long Hair", "Calculate children that suit long hair well");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "apply_guide_to_children", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_GUIDE);
|
2010-08-20 06:09:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "apply_guide_to_children", "");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_self_effect", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SELF_EFFECT);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Self Effect", "Particle effectors effect themselves");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_items(prop, type_items);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2011-05-15 17:59:48 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Type", "Particle Type");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_change_type");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "emit_from", PROP_ENUM, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "from");
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
RNA_def_property_enum_items(prop, part_reactor_from_items);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-06-05 23:59:33 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_from_itemf");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Emit From", "Where to emit particles from");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "distribution", PROP_ENUM, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "distr");
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2011-03-09 14:18:33 +00:00
|
|
|
RNA_def_property_enum_items(prop, part_dist_items);
|
|
|
|
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_dist_itemf");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Distribution", "How to distribute particles on selected element");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
|
|
|
/* physics modes */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "physics_type", PROP_ENUM, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "phystype");
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_items(prop, phys_type_items);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Physics Type", "Particle physics type");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_change_physics");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "rotmode");
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_items(prop, rot_mode_items);
|
2012-04-15 13:41:07 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Orientation axis",
|
|
|
|
"Particle orientation axis (does not affect Explode modifier's results)");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "angular_velocity_mode", PROP_ENUM, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "avemode");
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_items(prop, ave_mode_items);
|
2012-03-20 01:00:28 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Angular Velocity Axis", "What axis is used to change particle rotation with time");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "react_event", PROP_ENUM, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "reactevent");
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_items(prop, react_event_items);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "React On", "The event of target particles to react on");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
|
|
|
/*draw flag*/
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "show_velocity", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_VEL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Velocity", "Show particle velocity");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "show_size", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_SIZE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Size", "Show particle size");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_render_emitter", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_EMITTER);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Emitter", "Render emitter Object also");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "show_health", PROP_BOOLEAN, PROP_NONE);
|
2009-07-20 23:52:53 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_HEALTH);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Health", "Draw boid health");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_absolute_path_time", PROP_BOOLEAN, PROP_NONE);
|
2009-07-04 03:50:12 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_ABS_PATH_TIME);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Absolute Path Time", "Path timing is in absolute frames");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_abspathtime_update");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_parent_particles", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_PARENT);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Parents", "Render parent particles");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "show_number", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_NUM);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Number", "Show particle number");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_group_pick_random", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_RAND_GR);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Pick Random", "Pick objects from group randomly");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_group_count", PROP_BOOLEAN, PROP_NONE);
|
2009-10-05 13:25:56 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_COUNT_GR);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Count", "Use object multiple times in the same group");
|
2009-10-05 13:25:56 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_global_dupli", PROP_BOOLEAN, PROP_NONE);
|
2009-10-05 13:25:56 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_GLOBAL_OB);
|
2011-10-16 16:14:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Global", "Use object's global coordinates for duplication");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_rotation_dupli", PROP_BOOLEAN, PROP_NONE);
|
2011-10-16 16:14:36 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_ROTATE_OB);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Rotation",
|
|
|
|
"Use object's rotation for duplication (global x-axis is aligned "
|
|
|
|
"particle rotation axis)");
|
2009-10-05 13:25:56 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
|
|
|
|
2012-08-22 13:10:43 +00:00
|
|
|
prop = RNA_def_property(srna, "use_scale_dupli", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "draw", PART_DRAW_NO_SCALE_OB);
|
|
|
|
RNA_def_property_ui_text(prop, "Scale", "Use object's scale for duplication");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_render_adaptive", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_REN_ADAPT);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Adaptive render", "Draw steps of the particle path");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_velocity_length", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_VEL_LENGTH);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Speed", "Multiply line length by particle speed");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_whole_group", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_WHOLE_GR);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Whole Group", "Use whole group at once");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_strand_primitive", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_REN_STRAND);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Strand render", "Use the strand primitive for rendering");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "draw_method", PROP_ENUM, PROP_NONE);
|
2009-06-05 23:59:33 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "draw_as");
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
RNA_def_property_enum_items(prop, part_draw_as_items);
|
2009-06-05 23:59:33 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_draw_as_itemf");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Particle Drawing", "How particles are drawn in viewport");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-06-05 23:59:33 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "render_type", PROP_ENUM, PROP_NONE);
|
2009-06-05 23:59:33 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "ren_as");
|
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
|
|
|
RNA_def_property_enum_items(prop, part_ren_as_items);
|
2009-06-05 23:59:33 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_ren_as_itemf");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Particle Rendering", "How particles are rendered");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "draw_color", PROP_ENUM, PROP_NONE);
|
Completely refactored sph fluid particles. Only the very core of the algorithm remains
the same, but big changes have happened both on the outside and on the inside.
New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
from a users point of view. Now there are only a few intuitive basic parameters that
define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
density and spring rest lengths so that it's easy to get stable simulations by simply
emitting particles for a few frames and adjusting the particle size (easy when the
particle size is drawn) so that the fluid appears continuous (particles are touching
eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
problem to solve with particle based fluid simulation so some compromises have to be
made. So the bigger the stiffness parameter is the less the fluid will compress under
stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
smooth out instabilities, so less viscous fluids again need more substeps to remain
stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
gravity, and high pressure areas start to come down.
* In addition to these basic parameters there are separate advanced parameters that can
either be tweaked relative to the basic parameters (or particle size) or defined
independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
can lead to small clumps of particles, so the repulsion keeps the particles better
separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to
eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
densely next to eachother.
** Spring rest length - by default this is 2 * particle size.
* There are also new options for 3d view particle coloring in the display panel to show
particle velocity and acceleration. These make it easier to see what's happening in the
fluid simulations, but can of course be used with other particles as well.
* Viscoelastic springs have some new options too. The plasticity can now be set to much
higher values for instant deletion of springs as the elastic limit is exeeded. In addition
to that there is an option to only create springs for a certain number of frames when a
particle is born. These options give new possibilities for breaking viscoelastic fluids.
New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree
implementation makes the code quite a bit cleaner and should also give a slight speed
boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
now the fluid calculations are also done using the selected integration method, so there
are again more choices in effecting simulation accuracy and stability. This change also
included a nice cleanup of the whole particle integration code.
As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
2011-03-12 12:38:11 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "draw_col");
|
|
|
|
RNA_def_property_enum_items(prop, draw_col_items);
|
|
|
|
RNA_def_property_ui_text(prop, "Draw Color", "Draw additional particle data as a color");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
|
|
|
|
2013-12-13 04:39:15 +11:00
|
|
|
prop = RNA_def_property(srna, "draw_size", PROP_INT, PROP_PIXEL);
|
2010-02-10 01:54:32 +00:00
|
|
|
RNA_def_property_range(prop, 0, 1000);
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 100, 1, -1);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Draw Size", "Size of particles on viewport in pixels (0=default)");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "child_type", PROP_ENUM, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "childtype");
|
|
|
|
RNA_def_property_enum_items(prop, child_type_items);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Children From", "Create child particles");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "draw_step", PROP_INT, PROP_NONE);
|
2011-05-16 20:48:14 +00:00
|
|
|
RNA_def_property_range(prop, 0, 10);
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 7, 1, -1);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Steps", "How many steps paths are drawn with (power of 2)");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "render_step", PROP_INT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "ren_step");
|
2011-05-16 20:48:14 +00:00
|
|
|
RNA_def_property_range(prop, 0, 20);
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 9, 1, -1);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Render", "How many steps paths are rendered with (power of 2)");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "hair_step", PROP_INT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_range(prop, 2, 50);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Segments", "Number of hair segments");
|
2013-05-16 00:07:01 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-06-05 23:59:33 +00:00
|
|
|
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
/*TODO: not found in UI, readonly? */
|
|
|
|
prop = RNA_def_property(srna, "keys_step", PROP_INT, PROP_NONE);
|
2012-05-12 11:01:29 +00:00
|
|
|
RNA_def_property_range(prop, 0, SHRT_MAX); /*TODO:min,max */
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Keys Step", "");
|
|
|
|
|
|
|
|
/* adaptive path rendering */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "adaptive_angle", PROP_INT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "adapt_angle");
|
|
|
|
RNA_def_property_range(prop, 0, 45);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Degrees", "How many degrees path has to curve to make another render segment");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "adaptive_pixel", PROP_INT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "adapt_pix");
|
|
|
|
RNA_def_property_range(prop, 0, 50);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Pixel", "How many pixels path has to cover to make another render segment");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2013-12-13 17:03:44 +01:00
|
|
|
prop = RNA_def_property(srna, "draw_percentage", PROP_INT, PROP_PERCENTAGE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "disp");
|
|
|
|
RNA_def_property_range(prop, 0, 100);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Display", "Percentage of particles to display in 3D view");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "material", PROP_INT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "omat");
|
2011-04-04 13:33:31 +00:00
|
|
|
RNA_def_property_range(prop, 1, 32767);
|
2013-12-07 01:51:44 +01:00
|
|
|
RNA_def_property_ui_text(prop, "Material Index", "Index of material slot used for rendering particles");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "material_slot", PROP_ENUM, PROP_NONE);
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "omat");
|
|
|
|
RNA_def_property_enum_items(prop, part_mat_items);
|
2014-01-29 16:50:37 +01:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_Material_itemf");
|
|
|
|
RNA_def_property_ui_text(prop, "Material Slot", "Material nlot used for rendering particles");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "integrator", PROP_ENUM, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_items(prop, integrator_type_items);
|
2011-11-26 12:30:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Integration",
|
|
|
|
"Algorithm used to calculate physics, from the fastest to the "
|
|
|
|
"most stable/accurate: Midpoint, Euler, Verlet, RK4 (Old)");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "kink", PROP_ENUM, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_items(prop, kink_type_items);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Kink", "Type of periodic offset on the path");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "kink_axis", PROP_ENUM, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_items(prop, kink_axis_items);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Axis", "Which axis to use for offset");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
|
|
|
/* billboards */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "lock_billboard", PROP_BOOLEAN, PROP_NONE);
|
2011-06-23 18:59:47 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_BB_LOCK);
|
|
|
|
RNA_def_property_ui_text(prop, "Lock Billboard", "Lock the billboards align axis");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "billboard_align", PROP_ENUM, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "bb_align");
|
|
|
|
RNA_def_property_enum_items(prop, bb_align_items);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Align to", "In respect to what the billboards are aligned");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "billboard_uv_split", PROP_INT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "bb_uv_split");
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, 1, 100);
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 1, 10, 1, -1);
|
2011-11-26 12:30:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "UV Split", "Number of rows/columns to split UV coordinates for billboards");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "billboard_animation", PROP_ENUM, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "bb_anim");
|
|
|
|
RNA_def_property_enum_items(prop, bb_anim_items);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Animate", "How to animate billboard textures");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "billboard_offset_split", PROP_ENUM, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "bb_split_offset");
|
|
|
|
RNA_def_property_enum_items(prop, bb_split_offset_items);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Offset", "How to offset billboard textures");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "billboard_tilt", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "bb_tilt");
|
|
|
|
RNA_def_property_range(prop, -1.0f, 1.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Tilt", "Tilt of the billboards");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "color_maximum", PROP_FLOAT, PROP_NONE);
|
Completely refactored sph fluid particles. Only the very core of the algorithm remains
the same, but big changes have happened both on the outside and on the inside.
New UI:
* The old parameters were quite true to the underlying algorithm, but were quite obscure
from a users point of view. Now there are only a few intuitive basic parameters that
define the basic fluid behavior.
** By default particle size is now used to determine the interaction radius, rest
density and spring rest lengths so that it's easy to get stable simulations by simply
emitting particles for a few frames and adjusting the particle size (easy when the
particle size is drawn) so that the fluid appears continuous (particles are touching
eachother).
** Stiffness - in reality most fluids are very incompressible, but this is a very hard
problem to solve with particle based fluid simulation so some compromises have to be
made. So the bigger the stiffness parameter is the less the fluid will compress under
stress, but the more substeps are needed for stable simulation.
** Viscosity - how much internal friction there is in the fluid. Large viscosities also
smooth out instabilities, so less viscous fluids again need more substeps to remain
stable.
** Buoancy - with high buoancy low pressure areas inside the fluid start to rise against
gravity, and high pressure areas start to come down.
* In addition to these basic parameters there are separate advanced parameters that can
either be tweaked relative to the basic parameters (or particle size) or defined
independently.
** Repulsion - the stiffness parameter tries to keep the fluid density constant, but this
can lead to small clumps of particles, so the repulsion keeps the particles better
separated.
** Stiff viscosity - the normal viscosity only applies when particles are moving closer to
eachother to allow free flowing fluids. Stiff viscosity also applies smoothing to
particles that are moving away from eachother.
** Interaction radius - by default this is 4 * particle size.
** Rest density - by default this is a density that the particles have when they're packed
densely next to eachother.
** Spring rest length - by default this is 2 * particle size.
* There are also new options for 3d view particle coloring in the display panel to show
particle velocity and acceleration. These make it easier to see what's happening in the
fluid simulations, but can of course be used with other particles as well.
* Viscoelastic springs have some new options too. The plasticity can now be set to much
higher values for instant deletion of springs as the elastic limit is exeeded. In addition
to that there is an option to only create springs for a certain number of frames when a
particle is born. These options give new possibilities for breaking viscoelastic fluids.
New in the code:
* Most of the fluids code is now thread safe, so when particle dynamics go threaded there
will be a nice speed boost to fluids as well.
* Fluids now use a bvh-tree instead of a kd-tree for the neighbor lookups. The bvh-tree
implementation makes the code quite a bit cleaner and should also give a slight speed
boost to the simulation too.
* Previously only force fields were calculated with the different integration methods, but
now the fluid calculations are also done using the selected integration method, so there
are again more choices in effecting simulation accuracy and stability. This change also
included a nice cleanup of the whole particle integration code.
As the internals are pretty stirred up old particle fluid simulations will probably not
work correctly straight away, but with some tweaking the same level of control is still
available by not using the "relative versions" of the advanced parameters (by default these
are not used when loading old files).
2011-03-12 12:38:11 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "color_vec_max");
|
|
|
|
RNA_def_property_range(prop, 0.01f, 100.0f);
|
|
|
|
RNA_def_property_ui_text(prop, "Color Maximum", "Maximum length of the particle color vector");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "billboard_tilt_random", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "bb_rand_tilt");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Random Tilt", "Random tilt of the billboards");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "billboard_offset", PROP_FLOAT, PROP_TRANSLATION);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "bb_offset");
|
|
|
|
RNA_def_property_array(prop, 2);
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, -100.0f, 100.0f);
|
|
|
|
RNA_def_property_ui_range(prop, -1.0, 1.0, 0.1, 3);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Billboard Offset", "");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "billboard_size", PROP_FLOAT, PROP_FACTOR);
|
2011-06-23 18:59:47 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "bb_size");
|
|
|
|
RNA_def_property_array(prop, 2);
|
|
|
|
RNA_def_property_range(prop, 0.001f, 10.0f);
|
|
|
|
RNA_def_property_ui_text(prop, "Billboard Scale", "Scale billboards relative to particle size");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "billboard_velocity_head", PROP_FLOAT, PROP_FACTOR);
|
2011-06-23 18:59:47 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "bb_vel_head");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 10.0f);
|
|
|
|
RNA_def_property_ui_text(prop, "Billboard Velocity Head", "Scale billboards by velocity");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "billboard_velocity_tail", PROP_FLOAT, PROP_FACTOR);
|
2011-06-23 18:59:47 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "bb_vel_tail");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 10.0f);
|
|
|
|
RNA_def_property_ui_text(prop, "Billboard Velocity Tail", "Scale billboards by velocity");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
|
|
|
|
2009-02-17 21:07:01 +00:00
|
|
|
/* simplification */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_simplify", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "simplify_flag", PART_SIMPLIFY_ENABLE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Child Simplification",
|
|
|
|
"Remove child strands as the object becomes smaller on the screen");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_simplify_viewport", PROP_BOOLEAN, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "simplify_flag", PART_SIMPLIFY_VIEWPORT);
|
|
|
|
RNA_def_property_ui_text(prop, "Viewport", "");
|
|
|
|
|
2013-12-13 04:39:15 +11:00
|
|
|
prop = RNA_def_property(srna, "simplify_refsize", PROP_INT, PROP_PIXEL);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "simplify_refsize");
|
|
|
|
RNA_def_property_range(prop, 1, 32768);
|
2010-05-04 05:15:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Reference Size", "Reference size in pixels, after which simplification begins");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "simplify_rate", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
|
|
|
RNA_def_property_ui_text(prop, "Rate", "Speed of simplification");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "simplify_transition", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Transition", "Transition period for fading out strands");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "simplify_viewport", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 0.999f);
|
|
|
|
RNA_def_property_ui_text(prop, "Rate", "Speed of Simplification");
|
|
|
|
|
|
|
|
/* general values */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
|
2012-05-12 11:01:29 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "sta"); /*optional if prop names are the same */
|
2009-07-07 06:56:29 +00:00
|
|
|
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_start_set", NULL);
|
2011-11-26 12:30:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Start", "Frame number to start emitting particles");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE);
|
2010-04-22 17:35:00 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "end");
|
2009-07-07 06:56:29 +00:00
|
|
|
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_end_set", NULL);
|
2011-11-26 12:30:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "End", "Frame number to stop emitting particles");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
|
2009-07-07 06:56:29 +00:00
|
|
|
RNA_def_property_range(prop, 1.0f, MAXFRAMEF);
|
2011-11-26 12:30:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Lifetime", "Life span of the particles");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "lifetime_random", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "randlife");
|
2009-06-05 23:59:33 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Random", "Give the particle life a random variation");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "time_tweak", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "timetweak");
|
2010-02-10 01:54:32 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 100.0f);
|
|
|
|
RNA_def_property_ui_range(prop, 0, 10, 1, 3);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Tweak", "A multiplier for physics timestep (1.0 means one frame = 1/25 seconds)");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2011-03-21 10:53:29 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "timestep", PROP_FLOAT, PROP_NONE);
|
2011-03-21 10:53:29 +00:00
|
|
|
RNA_def_property_float_funcs(prop, "rna_PartSettings_timestep_get", "rna_PartSetings_timestep_set", NULL);
|
|
|
|
RNA_def_property_range(prop, 0.0001, 100.0);
|
|
|
|
RNA_def_property_ui_range(prop, 0.01, 10, 1, 3);
|
2011-09-25 11:51:28 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Timestep", "The simulation timestep per frame (seconds per frame)");
|
2011-03-21 10:53:29 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2011-09-25 11:51:28 +00:00
|
|
|
|
2013-04-23 07:06:29 +00:00
|
|
|
prop = RNA_def_property(srna, "use_adaptive_subframes", PROP_BOOLEAN, PROP_NONE);
|
2011-09-25 11:51:28 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "time_flag", PART_TIME_AUTOSF);
|
|
|
|
RNA_def_property_ui_text(prop, "Automatic Subframes", "Automatically set the number of subframes");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "subframes", PROP_INT, PROP_NONE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_range(prop, 0, 1000);
|
|
|
|
RNA_def_property_ui_text(prop, "Subframes",
|
|
|
|
"Subframes to simulate for improved stability and finer granularity simulations "
|
|
|
|
"(dt = timestep / (subframes + 1))");
|
2011-09-25 11:51:28 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "courant_target", PROP_FLOAT, PROP_NONE);
|
2012-12-12 22:42:55 +00:00
|
|
|
RNA_def_property_range(prop, 0.0001, 10);
|
|
|
|
RNA_def_property_float_default(prop, 0.1);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Adaptive Subframe Threshold",
|
|
|
|
"The relative distance a particle can move before requiring more subframes "
|
2012-12-12 22:42:55 +00:00
|
|
|
"(target Courant number); 0.01-0.3 is the recommended range");
|
2010-04-12 17:34:06 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "jitter_factor", PROP_FLOAT, PROP_NONE);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "jitfac");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 2.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Amount", "Amount of jitter applied to the sampling");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "effect_hair", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "eff_hair");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2010-05-04 05:15:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Stiffness", "Hair stiffness for effectors");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "count", PROP_INT, PROP_UNSIGNED);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "totpart");
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-07-23 00:19:01 +00:00
|
|
|
/* This limit is for those freaks who have the machine power to handle it. */
|
|
|
|
/* 10M particles take around 2.2 Gb of memory / disk space in saved file and */
|
|
|
|
/* each cached frame takes around 0.5 Gb of memory / disk space depending on cache mode. */
|
|
|
|
RNA_def_property_range(prop, 0, 10000000);
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 100000, 1, -1);
|
2011-11-26 12:30:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Number", "Total number of particles");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-05-12 11:01:29 +00:00
|
|
|
prop = RNA_def_property(srna, "userjit", PROP_INT, PROP_UNSIGNED); /*TODO: can we get a better name for userjit? */
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "userjit");
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_range(prop, 0, 1000);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "P/F", "Emission locations / face (0 = automatic)");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "grid_resolution", PROP_INT, PROP_UNSIGNED);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "grid_res");
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2011-02-04 15:48:13 +00:00
|
|
|
RNA_def_property_range(prop, 1, 250); /* ~15M particles in a cube (ouch!), but could be very usable in a plane */
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 1, 50, 1, -1); /* ~100k particles in a cube */
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Resolution", "The resolution of the particle grid");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "grid_random", PROP_FLOAT, PROP_NONE);
|
2011-02-04 15:48:13 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "grid_rand");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
|
|
|
RNA_def_property_ui_text(prop, "Grid Randomness", "Add random offset to the grid locations");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "effector_amount", PROP_INT, PROP_UNSIGNED);
|
2011-02-12 17:54:24 +00:00
|
|
|
/* in theory PROP_ANIMATABLE perhaps should be cleared, but animating this can give some interesting results! */
|
|
|
|
RNA_def_property_range(prop, 0, 10000); /* 10000 effectors will bel SLOW, but who knows */
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 100, 1, -1);
|
2011-11-26 12:30:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Effector Number", "How many particles are effectors (0 is all particles)");
|
2011-02-12 17:54:24 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2009-02-17 21:07:01 +00:00
|
|
|
/* initial velocity factors */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE);
|
2012-05-12 11:01:29 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "normfac"); /*optional if prop names are the same */
|
2010-02-09 16:28:00 +00:00
|
|
|
RNA_def_property_range(prop, -1000.0f, 1000.0f);
|
2010-02-10 01:54:32 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 100, 1, 3);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Normal", "Let the surface normal give the particle a starting speed");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "object_factor", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "obfac");
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, -200.0f, 200.0f);
|
|
|
|
RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1, 3);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Object", "Let the object give the particle a starting speed");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "factor_random", PROP_FLOAT, PROP_NONE);
|
2012-05-12 11:01:29 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "randfac"); /*optional if prop names are the same */
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 200.0f);
|
2010-02-10 01:54:32 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 100, 1, 3);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Random", "Give the starting speed a random variation");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "particle_factor", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "partfac");
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, -200.0f, 200.0f);
|
|
|
|
RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1, 3);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Particle", "Let the target particle give the particle a starting speed");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "tangent_factor", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "tanfac");
|
2010-02-09 16:28:00 +00:00
|
|
|
RNA_def_property_range(prop, -1000.0f, 1000.0f);
|
|
|
|
RNA_def_property_ui_range(prop, -100, 100, 1, 2);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Tangent", "Let the surface tangent give the particle a starting speed");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "tangent_phase", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "tanphase");
|
|
|
|
RNA_def_property_range(prop, -1.0f, 1.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Rot", "Rotate the surface tangent");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "reactor_factor", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "reactfac");
|
|
|
|
RNA_def_property_range(prop, -10.0f, 10.0f);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Reactor",
|
|
|
|
"Let the vector away from the target particle's location give the particle "
|
|
|
|
"a starting speed");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "object_align_factor", PROP_FLOAT, PROP_VELOCITY);
|
2009-10-05 13:25:56 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "ob_vel");
|
|
|
|
RNA_def_property_array(prop, 3);
|
|
|
|
RNA_def_property_range(prop, -200.0f, 200.0f);
|
2010-02-10 01:54:32 +00:00
|
|
|
RNA_def_property_ui_range(prop, -100, 100, 1, 3);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Object Aligned",
|
|
|
|
"Let the emitter object orientation give the particle a starting speed");
|
2009-10-05 13:25:56 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "angular_velocity_factor", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "avefac");
|
|
|
|
RNA_def_property_range(prop, -200.0f, 200.0f);
|
2010-02-10 01:54:32 +00:00
|
|
|
RNA_def_property_ui_range(prop, -100, 100, 10, 3);
|
2012-03-20 01:00:28 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Angular Velocity", "Angular velocity amount (in radians per second)");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "phase_factor", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "phasefac");
|
|
|
|
RNA_def_property_range(prop, -1.0f, 1.0f);
|
2012-03-20 01:00:28 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Phase", "Rotation around the chosen orientation axis");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "rotation_factor_random", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "randrotfac");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2012-03-20 01:00:28 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Random Orientation", "Randomize particle orientation");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "phase_factor_random", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "randphasefac");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2012-03-20 01:00:28 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Random Phase", "Randomize rotation around the chosen orientation axis");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "hair_length", PROP_FLOAT, PROP_NONE);
|
2011-02-07 11:43:33 +00:00
|
|
|
RNA_def_property_float_funcs(prop, "rna_PartSetting_hairlength_get", "rna_PartSetting_hairlength_set", NULL);
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1000.0f);
|
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
|
|
|
|
RNA_def_property_ui_text(prop, "Hair Length", "Length of the hair");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
|
|
|
|
2009-02-17 21:07:01 +00:00
|
|
|
/* physical properties */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
|
2012-12-14 04:57:26 +00:00
|
|
|
RNA_def_property_range(prop, 0.00000001f, 100000.0f);
|
2010-02-10 01:54:32 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.01, 100, 1, 3);
|
2011-11-26 12:30:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Mass", "Mass of the particles");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "particle_size", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "size");
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, 0.001f, 100000.0f);
|
2010-02-10 01:54:32 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.01, 100, 1, 3);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Size", "The size of the particles");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "size_random", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "randsize");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Random Size", "Give the particle size a random variation");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* global physical properties */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "drag_factor", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "dragfac");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2011-11-26 12:30:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Drag", "Amount of air-drag");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "brownian_factor", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "brownfac");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 200.0f);
|
2010-02-10 01:54:32 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 20, 1, 3);
|
2013-10-14 16:38:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Brownian", "Amount of random, erratic particle movement");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "dampfac");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2011-11-26 12:30:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Damp", "Amount of damping");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2009-07-12 23:38:47 +00:00
|
|
|
/* random length */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "length_random", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "randlength");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Random Length", "Give path length a random variation");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
|
|
|
/* children */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "child_nbr", PROP_INT, PROP_NONE);
|
2012-05-12 11:01:29 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "child_nbr"); /*optional if prop names are the same */
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, 0, 100000);
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 1000, 1, -1);
|
2011-11-26 12:30:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Children Per Parent", "Number of children/parent");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "rendered_child_count", PROP_INT, PROP_NONE);
|
2009-06-05 23:59:33 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "ren_child_nbr");
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, 0, 100000);
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 10000, 1, -1);
|
2011-11-26 12:30:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Rendered Children", "Number of children/parent for rendering");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "virtual_parents", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "parents");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Virtual Parents", "Relative amount of virtual parents");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "child_size", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "childsize");
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, 0.001f, 100000.0f);
|
|
|
|
RNA_def_property_ui_range(prop, 0.01f, 100.0f, 0.1, 3);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Child Size", "A multiplier for the child particle size");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "child_size_random", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "childrandsize");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Random Child Size", "Random variation to the size of the child particles");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "child_radius", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "childrad");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 10.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Child Radius", "Radius of children around parent");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "child_roundness", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "childflat");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Child Roundness", "Roundness of children around parent");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
|
|
|
/* clumping */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "clump_factor", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "clumpfac");
|
|
|
|
RNA_def_property_range(prop, -1.0f, 1.0f);
|
2009-03-28 11:44:07 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Clump", "Amount of clumping");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "clump_shape", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "clumppow");
|
|
|
|
RNA_def_property_range(prop, -0.999f, 0.999f);
|
2009-03-28 11:44:07 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Shape", "Shape of clumping");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* kink */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "kink_amplitude", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "kink_amp");
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, -100000.0f, 100000.0f);
|
|
|
|
RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 3);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Amplitude", "The amplitude of the offset");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "kink_amplitude_clump", PROP_FLOAT, PROP_NONE);
|
2011-01-07 11:24:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "kink_amp_clump");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2011-11-26 12:30:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Amplitude Clump", "How much clump affects kink amplitude");
|
2011-01-07 11:24:34 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "kink_frequency", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "kink_freq");
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, -100000.0f, 100000.0f);
|
|
|
|
RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 3);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Frequency", "The frequency of the offset (1/total length)");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "kink_shape", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_range(prop, -0.999f, 0.999f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Shape", "Adjust the offset to the beginning/end");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "kink_flat", PROP_FLOAT, PROP_NONE);
|
2011-01-07 11:24:34 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
|
|
|
RNA_def_property_ui_text(prop, "Flatness", "How flat the hairs are");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
|
|
|
/* rough */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "roughness_1", PROP_FLOAT, PROP_NONE);
|
2010-08-20 06:09:58 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "rough1");
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 100000.0f);
|
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Rough1", "Amount of location dependent rough");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "roughness_1_size", PROP_FLOAT, PROP_NONE);
|
2010-08-20 06:09:58 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "rough1_size");
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, 0.01f, 100000.0f);
|
|
|
|
RNA_def_property_ui_range(prop, 0.01f, 10.0f, 0.1, 3);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Size1", "Size of location dependent rough");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "roughness_2", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "rough2");
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 100000.0f);
|
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Rough2", "Amount of random rough");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "roughness_2_size", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "rough2_size");
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, 0.01f, 100000.0f);
|
|
|
|
RNA_def_property_ui_range(prop, 0.01f, 10.0f, 0.1, 3);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Size2", "Size of random rough");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "roughness_2_threshold", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "rough2_thres");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Threshold", "Amount of particles left untouched by random rough");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "roughness_endpoint", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "rough_end");
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 100000.0f);
|
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Rough Endpoint", "Amount of end point rough");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "roughness_end_shape", PROP_FLOAT, PROP_NONE);
|
2010-08-20 06:09:58 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "rough_end_shape");
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 10.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Shape", "Shape of end point rough");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "child_length", PROP_FLOAT, PROP_NONE);
|
2009-07-12 23:38:47 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "clength");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Length", "Length of child paths");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "child_length_threshold", PROP_FLOAT, PROP_NONE);
|
2009-07-12 23:38:47 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "clength_thres");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Threshold", "Amount of particles left untouched by child path length");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2011-01-07 11:24:34 +00:00
|
|
|
/* parting */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "child_parting_factor", PROP_FLOAT, PROP_NONE);
|
2011-01-07 11:24:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "parting_fac");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
|
|
|
RNA_def_property_ui_text(prop, "Parting Factor", "Create parting in the children based on parent strands");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "child_parting_min", PROP_FLOAT, PROP_NONE);
|
2011-01-07 11:24:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "parting_min");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 180.0f);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Parting Minimum",
|
|
|
|
"Minimum root to tip angle (tip distance/root distance for long hair)");
|
2011-01-07 11:24:34 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "child_parting_max", PROP_FLOAT, PROP_NONE);
|
2011-01-07 11:24:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "parting_max");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 180.0f);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Parting Maximum",
|
|
|
|
"Maximum root to tip angle (tip distance/root distance for long hair)");
|
2011-01-07 11:24:34 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
|
|
|
|
2009-02-17 21:07:01 +00:00
|
|
|
/* branching */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "branch_threshold", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "branch_thres");
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Threshold", "Threshold of branching");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
|
|
|
/* drawing stuff */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "line_length_tail", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_funcs(prop, "rna_PartSetting_linelentail_get", "rna_PartSetting_linelentail_set", NULL);
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 100000.0f);
|
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
|
2013-02-24 15:40:28 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Tail", "Length of the line's tail");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "line_length_head", PROP_FLOAT, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_float_funcs(prop, "rna_PartSetting_linelenhead_get", "rna_PartSetting_linelenhead_set", NULL);
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 100000.0f);
|
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Head", "Length of the line's head");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "path_start", PROP_FLOAT, PROP_NONE);
|
2009-07-04 03:50:12 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "path_start");
|
|
|
|
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_PartSetting_pathstartend_range");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Path Start", "Starting time of drawn path");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-07-04 03:50:12 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "path_end", PROP_FLOAT, PROP_NONE);
|
2009-07-04 03:50:12 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "path_end");
|
|
|
|
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_PartSetting_pathstartend_range");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Path End", "End time of drawn path");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-07-04 03:50:12 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "trail_count", PROP_INT, PROP_NONE);
|
2009-07-04 03:50:12 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "trail_count");
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, 1, 100000);
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 1, 100, 1, -1);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Trail Count", "Number of trail particles");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-07-12 23:38:47 +00:00
|
|
|
|
|
|
|
/* keyed particles */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "keyed_loops", PROP_INT, PROP_NONE);
|
2009-07-12 23:38:47 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "keyed_loops");
|
2009-07-23 00:19:01 +00:00
|
|
|
RNA_def_property_range(prop, 1.0f, 10000.0f);
|
|
|
|
RNA_def_property_ui_range(prop, 1.0f, 100.0f, 0.1, 3);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Loop count", "Number of times the keys are looped");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2010-04-04 12:29:06 +00:00
|
|
|
|
2013-05-27 17:11:05 +00:00
|
|
|
/* modified dm support */
|
|
|
|
prop = RNA_def_property(srna, "use_modifier_stack", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "use_modifier_stack", 0);
|
2013-05-27 18:08:14 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Modifier Stack", "Emit particles from mesh with modifiers applied "
|
2013-05-27 17:11:05 +00:00
|
|
|
"(must use same subsurf level for viewport and render for correct results)");
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_change_type");
|
|
|
|
|
2009-07-20 23:52:53 +00:00
|
|
|
/* draw objects & groups */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "dupli_group", PROP_POINTER, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "dup_group");
|
|
|
|
RNA_def_property_struct_type(prop, "Group");
|
2009-05-28 23:23:47 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Dupli Group", "Show Objects in this Group in place of particles");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "dupli_weights", PROP_COLLECTION, PROP_NONE);
|
2010-08-18 08:26:18 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "dupliweights", NULL);
|
2009-10-05 13:25:56 +00:00
|
|
|
RNA_def_property_struct_type(prop, "ParticleDupliWeight");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Dupli Group Weights", "Weights for all of the objects in the dupli group");
|
2009-10-05 13:25:56 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "active_dupliweight", PROP_POINTER, PROP_NONE);
|
2009-10-05 13:25:56 +00:00
|
|
|
RNA_def_property_struct_type(prop, "ParticleDupliWeight");
|
2010-08-03 05:14:59 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, "rna_ParticleDupliWeight_active_get", NULL, NULL, NULL);
|
2009-10-05 13:25:56 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Active Dupli Object", "");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "active_dupliweight_index", PROP_INT, PROP_UNSIGNED);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_int_funcs(prop, "rna_ParticleDupliWeight_active_index_get",
|
|
|
|
"rna_ParticleDupliWeight_active_index_set",
|
|
|
|
"rna_ParticleDupliWeight_active_index_range");
|
2009-10-05 13:25:56 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Active Dupli Object Index", "");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "dupli_object", PROP_POINTER, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "dup_ob");
|
|
|
|
RNA_def_property_struct_type(prop, "Object");
|
2009-05-28 23:23:47 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Dupli Object", "Show this Object in place of particles");
|
2009-11-04 03:01:39 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_dependency");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "billboard_object", PROP_POINTER, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "bb_ob");
|
|
|
|
RNA_def_property_struct_type(prop, "Object");
|
2009-05-28 23:23:47 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Billboard Object", "Billboards face this object (default is active camera)");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-07-20 23:52:53 +00:00
|
|
|
|
2010-11-23 11:15:38 +00:00
|
|
|
/* boids */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "boids", PROP_POINTER, PROP_NONE);
|
2010-11-23 11:15:38 +00:00
|
|
|
RNA_def_property_struct_type(prop, "BoidSettings");
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
RNA_def_property_ui_text(prop, "Boid Settings", "");
|
|
|
|
|
|
|
|
/* Fluid particles */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "fluid", PROP_POINTER, PROP_NONE);
|
2010-11-23 11:15:38 +00:00
|
|
|
RNA_def_property_struct_type(prop, "SPHFluidSettings");
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "SPH Fluid Settings", "");
|
2010-11-23 11:15:38 +00:00
|
|
|
|
|
|
|
/* Effector weights */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
RNA_def_property_struct_type(prop, "EffectorWeights");
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
RNA_def_property_ui_text(prop, "Effector Weights", "");
|
2009-06-24 02:11:36 +00:00
|
|
|
|
|
|
|
/* animation here? */
|
|
|
|
rna_def_animdata_common(srna);
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "force_field_1", PROP_POINTER, PROP_NONE);
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "pd");
|
|
|
|
RNA_def_property_struct_type(prop, "FieldSettings");
|
2010-08-03 05:14:59 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, "rna_Particle_field1_get", NULL, NULL, NULL);
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Force Field 1", "");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "force_field_2", PROP_POINTER, PROP_NONE);
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "pd2");
|
|
|
|
RNA_def_property_struct_type(prop, "FieldSettings");
|
2010-08-03 05:14:59 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, "rna_Particle_field2_get", NULL, NULL, NULL);
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Force Field 2", "");
|
2009-01-02 13:47:33 +00:00
|
|
|
}
|
|
|
|
|
2009-07-20 23:52:53 +00:00
|
|
|
static void rna_def_particle_target(BlenderRNA *brna)
|
2009-07-12 23:38:47 +00:00
|
|
|
{
|
|
|
|
StructRNA *srna;
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
2009-07-20 23:52:53 +00:00
|
|
|
static EnumPropertyItem mode_items[] = {
|
|
|
|
{PTARGET_MODE_FRIEND, "FRIEND", 0, "Friend", ""},
|
|
|
|
{PTARGET_MODE_NEUTRAL, "NEUTRAL", 0, "Neutral", ""},
|
|
|
|
{PTARGET_MODE_ENEMY, "ENEMY", 0, "Enemy", ""},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "ParticleTarget", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Particle Target", "Target particle system");
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
2009-07-20 23:52:53 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_ParticleTarget_name_get", "rna_ParticleTarget_name_length", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Name", "Particle target name");
|
2009-07-12 23:38:47 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
RNA_def_struct_name_property(srna, prop);
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
|
2009-07-12 23:38:47 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "ob");
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Target Object",
|
|
|
|
"The object that has the target particle system (empty if same object)");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_target_reset");
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "system", PROP_INT, PROP_UNSIGNED);
|
2009-07-12 23:38:47 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "psys");
|
|
|
|
RNA_def_property_range(prop, 1, INT_MAX);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Target Particle System", "The index of particle system on the target object");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_target_reset");
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "time", PROP_FLOAT, PROP_TIME);
|
2009-07-12 23:38:47 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "time");
|
2012-03-05 23:30:41 +00:00
|
|
|
RNA_def_property_range(prop, 0.0, 30000.0f); /*TODO: replace 30000 with MAXFRAMEF when available in 2.5 */
|
2009-07-12 23:38:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Time", "");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_target_redo");
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "duration", PROP_FLOAT, PROP_NONE);
|
2009-07-12 23:38:47 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "duration");
|
2012-03-05 23:30:41 +00:00
|
|
|
RNA_def_property_range(prop, 0.0, 30000.0f); /*TODO: replace 30000 with MAXFRAMEF when available in 2.5 */
|
2009-07-12 23:38:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Duration", "");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_target_redo");
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
|
2009-07-20 23:52:53 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTARGET_VALID);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Valid", "Keyed particles target is valid");
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "alliance", PROP_ENUM, PROP_NONE);
|
2010-08-19 12:51:31 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "mode");
|
2009-07-20 23:52:53 +00:00
|
|
|
RNA_def_property_enum_items(prop, mode_items);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-07-20 23:52:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Mode", "");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_target_reset");
|
2009-07-12 23:38:47 +00:00
|
|
|
|
|
|
|
}
|
2009-03-26 13:56:32 +00:00
|
|
|
static void rna_def_particle_system(BlenderRNA *brna)
|
2009-01-02 13:47:33 +00:00
|
|
|
{
|
|
|
|
StructRNA *srna;
|
|
|
|
PropertyRNA *prop;
|
2012-12-28 14:21:30 +00:00
|
|
|
FunctionRNA *func;
|
2009-01-02 13:47:33 +00:00
|
|
|
|
2013-02-05 13:33:54 +00:00
|
|
|
static EnumPropertyItem resolution_items[] = {
|
|
|
|
{eModifierMode_Realtime, "PREVIEW", 0, "Preview", "Apply modifier preview settings"},
|
|
|
|
{eModifierMode_Render, "RENDER", 0, "Render", "Apply modifier render settings"},
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "ParticleSystem", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Particle System", "Particle system in an object");
|
2009-06-03 23:22:43 +00:00
|
|
|
RNA_def_struct_ui_icon(srna, ICON_PARTICLE_DATA);
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Name", "Particle system name");
|
2012-05-12 11:01:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER | NA_RENAME, NULL);
|
2011-10-15 11:55:09 +00:00
|
|
|
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ParticleSystem_name_set");
|
2009-06-03 23:22:43 +00:00
|
|
|
RNA_def_struct_name_property(srna, prop);
|
2009-01-02 13:47:33 +00:00
|
|
|
|
2009-06-27 15:41:47 +00:00
|
|
|
/* access to particle settings is redirected through functions */
|
|
|
|
/* to allow proper id-buttons functionality */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
|
|
|
|
/*RNA_def_property_pointer_sdna(prop, NULL, "part"); */
|
2009-06-27 15:41:47 +00:00
|
|
|
RNA_def_property_struct_type(prop, "ParticleSettings");
|
2012-05-12 11:01:29 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
|
2010-08-03 05:14:59 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, "rna_particle_settings_get", "rna_particle_settings_set", NULL, NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Settings", "Particle system settings");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "particles", PROP_COLLECTION, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "particles", "totpart");
|
|
|
|
RNA_def_property_struct_type(prop, "Particle");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Particles", "Particles generated by the particle system");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "child_particles", PROP_COLLECTION, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "child", "totchild");
|
|
|
|
RNA_def_property_struct_type(prop, "ChildParticle");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Child Particles", "Child particles generated by the particle system");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "seed", PROP_INT, PROP_UNSIGNED);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Seed", "Offset in the random number table, to get a different randomized result");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "child_seed", PROP_INT, PROP_UNSIGNED);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Child Seed",
|
|
|
|
"Offset in the random number table for child particles, to get a different "
|
|
|
|
"randomized result");
|
2011-01-07 11:24:34 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
|
|
|
|
2009-03-26 13:56:32 +00:00
|
|
|
/* hair */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "is_global_hair", PROP_BOOLEAN, PROP_NONE);
|
2009-09-05 20:12:08 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_GLOBAL_HAIR);
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Global Hair", "Hair keys are in global coordinate space");
|
2009-09-05 20:12:08 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_hair_dynamics", PROP_BOOLEAN, PROP_NONE);
|
2009-09-10 22:32:33 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_HAIR_DYNAMICS);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Hair Dynamics", "Enable hair dynamics using cloth simulation");
|
2009-09-10 22:32:33 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_hair_dynamics");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "cloth", PROP_POINTER, PROP_NONE);
|
2009-09-10 22:32:33 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "clmd");
|
|
|
|
RNA_def_property_struct_type(prop, "ClothModifier");
|
2009-09-16 18:04:01 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
2009-09-10 22:32:33 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
RNA_def_property_ui_text(prop, "Cloth", "Cloth dynamics for hair");
|
|
|
|
|
2009-03-26 13:56:32 +00:00
|
|
|
/* reactor */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "reactor_target_object", PROP_POINTER, PROP_NONE);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "target_ob");
|
2009-05-28 23:23:47 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Reactor Target Object",
|
|
|
|
"For reactor systems, the object that has the target particle system "
|
|
|
|
"(empty if same object)");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "reactor_target_particle_system", PROP_INT, PROP_UNSIGNED);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "target_psys");
|
2010-11-21 03:45:35 +00:00
|
|
|
RNA_def_property_range(prop, 1, SHRT_MAX);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Reactor Target Particle System",
|
|
|
|
"For reactor systems, index of particle system on the target object");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2009-03-26 13:56:32 +00:00
|
|
|
/* keyed */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_keyed_timing", PROP_BOOLEAN, PROP_NONE);
|
2009-07-12 23:38:47 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_KEYED_TIMING);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Keyed timing", "Use key times");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE);
|
2009-07-20 23:52:53 +00:00
|
|
|
RNA_def_property_struct_type(prop, "ParticleTarget");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Targets", "Target particle systems");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "active_particle_target", PROP_POINTER, PROP_NONE);
|
2009-07-20 23:52:53 +00:00
|
|
|
RNA_def_property_struct_type(prop, "ParticleTarget");
|
2010-08-03 05:14:59 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, "rna_ParticleSystem_active_particle_target_get", NULL, NULL, NULL);
|
2009-07-20 23:52:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Active Particle Target", "");
|
2009-07-12 23:38:47 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "active_particle_target_index", PROP_INT, PROP_UNSIGNED);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_int_funcs(prop, "rna_ParticleSystem_active_particle_target_index_get",
|
|
|
|
"rna_ParticleSystem_active_particle_target_index_set",
|
|
|
|
"rna_ParticleSystem_active_particle_target_index_range");
|
2009-07-20 23:52:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Active Particle Target Index", "");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
|
|
|
/* billboard */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "billboard_normal_uv", PROP_STRING, PROP_NONE);
|
2009-03-26 13:56:32 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "bb_uvname[0]");
|
|
|
|
RNA_def_property_string_maxlength(prop, 32);
|
2011-11-23 17:25:25 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Billboard Normal UV", "UV map to control billboard normals");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "billboard_time_index_uv", PROP_STRING, PROP_NONE);
|
2009-03-26 13:56:32 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "bb_uvname[1]");
|
|
|
|
RNA_def_property_string_maxlength(prop, 32);
|
2011-11-23 17:25:25 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Billboard Time Index UV", "UV map to control billboard time index (X-Y)");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "billboard_split_uv", PROP_STRING, PROP_NONE);
|
2009-03-26 13:56:32 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "bb_uvname[2]");
|
|
|
|
RNA_def_property_string_maxlength(prop, 32);
|
2011-11-23 17:25:25 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Billboard Split UV", "UV map to control billboard splitting");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
|
|
|
/* vertex groups */
|
2009-11-04 12:09:02 +00:00
|
|
|
|
|
|
|
/* note, internally store as ints, access as strings */
|
2012-03-18 07:38:51 +00:00
|
|
|
#if 0 /* int access. works ok but isn't useful for the UI */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_group_density", PROP_INT, PROP_NONE);
|
2009-03-26 13:56:32 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "vgroup[0]");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Density", "Vertex group to control density");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-11-04 12:09:02 +00:00
|
|
|
#endif
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_group_density", PROP_STRING, PROP_NONE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_0", "rna_ParticleVGroup_name_len_0",
|
|
|
|
"rna_ParticleVGroup_name_set_0");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Density", "Vertex group to control density");
|
2009-11-04 12:09:02 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_vertex_group_density", PROP_BOOLEAN, PROP_NONE);
|
2009-03-26 13:56:32 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_DENSITY));
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Density Negate", "Negate the effect of the density vertex group");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_group_velocity", PROP_STRING, PROP_NONE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_1", "rna_ParticleVGroup_name_len_1",
|
|
|
|
"rna_ParticleVGroup_name_set_1");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Velocity", "Vertex group to control velocity");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_vertex_group_velocity", PROP_BOOLEAN, PROP_NONE);
|
2009-03-26 13:56:32 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_VEL));
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Velocity Negate", "Negate the effect of the velocity vertex group");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_group_length", PROP_STRING, PROP_NONE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_2", "rna_ParticleVGroup_name_len_2",
|
|
|
|
"rna_ParticleVGroup_name_set_2");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Length", "Vertex group to control length");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_vertex_group_length", PROP_BOOLEAN, PROP_NONE);
|
2009-03-26 13:56:32 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_LENGTH));
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Length Negate", "Negate the effect of the length vertex group");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_group_clump", PROP_STRING, PROP_NONE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_3", "rna_ParticleVGroup_name_len_3",
|
|
|
|
"rna_ParticleVGroup_name_set_3");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Clump", "Vertex group to control clump");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_vertex_group_clump", PROP_BOOLEAN, PROP_NONE);
|
2009-03-26 13:56:32 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_CLUMP));
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Clump Negate", "Negate the effect of the clump vertex group");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_group_kink", PROP_STRING, PROP_NONE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_4", "rna_ParticleVGroup_name_len_4",
|
|
|
|
"rna_ParticleVGroup_name_set_4");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Kink", "Vertex group to control kink");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_vertex_group_kink", PROP_BOOLEAN, PROP_NONE);
|
2009-03-26 13:56:32 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_KINK));
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Kink Negate", "Negate the effect of the kink vertex group");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_group_roughness_1", PROP_STRING, PROP_NONE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_5", "rna_ParticleVGroup_name_len_5",
|
|
|
|
"rna_ParticleVGroup_name_set_5");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Roughness 1", "Vertex group to control roughness 1");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_vertex_group_roughness_1", PROP_BOOLEAN, PROP_NONE);
|
2009-03-26 13:56:32 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROUGH1));
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Roughness 1 Negate",
|
|
|
|
"Negate the effect of the roughness 1 vertex group");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_group_roughness_2", PROP_STRING, PROP_NONE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_6", "rna_ParticleVGroup_name_len_6",
|
|
|
|
"rna_ParticleVGroup_name_set_6");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Roughness 2", "Vertex group to control roughness 2");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_vertex_group_roughness_2", PROP_BOOLEAN, PROP_NONE);
|
2009-03-26 13:56:32 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROUGH2));
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Roughness 2 Negate",
|
|
|
|
"Negate the effect of the roughness 2 vertex group");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_group_roughness_end", PROP_STRING, PROP_NONE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_7", "rna_ParticleVGroup_name_len_7",
|
|
|
|
"rna_ParticleVGroup_name_set_7");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Roughness End", "Vertex group to control roughness end");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_vertex_group_roughness_end", PROP_BOOLEAN, PROP_NONE);
|
2009-03-26 13:56:32 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROUGHE));
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Roughness End Negate",
|
|
|
|
"Negate the effect of the roughness end vertex group");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_group_size", PROP_STRING, PROP_NONE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_8", "rna_ParticleVGroup_name_len_8",
|
|
|
|
"rna_ParticleVGroup_name_set_8");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Size", "Vertex group to control size");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_vertex_group_size", PROP_BOOLEAN, PROP_NONE);
|
2009-03-26 13:56:32 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_SIZE));
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Size Negate", "Negate the effect of the size vertex group");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_group_tangent", PROP_STRING, PROP_NONE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_9", "rna_ParticleVGroup_name_len_9",
|
|
|
|
"rna_ParticleVGroup_name_set_9");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Tangent", "Vertex group to control tangent");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_vertex_group_tangent", PROP_BOOLEAN, PROP_NONE);
|
2009-03-26 13:56:32 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_TAN));
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Tangent Negate", "Negate the effect of the tangent vertex group");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_group_rotation", PROP_STRING, PROP_NONE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_10", "rna_ParticleVGroup_name_len_10",
|
|
|
|
"rna_ParticleVGroup_name_set_10");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Rotation", "Vertex group to control rotation");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_vertex_group_rotation", PROP_BOOLEAN, PROP_NONE);
|
2009-03-26 13:56:32 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROT));
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Rotation Negate", "Negate the effect of the rotation vertex group");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-03-26 13:56:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_group_field", PROP_STRING, PROP_NONE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_11", "rna_ParticleVGroup_name_len_11",
|
|
|
|
"rna_ParticleVGroup_name_set_11");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Field", "Vertex group to control field");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_vertex_group_field", PROP_BOOLEAN, PROP_NONE);
|
2009-03-26 13:56:32 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_EFFECTOR));
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Field Negate", "Negate the effect of the field vertex group");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_reset");
|
2009-02-17 21:07:01 +00:00
|
|
|
|
2009-03-26 13:56:32 +00:00
|
|
|
/* pointcache */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
|
2009-09-16 18:04:01 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
2009-02-17 21:07:01 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "pointcache");
|
|
|
|
RNA_def_property_struct_type(prop, "PointCache");
|
|
|
|
RNA_def_property_ui_text(prop, "Point Cache", "");
|
2009-06-21 11:09:16 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "has_multiple_caches", PROP_BOOLEAN, PROP_NONE);
|
2009-08-29 15:20:36 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_ParticleSystem_multiple_caches_get", NULL);
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
RNA_def_property_ui_text(prop, "Multiple Caches", "Particle system has multiple point caches");
|
|
|
|
|
2009-06-21 11:09:16 +00:00
|
|
|
/* offset ob */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
|
2009-06-21 11:09:16 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "parent");
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Parent",
|
|
|
|
"Use this object's coordinate system instead of global coordinate system");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
2009-08-29 15:20:36 +00:00
|
|
|
|
|
|
|
/* hair or cache editing */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "is_editable", PROP_BOOLEAN, PROP_NONE);
|
2009-08-29 15:20:36 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_ParticleSystem_editable_get", NULL);
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
RNA_def_property_ui_text(prop, "Editable", "Particle system can be edited in particle mode");
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "is_edited", PROP_BOOLEAN, PROP_NONE);
|
2009-08-29 15:20:36 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_ParticleSystem_edited_get", NULL);
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
RNA_def_property_ui_text(prop, "Edited", "Particle system has been edited in particle mode");
|
2010-12-03 02:24:21 +00:00
|
|
|
|
2011-09-25 11:51:28 +00:00
|
|
|
/* Read-only: this is calculated internally. Changing it would only affect
|
|
|
|
* the next time-step. The user should change ParticlSettings.subframes or
|
|
|
|
* ParticleSettings.courant_target instead. */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "dt_frac", PROP_FLOAT, PROP_NONE);
|
2012-05-12 11:01:29 +00:00
|
|
|
RNA_def_property_range(prop, 1.0f / 101.0f, 1.0f);
|
2011-09-26 09:31:24 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Timestep", "The current simulation time step size, as a fraction of a frame");
|
2011-09-25 11:51:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2010-12-03 02:24:21 +00:00
|
|
|
|
|
|
|
RNA_def_struct_path_func(srna, "rna_ParticleSystem_path");
|
2012-12-28 14:21:30 +00:00
|
|
|
|
2013-02-05 13:33:54 +00:00
|
|
|
/* set viewport or render resolution */
|
|
|
|
func = RNA_def_function(srna, "set_resolution", "rna_ParticleSystem_set_resolution");
|
|
|
|
RNA_def_function_ui_description(func, "Set the resolution to use for the number of particles");
|
2013-01-29 12:32:43 +00:00
|
|
|
prop = RNA_def_pointer(func, "scene", "Scene", "", "Scene");
|
|
|
|
prop = RNA_def_pointer(func, "object", "Object", "", "Object");
|
2013-02-05 13:33:54 +00:00
|
|
|
prop = RNA_def_enum(func, "resolution", resolution_items, 0, "", "Resolution settings to apply");
|
2013-01-29 12:32:43 +00:00
|
|
|
|
2012-12-28 14:21:30 +00:00
|
|
|
/* extract cached hair location data */
|
|
|
|
func = RNA_def_function(srna, "co_hair", "rna_ParticleSystem_co_hair");
|
|
|
|
RNA_def_function_ui_description(func, "Obtain cache hair data");
|
|
|
|
|
|
|
|
prop = RNA_def_pointer(func, "object", "Object", "", "Object");
|
2013-09-20 05:30:37 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
|
2012-12-28 14:21:30 +00:00
|
|
|
prop = RNA_def_int(func, "particle_no", 0, INT_MIN, INT_MAX, "Particle no", "", INT_MIN, INT_MAX);
|
|
|
|
prop = RNA_def_int(func, "step", 0, INT_MIN, INT_MAX, "step no", "", INT_MIN, INT_MAX);
|
|
|
|
|
|
|
|
prop = RNA_def_float_vector(func, "co", 3, NULL, -FLT_MAX, FLT_MAX, "Co",
|
|
|
|
"Exported hairkey location", -1e4, 1e4);
|
|
|
|
RNA_def_property_flag(prop, PROP_THICK_WRAP);
|
|
|
|
RNA_def_function_output(func, prop);
|
|
|
|
|
|
|
|
/* extract hair UVs */
|
|
|
|
func = RNA_def_function(srna, "uv_on_emitter", "rna_ParticleSystem_uv_on_emitter");
|
|
|
|
RNA_def_function_ui_description(func, "Obtain uv for all particles");
|
2013-09-20 05:30:37 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
2012-12-28 14:21:30 +00:00
|
|
|
prop = RNA_def_pointer(func, "modifier", "ParticleSystemModifier", "", "Particle modifier");
|
2013-09-20 05:30:37 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
|
2012-12-28 14:21:30 +00:00
|
|
|
prop = RNA_def_pointer(func, "particle", "Particle", "", "Particle");
|
2013-09-20 05:30:37 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
|
2012-12-28 14:21:30 +00:00
|
|
|
prop = RNA_def_int(func, "particle_no", 0, INT_MIN, INT_MAX, "Particle no", "", INT_MIN, INT_MAX);
|
2013-01-23 17:15:45 +00:00
|
|
|
prop = RNA_def_int(func, "uv_no", 0, INT_MIN, INT_MAX, "UV no", "", INT_MIN, INT_MAX);
|
2012-12-28 14:21:30 +00:00
|
|
|
prop = RNA_def_property(func, "uv", PROP_FLOAT, PROP_COORDS);
|
|
|
|
RNA_def_property_array(prop, 2);
|
|
|
|
RNA_def_property_flag(prop, PROP_THICK_WRAP);
|
|
|
|
RNA_def_function_output(func, prop);
|
|
|
|
|
2013-01-04 12:44:38 +00:00
|
|
|
/* extract hair mcols */
|
|
|
|
func = RNA_def_function(srna, "mcol_on_emitter", "rna_ParticleSystem_mcol_on_emitter");
|
|
|
|
RNA_def_function_ui_description(func, "Obtain mcol for all particles");
|
|
|
|
prop = RNA_def_pointer(func, "modifier", "ParticleSystemModifier", "", "Particle modifier");
|
2013-09-20 05:30:37 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
|
2013-01-04 12:44:38 +00:00
|
|
|
prop = RNA_def_pointer(func, "particle", "Particle", "", "Particle");
|
2013-09-20 05:30:37 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
|
2013-01-04 12:44:38 +00:00
|
|
|
prop = RNA_def_int(func, "particle_no", 0, INT_MIN, INT_MAX, "Particle no", "", INT_MIN, INT_MAX);
|
|
|
|
prop = RNA_def_int(func, "vcol_no", 0, INT_MIN, INT_MAX, "vcol no", "", INT_MIN, INT_MAX);
|
|
|
|
prop = RNA_def_property(func, "mcol", PROP_FLOAT, PROP_COLOR);
|
|
|
|
RNA_def_property_array(prop, 3);
|
|
|
|
RNA_def_property_flag(prop, PROP_THICK_WRAP);
|
|
|
|
RNA_def_function_output(func, prop);
|
|
|
|
|
2009-01-02 13:47:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void RNA_def_particle(BlenderRNA *brna)
|
|
|
|
{
|
2009-07-20 23:52:53 +00:00
|
|
|
rna_def_particle_target(brna);
|
2010-11-23 11:15:38 +00:00
|
|
|
rna_def_fluid_settings(brna);
|
2009-03-26 13:56:32 +00:00
|
|
|
rna_def_particle_hair_key(brna);
|
2009-02-17 21:07:01 +00:00
|
|
|
rna_def_particle_key(brna);
|
2010-04-04 12:29:06 +00:00
|
|
|
|
2009-02-17 21:07:01 +00:00
|
|
|
rna_def_child_particle(brna);
|
2009-03-26 13:56:32 +00:00
|
|
|
rna_def_particle(brna);
|
2009-10-05 13:25:56 +00:00
|
|
|
rna_def_particle_dupliweight(brna);
|
2009-03-26 13:56:32 +00:00
|
|
|
rna_def_particle_system(brna);
|
2011-02-12 14:38:34 +00:00
|
|
|
rna_def_particle_settings_mtex(brna);
|
2012-03-05 23:30:41 +00:00
|
|
|
rna_def_particle_settings(brna);
|
2009-01-02 13:47:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|