Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--intern/memutil/intern/MEM_CacheLimiterC-Api.cpp17
-rw-r--r--release/scripts/startup/bl_operators/clip.py19
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py2
-rw-r--r--source/blender/blenkernel/BKE_bmesh.h5
-rw-r--r--source/blender/blenkernel/BKE_bmeshCustomData.h5
-rw-r--r--source/blender/blenkernel/BKE_node.h5
-rw-r--r--source/blender/blenkernel/BKE_sequencer.h5
-rw-r--r--source/blender/blenkernel/intern/BME_Customdata.c5
-rw-r--r--source/blender/blenlib/intern/scanfill.c2
-rw-r--r--source/blender/editors/armature/reeb.c5
-rw-r--r--source/blender/editors/include/UI_resources.h5
-rw-r--r--source/blender/editors/interface/resources.c5
-rw-r--r--source/blender/editors/object/object_bake.c9
-rw-r--r--source/blender/editors/physics/physics_intern.h5
-rw-r--r--source/blender/editors/space_file/filelist.h5
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c8
-rw-r--r--source/blender/editors/util/undo.c6
-rw-r--r--source/blender/gpu/GPU_buffers.h5
-rw-r--r--source/blender/gpu/GPU_draw.h11
-rw-r--r--source/blender/gpu/GPU_extensions.h11
-rw-r--r--source/blender/gpu/GPU_material.h11
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c5
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c5
-rw-r--r--source/blender/gpu/intern/gpu_codegen.h5
-rw-r--r--source/blender/gpu/intern/gpu_draw.c5
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c5
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c46
-rw-r--r--source/blender/makesrna/intern/rna_nodetree_types.h12
-rw-r--r--source/blender/makesrna/intern/rna_tracking.c12
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c2
-rw-r--r--source/blender/modifiers/MOD_modifiertypes.h9
-rw-r--r--source/blender/modifiers/intern/MOD_none.c9
-rw-r--r--source/blender/modifiers/intern/MOD_util.c9
-rw-r--r--source/blender/modifiers/intern/MOD_util.h9
-rw-r--r--source/blender/nodes/NOD_composite.h5
-rw-r--r--source/blender/nodes/NOD_shader.h5
-rw-r--r--source/blender/nodes/NOD_texture.h5
-rw-r--r--source/blender/python/generic/CMakeLists.txt2
-rw-r--r--source/blender/python/generic/noise_py_api.c792
-rw-r--r--source/blender/python/intern/bpy_driver.c2
-rw-r--r--source/blender/python/intern/bpy_interface.c3
-rw-r--r--source/blender/python/intern/gpu.h11
-rw-r--r--source/blender/python/mathutils/CMakeLists.txt2
-rw-r--r--source/blender/python/mathutils/mathutils.c8
-rw-r--r--source/blender/python/mathutils/mathutils.h4
-rw-r--r--source/blender/python/mathutils/mathutils_noise.c911
-rw-r--r--source/blender/python/mathutils/mathutils_noise.h (renamed from source/blender/python/generic/noise_py_api.h)16
-rw-r--r--source/blender/render/intern/include/render_types.h1
-rw-r--r--source/blender/render/intern/source/convertblender.c34
-rw-r--r--source/blender/windowmanager/WM_api.h2
-rw-r--r--source/blender/windowmanager/intern/wm_jobs.c10
-rw-r--r--source/gameengine/Ketsji/KX_ObstacleSimulation.cpp55
-rw-r--r--source/gameengine/Ketsji/KX_ObstacleSimulation.h10
-rw-r--r--source/gameengine/Ketsji/KX_ParentActuator.cpp5
-rw-r--r--source/gameengine/Ketsji/KX_ParentActuator.h5
-rw-r--r--source/gameengine/Ketsji/KX_SteeringActuator.cpp61
-rw-r--r--source/gameengine/Ketsji/KX_SteeringActuator.h58
-rw-r--r--source/gameengine/Rasterizer/RAS_2DFilterManager.cpp10
58 files changed, 1174 insertions, 1127 deletions
diff --git a/intern/memutil/intern/MEM_CacheLimiterC-Api.cpp b/intern/memutil/intern/MEM_CacheLimiterC-Api.cpp
index cc8d2497f37..4fdbbf8f9d4 100644
--- a/intern/memutil/intern/MEM_CacheLimiterC-Api.cpp
+++ b/intern/memutil/intern/MEM_CacheLimiterC-Api.cpp
@@ -1,14 +1,10 @@
-/** \file memutil/intern/MEM_CacheLimiterC-Api.cpp
- * \ingroup memutil
- */
-/**
+/*
+ * ***** 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
@@ -21,6 +17,11 @@
*
* Contributor(s): Peter Schlaile <peter@schlaile.de> 2005
*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ */
+
+/** \file memutil/intern/MEM_CacheLimiterC-Api.cpp
+ * \ingroup memutil
*/
#include <cstddef>
diff --git a/release/scripts/startup/bl_operators/clip.py b/release/scripts/startup/bl_operators/clip.py
index 269871b7230..6ab480b4e23 100644
--- a/release/scripts/startup/bl_operators/clip.py
+++ b/release/scripts/startup/bl_operators/clip.py
@@ -531,6 +531,7 @@ class CLIP_OT_setup_tracking_scene(Operator):
vector_blur = tree.nodes.new(type='VECBLUR')
alphaover = tree.nodes.new(type='ALPHAOVER')
viewer = tree.nodes.new(type='VIEWER')
+ zcomb = tree.nodes.new(type='ZCOMBINE')
# setup nodes
movieclip.clip = clip
@@ -560,6 +561,8 @@ class CLIP_OT_setup_tracking_scene(Operator):
vector_blur.factor = 0.75
+ zcomb.use_alpha = True
+
# create links
tree.links.new(movieclip.outputs['Image'], distortion.inputs['Image'])
@@ -588,8 +591,14 @@ class CLIP_OT_setup_tracking_scene(Operator):
tree.links.new(rlayer_fg.outputs['Z'], vector_blur.inputs['Z'])
tree.links.new(rlayer_fg.outputs['Speed'], vector_blur.inputs['Speed'])
+ tree.links.new(vector_blur.outputs['Image'], zcomb.inputs[0])
+ tree.links.new(rlayer_fg.outputs['Z'], zcomb.inputs[1])
+
+ tree.links.new(mul_image.outputs['Image'], zcomb.inputs[2])
+ tree.links.new(rlayer_bg.outputs['Z'], zcomb.inputs[3])
+
tree.links.new(mul_image.outputs['Image'], alphaover.inputs[1])
- tree.links.new(vector_blur.outputs['Image'], alphaover.inputs[2])
+ tree.links.new(zcomb.outputs['Image'], alphaover.inputs[2])
tree.links.new(alphaover.outputs['Image'], composite.inputs['Image'])
tree.links.new(alphaover.outputs['Image'], viewer.inputs['Image'])
@@ -632,13 +641,17 @@ class CLIP_OT_setup_tracking_scene(Operator):
rlayer_fg.location = rlayer_bg.location
rlayer_fg.location -= Vector((0.0, 500.0))
- vector_blur.location[0] = mul_image.location[0]
+ vector_blur.location[0] = mul_image.location[0] - 200
vector_blur.location[1] = rlayer_fg.location[1]
- alphaover.location[0] = vector_blur.location[0] + 350
+ alphaover.location[0] = vector_blur.location[0] + 700
alphaover.location[1] = \
(vector_blur.location[1] + mul_image.location[1]) / 2
+ zcomb.location[0] = vector_blur.location[0] + 450
+ zcomb.location[1] = \
+ (vector_blur.location[1] + mul_image.location[1]) / 3 * 2
+
composite.location = alphaover.location
composite.location += Vector((200.0, -100.0))
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index 89e15fec828..cacf61249dc 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -814,7 +814,7 @@ class CLIP_MT_reconstruction(Menu):
layout.separator()
layout.operator("clip.track_to_empty")
- layout.operator("clip.tracks_to_mesh")
+ layout.operator("clip.bundles_to_mesh")
class CLIP_MT_track_visibility(Menu):
diff --git a/source/blender/blenkernel/BKE_bmesh.h b/source/blender/blenkernel/BKE_bmesh.h
index cddc42315b7..c23944d9590 100644
--- a/source/blender/blenkernel/BKE_bmesh.h
+++ b/source/blender/blenkernel/BKE_bmesh.h
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/blenkernel/BKE_bmeshCustomData.h b/source/blender/blenkernel/BKE_bmeshCustomData.h
index 2c6449eb290..793410371df 100644
--- a/source/blender/blenkernel/BKE_bmeshCustomData.h
+++ b/source/blender/blenkernel/BKE_bmeshCustomData.h
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 82e42ae27e2..5dbf22b54bf 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h
index 715febf2fd1..3a4ac279852 100644
--- a/source/blender/blenkernel/BKE_sequencer.h
+++ b/source/blender/blenkernel/BKE_sequencer.h
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/blenkernel/intern/BME_Customdata.c b/source/blender/blenkernel/intern/BME_Customdata.c
index 424af08f943..af0e5c93aba 100644
--- a/source/blender/blenkernel/intern/BME_Customdata.c
+++ b/source/blender/blenkernel/intern/BME_Customdata.c
@@ -10,10 +10,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c
index 920e1989117..04f83dd351e 100644
--- a/source/blender/blenlib/intern/scanfill.c
+++ b/source/blender/blenlib/intern/scanfill.c
@@ -706,7 +706,7 @@ static int scanfill(PolyFill *pf, short mat_nr)
ed1->v1->h--;
ed1->v2->h--;
/* ed2 can be removed when it's a boundary edge */
- if(ed2->f==0 && twoconnected || ed2->f==FILLBOUNDARY) {
+ if((ed2->f == 0 && twoconnected) || (ed2->f == FILLBOUNDARY)) {
BLI_remlink((ListBase *)&(sc->first),ed2);
BLI_addtail(&filledgebase,ed2);
ed2->v2->f= 0;
diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c
index 8c9988c4d84..06225a38311 100644
--- a/source/blender/editors/armature/reeb.c
+++ b/source/blender/editors/armature/reeb.c
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index 37a057303e9..5d95992f7d4 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -5,10 +5,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 66add6d8f0c..dee945ecd7d 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c
index 8b9cc98e2fe..6b40ba83b0d 100644
--- a/source/blender/editors/object/object_bake.c
+++ b/source/blender/editors/object/object_bake.c
@@ -636,6 +636,13 @@ static void *init_normal_data(MultiresBakeRender *bkr, Image *UNUSED(ima))
return (void*)normal_data;
}
+static void free_normal_data(void *bake_data)
+{
+ MNormalBakeData *normal_data= (MNormalBakeData*)bake_data;
+
+ MEM_freeN(normal_data);
+}
+
static void apply_heights_data(void *bake_data)
{
MHeightBakeData *height_data= (MHeightBakeData*)bake_data;
@@ -849,7 +856,7 @@ static void bake_images(MultiresBakeRender *bkr)
switch(bkr->mode) {
case RE_BAKE_NORMALS:
- do_multires_bake(bkr, ima, apply_tangmat_callback, init_normal_data, NULL, NULL);
+ do_multires_bake(bkr, ima, apply_tangmat_callback, init_normal_data, NULL, free_normal_data);
break;
case RE_BAKE_DISPLACEMENT:
do_multires_bake(bkr, ima, apply_heights_callback, init_heights_data,
diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h
index 9d6b5884cbd..0dae8b362cd 100644
--- a/source/blender/editors/physics/physics_intern.h
+++ b/source/blender/editors/physics/physics_intern.h
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h
index cd4c22df418..0a8824e473d 100644
--- a/source/blender/editors/space_file/filelist.h
+++ b/source/blender/editors/space_file/filelist.h
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index cf9bf3de1b8..86031ca7104 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -893,9 +893,11 @@ struct DrawIconArg {
static void tselem_draw_icon_uibut(struct DrawIconArg *arg, int icon)
{
/* restrict collumn clip... it has been coded by simply overdrawing, doesnt work for buttons */
- if(arg->x >= arg->xmax)
- UI_icon_draw(arg->x, arg->y, icon);
- else {
+ if(arg->x >= arg->xmax) {
+ glEnable(GL_BLEND);
+ UI_icon_draw_aspect(arg->x, arg->y, icon, 1.0f, arg->alpha);
+ glDisable(GL_BLEND);
+ } else {
/* XXX investigate: button placement of icons is way different than UI_icon_draw? */
float ufac= UI_UNIT_X/20.0f;
uiBut *but= uiDefIconBut(arg->block, LABEL, 0, icon, arg->x-3.0f*ufac, arg->y, UI_UNIT_X-4.0f*ufac, UI_UNIT_Y-4.0f*ufac, NULL, 0.0, 0.0, 1.0, arg->alpha, (arg->id && arg->id->lib) ? arg->id->lib->name : "");
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index 527537b5efb..f0055bd6008 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -125,6 +125,12 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
Object *obact= CTX_data_active_object(C);
ScrArea *sa= CTX_wm_area(C);
+ /* undo during jobs are running can easily lead to freeing data using by jobs,
+ or they can just lead to freezing job in some other cases */
+ if(WM_jobs_has_running(CTX_wm_manager(C))) {
+ return OPERATOR_CANCELLED;
+ }
+
/* grease pencil can be can be used in plenty of spaces, so check it first */
if(ED_gpencil_session_active()) {
return ED_undo_gpencil_step(C, step, undoname);
diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h
index 5e0eff69047..9e551f637de 100644
--- a/source/blender/gpu/GPU_buffers.h
+++ b/source/blender/gpu/GPU_buffers.h
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/gpu/GPU_draw.h b/source/blender/gpu/GPU_draw.h
index 5813fe21265..dc1f80ca903 100644
--- a/source/blender/gpu/GPU_draw.h
+++ b/source/blender/gpu/GPU_draw.h
@@ -1,21 +1,18 @@
/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
- * This shader is free software; you can redistribute it and/or
+ * 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * of the License, or (at your option) any later version.
*
- * This shader is distributed in the hope that it will be useful,
+ * 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 shader; if not, write to the Free Software Foundation,
+ * along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2005 Blender Foundation.
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h
index 3fff79390e3..d827fda0844 100644
--- a/source/blender/gpu/GPU_extensions.h
+++ b/source/blender/gpu/GPU_extensions.h
@@ -1,21 +1,18 @@
/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
- * This shader is free software; you can redistribute it and/or
+ * 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * of the License, or (at your option) any later version.
*
- * This shader is distributed in the hope that it will be useful,
+ * 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 shader; if not, write to the Free Software Foundation,
+ * along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2005 Blender Foundation.
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h
index e838d801dc1..418bea5fe9c 100644
--- a/source/blender/gpu/GPU_material.h
+++ b/source/blender/gpu/GPU_material.h
@@ -1,21 +1,18 @@
/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
- * This shader is free software; you can redistribute it and/or
+ * 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * of the License, or (at your option) any later version.
*
- * This shader is distributed in the hope that it will be useful,
+ * 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 shader; if not, write to the Free Software Foundation,
+ * along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2005 Blender Foundation.
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index 98491201ec9..25347cc54c6 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 4a923e66356..185f9eb185e 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h
index 06378b088de..f52b5bb627e 100644
--- a/source/blender/gpu/intern/gpu_codegen.h
+++ b/source/blender/gpu/intern/gpu_codegen.h
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 05b980cd88c..afd22fb70a0 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index 184eac9519e..79db125c21f 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 349f5cddcfb..8e567d0ac70 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -126,9 +126,9 @@ EnumPropertyItem prop_noise_type_items[] = {
#if 0
EnumPropertyItem prop_wave_items[] = {
- {SHD_WAVE_SINE, "SINE", 0, "Sine", "Uses a sine wave to produce bands"},
- {SHD_WAVE_SAW, "SAW", 0, "Saw", "Uses a saw wave to produce bands"},
- {SHD_WAVE_TRI, "TRI", 0, "Tri", "Uses a triangle wave to produce bands"},
+ {SHD_WAVE_SINE, "SINE", 0, "Sine", "Use a sine wave to produce bands"},
+ {SHD_WAVE_SAW, "SAW", 0, "Saw", "Use a saw wave to produce bands"},
+ {SHD_WAVE_TRI, "TRI", 0, "Tri", "Use a triangle wave to produce bands"},
{0, NULL, 0, NULL, NULL}};
#endif
@@ -1292,13 +1292,13 @@ static void def_sh_tex_image(StructRNA *srna)
static void def_sh_tex_gradient(StructRNA *srna)
{
static EnumPropertyItem prop_gradient_type[] = {
- {SHD_BLEND_LINEAR, "LINEAR", 0, "Linear", "Creates a linear progression"},
- {SHD_BLEND_QUADRATIC, "QUADRATIC", 0, "Quadratic", "Creates a quadratic progression"},
- {SHD_BLEND_EASING, "EASING", 0, "Easing", "Creates a progression easing from one step to the next"},
- {SHD_BLEND_DIAGONAL, "DIAGONAL", 0, "Diagonal", "Creates a diagonal progression"},
- {SHD_BLEND_SPHERICAL, "SPHERICAL", 0, "Spherical", "Creates a spherical progression"},
- {SHD_BLEND_QUADRATIC_SPHERE, "QUADRATIC_SPHERE", 0, "Quadratic sphere", "Creates a quadratic progression in the shape of a sphere"},
- {SHD_BLEND_RADIAL, "RADIAL", 0, "Radial", "Creates a radial progression"},
+ {SHD_BLEND_LINEAR, "LINEAR", 0, "Linear", "Create a linear progression"},
+ {SHD_BLEND_QUADRATIC, "QUADRATIC", 0, "Quadratic", "Create a quadratic progression"},
+ {SHD_BLEND_EASING, "EASING", 0, "Easing", "Create a progression easing from one step to the next"},
+ {SHD_BLEND_DIAGONAL, "DIAGONAL", 0, "Diagonal", "Create a diagonal progression"},
+ {SHD_BLEND_SPHERICAL, "SPHERICAL", 0, "Spherical", "Create a spherical progression"},
+ {SHD_BLEND_QUADRATIC_SPHERE, "QUADRATIC_SPHERE", 0, "Quadratic sphere", "Create a quadratic progression in the shape of a sphere"},
+ {SHD_BLEND_RADIAL, "RADIAL", 0, "Radial", "Create a radial progression"},
{0, NULL, 0, NULL, NULL}};
PropertyRNA *prop;
@@ -1308,7 +1308,7 @@ static void def_sh_tex_gradient(StructRNA *srna)
prop= RNA_def_property(srna, "gradient_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_gradient_type);
- RNA_def_property_ui_text(prop, "Gradient Type", "Sets the style of the color blending");
+ RNA_def_property_ui_text(prop, "Gradient Type", "Style of the color blending");
RNA_def_property_update(prop, 0, "rna_Node_update");
}
@@ -1376,8 +1376,8 @@ static void def_sh_tex_voronoi(StructRNA *srna)
static void def_sh_tex_wave(StructRNA *srna)
{
static EnumPropertyItem prop_wave_type_items[] = {
- {SHD_WAVE_BANDS, "BANDS", 0, "Bands", "Uses standard wave texture in bands"},
- {SHD_WAVE_RINGS, "RINGS", 0, "Rings", "Uses wave texture in rings"},
+ {SHD_WAVE_BANDS, "BANDS", 0, "Bands", "Use standard wave texture in bands"},
+ {SHD_WAVE_RINGS, "RINGS", 0, "Rings", "Use wave texture in rings"},
{0, NULL, 0, NULL, NULL}};
PropertyRNA *prop;
@@ -1521,12 +1521,12 @@ static void def_cmp_blur(StructRNA *srna)
prop = RNA_def_property(srna, "use_bokeh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bokeh", 1);
- RNA_def_property_ui_text(prop, "Bokeh", "Uses circular filter (slower)");
+ RNA_def_property_ui_text(prop, "Bokeh", "Use circular filter (slower)");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "use_gamma_correction", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gamma", 1);
- RNA_def_property_ui_text(prop, "Gamma", "Applies filter on gamma corrected values");
+ RNA_def_property_ui_text(prop, "Gamma", "Apply filter on gamma corrected values");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
@@ -1602,7 +1602,7 @@ static void def_cmp_vector_blur(StructRNA *srna)
prop = RNA_def_property(srna, "speed_min", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "minspeed");
RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "Min Speed", "Minimum speed for a pixel to be blurred; used to separate background from foreground");
+ RNA_def_property_ui_text(prop, "Min Speed", "Minimum speed for a pixel to be blurred (used to separate background from foreground)");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "speed_max", PROP_INT, PROP_NONE);
@@ -1614,7 +1614,7 @@ static void def_cmp_vector_blur(StructRNA *srna)
prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fac");
RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Blur Factor", "Scaling factor for motion vectors; actually 'shutter speed' in frames");
+ RNA_def_property_ui_text(prop, "Blur Factor", "Scaling factor for motion vectors (actually, 'shutter speed', in frames)");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "use_curved", PROP_BOOLEAN, PROP_NONE);
@@ -2037,7 +2037,7 @@ static void def_cmp_channel_matte(StructRNA *srna)
RNA_def_property_enum_sdna(prop, NULL, "channel");
RNA_def_property_enum_items(prop, prop_tri_channel_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Node_channel_itemf");
- RNA_def_property_ui_text(prop, "Limit Channel", "Limit by this channels value");
+ RNA_def_property_ui_text(prop, "Limit Channel", "Limit by this channel's value");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "limit_max", PROP_FLOAT, PROP_NONE);
@@ -2141,7 +2141,7 @@ static void def_cmp_defocus(StructRNA *srna)
prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "rotation");
RNA_def_property_range(prop, 0.0f, DEG2RADF(90.0f));
- RNA_def_property_ui_text(prop, "Angle", "Bokeh shape rotation offset in degrees");
+ RNA_def_property_ui_text(prop, "Angle", "Bokeh shape rotation offset");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "use_gamma_correction", PROP_BOOLEAN, PROP_NONE);
@@ -2187,7 +2187,7 @@ static void def_cmp_defocus(StructRNA *srna)
prop = RNA_def_property(srna, "z_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scale");
RNA_def_property_range(prop, 0.0f, 1000.0f);
- RNA_def_property_ui_text(prop, "Z-Scale", "Scales the Z input when not using a z-buffer, controls maximum blur designated by the color white or input value 1");
+ RNA_def_property_ui_text(prop, "Z-Scale", "Scale the Z input when not using a z-buffer, controls maximum blur designated by the color white or input value 1");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
@@ -2522,12 +2522,12 @@ static void def_cmp_lensdist(StructRNA *srna)
prop = RNA_def_property(srna, "use_projector", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "proj", 1);
- RNA_def_property_ui_text(prop, "Projector", "Enable/disable projector mode. Effect is applied in horizontal direction only");
+ RNA_def_property_ui_text(prop, "Projector", "Enable/disable projector mode (the effect is applied in horizontal direction only)");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "use_jitter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "jit", 1);
- RNA_def_property_ui_text(prop, "Jitter", "Enable/disable jittering; faster, but also noisier");
+ RNA_def_property_ui_text(prop, "Jitter", "Enable/disable jittering (faster, but also noisier)");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "use_fit", PROP_BOOLEAN, PROP_NONE);
@@ -2622,7 +2622,7 @@ static void def_cmp_zcombine(StructRNA *srna)
prop = RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom1", 0);
- RNA_def_property_ui_text(prop, "Use Alpha", "Takes Alpha channel into account when doing the Z operation");
+ RNA_def_property_ui_text(prop, "Use Alpha", "Take Alpha channel into account when doing the Z operation");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h
index 78be14ebf7e..d8fabad824e 100644
--- a/source/blender/makesrna/intern/rna_nodetree_types.h
+++ b/source/blender/makesrna/intern/rna_nodetree_types.h
@@ -74,7 +74,7 @@ DefNode( ShaderNode, SH_NODE_VOLUME_TRANSPARENT, 0, "VO
DefNode( ShaderNode, SH_NODE_VOLUME_ISOTROPIC, 0, "VOLUME_ISOTROPIC", VolumeIsotropic, "Isotropic Volume", "" )
DefNode( ShaderNode, SH_NODE_EMISSION, 0, "EMISSION", Emission, "Emission", "" )
DefNode( ShaderNode, SH_NODE_NEW_GEOMETRY, 0, "NEW_GEOMETRY", NewGeometry, "Geometry", "" )
-DefNode( ShaderNode, SH_NODE_LIGHT_PATH, 0, "LIGHT_PATH", Light_path, "Light_path", "" )
+DefNode( ShaderNode, SH_NODE_LIGHT_PATH, 0, "LIGHT_PATH", Light_path, "Light Path", "" )
DefNode( ShaderNode, SH_NODE_TEX_IMAGE, def_sh_tex_image, "TEX_IMAGE", TexImage, "Image Texture", "" )
DefNode( ShaderNode, SH_NODE_TEX_ENVIRONMENT, def_sh_tex_environment, "TEX_ENVIRONMENT", TexEnvironment, "Environment Texture","" )
DefNode( ShaderNode, SH_NODE_TEX_SKY, def_sh_tex_sky, "TEX_SKY", TexSky, "Sky Texture", "" )
@@ -90,7 +90,7 @@ DefNode( CompositorNode, CMP_NODE_VIEWER, 0, "VIEWE
DefNode( CompositorNode, CMP_NODE_RGB, 0, "RGB", RGB, "RGB", "" )
DefNode( CompositorNode, CMP_NODE_VALUE, 0, "VALUE", Value, "Value", "" )
DefNode( CompositorNode, CMP_NODE_MIX_RGB, def_mix_rgb, "MIX_RGB", MixRGB, "Mix RGB", "" )
-DefNode( CompositorNode, CMP_NODE_VALTORGB, def_colorramp, "VALTORGB", ValToRGB, "Val to RGB", "" )
+DefNode( CompositorNode, CMP_NODE_VALTORGB, def_colorramp, "VALTORGB", ValToRGB, "Value to RGB", "" )
DefNode( CompositorNode, CMP_NODE_RGBTOBW, 0, "RGBTOBW", RGBToBW, "RGB to BW", "" )
DefNode( CompositorNode, CMP_NODE_NORMAL, 0, "NORMAL", Normal, "Normal", "" )
DefNode( CompositorNode, CMP_NODE_CURVE_VEC, def_vector_curve, "CURVE_VEC", CurveVec, "Vector Curve", "" )
@@ -138,7 +138,7 @@ DefNode( CompositorNode, CMP_NODE_GAMMA, 0, "GAMMA
DefNode( CompositorNode, CMP_NODE_INVERT, def_cmp_invert, "INVERT", Invert, "Invert", "" )
DefNode( CompositorNode, CMP_NODE_NORMALIZE, 0, "NORMALIZE", Normalize, "Normalize", "" )
DefNode( CompositorNode, CMP_NODE_CROP, def_cmp_crop, "CROP", Crop, "Crop", "" )
-DefNode( CompositorNode, CMP_NODE_DBLUR, def_cmp_dblur, "DBLUR", DBlur, "DBlur", "" )
+DefNode( CompositorNode, CMP_NODE_DBLUR, def_cmp_dblur, "DBLUR", DBlur, "Directional Blur", "" )
DefNode( CompositorNode, CMP_NODE_BILATERALBLUR, def_cmp_bilateral_blur, "BILATERALBLUR", Bilateralblur, "Bilateral Blur", "" )
DefNode( CompositorNode, CMP_NODE_PREMULKEY, def_cmp_premul_key, "PREMULKEY", PremulKey, "Premul Key", "" )
DefNode( CompositorNode, CMP_NODE_GLARE, def_cmp_glare, "GLARE", Glare, "Glare", "" )
@@ -160,8 +160,8 @@ DefNode( TextureNode, TEX_NODE_TEXTURE, def_texture, "TEXTU
DefNode( TextureNode, TEX_NODE_BRICKS, def_tex_bricks, "BRICKS", Bricks, "Bricks", "" )
DefNode( TextureNode, TEX_NODE_MATH, def_math, "MATH", Math, "Math", "" )
DefNode( TextureNode, TEX_NODE_MIX_RGB, def_mix_rgb, "MIX_RGB", MixRGB, "Mix RGB", "" )
-DefNode( TextureNode, TEX_NODE_RGBTOBW, 0, "RGBTOBW", RGBToBW, "RGB To BW", "" )
-DefNode( TextureNode, TEX_NODE_VALTORGB, def_colorramp, "VALTORGB", ValToRGB, "Val To RGB", "" )
+DefNode( TextureNode, TEX_NODE_RGBTOBW, 0, "RGBTOBW", RGBToBW, "RGB to BW", "" )
+DefNode( TextureNode, TEX_NODE_VALTORGB, def_colorramp, "VALTORGB", ValToRGB, "Value to RGB", "" )
DefNode( TextureNode, TEX_NODE_IMAGE, def_tex_image, "IMAGE", Image, "Image", "" )
DefNode( TextureNode, TEX_NODE_CURVE_RGB, def_rgb_curve, "CURVE_RGB", CurveRGB, "RGB Curve", "" )
DefNode( TextureNode, TEX_NODE_INVERT, 0, "INVERT", Invert, "Invert", "" )
@@ -174,7 +174,7 @@ DefNode( TextureNode, TEX_NODE_COORD, 0, "COORD
DefNode( TextureNode, TEX_NODE_DISTANCE, 0, "DISTANCE", Distance, "Distance", "" )
DefNode( TextureNode, TEX_NODE_COMPOSE, 0, "COMPOSE", Compose, "Compose", "" )
DefNode( TextureNode, TEX_NODE_DECOMPOSE, 0, "DECOMPOSE", Decompose, "Decompose", "" )
-DefNode( TextureNode, TEX_NODE_VALTONOR, 0, "VALTONOR", ValToNor, "Val to Nor", "" )
+DefNode( TextureNode, TEX_NODE_VALTONOR, 0, "VALTONOR", ValToNor, "Value to Normal", "" )
DefNode( TextureNode, TEX_NODE_SCALE, 0, "SCALE", Scale, "Scale", "" )
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index a3d043ab6ec..89c17819265 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -268,7 +268,7 @@ static MovieTrackingMarker *rna_trackingTrack_marker_find_frame(MovieTrackingTra
static EnumPropertyItem tracker_items[] = {
{TRACKER_KLT, "KLT", 0, "KLT", "Kanade–Lucas–Tomasi tracker which works with most of video clips, a bit slower than SAD"},
- {TRACKER_SAD, "SAD", 0, "SAD", "Sum of Absolute Differences tracker which can be used when MLT tracker fails"},
+ {TRACKER_SAD, "SAD", 0, "SAD", "Sum of Absolute Differences tracker which can be used when KLT tracker fails"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem pattern_match_items[] = {
@@ -384,7 +384,7 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "default_frames_limit");
RNA_def_property_range(prop, 0, SHRT_MAX);
- RNA_def_property_ui_text(prop, "Frames Limit", "Every tracking cycle, this amount of frames are tracked");
+ RNA_def_property_ui_text(prop, "Frames Limit", "Every tracking cycle, this number of frames are tracked");
/* pattern match */
prop= RNA_def_property(srna, "default_pattern_match", PROP_ENUM, PROP_NONE);
@@ -432,7 +432,7 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "default_pattern_size");
RNA_def_property_range(prop, 5, 1000);
RNA_def_property_update(prop, 0, "rna_tracking_defaultSettings_patternUpdate");
- RNA_def_property_ui_text(prop, "Pattern Size", "Size of pattern area for newly creating tracks");
+ RNA_def_property_ui_text(prop, "Pattern Size", "Size of pattern area for newly created tracks");
/* default search size */
prop= RNA_def_property(srna, "default_search_size", PROP_INT, PROP_NONE);
@@ -440,7 +440,7 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "default_search_size");
RNA_def_property_range(prop, 5, 1000);
RNA_def_property_update(prop, 0, "rna_tracking_defaultSettings_searchUpdate");
- RNA_def_property_ui_text(prop, "Search Size", "Size of search area for newly creating tracks");
+ RNA_def_property_ui_text(prop, "Search Size", "Size of search area for newly created tracks");
}
static void rna_def_trackingCamera(BlenderRNA *brna)
@@ -607,7 +607,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "frames_limit");
RNA_def_property_range(prop, 0, SHRT_MAX);
- RNA_def_property_ui_text(prop, "Frames Limit", "Every tracking cycle, this amount of frames are tracked");
+ RNA_def_property_ui_text(prop, "Frames Limit", "Every tracking cycle, this number of frames are tracked");
/* pattern match */
prop= RNA_def_property(srna, "pattern_match", PROP_ENUM, PROP_NONE);
@@ -794,7 +794,7 @@ static void rna_def_trackingStabilization(BlenderRNA *brna)
prop= RNA_def_property(srna, "scale_max", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "maxscale");
RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Maximal Scale", "Limits the amount of automatic scaling");
+ RNA_def_property_ui_text(prop, "Maximal Scale", "Limit the amount of automatic scaling");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_tracking_flushUpdate");
/* influence_location */
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index f7ad47b4ad9..0ea6b902150 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -2616,6 +2616,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{15, "RUSSIAN", 0, "Russian (Русский)", "ru_RU"},
{13, "SIMPLIFIED_CHINESE", 0, "Simplified Chinese (简体中文)", "zh_CN"},
{9, "SPANISH", 0, "Spanish (Español)", "es"},
+ {14, "TRADITIONAL_CHINESE", 0, "Traditional Chinese (繁體中文)", "zh_TW"},
{0, "", 0, "In progress", ""},
{2, "JAPANESE", 0, "Japanese (日本語)", "ja_JP"},
{3, "DUTCH", 0, "Dutch (Nederlandse taal)", "nl_NL"},
@@ -2625,7 +2626,6 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{10, "CATALAN", 0, "Catalan (Català)", "ca_AD"},
{11, "CZECH", 0, "Czech (Český)", "cs_CZ"},
{12, "BRAZILIAN_PORTUGUESE", 0, "Brazilian Portuguese (Português do Brasil)", "pt_BR"},
- {14, "TRADITIONAL_CHINESE", 0, "Traditional Chinese (繁體中文)", "zh_TW"},
{16, "CROATIAN", 0, "Croatian (Hrvatski)", "hr_HR"},
{17, "SERBIAN", 0, "Serbian (Српском језику)", "sr_RS"},
{18, "UKRAINIAN", 0, "Ukrainian (Український)", "uk_UA"},
diff --git a/source/blender/modifiers/MOD_modifiertypes.h b/source/blender/modifiers/MOD_modifiertypes.h
index 3af12e110ae..76ea6d6bb73 100644
--- a/source/blender/modifiers/MOD_modifiertypes.h
+++ b/source/blender/modifiers/MOD_modifiertypes.h
@@ -4,18 +4,15 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful;
+ * 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;
+ * along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Ben Batt
diff --git a/source/blender/modifiers/intern/MOD_none.c b/source/blender/modifiers/intern/MOD_none.c
index 6b014a869b7..967532adf3c 100644
--- a/source/blender/modifiers/intern/MOD_none.c
+++ b/source/blender/modifiers/intern/MOD_none.c
@@ -4,18 +4,15 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful;
+ * 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;
+ * along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2005 Blender Foundation.
diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c
index 6f3e99fff0f..38cd62046b0 100644
--- a/source/blender/modifiers/intern/MOD_util.c
+++ b/source/blender/modifiers/intern/MOD_util.c
@@ -4,18 +4,15 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful;
+ * 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;
+ * along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2005 Blender Foundation.
diff --git a/source/blender/modifiers/intern/MOD_util.h b/source/blender/modifiers/intern/MOD_util.h
index abc36653082..f1f6252c255 100644
--- a/source/blender/modifiers/intern/MOD_util.h
+++ b/source/blender/modifiers/intern/MOD_util.h
@@ -4,18 +4,15 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful;
+ * 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;
+ * along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s): Ben Batt
diff --git a/source/blender/nodes/NOD_composite.h b/source/blender/nodes/NOD_composite.h
index b74342ab516..97a5afec7da 100644
--- a/source/blender/nodes/NOD_composite.h
+++ b/source/blender/nodes/NOD_composite.h
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/nodes/NOD_shader.h b/source/blender/nodes/NOD_shader.h
index 293ce466574..ae255517733 100644
--- a/source/blender/nodes/NOD_shader.h
+++ b/source/blender/nodes/NOD_shader.h
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/nodes/NOD_texture.h b/source/blender/nodes/NOD_texture.h
index b3fdbf0e250..cb727ef071a 100644
--- a/source/blender/nodes/NOD_texture.h
+++ b/source/blender/nodes/NOD_texture.h
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/blender/python/generic/CMakeLists.txt b/source/blender/python/generic/CMakeLists.txt
index bd9731a277a..9a73911d697 100644
--- a/source/blender/python/generic/CMakeLists.txt
+++ b/source/blender/python/generic/CMakeLists.txt
@@ -37,14 +37,12 @@ set(SRC
blf_py_api.c
bpy_internal_import.c
idprop_py_api.c
- noise_py_api.c
py_capi_utils.c
bgl.h
blf_py_api.h
bpy_internal_import.h
idprop_py_api.h
- noise_py_api.h
py_capi_utils.h
)
diff --git a/source/blender/python/generic/noise_py_api.c b/source/blender/python/generic/noise_py_api.c
deleted file mode 100644
index 902e64eb7c1..00000000000
--- a/source/blender/python/generic/noise_py_api.c
+++ /dev/null
@@ -1,792 +0,0 @@
-/*
- * ***** 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,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * This is a new part of Blender.
- *
- * Contributor(s): eeshlo, Campbell Barton
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file blender/python/generic/noise_py_api.c
- * \ingroup pygen
- *
- * This file defines the 'noise' module, a general purpose module to access
- * blenders noise functions.
- */
-
-
-/************************/
-/* Blender Noise Module */
-/************************/
-
-#include <Python.h>
-
-#include "structseq.h"
-
-#include "BLI_blenlib.h"
-#include "BLI_utildefines.h"
-
-#include "DNA_texture_types.h"
-
-#include "noise_py_api.h"
-
-/*-----------------------------------------*/
-/* 'mersenne twister' random number generator */
-
-/*
- A C-program for MT19937, with initialization improved 2002/2/10.
- Coded by Takuji Nishimura and Makoto Matsumoto.
- This is a faster version by taking Shawn Cokus's optimization,
- Matthe Bellew's simplification, Isaku Wada's real version.
-
- Before using, initialize the state by using init_genrand(seed)
- or init_by_array(init_key, key_length).
-
- Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- 3. The names of its contributors may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
- Any feedback is very welcome.
- http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
- email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
-*/
-
-/* 2.5 update
- * Noise.setRandomSeed --> seed_set
- * Noise.randuvec --> random_unit_vector
- * Noise.vNoise --> noise_vector
- * Noise.vTurbulence --> turbulence_vector
- * Noise.multiFractal --> multi_fractal
- * Noise.cellNoise --> cell
- * Noise.cellNoiseV --> cell_vector
- * Noise.vlNoise --> vl_vector
- * Noise.heteroTerrain --> hetero_terrain
- * Noise.hybridMFractal --> hybrid_multi_fractal
- * Noise.fBm --> fractal
- * Noise.ridgedMFractal --> ridged_multi_fractal
- *
- * Const's *
- * Noise.NoiseTypes --> types
- * Noise.DistanceMetrics --> distance_metrics
- */
-
-/* Period parameters */
-#define N 624
-#define M 397
-#define MATRIX_A 0x9908b0dfUL /* constant vector a */
-#define UMASK 0x80000000UL /* most significant w-r bits */
-#define LMASK 0x7fffffffUL /* least significant r bits */
-#define MIXBITS(u,v) (((u) & UMASK) | ((v) & LMASK))
-#define TWIST(u,v) ((MIXBITS(u,v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL))
-
-static unsigned long state[N]; /* the array for the state vector */
-static int left = 1;
-static int initf = 0;
-static unsigned long *next;
-
-/* initializes state[N] with a seed */
-static void init_genrand(unsigned long s)
-{
- int j;
- state[0] = s & 0xffffffffUL;
- for (j = 1; j < N; j++) {
- state[j] =
- (1812433253UL *
- (state[j - 1] ^ (state[j - 1] >> 30)) + j);
- /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */
- /* In the previous versions, MSBs of the seed affect */
- /* only MSBs of the array state[]. */
- /* 2002/01/09 modified by Makoto Matsumoto */
- state[j] &= 0xffffffffUL; /* for >32 bit machines */
- }
- left = 1;
- initf = 1;
-}
-
-static void next_state(void)
-{
- unsigned long *p = state;
- int j;
-
- /* if init_genrand() has not been called, */
- /* a default initial seed is used */
- if (initf == 0)
- init_genrand(5489UL);
-
- left = N;
- next = state;
-
- for (j = N - M + 1; --j; p++)
- *p = p[M] ^ TWIST(p[0], p[1]);
-
- for (j = M; --j; p++)
- *p = p[M - N] ^ TWIST(p[0], p[1]);
-
- *p = p[M - N] ^ TWIST(p[0], state[0]);
-}
-
-/*------------------------------------------------------------*/
-
-static void setRndSeed(int seed)
-{
- if (seed == 0)
- init_genrand(time(NULL));
- else
- init_genrand(seed);
-}
-
-/* float number in range [0, 1) using the mersenne twister rng */
-static float frand(void)
-{
- unsigned long y;
-
- if (--left == 0)
- next_state();
- y = *next++;
-
- /* Tempering */
- y ^= (y >> 11);
- y ^= (y << 7) & 0x9d2c5680UL;
- y ^= (y << 15) & 0xefc60000UL;
- y ^= (y >> 18);
-
- return (float) y / 4294967296.f;
-}
-
-/*------------------------------------------------------------*/
-
-/* returns random unit vector */
-static void randuvec(float v[3])
-{
- float r;
- v[2] = 2.f * frand() - 1.f;
- if ((r = 1.f - v[2] * v[2]) > 0.f) {
- float a = (float)(6.283185307f * frand());
- r = (float)sqrt(r);
- v[0] = (float)(r * cosf(a));
- v[1] = (float)(r * sinf(a));
- }
- else {
- v[2] = 1.f;
- }
-}
-
-static PyObject *Noise_random(PyObject *UNUSED(self))
-{
- return PyFloat_FromDouble(frand());
-}
-
-static PyObject *Noise_random_unit_vector(PyObject *UNUSED(self))
-{
- float v[3] = {0.0f, 0.0f, 0.0f};
- randuvec(v);
- return Py_BuildValue("[fff]", v[0], v[1], v[2]);
-}
-
-/*---------------------------------------------------------------------*/
-
-/* Random seed init. Only used for MT random() & randuvec() */
-
-static PyObject *Noise_seed_set(PyObject *UNUSED(self), PyObject *args)
-{
- int s;
- if (!PyArg_ParseTuple(args, "i:seed_set", &s))
- return NULL;
- setRndSeed(s);
- Py_RETURN_NONE;
-}
-
-/*-------------------------------------------------------------------------*/
-
-/* General noise */
-
-static PyObject *Noise_noise(PyObject *UNUSED(self), PyObject *args)
-{
- float x, y, z;
- int nb = 1;
- if (!PyArg_ParseTuple(args, "(fff)|i:noise", &x, &y, &z, &nb))
- return NULL;
-
- return PyFloat_FromDouble((2.0f * BLI_gNoise(1.0f, x, y, z, 0, nb) - 1.0f));
-}
-
-/*-------------------------------------------------------------------------*/
-
-/* General Vector noise */
-
-static void noise_vector(float x, float y, float z, int nb, float v[3])
-{
- /* Simply evaluate noise at 3 different positions */
- v[0]= (float)(2.0f * BLI_gNoise(1.f, x + 9.321f, y - 1.531f, z - 7.951f, 0,
- nb) - 1.0f);
- v[1]= (float)(2.0f * BLI_gNoise(1.f, x, y, z, 0, nb) - 1.0f);
- v[2]= (float)(2.0f * BLI_gNoise(1.f, x + 6.327f, y + 0.1671f, z - 2.672f, 0,
- nb) - 1.0f);
-}
-
-static PyObject *Noise_vector(PyObject *UNUSED(self), PyObject *args)
-{
- float x, y, z, v[3];
- int nb = 1;
- if (!PyArg_ParseTuple(args, "(fff)|i:vector", &x, &y, &z, &nb))
- return NULL;
- noise_vector(x, y, z, nb, v);
- return Py_BuildValue("[fff]", v[0], v[1], v[2]);
-}
-
-/*---------------------------------------------------------------------------*/
-
-/* General turbulence */
-
-static float turb(float x, float y, float z, int oct, int hard, int nb,
- float ampscale, float freqscale)
-{
- float amp, out, t;
- int i;
- amp = 1.f;
- out = (float)(2.0f * BLI_gNoise(1.f, x, y, z, 0, nb) - 1.0f);
- if (hard)
- out = fabsf(out);
- for (i = 1; i < oct; i++) {
- amp *= ampscale;
- x *= freqscale;
- y *= freqscale;
- z *= freqscale;
- t = (float)(amp * (2.0f * BLI_gNoise(1.f, x, y, z, 0, nb) - 1.0f));
- if (hard)
- t = fabsf(t);
- out += t;
- }
- return out;
-}
-
-static PyObject *Noise_turbulence(PyObject *UNUSED(self), PyObject *args)
-{
- float x, y, z;
- int oct, hd, nb = 1;
- float as = 0.5, fs = 2.0;
- if (!PyArg_ParseTuple(args, "(fff)ii|iff:turbulence", &x, &y, &z, &oct, &hd, &nb, &as, &fs))
- return NULL;
-
- return PyFloat_FromDouble(turb(x, y, z, oct, hd, nb, as, fs));
-}
-
-/*--------------------------------------------------------------------------*/
-
-/* Turbulence Vector */
-
-static void vTurb(float x, float y, float z, int oct, int hard, int nb,
- float ampscale, float freqscale, float v[3])
-{
- float amp, t[3];
- int i;
- amp = 1.f;
- noise_vector(x, y, z, nb, v);
- if (hard) {
- v[0] = fabsf(v[0]);
- v[1] = fabsf(v[1]);
- v[2] = fabsf(v[2]);
- }
- for (i = 1; i < oct; i++) {
- amp *= ampscale;
- x *= freqscale;
- y *= freqscale;
- z *= freqscale;
- noise_vector(x, y, z, nb, t);
- if (hard) {
- t[0] = fabsf(t[0]);
- t[1] = fabsf(t[1]);
- t[2] = fabsf(t[2]);
- }
- v[0] += amp * t[0];
- v[1] += amp * t[1];
- v[2] += amp * t[2];
- }
-}
-
-static PyObject *Noise_turbulence_vector(PyObject *UNUSED(self), PyObject *args)
-{
- float x, y, z, v[3];
- int oct, hd, nb = 1;
- float as = 0.5, fs = 2.0;
- if (!PyArg_ParseTuple(args, "(fff)ii|iff:turbulence_vector", &x, &y, &z, &oct, &hd, &nb, &as, &fs))
- return NULL;
- vTurb(x, y, z, oct, hd, nb, as, fs, v);
- return Py_BuildValue("[fff]", v[0], v[1], v[2]);
-}
-
-/*---------------------------------------------------------------------*/
-
-/* F. Kenton Musgrave's fractal functions */
-
-static PyObject *Noise_fractal(PyObject *UNUSED(self), PyObject *args)
-{
- float x, y, z, H, lac, oct;
- int nb = 1;
- if (!PyArg_ParseTuple(args, "(fff)fff|i:fractal", &x, &y, &z, &H, &lac, &oct, &nb))
- return NULL;
- return PyFloat_FromDouble(mg_fBm(x, y, z, H, lac, oct, nb));
-}
-
-/*------------------------------------------------------------------------*/
-
-static PyObject *Noise_multi_fractal(PyObject *UNUSED(self), PyObject *args)
-{
- float x, y, z, H, lac, oct;
- int nb = 1;
- if (!PyArg_ParseTuple(args, "(fff)fff|i:multi_fractal", &x, &y, &z, &H, &lac, &oct, &nb))
- return NULL;
-
- return PyFloat_FromDouble(mg_MultiFractal(x, y, z, H, lac, oct, nb));
-}
-
-/*------------------------------------------------------------------------*/
-
-static PyObject *Noise_vl_vector(PyObject *UNUSED(self), PyObject *args)
-{
- float x, y, z, d;
- int nt1 = 1, nt2 = 1;
- if (!PyArg_ParseTuple(args, "(fff)f|ii:vl_vector", &x, &y, &z, &d, &nt1, &nt2))
- return NULL;
- return PyFloat_FromDouble(mg_VLNoise(x, y, z, d, nt1, nt2));
-}
-
-/*-------------------------------------------------------------------------*/
-
-static PyObject *Noise_hetero_terrain(PyObject *UNUSED(self), PyObject *args)
-{
- float x, y, z, H, lac, oct, ofs;
- int nb = 1;
- if (!PyArg_ParseTuple(args, "(fff)ffff|i:hetero_terrain", &x, &y, &z, &H, &lac, &oct, &ofs, &nb))
- return NULL;
-
- return PyFloat_FromDouble(mg_HeteroTerrain(x, y, z, H, lac, oct, ofs, nb));
-}
-
-/*-------------------------------------------------------------------------*/
-
-static PyObject *Noise_hybrid_multi_fractal(PyObject *UNUSED(self), PyObject *args)
-{
- float x, y, z, H, lac, oct, ofs, gn;
- int nb = 1;
- if (!PyArg_ParseTuple(args, "(fff)fffff|i:hybrid_multi_fractal", &x, &y, &z, &H, &lac, &oct, &ofs, &gn, &nb))
- return NULL;
-
- return PyFloat_FromDouble(mg_HybridMultiFractal(x, y, z, H, lac, oct, ofs, gn, nb));
-}
-
-/*------------------------------------------------------------------------*/
-
-static PyObject *Noise_ridged_multi_fractal(PyObject *UNUSED(self), PyObject *args)
-{
- float x, y, z, H, lac, oct, ofs, gn;
- int nb = 1;
- if (!PyArg_ParseTuple(args, "(fff)fffff|i:ridged_multi_fractal", &x, &y, &z, &H, &lac, &oct, &ofs, &gn, &nb))
- return NULL;
- return PyFloat_FromDouble(mg_RidgedMultiFractal(x, y, z, H, lac, oct, ofs, gn, nb));
-}
-
-/*-------------------------------------------------------------------------*/
-
-static PyObject *Noise_voronoi(PyObject *UNUSED(self), PyObject *args)
-{
- float x, y, z, da[4], pa[12];
- int dtype = 0;
- float me = 2.5; /* default minkovsky exponent */
- if (!PyArg_ParseTuple(args, "(fff)|if:voronoi", &x, &y, &z, &dtype, &me))
- return NULL;
- voronoi(x, y, z, da, pa, me, dtype);
- return Py_BuildValue("[[ffff][[fff][fff][fff][fff]]]",
- da[0], da[1], da[2], da[3],
- pa[0], pa[1], pa[2],
- pa[3], pa[4], pa[5],
- pa[6], pa[7], pa[8], pa[9], pa[10], pa[11]);
-}
-
-/*-------------------------------------------------------------------------*/
-
-static PyObject *Noise_cell(PyObject *UNUSED(self), PyObject *args)
-{
- float x, y, z;
- if (!PyArg_ParseTuple(args, "(fff):cell", &x, &y, &z))
- return NULL;
-
- return PyFloat_FromDouble(cellNoise(x, y, z));
-}
-
-/*--------------------------------------------------------------------------*/
-
-static PyObject *Noise_cell_vector(PyObject *UNUSED(self), PyObject *args)
-{
- float x, y, z, ca[3];
- if (!PyArg_ParseTuple(args, "(fff):cell_vector", &x, &y, &z))
- return NULL;
- cellNoiseV(x, y, z, ca);
- return Py_BuildValue("[fff]", ca[0], ca[1], ca[2]);
-}
-
-/*--------------------------------------------------------------------------*/
-/* For all other Blender modules, this stuff seems to be put in a header file.
- This doesn't seem really appropriate to me, so I just put it here, feel free to change it.
- In the original module I actually kept the docs stings with the functions themselves,
- but I grouped them here so that it can easily be moved to a header if anyone thinks that is necessary. */
-
-PyDoc_STRVAR(random__doc__,
-"() No arguments.\n\n\
-Returns a random floating point number in the range [0, 1)"
-);
-
-PyDoc_STRVAR(random_unit_vector__doc__,
-"() No arguments.\n\nReturns a random unit vector (3-float list)."
-);
-
-PyDoc_STRVAR(seed_set__doc__,
-"(seed value)\n\n\
-Initializes random number generator.\n\
-if seed is zero, the current time will be used instead."
-);
-
-PyDoc_STRVAR(noise__doc__,
-"((x,y,z) tuple, [noisetype])\n\n\
-Returns general noise of the optional specified type.\n\
-Optional argument noisetype determines the type of noise, STDPERLIN by default, see NoiseTypes."
-);
-
-PyDoc_STRVAR(noise_vector__doc__,
-"((x,y,z) tuple, [noisetype])\n\n\
-Returns noise vector (3-float list) of the optional specified type.\
-Optional argument noisetype determines the type of noise, STDPERLIN by default, see NoiseTypes."
-);
-
-PyDoc_STRVAR(turbulence__doc__,
-"((x,y,z) tuple, octaves, hard, [noisebasis], [ampscale], [freqscale])\n\n\
-Returns general turbulence value using the optional specified noisebasis function.\n\
-octaves (integer) is the number of noise values added.\n\
-hard (bool), when false (0) returns 'soft' noise, when true (1) returns 'hard' noise (returned value always positive).\n\
-Optional arguments:\n\
-noisebasis determines the type of noise used for the turbulence, STDPERLIN by default, see NoiseTypes.\n\
-ampscale sets the amplitude scale value of the noise frequencies added, 0.5 by default.\n\
-freqscale sets the frequency scale factor, 2.0 by default."
-);
-
-PyDoc_STRVAR(turbulence_vector__doc__,
-"((x,y,z) tuple, octaves, hard, [noisebasis], [ampscale], [freqscale])\n\n\
-Returns general turbulence vector (3-float list) using the optional specified noisebasis function.\n\
-octaves (integer) is the number of noise values added.\n\
-hard (bool), when false (0) returns 'soft' noise, when true (1) returns 'hard' noise (returned vector always positive).\n\
-Optional arguments:\n\
-noisebasis determines the type of noise used for the turbulence, STDPERLIN by default, see NoiseTypes.\n\
-ampscale sets the amplitude scale value of the noise frequencies added, 0.5 by default.\n\
-freqscale sets the frequency scale factor, 2.0 by default."
-);
-
-PyDoc_STRVAR(fractal__doc__,
-"((x,y,z) tuple, H, lacunarity, octaves, [noisebasis])\n\n\
-Returns Fractal Brownian Motion noise value(fBm).\n\
-H is the fractal increment parameter.\n\
-lacunarity is the gap between successive frequencies.\n\
-octaves is the number of frequencies in the fBm.\n\
-Optional argument noisebasis determines the type of noise used for the turbulence, STDPERLIN by default, see NoiseTypes."
-);
-
-PyDoc_STRVAR(multi_fractal__doc__,
-"((x,y,z) tuple, H, lacunarity, octaves, [noisebasis])\n\n\
-Returns Multifractal noise value.\n\
-H determines the highest fractal dimension.\n\
-lacunarity is gap between successive frequencies.\n\
-octaves is the number of frequencies in the fBm.\n\
-Optional argument noisebasis determines the type of noise used for the turbulence, STDPERLIN by default, see NoiseTypes."
-);
-
-PyDoc_STRVAR(vl_vector__doc__,
-"((x,y,z) tuple, distortion, [noisetype1], [noisetype2])\n\n\
-Returns Variable Lacunarity Noise value, a distorted variety of noise.\n\
-distortion sets the amount of distortion.\n\
-Optional arguments noisetype1 and noisetype2 set the noisetype to distort and the noisetype used for the distortion respectively.\n\
-See NoiseTypes, both are STDPERLIN by default."
-);
-
-PyDoc_STRVAR(hetero_terrain__doc__,
-"((x,y,z) tuple, H, lacunarity, octaves, offset, [noisebasis])\n\n\
-returns Heterogeneous Terrain value\n\
-H determines the fractal dimension of the roughest areas.\n\
-lacunarity is the gap between successive frequencies.\n\
-octaves is the number of frequencies in the fBm.\n\
-offset raises the terrain from 'sea level'.\n\
-Optional argument noisebasis determines the type of noise used for the turbulence, STDPERLIN by default, see NoiseTypes."
-);
-
-PyDoc_STRVAR(hybrid_multi_fractal__doc__,
-"((x,y,z) tuple, H, lacunarity, octaves, offset, gain, [noisebasis])\n\n\
-returns Hybrid Multifractal value.\n\
-H determines the fractal dimension of the roughest areas.\n\
-lacunarity is the gap between successive frequencies.\n\
-octaves is the number of frequencies in the fBm.\n\
-offset raises the terrain from 'sea level'.\n\
-gain scales the values.\n\
-Optional argument noisebasis determines the type of noise used for the turbulence, STDPERLIN by default, see NoiseTypes."
-);
-
-PyDoc_STRVAR(ridged_multi_fractal__doc__,
-"((x,y,z) tuple, H, lacunarity, octaves, offset, gain [noisebasis])\n\n\
-returns Ridged Multifractal value.\n\
-H determines the fractal dimension of the roughest areas.\n\
-lacunarity is the gap between successive frequencies.\n\
-octaves is the number of frequencies in the fBm.\n\
-offset raises the terrain from 'sea level'.\n\
-gain scales the values.\n\
-Optional argument noisebasis determines the type of noise used for the turbulence, STDPERLIN by default, see NoiseTypes."
-);
-
-PyDoc_STRVAR(voronoi__doc__,
-"((x,y,z) tuple, distance_metric, [exponent])\n\n\
-returns a list, containing a list of distances in order of closest feature,\n\
-and a list containing the positions of the four closest features\n\
-Optional arguments:\n\
-distance_metric: see DistanceMetrics, default is DISTANCE\n\
-exponent is only used with MINKOVSKY, default is 2.5."
-);
-
-PyDoc_STRVAR(cell__doc__,
-"((x,y,z) tuple)\n\n\
-returns cellnoise float value."
-);
-
-PyDoc_STRVAR(cell_vector__doc__,
-"((x,y,z) tuple)\n\n\
-returns cellnoise vector/point/color (3-float list)."
-);
-
-PyDoc_STRVAR(Noise__doc__,
-"Blender Noise and Turbulence Module\n\n\
-This module can be used to generate noise of various types.\n\
-This can be used for terrain generation, to create textures,\n\
-make animations more 'animated', object deformation, etc.\n\
-As an example, this code segment when scriptlinked to a framechanged event,\n\
-will make the camera sway randomly about, by changing parameters this can\n\
-look like anything from an earthquake to a very nervous or maybe even drunk cameraman...\n\
-(the camera needs an ipo with at least one Loc & Rot key for this to work!):\n\
-\n\
-\tfrom Blender import Get, Scene, Noise\n\
-\n\
-\t####################################################\n\
-\t# This controls jitter speed\n\
-\tsl = 0.025\n\
-\t# This controls the amount of position jitter\n\
-\tsp = 0.1\n\
-\t# This controls the amount of rotation jitter\n\
-\tsr = 0.25\n\
-\t####################################################\n\
-\n\
-\ttime = Get('curtime')\n\
-\tob = Scene.GetCurrent().getCurrentCamera()\n\
-\tps = (sl*time, sl*time, sl*time)\n\
-\t# To add jitter only when the camera moves, use this next line instead\n\
-\t#ps = (sl*ob.LocX, sl*ob.LocY, sl*ob.LocZ)\n\
-\trv = Noise.turbulence_vector(ps, 3, 0, Noise.NoiseTypes.NEWPERLIN)\n\
-\tob.dloc = (sp*rv[0], sp*rv[1], sp*rv[2])\n\
-\tob.drot = (sr*rv[0], sr*rv[1], sr*rv[2])\n\
-\n"
-);
-
-/* Just in case, declarations for a header file */
-/*
-static PyObject *Noise_random(PyObject *UNUSED(self));
-static PyObject *Noise_random_unit_vector(PyObject *UNUSED(self));
-static PyObject *Noise_seed_set(PyObject *UNUSED(self), PyObject *args);
-static PyObject *Noise_noise(PyObject *UNUSED(self), PyObject *args);
-static PyObject *Noise_vector(PyObject *UNUSED(self), PyObject *args);
-static PyObject *Noise_turbulence(PyObject *UNUSED(self), PyObject *args);
-static PyObject *Noise_turbulence_vector(PyObject *UNUSED(self), PyObject *args);
-static PyObject *Noise_fractal(PyObject *UNUSED(self), PyObject *args);
-static PyObject *Noise_multi_fractal(PyObject *UNUSED(self), PyObject *args);
-static PyObject *Noise_vl_vector(PyObject *UNUSED(self), PyObject *args);
-static PyObject *Noise_hetero_terrain(PyObject *UNUSED(self), PyObject *args);
-static PyObject *Noise_hybrid_multi_fractal(PyObject *UNUSED(self), PyObject *args);
-static PyObject *Noise_ridged_multi_fractal(PyObject *UNUSED(self), PyObject *args);
-static PyObject *Noise_voronoi(PyObject *UNUSED(self), PyObject *args);
-static PyObject *Noise_cell(PyObject *UNUSED(self), PyObject *args);
-static PyObject *Noise_cell_vector(PyObject *UNUSED(self), PyObject *args);
-*/
-
-static PyMethodDef NoiseMethods[] = {
- {"seed_set", (PyCFunction) Noise_seed_set, METH_VARARGS, seed_set__doc__},
- {"random", (PyCFunction) Noise_random, METH_NOARGS, random__doc__},
- {"random_unit_vector", (PyCFunction) Noise_random_unit_vector, METH_NOARGS, random_unit_vector__doc__},
- {"noise", (PyCFunction) Noise_noise, METH_VARARGS, noise__doc__},
- {"vector", (PyCFunction) Noise_vector, METH_VARARGS, noise_vector__doc__},
- {"turbulence", (PyCFunction) Noise_turbulence, METH_VARARGS, turbulence__doc__},
- {"turbulence_vector", (PyCFunction) Noise_turbulence_vector, METH_VARARGS, turbulence_vector__doc__},
- {"fractal", (PyCFunction) Noise_fractal, METH_VARARGS, fractal__doc__},
- {"multi_fractal", (PyCFunction) Noise_multi_fractal, METH_VARARGS, multi_fractal__doc__},
- {"vl_vector", (PyCFunction) Noise_vl_vector, METH_VARARGS, vl_vector__doc__},
- {"hetero_terrain", (PyCFunction) Noise_hetero_terrain, METH_VARARGS, hetero_terrain__doc__},
- {"hybrid_multi_fractal", (PyCFunction) Noise_hybrid_multi_fractal, METH_VARARGS, hybrid_multi_fractal__doc__},
- {"ridged_multi_fractal", (PyCFunction) Noise_ridged_multi_fractal, METH_VARARGS, ridged_multi_fractal__doc__},
- {"voronoi", (PyCFunction) Noise_voronoi, METH_VARARGS, voronoi__doc__},
- {"cell", (PyCFunction) Noise_cell, METH_VARARGS, cell__doc__},
- {"cell_vector", (PyCFunction) Noise_cell_vector, METH_VARARGS, cell_vector__doc__},
- {NULL, NULL, 0, NULL}
-};
-
-/*----------------------------------------------------------------------*/
-
-static struct PyModuleDef noise_module_def = {
- PyModuleDef_HEAD_INIT,
- "noise", /* m_name */
- Noise__doc__, /* m_doc */
- 0, /* m_size */
- NoiseMethods, /* m_methods */
- NULL, /* m_reload */
- NULL, /* m_traverse */
- NULL, /* m_clear */
- NULL, /* m_free */
-};
-
-PyObject *BPyInit_noise(void)
-{
- PyObject *submodule = PyModule_Create(&noise_module_def);
-
- /* use current time as seed for random number generator by default */
- setRndSeed(0);
-
- /* Constant noisetype dictionary */
- if (submodule) {
- static PyStructSequence_Field noise_types_fields[] = {
- {(char *)"BLENDER", NULL},
- {(char *)"STDPERLIN", NULL},
- {(char *)"NEWPERLIN", NULL},
- {(char *)"VORONOI_F1", NULL},
- {(char *)"VORONOI_F2", NULL},
- {(char *)"VORONOI_F3", NULL},
- {(char *)"VORONOI_F4", NULL},
- {(char *)"VORONOI_F2F1", NULL},
- {(char *)"VORONOI_CRACKLE", NULL},
- {(char *)"CELLNOISE", NULL},
- {NULL}
- };
-
- static PyStructSequence_Desc noise_types_info_desc = {
- (char *)"noise.types", /* name */
- (char *)"Noise type", /* doc */
- noise_types_fields, /* fields */
- (sizeof(noise_types_fields)/sizeof(PyStructSequence_Field)) - 1
- };
-
- static PyTypeObject NoiseType;
-
- PyObject *noise_types;
-
- int pos = 0;
-
- PyStructSequence_InitType(&NoiseType, &noise_types_info_desc);
-
- noise_types = PyStructSequence_New(&NoiseType);
- if (noise_types == NULL) {
- return NULL;
- }
-
- PyStructSequence_SET_ITEM(noise_types, pos++, PyLong_FromLong(TEX_BLENDER));
- PyStructSequence_SET_ITEM(noise_types, pos++, PyLong_FromLong(TEX_STDPERLIN));
- PyStructSequence_SET_ITEM(noise_types, pos++, PyLong_FromLong(TEX_NEWPERLIN));
- PyStructSequence_SET_ITEM(noise_types, pos++, PyLong_FromLong(TEX_VORONOI_F1));
- PyStructSequence_SET_ITEM(noise_types, pos++, PyLong_FromLong(TEX_VORONOI_F2));
- PyStructSequence_SET_ITEM(noise_types, pos++, PyLong_FromLong(TEX_VORONOI_F3));
- PyStructSequence_SET_ITEM(noise_types, pos++, PyLong_FromLong(TEX_VORONOI_F4));
- PyStructSequence_SET_ITEM(noise_types, pos++, PyLong_FromLong(TEX_VORONOI_F2F1));
- PyStructSequence_SET_ITEM(noise_types, pos++, PyLong_FromLong(TEX_VORONOI_CRACKLE));
- PyStructSequence_SET_ITEM(noise_types, pos++, PyLong_FromLong(TEX_CELLNOISE));
-
- PyModule_AddObject(submodule, "types", noise_types);
- }
-
- if (submodule) {
- static PyStructSequence_Field distance_metrics_fields[] = {
- {(char *)"DISTANCE", NULL},
- {(char *)"DISTANCE_SQUARED", NULL},
- {(char *)"MANHATTAN", NULL},
- {(char *)"CHEBYCHEV", NULL},
- {(char *)"MINKOVSKY_HALF", NULL},
- {(char *)"MINKOVSKY_FOUR", NULL},
- {(char *)"MINKOVSKY", NULL},
- {NULL}
- };
-
- static PyStructSequence_Desc noise_types_info_desc = {
- (char *)"noise.distance_metrics", /* name */
- (char *)"Distance Metrics for noise module.", /* doc */
- distance_metrics_fields, /* fields */
- (sizeof(distance_metrics_fields)/sizeof(PyStructSequence_Field)) - 1
- };
-
- static PyTypeObject DistanceMetrics;
-
- PyObject *distance_metrics;
-
- int pos = 0;
-
- PyStructSequence_InitType(&DistanceMetrics, &noise_types_info_desc);
-
- distance_metrics = PyStructSequence_New(&DistanceMetrics);
- if (distance_metrics == NULL) {
- return NULL;
- }
-
- PyStructSequence_SET_ITEM(distance_metrics, pos++, PyLong_FromLong(TEX_DISTANCE));
- PyStructSequence_SET_ITEM(distance_metrics, pos++, PyLong_FromLong(TEX_DISTANCE_SQUARED));
- PyStructSequence_SET_ITEM(distance_metrics, pos++, PyLong_FromLong(TEX_MANHATTAN));
- PyStructSequence_SET_ITEM(distance_metrics, pos++, PyLong_FromLong(TEX_CHEBYCHEV));
- PyStructSequence_SET_ITEM(distance_metrics, pos++, PyLong_FromLong(TEX_MINKOVSKY_HALF));
- PyStructSequence_SET_ITEM(distance_metrics, pos++, PyLong_FromLong(TEX_MINKOVSKY_FOUR));
- PyStructSequence_SET_ITEM(distance_metrics, pos++, PyLong_FromLong(TEX_MINKOVSKY));
-
- PyModule_AddObject(submodule, "distance_metrics", distance_metrics);
- }
-
- return submodule;
-}
diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c
index 2aad4d8f2fe..34270c832ea 100644
--- a/source/blender/python/intern/bpy_driver.c
+++ b/source/blender/python/intern/bpy_driver.c
@@ -82,7 +82,7 @@ int bpy_pydriver_create_dict(void)
}
/* add noise to global namespace */
- mod= PyImport_ImportModuleLevel((char *)"noise", NULL, NULL, NULL, 0);
+ mod= PyImport_ImportModuleLevel((char *)"mathutils.noise", NULL, NULL, NULL, 0);
if (mod) {
PyDict_SetItemString(bpy_pydriver_Dict, "noise", mod);
Py_DECREF(mod);
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 66db0724d96..14d74bcf5d0 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -71,7 +71,6 @@
/* inittab initialization functions */
#include "../generic/bgl.h"
#include "../generic/blf_py_api.h"
-#include "../generic/noise_py_api.h"
#include "../mathutils/mathutils.h"
/* for internal use, when starting and ending python scripts */
@@ -181,9 +180,9 @@ extern PyObject *AUD_initPython(void);
extern PyObject *CYCLES_initPython(void);
static struct _inittab bpy_internal_modules[]= {
- {(char *)"noise", BPyInit_noise},
{(char *)"mathutils", PyInit_mathutils},
// {(char *)"mathutils.geometry", PyInit_mathutils_geometry},
+// {(char *)"mathutils.noise", PyInit_mathutils_noise},
{(char *)"bgl", BPyInit_bgl},
{(char *)"blf", BPyInit_blf},
#ifdef WITH_AUDASPACE
diff --git a/source/blender/python/intern/gpu.h b/source/blender/python/intern/gpu.h
index 95656e7e147..bffbae13ba2 100644
--- a/source/blender/python/intern/gpu.h
+++ b/source/blender/python/intern/gpu.h
@@ -1,21 +1,18 @@
/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
- * This shader is free software; you can redistribute it and/or
+ * 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * of the License, or (at your option) any later version.
*
- * This shader is distributed in the hope that it will be useful,
+ * 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 shader; if not, write to the Free Software Foundation,
+ * along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2005 Blender Foundation.
diff --git a/source/blender/python/mathutils/CMakeLists.txt b/source/blender/python/mathutils/CMakeLists.txt
index b28496d612e..dae1c665ebc 100644
--- a/source/blender/python/mathutils/CMakeLists.txt
+++ b/source/blender/python/mathutils/CMakeLists.txt
@@ -38,6 +38,7 @@ set(SRC
mathutils_Quaternion.c
mathutils_Vector.c
mathutils_geometry.c
+ mathutils_noise.c
mathutils.h
mathutils_Color.h
@@ -46,6 +47,7 @@ set(SRC
mathutils_Quaternion.h
mathutils_Vector.h
mathutils_geometry.h
+ mathutils_noise.h
)
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index 41c1568dbde..f0fe69259fe 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -347,6 +347,7 @@ PyMODINIT_FUNC PyInit_mathutils(void)
{
PyObject *submodule;
PyObject *item;
+ PyObject *sys_modules= PyThreadState_GET()->interp->modules;
if (PyType_Ready(&vector_Type) < 0)
return NULL;
@@ -373,7 +374,12 @@ PyMODINIT_FUNC PyInit_mathutils(void)
/* XXX, python doesnt do imports with this usefully yet
* 'from mathutils.geometry import PolyFill'
* ...fails without this. */
- PyDict_SetItemString(PyThreadState_GET()->interp->modules, "mathutils.geometry", item);
+ PyDict_SetItemString(sys_modules, "mathutils.geometry", item);
+ Py_INCREF(item);
+
+ /* Noise submodule */
+ PyModule_AddObject(submodule, "noise", (item=PyInit_mathutils_noise()));
+ PyDict_SetItemString(sys_modules, "mathutils.noise", item);
Py_INCREF(item);
mathutils_matrix_vector_cb_index= Mathutils_RegisterCallback(&mathutils_matrix_vector_cb);
diff --git a/source/blender/python/mathutils/mathutils.h b/source/blender/python/mathutils/mathutils.h
index 70b0ef93ebd..b50535bd709 100644
--- a/source/blender/python/mathutils/mathutils.h
+++ b/source/blender/python/mathutils/mathutils.h
@@ -52,12 +52,16 @@ typedef struct {
BASE_MATH_MEMBERS(data)
} BaseMathObject;
+/* types */
#include "mathutils_Vector.h"
#include "mathutils_Matrix.h"
#include "mathutils_Quaternion.h"
#include "mathutils_Euler.h"
#include "mathutils_Color.h"
+
+/* utility submodules */
#include "mathutils_geometry.h"
+#include "mathutils_noise.h"
PyObject *BaseMathObject_getOwner( BaseMathObject * self, void * );
PyObject *BaseMathObject_getWrapped( BaseMathObject *self, void * );
diff --git a/source/blender/python/mathutils/mathutils_noise.c b/source/blender/python/mathutils/mathutils_noise.c
new file mode 100644
index 00000000000..bd490d62e94
--- /dev/null
+++ b/source/blender/python/mathutils/mathutils_noise.c
@@ -0,0 +1,911 @@
+/*
+ * ***** 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,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * This is a new part of Blender.
+ *
+ * Contributor(s): eeshlo, Campbell Barton
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/python/mathutils/mathutils_noise.c
+ * \ingroup mathutils
+ *
+ * This file defines the 'noise' module, a general purpose module to access
+ * blenders noise functions.
+ */
+
+
+/************************/
+/* Blender Noise Module */
+/************************/
+
+#include <Python.h>
+
+#include "structseq.h"
+
+#include "BLI_blenlib.h"
+#include "BLI_math.h"
+#include "BLI_utildefines.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "DNA_texture_types.h"
+
+#include "mathutils.h"
+#include "mathutils_noise.h"
+
+/* 2.6 update
+ * Moved to submodule of mathutils.
+ * All vector functions now return mathutils.Vector
+ * Updated docs to be compatible with autodocs generation.
+ * Updated vector functions to use nD array functions.
+ * noise.vl_vector --> noise.variable_lacunarity
+ * noise.vector --> noise.noise_vector
+ */
+
+/*-----------------------------------------*/
+/* 'mersenne twister' random number generator */
+
+/*
+ A C-program for MT19937, with initialization improved 2002/2/10.
+ Coded by Takuji Nishimura and Makoto Matsumoto.
+ This is a faster version by taking Shawn Cokus's optimization,
+ Matthe Bellew's simplification, Isaku Wada's real version.
+
+ Before using, initialize the state by using init_genrand(seed)
+ or init_by_array(init_key, key_length).
+
+ Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. The names of its contributors may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ Any feedback is very welcome.
+ http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
+ email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
+*/
+
+/* Period parameters */
+#define N 624
+#define M 397
+#define MATRIX_A 0x9908b0dfUL /* constant vector a */
+#define UMASK 0x80000000UL /* most significant w-r bits */
+#define LMASK 0x7fffffffUL /* least significant r bits */
+#define MIXBITS(u,v) (((u) & UMASK) | ((v) & LMASK))
+#define TWIST(u,v) ((MIXBITS(u,v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL))
+
+static unsigned long state[N]; /* the array for the state vector */
+static int left = 1;
+static int initf = 0;
+static unsigned long *next;
+
+/* initializes state[N] with a seed */
+static void init_genrand(unsigned long s)
+{
+ int j;
+ state[0] = s & 0xffffffffUL;
+ for (j = 1; j < N; j++) {
+ state[j] =
+ (1812433253UL *
+ (state[j - 1] ^ (state[j - 1] >> 30)) + j);
+ /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */
+ /* In the previous versions, MSBs of the seed affect */
+ /* only MSBs of the array state[]. */
+ /* 2002/01/09 modified by Makoto Matsumoto */
+ state[j] &= 0xffffffffUL; /* for >32 bit machines */
+ }
+ left = 1;
+ initf = 1;
+}
+
+static void next_state(void)
+{
+ unsigned long *p = state;
+ int j;
+
+ /* if init_genrand() has not been called, */
+ /* a default initial seed is used */
+ if (initf == 0)
+ init_genrand(5489UL);
+
+ left = N;
+ next = state;
+
+ for (j = N - M + 1; --j; p++)
+ *p = p[M] ^ TWIST(p[0], p[1]);
+
+ for (j = M; --j; p++)
+ *p = p[M - N] ^ TWIST(p[0], p[1]);
+
+ *p = p[M - N] ^ TWIST(p[0], state[0]);
+}
+
+/*------------------------------------------------------------*/
+
+static void setRndSeed(int seed)
+{
+ if (seed == 0)
+ init_genrand(time(NULL));
+ else
+ init_genrand(seed);
+}
+
+/* float number in range [0, 1) using the mersenne twister rng */
+static float frand(void)
+{
+ unsigned long y;
+
+ if (--left == 0)
+ next_state();
+ y = *next++;
+
+ /* Tempering */
+ y ^= (y >> 11);
+ y ^= (y << 7) & 0x9d2c5680UL;
+ y ^= (y << 15) & 0xefc60000UL;
+ y ^= (y >> 18);
+
+ return (float) y / 4294967296.f;
+}
+
+/*------------------------------------------------------------*/
+/* Utility Functions */
+/*------------------------------------------------------------*/
+
+/* Fills an array of length size with random numbers in the range (-1, 1)*/
+static void rand_vn(float *array_tar, const int size)
+{
+ float *array_pt= array_tar + (size-1);
+ int i= size;
+ while(i--) { *(array_pt--) = 2.0f * frand() - 1.0f; }
+}
+
+/* Fills an array of length 3 with noise values */
+static void noise_vector(float x, float y, float z, int nb, float v[3])
+{
+ /* Simply evaluate noise at 3 different positions */
+ v[0]= (float)(2.0f * BLI_gNoise(1.f, x + 9.321f, y - 1.531f, z - 7.951f, 0, nb) - 1.0f);
+ v[1]= (float)(2.0f * BLI_gNoise(1.f, x, y, z, 0, nb) - 1.0f);
+ v[2]= (float)(2.0f * BLI_gNoise(1.f, x + 6.327f, y + 0.1671f, z - 2.672f, 0, nb) - 1.0f);
+}
+
+/* Returns a turbulence value for a given position (x, y, z) */
+static float turb(float x, float y, float z, int oct, int hard, int nb,
+ float ampscale, float freqscale)
+{
+ float amp, out, t;
+ int i;
+ amp = 1.f;
+ out = (float)(2.0f * BLI_gNoise(1.f, x, y, z, 0, nb) - 1.0f);
+ if (hard)
+ out = fabsf(out);
+ for (i = 1; i < oct; i++) {
+ amp *= ampscale;
+ x *= freqscale;
+ y *= freqscale;
+ z *= freqscale;
+ t = (float)(amp * (2.0f * BLI_gNoise(1.f, x, y, z, 0, nb) - 1.0f));
+ if (hard)
+ t = fabsf(t);
+ out += t;
+ }
+ return out;
+}
+
+/* Fills an array of length 3 with the turbulence vector for a given
+position (x, y, z) */
+static void vTurb(float x, float y, float z, int oct, int hard, int nb,
+ float ampscale, float freqscale, float v[3])
+{
+ float amp, t[3];
+ int i;
+ amp = 1.f;
+ noise_vector(x, y, z, nb, v);
+ if (hard) {
+ v[0] = fabsf(v[0]);
+ v[1] = fabsf(v[1]);
+ v[2] = fabsf(v[2]);
+ }
+ for (i = 1; i < oct; i++) {
+ amp *= ampscale;
+ x *= freqscale;
+ y *= freqscale;
+ z *= freqscale;
+ noise_vector(x, y, z, nb, t);
+ if (hard) {
+ t[0] = fabsf(t[0]);
+ t[1] = fabsf(t[1]);
+ t[2] = fabsf(t[2]);
+ }
+ v[0] += amp * t[0];
+ v[1] += amp * t[1];
+ v[2] += amp * t[2];
+ }
+}
+
+/*-------------------------DOC STRINGS ---------------------------*/
+PyDoc_STRVAR(M_Noise_doc,
+"The Blender noise module"
+);
+
+/*------------------------------------------------------------*/
+/* Python Functions */
+/*------------------------------------------------------------*/
+
+PyDoc_STRVAR(M_Noise_random_doc,
+".. function:: random()\n"
+"\n"
+" Returns a random number in the range [0, 1].\n"
+"\n"
+" :return: The random number.\n"
+" :rtype: float\n"
+);
+static PyObject *M_Noise_random(PyObject *UNUSED(self))
+{
+ return PyFloat_FromDouble(frand());
+}
+
+PyDoc_STRVAR(M_Noise_random_unit_vector_doc,
+".. function:: random_unit_vector(size=3)\n"
+"\n"
+" Returns a unit vector with random entries.\n"
+"\n"
+" :arg size: The size of the vector to be produced.\n"
+" :type size: Int\n"
+" :return: The random unit vector.\n"
+" :rtype: :class:`mathutils.Vector`\n"
+);
+static PyObject *M_Noise_random_unit_vector(PyObject *UNUSED(self), PyObject *args)
+{
+ float vec[4]= {0.0f, 0.0f, 0.0f, 0.0f};
+ float norm= 2.0f;
+ int size= 3;
+
+ if (!PyArg_ParseTuple(args, "|i:random_vector", &size))
+ return NULL;
+
+ if (size > 4 || size < 2) {
+ PyErr_SetString(PyExc_ValueError, "Vector(): invalid size");
+ return NULL;
+ }
+
+ while (norm==0.0f || norm>=1.0f) {
+ rand_vn(vec, size);
+ norm= normalize_vn(vec, size);
+ }
+
+ return Vector_CreatePyObject(vec, size, Py_NEW, NULL);
+}
+/* This is dumb, most people will want a unit vector anyway, since this doesn't have uniform distribution over a sphere*/
+/*
+PyDoc_STRVAR(M_Noise_random_vector_doc,
+".. function:: random_vector(size=3)\n"
+"\n"
+" Returns a vector with random entries in the range [0, 1).\n"
+"\n"
+" :arg size: The size of the vector to be produced.\n"
+" :type size: Int\n"
+" :return: The random vector.\n"
+" :rtype: :class:`mathutils.Vector`\n"
+);
+static PyObject *M_Noise_random_vector(PyObject *UNUSED(self), PyObject *args)
+{
+ float vec[4]= {0.0f, 0.0f, 0.0f, 0.0f};
+ int size= 3;
+
+ if (!PyArg_ParseTuple(args, "|i:random_vector", &size))
+ return NULL;
+
+ if (size > 4 || size < 2) {
+ PyErr_SetString(PyExc_ValueError, "Vector(): invalid size");
+ return NULL;
+ }
+
+ rand_vn(vec, size);
+
+ return Vector_CreatePyObject(vec, size, Py_NEW, NULL);
+}
+*/
+
+PyDoc_STRVAR(M_Noise_seed_set_doc,
+".. function:: seed_set(seed)\n"
+"\n"
+" Sets the random seed used for random_unit_vector, random_vector and random.\n"
+"\n"
+" :arg seed: Seed used for the random generator.\n"
+" :type seed: Int\n"
+);
+static PyObject *M_Noise_seed_set(PyObject *UNUSED(self), PyObject *args)
+{
+ int s;
+ if (!PyArg_ParseTuple(args, "i:seed_set", &s))
+ return NULL;
+ setRndSeed(s);
+ Py_RETURN_NONE;
+}
+
+PyDoc_STRVAR(M_Noise_noise_doc,
+".. function:: noise(position, noise_basis=noise.types.STDPERLIN)\n"
+"\n"
+" Returns noise value from the noise basis at the position specified.\n"
+"\n"
+" :arg position: The position to evaluate the selected noise function at.\n"
+" :type position: :class:`mathutils.Vector`\n"
+" :arg noise_basis: The type of noise to be evaluated.\n"
+" :type noise_basis: Value in noise.types or int\n"
+" :return: The noise value.\n"
+" :rtype: float\n"
+);
+static PyObject *M_Noise_noise(PyObject *UNUSED(self), PyObject *args)
+{
+ PyObject *value;
+ float vec[3];
+ int nb= 1;
+ if (!PyArg_ParseTuple(args, "O|i:noise", &value, &nb))
+ return NULL;
+
+ if (mathutils_array_parse(vec, 3, 3, value, "noise: invalid 'position' arg") == -1)
+ return NULL;
+
+ return PyFloat_FromDouble((2.0f * BLI_gNoise(1.0f, vec[0], vec[1], vec[2], 0, nb) - 1.0f));
+}
+
+PyDoc_STRVAR(M_Noise_noise_vector_doc,
+".. function:: noise_vector(position, noise_basis=noise.types.STDPERLIN)\n"
+"\n"
+" Returns the noise vector from the noise basis at the specified position.\n"
+"\n"
+" :arg position: The position to evaluate the selected noise function at.\n"
+" :type position: :class:`mathutils.Vector`\n"
+" :arg noise_basis: The type of noise to be evaluated.\n"
+" :type noise_basis: Value in noise.types or int\n"
+" :return: The noise vector.\n"
+" :rtype: :class:`mathutils.Vector`\n"
+);
+static PyObject *M_Noise_noise_vector(PyObject *UNUSED(self), PyObject *args)
+{
+ PyObject *value;
+ float vec[3], r_vec[3];
+ int nb= 1;
+
+ if (!PyArg_ParseTuple(args, "O|i:noise_vector", &value, &nb))
+ return NULL;
+
+ if (mathutils_array_parse(vec, 3, 3, value, "noise_vector: invalid 'position' arg") == -1)
+ return NULL;
+
+ noise_vector(vec[0], vec[1], vec[2], nb, r_vec);
+
+ return Vector_CreatePyObject(r_vec, 3, Py_NEW, NULL);
+}
+
+PyDoc_STRVAR(M_Noise_turbulence_doc,
+".. function:: turbulence(position, octaves, hard, noise_basis=noise.types.STDPERLIN, amplitude_scale=0.5, frequency_scale=2.0)\n"
+"\n"
+" Returns the turbulence value from the noise basis at the specified position.\n"
+"\n"
+" :arg position: The position to evaluate the selected noise function at.\n"
+" :type position: :class:`mathutils.Vector`\n"
+" :arg octaves: The number of different noise frequencies used.\n"
+" :type octaves: int\n"
+" :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or soft (smooth transitions).\n"
+" :type hard: :boolean\n"
+" :arg noise_basis: The type of noise to be evaluated.\n"
+" :type noise_basis: Value in mathutils.noise.types or int\n"
+" :arg amplitude_scale: The amplitude scaling factor.\n"
+" :type amplitude_scale: float\n"
+" :arg frequency_scale: The frequency scaling factor\n"
+" :type frequency_scale: Value in noise.types or int\n"
+" :return: The turbulence value.\n"
+" :rtype: float\n"
+);
+static PyObject *M_Noise_turbulence(PyObject *UNUSED(self), PyObject *args)
+{
+ PyObject *value;
+ float vec[3];
+ int oct, hd, nb= 1;
+ float as= 0.5f, fs= 2.0f;
+
+ if (!PyArg_ParseTuple(args, "Oii|iff:turbulence", &value, &oct, &hd, &nb, &as, &fs))
+ return NULL;
+
+ if (mathutils_array_parse(vec, 3, 3, value, "turbulence: invalid 'position' arg") == -1)
+ return NULL;
+
+ return PyFloat_FromDouble(turb(vec[0], vec[1], vec[2], oct, hd, nb, as, fs));
+}
+
+PyDoc_STRVAR(M_Noise_turbulence_vector_doc,
+".. function:: turbulence_vector(position, octaves, hard, noise_basis=noise.types.STDPERLIN, amplitude_scale=0.5, frequency_scale=2.0)\n"
+"\n"
+" Returns the turbulence vector from the noise basis at the specified position.\n"
+"\n"
+" :arg position: The position to evaluate the selected noise function at.\n"
+" :type position: :class:`mathutils.Vector`\n"
+" :arg octaves: The number of different noise frequencies used.\n"
+" :type octaves: int\n"
+" :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or soft (smooth transitions).\n"
+" :type hard: :boolean\n"
+" :arg noise_basis: The type of noise to be evaluated.\n"
+" :type noise_basis: Value in mathutils.noise.types or int\n"
+" :arg amplitude_scale: The amplitude scaling factor.\n"
+" :type amplitude_scale: float\n"
+" :arg frequency_scale: The frequency scaling factor\n"
+" :type frequency_scale: Value in noise.types or int\n"
+" :return: The turbulence vector.\n"
+" :rtype: :class:`mathutils.Vector`\n"
+);
+static PyObject *M_Noise_turbulence_vector(PyObject *UNUSED(self), PyObject *args)
+{
+ PyObject *value;
+ float vec[3], r_vec[3];
+ int oct, hd, nb= 1;
+ float as =0.5f, fs= 2.0f;
+ if (!PyArg_ParseTuple(args, "Oii|iff:turbulence_vector", &value, &oct, &hd, &nb, &as, &fs))
+ return NULL;
+
+ if (mathutils_array_parse(vec, 3, 3, value, "turbulence_vector: invalid 'position' arg") == -1)
+ return NULL;
+
+ vTurb(vec[0], vec[1], vec[2], oct, hd, nb, as, fs, r_vec);
+ return Vector_CreatePyObject(r_vec, 3, Py_NEW, NULL);
+}
+
+/* F. Kenton Musgrave's fractal functions */
+PyDoc_STRVAR(M_Noise_fractal_doc,
+".. function:: fractal(position, H, lacunarity, octaves, noise_basis=noise.types.STDPERLIN)\n"
+"\n"
+" Returns the fractal Brownian motion (fBm) noise value from the noise basis at the specified position.\n"
+"\n"
+" :arg position: The position to evaluate the selected noise function at.\n"
+" :type position: :class:`mathutils.Vector`\n"
+" :arg H: The fractal increment factor.\n"
+" :type H: float\n"
+" :arg lacunarity: The gap between successive frequencies.\n"
+" :type lacunarity: float\n"
+" :arg octaves: The number of different noise frequencies used.\n"
+" :type octaves: int\n"
+" :arg noise_basis: The type of noise to be evaluated.\n"
+" :type noise_basis: Value in noise.types or int\n"
+" :return: The fractal Brownian motion noise value.\n"
+" :rtype: float\n"
+);
+static PyObject *M_Noise_fractal(PyObject *UNUSED(self), PyObject *args)
+{
+ PyObject *value;
+ float vec[3];
+ float H, lac, oct;
+ int nb= 1;
+
+ if (!PyArg_ParseTuple(args, "Offf|i:fractal", &value, &H, &lac, &oct, &nb))
+ return NULL;
+
+ if (mathutils_array_parse(vec, 3, 3, value, "fractal: invalid 'position' arg") == -1)
+ return NULL;
+
+ return PyFloat_FromDouble(mg_fBm(vec[0], vec[1], vec[2], H, lac, oct, nb));
+}
+
+PyDoc_STRVAR(M_Noise_multi_fractal_doc,
+".. function:: multi_fractal(position, H, lacunarity, octaves, noise_basis=noise.types.STDPERLIN)\n"
+"\n"
+" Returns multifractal noise value from the noise basis at the specified position.\n"
+"\n"
+" :arg position: The position to evaluate the selected noise function at.\n"
+" :type position: :class:`mathutils.Vector`\n"
+" :arg H: The fractal increment factor.\n"
+" :type H: float\n"
+" :arg lacunarity: The gap between successive frequencies.\n"
+" :type lacunarity: float\n"
+" :arg octaves: The number of different noise frequencies used.\n"
+" :type octaves: int\n"
+" :arg noise_basis: The type of noise to be evaluated.\n"
+" :type noise_basis: Value in noise.types or int\n"
+" :return: The multifractal noise value.\n"
+" :rtype: float\n"
+);
+static PyObject *M_Noise_multi_fractal(PyObject *UNUSED(self), PyObject *args)
+{
+ PyObject *value;
+ float vec[3];
+ float H, lac, oct;
+ int nb= 1;
+
+ if (!PyArg_ParseTuple(args, "Offf|i:multi_fractal", &value, &H, &lac, &oct, &nb))
+ return NULL;
+
+ if (mathutils_array_parse(vec, 3, 3, value, "multi_fractal: invalid 'position' arg") == -1)
+ return NULL;
+
+ return PyFloat_FromDouble(mg_MultiFractal(vec[0], vec[1], vec[2], H, lac, oct, nb));
+}
+
+PyDoc_STRVAR(M_Noise_variable_lacunarity_doc,
+".. function:: variable_lacunarity(position, distortion, noise_type1=noise.types.STDPERLIN, noise_type2=noise.types.STDPERLIN)\n"
+"\n"
+" Returns variable lacunarity noise value, a distorted variety of noise, from noise type 1 distorted by noise type 2 at the specified position.\n"
+"\n"
+" :arg position: The position to evaluate the selected noise function at.\n"
+" :type position: :class:`mathutils.Vector`\n"
+" :arg distortion: The amount of distortion.\n"
+" :type distortion: float\n"
+" :arg noise_type1: The type of noise to be distorted.\n"
+" :type noise_type1: Value in noise.types or int\n"
+" :arg noise_type2: The type of noise used to distort noise_type1.\n"
+" :type noise_type2: Value in noise.types or int\n"
+" :return: The variable lacunarity noise value.\n"
+" :rtype: float\n"
+);
+static PyObject *M_Noise_variable_lacunarity(PyObject *UNUSED(self), PyObject *args)
+{
+ PyObject *value;
+ float vec[3];
+ float d;
+ int nt1= 1, nt2= 1;
+
+ if (!PyArg_ParseTuple(args, "Of|ii:variable_lacunarity", &value, &d, &nt1, &nt2))
+ return NULL;
+
+ if (mathutils_array_parse(vec, 3, 3, value, "variable_lacunarity: invalid 'position' arg") == -1)
+ return NULL;
+
+ return PyFloat_FromDouble(mg_VLNoise(vec[0], vec[1], vec[2], d, nt1, nt2));
+}
+
+PyDoc_STRVAR(M_Noise_hetero_terrain_doc,
+".. function:: hetero_terrain(position, H, lacunarity, octaves, offset, noise_basis=noise.types.STDPERLIN)\n"
+"\n"
+" Returns the heterogeneous terrain value from the noise basis at the specified position.\n"
+"\n"
+" :arg position: The position to evaluate the selected noise function at.\n"
+" :type position: :class:`mathutils.Vector`\n"
+" :arg H: The fractal dimension of the roughest areas.\n"
+" :type H: float\n"
+" :arg lacunarity: The gap between successive frequencies.\n"
+" :type lacunarity: float\n"
+" :arg octaves: The number of different noise frequencies used.\n"
+" :type octaves: int\n"
+" :arg offset: The height of the terrain above 'sea level'.\n"
+" :type offset: float\n"
+" :arg noise_basis: The type of noise to be evaluated.\n"
+" :type noise_basis: Value in noise.types or int\n"
+" :return: The heterogeneous terrain value.\n"
+" :rtype: float\n"
+);
+static PyObject *M_Noise_hetero_terrain(PyObject *UNUSED(self), PyObject *args)
+{
+ PyObject *value;
+ float vec[3];
+ float H, lac, oct, ofs;
+ int nb= 1;
+
+ if (!PyArg_ParseTuple(args, "Offff|i:hetero_terrain", &value, &H, &lac, &oct, &ofs, &nb))
+ return NULL;
+
+ if (mathutils_array_parse(vec, 3, 3, value, "hetero_terrain: invalid 'position' arg") == -1)
+ return NULL;
+
+ return PyFloat_FromDouble(mg_HeteroTerrain(vec[0], vec[1], vec[2], H, lac, oct, ofs, nb));
+}
+
+PyDoc_STRVAR(M_Noise_hybrid_multi_fractal_doc,
+".. function:: hybrid_multi_fractal(position, H, lacunarity, octaves, offset, gain, noise_basis=noise.types.STDPERLIN)\n"
+"\n"
+" Returns hybrid multifractal value from the noise basis at the specified position.\n"
+"\n"
+" :arg position: The position to evaluate the selected noise function at.\n"
+" :type position: :class:`mathutils.Vector`\n"
+" :arg H: The fractal dimension of the roughest areas.\n"
+" :type H: float\n"
+" :arg lacunarity: The gap between successive frequencies.\n"
+" :type lacunarity: float\n"
+" :arg octaves: The number of different noise frequencies used.\n"
+" :type octaves: int\n"
+" :arg offset: The height of the terrain above 'sea level'.\n"
+" :type offset: float\n"
+" :arg gain: Scaling applied to the values.\n"
+" :type gain: float\n"
+" :arg noise_basis: The type of noise to be evaluated.\n"
+" :type noise_basis: Value in noise.types or int\n"
+" :return: The hybrid multifractal value.\n"
+" :rtype: float\n"
+);
+static PyObject *M_Noise_hybrid_multi_fractal(PyObject *UNUSED(self), PyObject *args)
+{
+ PyObject *value;
+ float vec[3];
+ float H, lac, oct, ofs, gn;
+ int nb= 1;
+
+ if (!PyArg_ParseTuple(args, "Offfff|i:hybrid_multi_fractal", &value, &H, &lac, &oct, &ofs, &gn, &nb))
+ return NULL;
+
+ if (mathutils_array_parse(vec, 3, 3, value, "hybrid_multi_fractal: invalid 'position' arg") == -1)
+ return NULL;
+
+ return PyFloat_FromDouble(mg_HybridMultiFractal(vec[0], vec[1], vec[2], H, lac, oct, ofs, gn, nb));
+}
+
+PyDoc_STRVAR(M_Noise_ridged_multi_fractal_doc,
+".. function:: ridged_multi_fractal(position, H, lacunarity, octaves, offset, gain, noise_basis=noise.types.STDPERLIN)\n"
+"\n"
+" Returns ridged multifractal value from the noise basis at the specified position.\n"
+"\n"
+" :arg position: The position to evaluate the selected noise function at.\n"
+" :type position: :class:`mathutils.Vector`\n"
+" :arg H: The fractal dimension of the roughest areas.\n"
+" :type H: float\n"
+" :arg lacunarity: The gap between successive frequencies.\n"
+" :type lacunarity: float\n"
+" :arg octaves: The number of different noise frequencies used.\n"
+" :type octaves: int\n"
+" :arg offset: The height of the terrain above 'sea level'.\n"
+" :type offset: float\n"
+" :arg gain: Scaling applied to the values.\n"
+" :type gain: float\n"
+" :arg noise_basis: The type of noise to be evaluated.\n"
+" :type noise_basis: Value in noise.types or int\n"
+" :return: The ridged multifractal value.\n"
+" :rtype: float\n"
+);
+static PyObject *M_Noise_ridged_multi_fractal(PyObject *UNUSED(self), PyObject *args)
+{
+ PyObject *value;
+ float vec[3];
+ float H, lac, oct, ofs, gn;
+ int nb= 1;
+
+ if (!PyArg_ParseTuple(args, "Offfff|i:ridged_multi_fractal", &value, &H, &lac, &oct, &ofs, &gn, &nb))
+ return NULL;
+
+ if (mathutils_array_parse(vec, 3, 3, value, "ridged_multi_fractal: invalid 'position' arg") == -1)
+ return NULL;
+
+ return PyFloat_FromDouble(mg_RidgedMultiFractal(vec[0], vec[1], vec[2], H, lac, oct, ofs, gn, nb));
+}
+
+PyDoc_STRVAR(M_Noise_voronoi_doc,
+".. function:: voronoi(position, distance_metric=noise.distance_metrics.DISTANCE, exponent=2.5)\n"
+"\n"
+" Returns a list of distances to the four closest features and their locations.\n"
+"\n"
+" :arg position: The position to evaluate the selected noise function at.\n"
+" :type position: :class:`mathutils.Vector`\n"
+" :arg distance_metric: Method of measuring distance.\n"
+" :type distance_metric: Value in noise.distance_metrics or int\n"
+" :arg exponent: The exponent for Minkovsky distance metric.\n"
+" :type exponent: float\n"
+" :return: A list of distances to the four closest features and their locations.\n"
+" :rtype: [list of four floats, list of four :class:`mathutils.Vector`s]\n"
+);
+static PyObject *M_Noise_voronoi(PyObject *UNUSED(self), PyObject *args)
+{
+ PyObject *value;
+ PyObject *list;
+ float vec[3];
+ float da[4], pa[12];
+ int dtype= 0;
+ float me= 2.5f; /* default minkovsky exponent */
+
+ int i;
+
+ if (!PyArg_ParseTuple(args, "O|if:voronoi", &value, &dtype, &me))
+ return NULL;
+
+ if (mathutils_array_parse(vec, 3, 3, value, "voronoi: invalid 'position' arg") == -1)
+ return NULL;
+
+ list= PyList_New(4);
+
+ voronoi(vec[0], vec[1], vec[2], da, pa, me, dtype);
+
+ for (i=0; i<4; i++) {
+ PyList_SET_ITEM(list, i, Vector_CreatePyObject(pa + 3*i, 3, Py_NEW, NULL));
+ }
+
+ return Py_BuildValue("[[ffff]O]", da[0], da[1], da[2], da[3], list);
+}
+
+PyDoc_STRVAR(M_Noise_cell_doc,
+".. function:: cell(position)\n"
+"\n"
+" Returns cell noise value at the specified position.\n"
+"\n"
+" :arg position: The position to evaluate the selected noise function at.\n"
+" :type position: :class:`mathutils.Vector`\n"
+" :return: The cell noise value.\n"
+" :rtype: float\n"
+);
+static PyObject *M_Noise_cell(PyObject *UNUSED(self), PyObject *args)
+{
+ PyObject *value;
+ float vec[3];
+
+ if (!PyArg_ParseTuple(args, "O:cell", &value))
+ return NULL;
+
+ if (mathutils_array_parse(vec, 3, 3, value, "cell: invalid 'position' arg") == -1)
+ return NULL;
+
+ return PyFloat_FromDouble(cellNoise(vec[0], vec[1], vec[2]));
+}
+
+PyDoc_STRVAR(M_Noise_cell_vector_doc,
+".. function:: cell_vector(position)\n"
+"\n"
+" Returns cell noise vector at the specified position.\n"
+"\n"
+" :arg position: The position to evaluate the selected noise function at.\n"
+" :type position: :class:`mathutils.Vector`\n"
+" :return: The cell noise vector.\n"
+" :rtype: :class:`mathutils.Vector`\n"
+);
+static PyObject *M_Noise_cell_vector(PyObject *UNUSED(self), PyObject *args)
+{
+ PyObject *value;
+ float vec[3], r_vec[3];
+
+ if (!PyArg_ParseTuple(args, "O:cell_vector", &value))
+ return NULL;
+
+ if (mathutils_array_parse(vec, 3, 3, value, "cell_vector: invalid 'position' arg") == -1)
+ return NULL;
+
+ cellNoiseV(vec[0], vec[1], vec[2], r_vec);
+ return Vector_CreatePyObject(NULL, 3, Py_NEW, NULL);;
+}
+
+static PyMethodDef M_Noise_methods[] = {
+ {"seed_set", (PyCFunction) M_Noise_seed_set, METH_VARARGS, M_Noise_seed_set_doc},
+ {"random", (PyCFunction) M_Noise_random, METH_NOARGS, M_Noise_random_doc},
+ {"random_unit_vector", (PyCFunction) M_Noise_random_unit_vector, METH_VARARGS, M_Noise_random_unit_vector_doc},
+ /*{"random_vector", (PyCFunction) M_Noise_random_vector, METH_VARARGS, M_Noise_random_vector_doc},*/
+ {"noise", (PyCFunction) M_Noise_noise, METH_VARARGS, M_Noise_noise_doc},
+ {"noise_vector", (PyCFunction) M_Noise_noise_vector, METH_VARARGS, M_Noise_noise_vector_doc},
+ {"turbulence", (PyCFunction) M_Noise_turbulence, METH_VARARGS, M_Noise_turbulence_doc},
+ {"turbulence_vector", (PyCFunction) M_Noise_turbulence_vector, METH_VARARGS, M_Noise_turbulence_vector_doc},
+ {"fractal", (PyCFunction) M_Noise_fractal, METH_VARARGS, M_Noise_fractal_doc},
+ {"multi_fractal", (PyCFunction) M_Noise_multi_fractal, METH_VARARGS, M_Noise_multi_fractal_doc},
+ {"variable_lacunarity", (PyCFunction) M_Noise_variable_lacunarity, METH_VARARGS, M_Noise_variable_lacunarity_doc},
+ {"hetero_terrain", (PyCFunction) M_Noise_hetero_terrain, METH_VARARGS, M_Noise_hetero_terrain_doc},
+ {"hybrid_multi_fractal", (PyCFunction) M_Noise_hybrid_multi_fractal, METH_VARARGS, M_Noise_hybrid_multi_fractal_doc},
+ {"ridged_multi_fractal", (PyCFunction) M_Noise_ridged_multi_fractal, METH_VARARGS, M_Noise_ridged_multi_fractal_doc},
+ {"voronoi", (PyCFunction) M_Noise_voronoi, METH_VARARGS, M_Noise_voronoi_doc},
+ {"cell", (PyCFunction) M_Noise_cell, METH_VARARGS, M_Noise_cell_doc},
+ {"cell_vector", (PyCFunction) M_Noise_cell_vector, METH_VARARGS, M_Noise_cell_vector_doc},
+ {NULL, NULL, 0, NULL}
+};
+
+static struct PyModuleDef M_Noise_module_def = {
+ PyModuleDef_HEAD_INIT,
+ "mathutils.noise", /* m_name */
+ M_Noise_doc, /* m_doc */
+ 0, /* m_size */
+ M_Noise_methods, /* m_methods */
+ NULL, /* m_reload */
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL, /* m_free */
+};
+
+/*----------------------------MODULE INIT-------------------------*/
+PyMODINIT_FUNC PyInit_mathutils_noise(void)
+{
+ PyObject *submodule = PyModule_Create(&M_Noise_module_def);
+ PyObject *item_types, *item_metrics;
+
+ /* use current time as seed for random number generator by default */
+ setRndSeed(0);
+
+ PyModule_AddObject(submodule, "types", (item_types=PyInit_mathutils_noise_types()));
+ PyDict_SetItemString(PyThreadState_GET()->interp->modules, "noise.types", item_types);
+ Py_INCREF(item_types);
+
+ PyModule_AddObject(submodule, "distance_metrics", (item_metrics=PyInit_mathutils_noise_metrics()));
+ PyDict_SetItemString(PyThreadState_GET()->interp->modules, "noise.distance_metrics", item_metrics);
+ Py_INCREF(item_metrics);
+
+ return submodule;
+}
+
+/*----------------------------SUBMODULE INIT-------------------------*/
+static struct PyModuleDef M_NoiseTypes_module_def = {
+ PyModuleDef_HEAD_INIT,
+ "mathutils.noise.types", /* m_name */
+ NULL, /* m_doc */
+ 0, /* m_size */
+ NULL, /* m_methods */
+ NULL, /* m_reload */
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL, /* m_free */
+};
+
+PyMODINIT_FUNC PyInit_mathutils_noise_types(void)
+{
+ PyObject *submodule = PyModule_Create(&M_NoiseTypes_module_def);
+
+ PyModule_AddIntConstant(submodule, (char *)"BLENDER", TEX_BLENDER);
+ PyModule_AddIntConstant(submodule, (char *)"STDPERLIN", TEX_STDPERLIN);
+ PyModule_AddIntConstant(submodule, (char *)"NEWPERLIN", TEX_NEWPERLIN);
+ PyModule_AddIntConstant(submodule, (char *)"VORONOI_F1", TEX_VORONOI_F1);
+ PyModule_AddIntConstant(submodule, (char *)"VORONOI_F2", TEX_VORONOI_F2);
+ PyModule_AddIntConstant(submodule, (char *)"VORONOI_F3", TEX_VORONOI_F3);
+ PyModule_AddIntConstant(submodule, (char *)"VORONOI_F4", TEX_VORONOI_F4);
+ PyModule_AddIntConstant(submodule, (char *)"VORONOI_F2F1", TEX_VORONOI_F2F1);
+ PyModule_AddIntConstant(submodule, (char *)"VORONOI_CRACKLE", TEX_VORONOI_CRACKLE);
+ PyModule_AddIntConstant(submodule, (char *)"CELLNOISE", TEX_CELLNOISE);
+
+ return submodule;
+}
+
+static struct PyModuleDef M_NoiseMetrics_module_def = {
+ PyModuleDef_HEAD_INIT,
+ "mathutils.noise.distance_metrics", /* m_name */
+ NULL, /* m_doc */
+ 0, /* m_size */
+ NULL, /* m_methods */
+ NULL, /* m_reload */
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL, /* m_free */
+};
+
+PyMODINIT_FUNC PyInit_mathutils_noise_metrics(void)
+{
+ PyObject *submodule = PyModule_Create(&M_NoiseMetrics_module_def);
+
+ PyModule_AddIntConstant(submodule, (char *)"DISTANCE", TEX_DISTANCE);
+ PyModule_AddIntConstant(submodule, (char *)"DISTANCE_SQUARED", TEX_DISTANCE_SQUARED);
+ PyModule_AddIntConstant(submodule, (char *)"MANHATTAN", TEX_MANHATTAN);
+ PyModule_AddIntConstant(submodule, (char *)"CHEBYCHEV", TEX_CHEBYCHEV);
+ PyModule_AddIntConstant(submodule, (char *)"MINKOVSKY_HALF", TEX_MINKOVSKY_HALF);
+ PyModule_AddIntConstant(submodule, (char *)"MINKOVSKY_FOUR", TEX_MINKOVSKY_FOUR);
+ PyModule_AddIntConstant(submodule, (char *)"MINKOVSKY", TEX_MINKOVSKY);
+
+ return submodule;
+}
diff --git a/source/blender/python/generic/noise_py_api.h b/source/blender/python/mathutils/mathutils_noise.h
index 60f43e16158..6a6527588ef 100644
--- a/source/blender/python/generic/noise_py_api.h
+++ b/source/blender/python/mathutils/mathutils_noise.h
@@ -20,13 +20,17 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/python/generic/noise_py_api.h
- * \ingroup pygen
+/** \file blender/python/mathutils/mathutils_noise.h
+ * \ingroup mathutils
*/
-#ifndef NOISE_PY_API_H
-#define NOISE_PY_API_H
+#ifndef MATHUTILS_NOISE_H
+#define MATHUTILS_NOISE_H
-PyObject *BPyInit_noise(void);
+#include "mathutils.h"
-#endif // NOISE_PY_API_H
+PyMODINIT_FUNC PyInit_mathutils_noise(void);
+PyMODINIT_FUNC PyInit_mathutils_noise_types(void);
+PyMODINIT_FUNC PyInit_mathutils_noise_metrics(void);
+
+#endif // MATHUTILS_NOISE_H
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index a931de04737..43d03ec60a4 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -626,7 +626,6 @@ typedef struct LampRen {
#define R_DUPLI_TRANSFORMED 1
#define R_ENV_TRANSFORMED 2
#define R_TRANSFORMED (1|2)
-#define R_NEED_VECTORS 4
#endif /* RENDER_TYPES_H */
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 894dffd39b0..e6e098ce0ce 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -2391,7 +2391,7 @@ static void do_displacement(Render *re, ObjectRen *obr, float mat[][4], float im
/* Object Size with parenting */
obt=obr->ob;
while(obt){
- mul_v3_v3v3(temp, obt->size, obt->dsize);
+ add_v3_v3v3(temp, obt->size, obt->dsize);
scale[0]*=temp[0]; scale[1]*=temp[1]; scale[2]*=temp[2];
obt=obt->parent;
}
@@ -4525,7 +4525,7 @@ static void init_render_object_data(Render *re, ObjectRen *obr, int timeoffset)
re->totstrand += obr->totstrand;
}
-static void add_render_object(Render *re, Object *ob, Object *par, DupliObject *dob, int timeoffset, int vectorlay)
+static void add_render_object(Render *re, Object *ob, Object *par, DupliObject *dob, int timeoffset)
{
ObjectRen *obr;
ObjectInstanceRen *obi;
@@ -4555,8 +4555,6 @@ static void add_render_object(Render *re, Object *ob, Object *par, DupliObject *
obr->flag |= R_INSTANCEABLE;
copy_m4_m4(obr->obmat, ob->obmat);
}
- if(obr->lay & vectorlay)
- obr->flag |= R_NEED_VECTORS;
init_render_object_data(re, obr, timeoffset);
/* only add instance for objects that have not been used for dupli */
@@ -4583,8 +4581,6 @@ static void add_render_object(Render *re, Object *ob, Object *par, DupliObject *
obr->flag |= R_INSTANCEABLE;
copy_m4_m4(obr->obmat, ob->obmat);
}
- if(obr->lay & vectorlay)
- obr->flag |= R_NEED_VECTORS;
if(dob)
psys->flag |= PSYS_USE_IMAT;
init_render_object_data(re, obr, timeoffset);
@@ -4604,7 +4600,7 @@ static void add_render_object(Render *re, Object *ob, Object *par, DupliObject *
/* par = pointer to duplicator parent, needed for object lookup table */
/* index = when duplicater copies same object (particle), the counter */
-static void init_render_object(Render *re, Object *ob, Object *par, DupliObject *dob, int timeoffset, int vectorlay)
+static void init_render_object(Render *re, Object *ob, Object *par, DupliObject *dob, int timeoffset)
{
static double lasttime= 0.0;
double time;
@@ -4613,7 +4609,7 @@ static void init_render_object(Render *re, Object *ob, Object *par, DupliObject
if(ob->type==OB_LAMP)
add_render_lamp(re, ob);
else if(render_object_type(ob->type))
- add_render_object(re, ob, par, dob, timeoffset, vectorlay);
+ add_render_object(re, ob, par, dob, timeoffset);
else {
mul_m4_m4m4(mat, ob->obmat, re->viewmat);
invert_m4_m4(ob->imat, mat);
@@ -4811,7 +4807,7 @@ static int get_vector_renderlayers(Scene *sce)
return lay;
}
-static void add_group_render_dupli_obs(Render *re, Group *group, int nolamps, int onlyselected, Object *actob, int timeoffset, int vectorlay, int level)
+static void add_group_render_dupli_obs(Render *re, Group *group, int nolamps, int onlyselected, Object *actob, int timeoffset, int level)
{
GroupObject *go;
Object *ob;
@@ -4827,11 +4823,11 @@ static void add_group_render_dupli_obs(Render *re, Group *group, int nolamps, in
if(ob->flag & OB_DONE) {
if(ob->transflag & OB_RENDER_DUPLI) {
if(allow_render_object(re, ob, nolamps, onlyselected, actob)) {
- init_render_object(re, ob, NULL, 0, timeoffset, vectorlay);
+ init_render_object(re, ob, NULL, 0, timeoffset);
ob->transflag &= ~OB_RENDER_DUPLI;
if(ob->dup_group)
- add_group_render_dupli_obs(re, ob->dup_group, nolamps, onlyselected, actob, timeoffset, vectorlay, level+1);
+ add_group_render_dupli_obs(re, ob->dup_group, nolamps, onlyselected, actob, timeoffset, level+1);
}
}
}
@@ -4887,7 +4883,7 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp
* it still needs to create the ObjectRen containing the data */
if(ob->transflag & OB_RENDER_DUPLI) {
if(allow_render_object(re, ob, nolamps, onlyselected, actob)) {
- init_render_object(re, ob, NULL, 0, timeoffset, vectorlay);
+ init_render_object(re, ob, NULL, 0, timeoffset);
ob->transflag &= ~OB_RENDER_DUPLI;
}
}
@@ -4979,7 +4975,7 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp
if(obi==NULL)
/* can't instance, just create the object */
- init_render_object(re, obd, ob, dob, timeoffset, vectorlay);
+ init_render_object(re, obd, ob, dob, timeoffset);
if(dob->type != OB_DUPLIGROUP) {
obd->flag |= OB_DONE;
@@ -4987,17 +4983,17 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp
}
}
else
- init_render_object(re, obd, ob, dob, timeoffset, vectorlay);
+ init_render_object(re, obd, ob, dob, timeoffset);
if(re->test_break(re->tbh)) break;
}
free_object_duplilist(lb);
if(allow_render_object(re, ob, nolamps, onlyselected, actob))
- init_render_object(re, ob, NULL, 0, timeoffset, vectorlay);
+ init_render_object(re, ob, NULL, 0, timeoffset);
}
else if(allow_render_object(re, ob, nolamps, onlyselected, actob))
- init_render_object(re, ob, NULL, 0, timeoffset, vectorlay);
+ init_render_object(re, ob, NULL, 0, timeoffset);
}
if(re->test_break(re->tbh)) break;
@@ -5006,7 +5002,7 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp
/* objects in groups with OB_RENDER_DUPLI set still need to be created,
* since they may not be part of the scene */
for(group= re->main->group.first; group; group=group->id.next)
- add_group_render_dupli_obs(re, group, nolamps, onlyselected, actob, timeoffset, renderlay, 0);
+ add_group_render_dupli_obs(re, group, nolamps, onlyselected, actob, timeoffset, 0);
if(!re->test_break(re->tbh))
RE_makeRenderInstances(re);
@@ -5609,6 +5605,8 @@ void RE_Database_FromScene_Vectors(Render *re, Main *bmain, Scene *sce, unsigned
RE_Database_FromScene(re, bmain, sce, lay, 1);
if(!re->test_break(re->tbh)) {
+ int vectorlay= get_vector_renderlayers(re->scene);
+
for(step= 0; step<2; step++) {
if(step)
@@ -5621,7 +5619,7 @@ void RE_Database_FromScene_Vectors(Render *re, Main *bmain, Scene *sce, unsigned
int ok= 1;
FluidsimModifierData *fluidmd;
- if(!(obi->obr->flag & R_NEED_VECTORS))
+ if(!(obi->lay & vectorlay))
continue;
obi->totvector= obi->obr->totvert;
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index fcdb6d25083..1d8161086b0 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -316,6 +316,8 @@ void WM_jobs_stop(struct wmWindowManager *wm, void *owner, void *startjob);
void WM_jobs_kill(struct wmWindowManager *wm, void *owner, void (*)(void *, short int *, short int *, float *));
void WM_jobs_stop_all(struct wmWindowManager *wm);
+int WM_jobs_has_running(struct wmWindowManager *wm);
+
/* clipboard */
char *WM_clipboard_text_get(int selection);
void WM_clipboard_text_set(char *buf, int selection);
diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c
index 16691ac5ab0..2d0d0f92a44 100644
--- a/source/blender/windowmanager/intern/wm_jobs.c
+++ b/source/blender/windowmanager/intern/wm_jobs.c
@@ -505,3 +505,13 @@ void wm_jobs_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt)
}
}
+int WM_jobs_has_running(wmWindowManager *wm)
+{
+ wmJob *steve;
+
+ for(steve= wm->jobs.first; steve; steve= steve->next)
+ if(steve->running)
+ return 1;
+
+ return 0;
+}
diff --git a/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp b/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
index bfbdb4a1f6a..f9d60c57adc 100644
--- a/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
+++ b/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
@@ -1,35 +1,26 @@
-/**
-* Simulation for obstacle avoidance behavior
-*
-*
-* ***** 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. The Blender
-* Foundation also sells licenses for use in proprietary software under
-* the Blender License. See http://www.blender.org/BL/ for information
-* about this.
-*
-* 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,
-* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-* All rights reserved.
-*
-* The Original Code is: all of this file.
-*
-* Contributor(s): none yet.
-*
-* ***** END GPL LICENSE BLOCK *****
-*/
+/*
+ * Simulation for obstacle avoidance behavior
+ *
+ * ***** 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,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
#include "KX_ObstacleSimulation.h"
#include "KX_NavMeshObject.h"
diff --git a/source/gameengine/Ketsji/KX_ObstacleSimulation.h b/source/gameengine/Ketsji/KX_ObstacleSimulation.h
index d6af8f7d59a..f429d7480c9 100644
--- a/source/gameengine/Ketsji/KX_ObstacleSimulation.h
+++ b/source/gameengine/Ketsji/KX_ObstacleSimulation.h
@@ -7,10 +7,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
@@ -21,11 +18,6 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
diff --git a/source/gameengine/Ketsji/KX_ParentActuator.cpp b/source/gameengine/Ketsji/KX_ParentActuator.cpp
index cca50be7eb0..5058af18d15 100644
--- a/source/gameengine/Ketsji/KX_ParentActuator.cpp
+++ b/source/gameengine/Ketsji/KX_ParentActuator.cpp
@@ -7,10 +7,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/gameengine/Ketsji/KX_ParentActuator.h b/source/gameengine/Ketsji/KX_ParentActuator.h
index 484b137c2f5..d9509894748 100644
--- a/source/gameengine/Ketsji/KX_ParentActuator.h
+++ b/source/gameengine/Ketsji/KX_ParentActuator.h
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
diff --git a/source/gameengine/Ketsji/KX_SteeringActuator.cpp b/source/gameengine/Ketsji/KX_SteeringActuator.cpp
index 91c85c7f595..232b907d9a8 100644
--- a/source/gameengine/Ketsji/KX_SteeringActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SteeringActuator.cpp
@@ -1,35 +1,32 @@
-/**
-* Add steering behaviors
-*
-*
-* ***** 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. The Blender
-* Foundation also sells licenses for use in proprietary software under
-* the Blender License. See http://www.blender.org/BL/ for information
-* about this.
-*
-* 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,
-* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-* All rights reserved.
-*
-* The Original Code is: all of this file.
-*
-* Contributor(s): none yet.
-*
-* ***** END GPL LICENSE BLOCK *****
-*/
+/*
+ * Add steering behaviors
+ *
+ *
+ * ***** 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,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
#include "BLI_math.h"
#include "KX_SteeringActuator.h"
diff --git a/source/gameengine/Ketsji/KX_SteeringActuator.h b/source/gameengine/Ketsji/KX_SteeringActuator.h
index a0ae8e0d1d9..0e9d4c7e3a0 100644
--- a/source/gameengine/Ketsji/KX_SteeringActuator.h
+++ b/source/gameengine/Ketsji/KX_SteeringActuator.h
@@ -1,36 +1,28 @@
-/**
-* Add steering behaviors
-*
-*
-*
-* ***** 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. The Blender
-* Foundation also sells licenses for use in proprietary software under
-* the Blender License. See http://www.blender.org/BL/ for information
-* about this.
-*
-* 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,
-* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-* All rights reserved.
-*
-* The Original Code is: all of this file.
-*
-* Contributor(s): none yet.
-*
-* ***** END GPL LICENSE BLOCK *****
-*/
+/*
+ * Add steering behaviors
+ *
+ * ***** 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,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
#ifndef __KX_STEERINGACTUATOR
#define __KX_STEERINGACTUATOR
diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
index 725d00aa5cd..4eadf8e3e66 100644
--- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
+++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
@@ -4,10 +4,7 @@
* 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License. See http://www.blender.org/BL/ for information
- * about this.
+ * 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
@@ -18,11 +15,6 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****