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:
authorJoerg Mueller <nexyon@gmail.com>2009-08-04 11:28:17 +0400
committerJoerg Mueller <nexyon@gmail.com>2009-08-04 11:28:17 +0400
commit20ea6bac2d01c74ecb0a2412cf06bd77daf94be3 (patch)
tree12eebe9ea1d54930eaaac10edcdafae20f328210
parenta917e1d6de2cfaed592caec09befd0518329dd2d (diff)
parent9bb8540ba9e716363ed654aeb989cf83ea704d4a (diff)
Merge with 2.5 branch to revision 22207.
-rw-r--r--SConstruct5
-rw-r--r--config/darwin-config.py4
-rw-r--r--intern/smoke/intern/FLUID_3D.cpp38
-rw-r--r--intern/smoke/intern/FLUID_3D_STATIC.cpp32
-rw-r--r--intern/smoke/intern/WAVELET_NOISE.h1
-rw-r--r--release/Makefile6
-rw-r--r--release/ui/buttons_data_modifier.py3
-rw-r--r--release/ui/buttons_material.py47
-rw-r--r--release/ui/buttons_physics_softbody.py48
-rw-r--r--release/ui/buttons_scene.py26
-rw-r--r--release/ui/space_view3d_toolbar.py36
-rw-r--r--source/blender/blenkernel/BKE_mball.h1
-rw-r--r--source/blender/blenkernel/BKE_nla.h1
-rw-r--r--source/blender/blenkernel/BKE_sequence.h2
-rw-r--r--source/blender/blenkernel/BKE_smoke.h2
-rw-r--r--source/blender/blenkernel/BKE_softbody.h2
-rw-r--r--source/blender/blenkernel/CMakeLists.txt2
-rw-r--r--source/blender/blenkernel/SConscript2
-rw-r--r--source/blender/blenkernel/intern/Makefile1
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c5
-rw-r--r--source/blender/blenkernel/intern/mball.c51
-rw-r--r--source/blender/blenkernel/intern/modifier.c2
-rw-r--r--source/blender/blenkernel/intern/nla.c25
-rw-r--r--source/blender/blenkernel/intern/object.c33
-rw-r--r--source/blender/blenkernel/intern/pointcache.c8
-rw-r--r--source/blender/blenkernel/intern/sequence.c118
-rw-r--r--source/blender/blenkernel/intern/smoke.c257
-rw-r--r--source/blender/blenkernel/intern/softbody.c156
-rw-r--r--source/blender/blenloader/intern/readfile.c47
-rw-r--r--source/blender/blenloader/intern/writefile.c1
-rw-r--r--source/blender/editors/animation/anim_channels.c21
-rw-r--r--source/blender/editors/animation/anim_filter.c47
-rw-r--r--source/blender/editors/animation/keyingsets.c26
-rw-r--r--source/blender/editors/include/ED_anim_api.h2
-rw-r--r--source/blender/editors/interface/interface_style.c16
-rw-r--r--source/blender/editors/mesh/editmesh.c2
-rw-r--r--source/blender/editors/object/object_edit.c62
-rw-r--r--source/blender/editors/physics/ed_pointcache.c110
-rw-r--r--source/blender/editors/space_action/action_draw.c17
-rw-r--r--source/blender/editors/space_action/action_header.c6
-rw-r--r--source/blender/editors/space_graph/graph_draw.c17
-rw-r--r--source/blender/editors/space_graph/graph_header.c8
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c1
-rw-r--r--source/blender/editors/space_nla/nla_channels.c17
-rw-r--r--source/blender/editors/space_nla/nla_draw.c26
-rw-r--r--source/blender/editors/space_nla/nla_header.c3
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c2
-rw-r--r--source/blender/editors/space_view3d/drawobject.c36
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c219
-rw-r--r--source/blender/makesdna/DNA_action_types.h1
-rw-r--r--source/blender/makesdna/DNA_anim_types.h2
-rw-r--r--source/blender/makesdna/DNA_meta_types.h11
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h2
-rw-r--r--source/blender/makesdna/DNA_smoke_types.h10
-rw-r--r--source/blender/makesdna/DNA_world_types.h10
-rw-r--r--source/blender/makesrna/intern/rna_animation.c12
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c21
-rw-r--r--source/blender/makesrna/intern/rna_curve.c77
-rw-r--r--source/blender/makesrna/intern/rna_material.c4
-rw-r--r--source/blender/makesrna/intern/rna_meta.c43
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c16
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c28
-rw-r--r--source/blender/makesrna/intern/rna_pose.c6
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c17
-rw-r--r--source/blender/makesrna/intern/rna_texture.c30
-rw-r--r--source/blender/render/intern/source/pipeline.c60
-rw-r--r--source/gameengine/BlenderRoutines/Makefile1
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp1
-rw-r--r--source/gameengine/Converter/Makefile2
-rw-r--r--source/gameengine/GamePlayer/common/CMakeLists.txt1
-rw-r--r--source/gameengine/GamePlayer/common/Makefile1
-rw-r--r--source/gameengine/GamePlayer/common/unix/Makefile1
-rw-r--r--source/gameengine/Ketsji/KX_ConstraintActuator.cpp5
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp6
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.h16
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp5
-rw-r--r--source/gameengine/Ketsji/KX_Scene.h4
-rw-r--r--source/gameengine/Ketsji/Makefile3
-rw-r--r--source/gameengine/Physics/Dummy/Makefile2
-rw-r--r--source/gameengine/Physics/common/Makefile2
-rw-r--r--source/gameengine/Rasterizer/RAS_BucketManager.cpp9
-rw-r--r--source/nan_compile.mk2
-rw-r--r--source/nan_definitions.mk49
-rw-r--r--source/nan_link.mk1
84 files changed, 1322 insertions, 739 deletions
diff --git a/SConstruct b/SConstruct
index be574398dc2..c7a54dec25f 100644
--- a/SConstruct
+++ b/SConstruct
@@ -31,6 +31,7 @@
import platform as pltfrm
+# Need a better way to do this. Automagical maybe is not the best thing, maybe it is.
if pltfrm.architecture()[0] == '64bit':
bitness = 64
else:
@@ -574,8 +575,8 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc'):
if env['WITH_BF_PYTHON']:
ver = env["BF_PYTHON_VERSION"].replace(".", "")
- dllsources.append('#release/windows/extra/python' + ver + '.zip')
- dllsources.append('#release/windows/extra/zlib.pyd')
+ dllsources.append('${LCGDIR}/release/python' + ver + '.zip')
+ dllsources.append('${LCGDIR}/release/zlib.pyd')
if env['BF_DEBUG']:
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_LIB}_d.dll')
else:
diff --git a/config/darwin-config.py b/config/darwin-config.py
index 50b7aacd61b..597ce72a0d3 100644
--- a/config/darwin-config.py
+++ b/config/darwin-config.py
@@ -27,6 +27,8 @@ else :
LCGDIR = '#../lib/darwin-8.x.i386'
LIBDIR = '${LCGDIR}'
+BF_PYTHON_VERSION = '3.1'
+
if MAC_PROC== 'powerpc' and BF_PYTHON_VERSION == '2.3':
MAC_MIN_VERS = '10.3'
MACOSX_SDK='/Developer/SDKs/MacOSX10.3.9.sdk'
@@ -47,8 +49,6 @@ if USE_SDK==True:
#BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
#BF_FFMPEG_LIB = 'avformat.a avcodec.a avutil.a'
-BF_PYTHON_VERSION = '3.1'
-
if BF_PYTHON_VERSION=='3.1':
# python 3.1 uses precompiled libraries in bf svn /lib by default
diff --git a/intern/smoke/intern/FLUID_3D.cpp b/intern/smoke/intern/FLUID_3D.cpp
index 2822fca3607..344883866a8 100644
--- a/intern/smoke/intern/FLUID_3D.cpp
+++ b/intern/smoke/intern/FLUID_3D.cpp
@@ -120,29 +120,29 @@ FLUID_3D::FLUID_3D(int *res, int amplify, float *p0, float dt) :
// set side obstacles
int index;
- for (int y = 0; y < _yRes; y++)
+ for (int y = 0; y < _yRes; y++) // z
for (int x = 0; x < _xRes; x++)
{
// front slab
index = x + y * _xRes;
- if(DOMAIN_BC_FRONT==1) _obstacles[index] = 1;
+ if(DOMAIN_BC_BOTTOM==1) _obstacles[index] = 1;
// back slab
index += _totalCells - _slabSize;
- if(DOMAIN_BC_BACK==1) _obstacles[index] = 1;
+ if(DOMAIN_BC_TOP==1) _obstacles[index] = 1;
}
- for (int z = 0; z < _zRes; z++)
+ for (int z = 0; z < _zRes; z++) // y
for (int x = 0; x < _xRes; x++)
{
// bottom slab
index = x + z * _slabSize;
- if(DOMAIN_BC_BOTTOM==1) _obstacles[index] = 1;
+ if(DOMAIN_BC_FRONT==1) _obstacles[index] = 1;
// top slab
index += _slabSize - _xRes;
- if(DOMAIN_BC_TOP==1) _obstacles[index] = 1;
+ if(DOMAIN_BC_BACK==1) _obstacles[index] = 1;
}
- for (int z = 0; z < _zRes; z++)
+ for (int z = 0; z < _zRes; z++) // x
for (int y = 0; y < _yRes; y++)
{
// left slab
@@ -360,12 +360,12 @@ void FLUID_3D::project()
if(DOMAIN_BC_LEFT == 0) setNeumannX(_xVelocity, _res);
else setZeroX(_xVelocity, _res);
- if(DOMAIN_BC_TOP == 0) setNeumannY(_yVelocity, _res);
- else setZeroY(_yVelocity, _res);
-
- if(DOMAIN_BC_FRONT == 0) setNeumannZ(_zVelocity, _res);
+ if(DOMAIN_BC_TOP == 0) setNeumannZ(_zVelocity, _res);
else setZeroZ(_zVelocity, _res);
+ if(DOMAIN_BC_FRONT == 0) setNeumannY(_yVelocity, _res);
+ else setZeroY(_yVelocity, _res);
+
// calculate divergence
index = _slabSize + _xRes + 1;
for (z = 1; z < _zRes - 1; z++, index += 2 * _xRes)
@@ -630,12 +630,12 @@ void FLUID_3D::advectMacCormack()
if(DOMAIN_BC_LEFT == 0) copyBorderX(_xVelocity, res);
else setZeroX(_xVelocity, res);
- if(DOMAIN_BC_TOP == 0) copyBorderY(_yVelocity, res);
- else setZeroY(_yVelocity, res);
-
- if(DOMAIN_BC_FRONT == 0) copyBorderZ(_zVelocity, res);
+ if(DOMAIN_BC_TOP == 0) copyBorderZ(_zVelocity, res);
else setZeroZ(_zVelocity, res);
+ if(DOMAIN_BC_FRONT == 0) copyBorderY(_yVelocity, res);
+ else setZeroY(_yVelocity, res);
+
SWAP_POINTERS(_xVelocity, _xVelocityOld);
SWAP_POINTERS(_yVelocity, _yVelocityOld);
SWAP_POINTERS(_zVelocity, _zVelocityOld);
@@ -658,12 +658,12 @@ void FLUID_3D::advectMacCormack()
if(DOMAIN_BC_LEFT == 0) copyBorderX(_xVelocity, res);
else setZeroX(_xVelocity, res);
- if(DOMAIN_BC_TOP == 0) copyBorderY(_yVelocity, res);
- else setZeroY(_yVelocity, res);
-
- if(DOMAIN_BC_FRONT == 0) copyBorderZ(_zVelocity, res);
+ if(DOMAIN_BC_TOP == 0) copyBorderZ(_zVelocity, res);
else setZeroZ(_zVelocity, res);
+ if(DOMAIN_BC_FRONT == 0) copyBorderY(_yVelocity, res);
+ else setZeroY(_yVelocity, res);
+
setZeroBorder(_density, res);
setZeroBorder(_heat, res);
diff --git a/intern/smoke/intern/FLUID_3D_STATIC.cpp b/intern/smoke/intern/FLUID_3D_STATIC.cpp
index a72009b9abf..f2bbcf33075 100644
--- a/intern/smoke/intern/FLUID_3D_STATIC.cpp
+++ b/intern/smoke/intern/FLUID_3D_STATIC.cpp
@@ -104,26 +104,14 @@ void FLUID_3D::setNeumannY(float* field, Vec3Int res)
for (int z = 0; z < res[2]; z++)
for (int x = 0; x < res[0]; x++)
{
- // bottom slab
+ // front slab
index = x + z * slabSize;
field[index] = field[index + 2 * res[0]];
- // top slab
+ // back slab
index += slabSize - res[0];
field[index] = field[index - 2 * res[0]];
}
-
- // fix, force top slab to only allow outwards flux
- for (int z = 0; z < res[2]; z++)
- for (int x = 0; x < res[0]; x++)
- {
- // top slab
- index = x + z * slabSize;
- index += slabSize - res[0];
- if(field[index]<0.) field[index] = 0.;
- index -= res[0];
- if(field[index]<0.) field[index] = 0.;
- }
}
//////////////////////////////////////////////////////////////////////
@@ -137,14 +125,26 @@ void FLUID_3D::setNeumannZ(float* field, Vec3Int res)
for (int y = 0; y < res[1]; y++)
for (int x = 0; x < res[0]; x++)
{
- // front slab
+ // bottom slab
index = x + y * res[0];
field[index] = field[index + 2 * slabSize];
- // back slab
+ // top slab
index += totalCells - slabSize;
field[index] = field[index - 2 * slabSize];
}
+
+ // fix, force top slab to only allow outwards flux
+ for (int y = 0; y < res[1]; y++)
+ for (int x = 0; x < res[0]; x++)
+ {
+ // top slab
+ index = x + y * res[0];
+ index += totalCells - slabSize;
+ if(field[index]<0.) field[index] = 0.;
+ index -= slabSize;
+ if(field[index]<0.) field[index] = 0.;
+ }
}
//////////////////////////////////////////////////////////////////////
diff --git a/intern/smoke/intern/WAVELET_NOISE.h b/intern/smoke/intern/WAVELET_NOISE.h
index ccb540f6d4d..493ed1642fc 100644
--- a/intern/smoke/intern/WAVELET_NOISE.h
+++ b/intern/smoke/intern/WAVELET_NOISE.h
@@ -323,6 +323,7 @@ static void generateTile_WAVELET(float* const noiseTileData, std::string filenam
saveTile(noise3, filename);
delete[] temp13;
delete[] temp23;
+ delete[] noise3;
std::cout <<"Generating new 3d noise done\n";
}
diff --git a/release/Makefile b/release/Makefile
index 2d688211b9c..24827014b16 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -166,6 +166,12 @@ endif
@echo "----> Copy python UI files"
@[ ! -d ui ] || cp -r ui $(CONFDIR)/ui
+
+ ifeq ($(OS),darwin)
+ @echo "----> Copy python modules"
+ @mkdir $(CONFDIR)/python/
+ @unzip -q $(LCGDIR)/release/python.zip -d $(CONFDIR)/python/
+ endif
ifeq ($(OS),darwin)
@echo "----> Move .blender to .app/Contents/MacOS/"
diff --git a/release/ui/buttons_data_modifier.py b/release/ui/buttons_data_modifier.py
index ae824e73720..bd39ff1e70e 100644
--- a/release/ui/buttons_data_modifier.py
+++ b/release/ui/buttons_data_modifier.py
@@ -376,10 +376,9 @@ class DATA_PT_modifiers(DataButtonsPanel):
layout.itemR(md.domain_settings, "coll_group")
elif md.smoke_type == 'TYPE_FLOW':
layout.itemS()
+ layout.itemR(md.flow_settings, "outflow")
layout.itemR(md.flow_settings, "density")
layout.itemR(md.flow_settings, "temperature")
- layout.itemL(text="Velocity")
- layout.row().itemR(md.flow_settings, "velocity", text="")
layout.item_pointerR(md.flow_settings, "psys", ob, "particle_systems")
elif md.smoke_type == 'TYPE_COLL':
layout.itemS()
diff --git a/release/ui/buttons_material.py b/release/ui/buttons_material.py
index 5cbec3f38f9..b570deebfe2 100644
--- a/release/ui/buttons_material.py
+++ b/release/ui/buttons_material.py
@@ -170,6 +170,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel):
sub = col.column()
sub.active = mat.face_texture
sub.itemR(mat, "face_texture_alpha")
+ col.itemS()
col.itemR(mat, "vertex_color_paint")
col.itemR(mat, "vertex_color_light")
col.itemR(mat, "object_color")
@@ -373,24 +374,28 @@ class MATERIAL_PT_raymir(MaterialButtonsPanel):
col = split.column()
col.itemR(raym, "reflect", text="Reflectivity", slider=True)
col.itemR(mat, "mirror_color", text="")
- col.itemR(raym, "fresnel")
+ col.itemL(text="Fresnel:")
+ col.itemR(raym, "fresnel", text="Amount")
sub = col.column()
sub.active = raym.fresnel > 0
- sub.itemR(raym, "fresnel_fac", text="Fac", slider=True)
+ sub.itemR(raym, "fresnel_fac", text="Blend", slider=True)
+ col.itemS()
+ col.itemS()
+ sub = col.split(percentage=0.4)
+ sub.itemL(text="Fade To:")
+ sub.itemR(raym, "fade_to", text="")
col = split.column()
- col.itemR(raym, "gloss", slider=True)
+ col.itemR(raym, "depth")
+ col.itemR(raym, "distance", text="Max Dist")
+ col.itemL(text="Gloss:")
+ col.itemR(raym, "gloss", text="Amount", slider=True)
sub = col.column()
sub.active = raym.gloss < 1
sub.itemR(raym, "gloss_threshold", slider=True, text="Threshold")
sub.itemR(raym, "gloss_samples", text="Samples")
sub.itemR(raym, "gloss_anisotropic", slider=True, text="Anisotropic")
- row = layout.row()
- row.itemR(raym, "distance", text="Max Dist")
- row.itemR(raym, "depth")
-
- layout.itemR(raym, "fade_to")
class MATERIAL_PT_raytransp(MaterialButtonsPanel):
__label__= "Ray Transparency"
@@ -419,25 +424,31 @@ class MATERIAL_PT_raytransp(MaterialButtonsPanel):
col = split.column()
col.itemR(rayt, "ior")
- col.itemR(rayt, "fresnel")
+ col.itemR(rayt, "falloff")
+ col.itemR(rayt, "limit")
+
+ col = split.column()
+ col.itemR(rayt, "depth")
+ col.itemR(rayt, "filter", slider=True)
+ col.itemR(rayt, "specular_opacity", slider=True, text="Spec Opacity")
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemL(text="Fresnel:")
+ col.itemR(rayt, "fresnel", text="Amount")
sub = col.column()
sub.active = rayt.fresnel > 0
- sub.itemR(rayt, "fresnel_fac", text="Fac", slider=True)
+ sub.itemR(rayt, "fresnel_fac", text="Blend", slider=True)
col = split.column()
- col.itemR(rayt, "gloss", slider=True)
+ col.itemL(text="Gloss:")
+ col.itemR(rayt, "gloss", text="Amount", slider=True)
sub = col.column()
sub.active = rayt.gloss < 1
sub.itemR(rayt, "gloss_threshold", slider=True, text="Threshold")
sub.itemR(rayt, "gloss_samples", text="Samples")
- flow = layout.column_flow()
- flow.itemR(rayt, "filter", slider=True)
- flow.itemR(rayt, "limit")
- flow.itemR(rayt, "falloff")
- flow.itemR(rayt, "specular_opacity", slider=True, text="Spec Opacity")
- flow.itemR(rayt, "depth")
-
class MATERIAL_PT_halo(MaterialButtonsPanel):
__label__= "Halo"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
diff --git a/release/ui/buttons_physics_softbody.py b/release/ui/buttons_physics_softbody.py
index 80e11f92d6b..bff9b13f464 100644
--- a/release/ui/buttons_physics_softbody.py
+++ b/release/ui/buttons_physics_softbody.py
@@ -51,7 +51,54 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel):
col.itemL(text="Simulation:")
col.itemR(softbody, "gravity")
col.itemR(softbody, "speed")
+
+class PHYSICS_PT_softbody_cache(PhysicButtonsPanel):
+ __label__ = "Soft Body Cache"
+ __default_closed__ = True
+
+ def poll(self, context):
+ return (context.soft_body)
+
+ def draw(self, context):
+ layout = self.layout
+
+ cache = context.soft_body.point_cache
+
+ row = layout.row()
+ row.itemR(cache, "name")
+
+ row = layout.row()
+ row.itemR(cache, "start_frame")
+ row.itemR(cache, "end_frame")
+
+ row = layout.row()
+
+ if cache.baked == True:
+ row.itemO("ptcache.free_bake_softbody", text="Free Bake")
+ else:
+ row.item_booleanO("ptcache.cache_softbody", "bake", True, text="Bake")
+
+ sub = row.row()
+ sub.enabled = cache.frames_skipped or cache.outdated
+ sub.itemO("ptcache.cache_softbody", text="Calculate to Current Frame")
+
+ row = layout.row()
+ row.itemO("ptcache.bake_from_softbody_cache", text="Current Cache to Bake")
+ row.itemR(cache, "step");
+ row = layout.row()
+ row.itemR(cache, "quick_cache")
+ row.itemR(cache, "disk_cache")
+
+ layout.itemL(text=cache.info)
+
+ layout.itemS()
+
+ row = layout.row()
+ row.itemO("ptcache.bake_all", "bake", True, text="Bake All Dynamics")
+ row.itemO("ptcache.free_bake_all", text="Free All Bakes")
+ layout.itemO("ptcache.bake_all", text="Update All Dynamics to current frame")
+
class PHYSICS_PT_softbody_goal(PhysicButtonsPanel):
__label__ = "Soft Body Goal"
@@ -211,6 +258,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
layout.itemR(softbody, "diagnose")
bpy.types.register(PHYSICS_PT_softbody)
+bpy.types.register(PHYSICS_PT_softbody_cache)
bpy.types.register(PHYSICS_PT_softbody_goal)
bpy.types.register(PHYSICS_PT_softbody_edge)
bpy.types.register(PHYSICS_PT_softbody_collision)
diff --git a/release/ui/buttons_scene.py b/release/ui/buttons_scene.py
index f9ca02d2b4b..2d8dc0eab33 100644
--- a/release/ui/buttons_scene.py
+++ b/release/ui/buttons_scene.py
@@ -163,28 +163,22 @@ class SCENE_PT_performance(RenderButtonsPanel):
sub = col.column()
sub.enabled = rd.threads_mode == 'THREADS_FIXED'
sub.itemR(rd, "threads")
-
- col = split.column(align=True)
col.itemL(text="Tiles:")
col.itemR(rd, "parts_x", text="X")
col.itemR(rd, "parts_y", text="Y")
- split = layout.split()
-
col = split.column()
col.itemL(text="Memory:")
- row = col.row()
- row.itemR(rd, "save_buffers")
- row.enabled = not rd.full_sample
-
- col = split.column()
- col.active = rd.use_compositing
- col.itemL()
- col.itemR(rd, "free_image_textures")
-
- row = layout.row()
- row.active = rd.render_raytracing
- row.itemR(rd, "octree_resolution", text="Ray Tracing Octree")
+ sub = col.column()
+ sub.itemR(rd, "save_buffers")
+ sub.enabled = not rd.full_sample
+ sub = col.column()
+ sub.active = rd.use_compositing
+ sub.itemR(rd, "free_image_textures")
+ sub = col.column()
+ sub.active = rd.render_raytracing
+ sub.itemL(text="Ray Tracing Octree:")
+ sub.itemR(rd, "octree_resolution", text="")
class SCENE_PT_post_processing(RenderButtonsPanel):
__label__ = "Post Processing"
diff --git a/release/ui/space_view3d_toolbar.py b/release/ui/space_view3d_toolbar.py
index 7fd8d75209f..be57497a0b4 100644
--- a/release/ui/space_view3d_toolbar.py
+++ b/release/ui/space_view3d_toolbar.py
@@ -252,7 +252,7 @@ class VIEW3D_PT_tools_editmode_lattice(View3DPanel):
class View3DPanel(bpy.types.Panel):
__space_type__ = "VIEW_3D"
__region_type__ = "TOOLS"
- __context__ = "posemode"
+ __context__ = "pose_mode"
class VIEW3D_PT_tools_posemode(View3DPanel):
__label__ = "Pose Tools"
@@ -325,8 +325,25 @@ class VIEW3D_PT_tools_brush(PaintPanel):
settings = self.paint_settings(context)
brush = settings.brush
+ # XXX This needs a check if psys is editable.
if context.particle_edit_object:
layout.column().itemR(settings, "tool", expand=True)
+ if settings.tool != 'NONE':
+ col = layout.column(align=True)
+ col.itemR(brush, "size", slider=True)
+ col.itemR(brush, "strength", slider=True)
+
+ if settings.tool == 'ADD':
+ layout.itemR(settings, "add_interpolate")
+
+ col = layout.column()
+ col.itemR(brush, "steps", slider=True)
+ col.itemR(settings, "add_keys", slider=True)
+ elif settings.tool == 'LENGTH':
+ layout.itemR(brush, "length_mode", expand=True)
+ elif settings.tool == 'PUFF':
+ layout.itemR(brush, "puff_mode", expand=True)
+
else:
layout.split().row().template_ID(settings, "brush")
@@ -354,7 +371,7 @@ class VIEW3D_PT_tools_brush(PaintPanel):
row = col.row(align=True)
row.itemR(brush, "falloff", slider=True)
row.itemR(brush, "falloff_pressure", toggle=True, icon='ICON_BRUSH_DATA', text="")
- if context.vertex_paint_object:
+ if context.vertex_paint_object or context.texture_paint_object:
col.itemR(brush, "color", text="")
if context.texture_paint_object:
row = col.row(align=True)
@@ -443,6 +460,8 @@ class VIEW3D_PT_weight_paint_options(View3DPanel):
# col.itemL(text="Multiply:")
# col.itemR(wpaint, "mul", text="")
+# Also missing now:
+# Soft, Vgroup, X-Mirror and "Clear" Operator.
# ********** default tools for vertexpaint ****************
@@ -513,11 +532,20 @@ class VIEW3D_PT_tools_particle_edit(View3DPanel):
pe = context.tool_settings.particle_edit
col = layout.column(align=True)
-
col.itemR(pe, "emitter_deflect", text="Deflect")
sub = col.row()
- sub.itemR(pe, "emitter_distance", text="Distance")
sub.active = pe.emitter_deflect
+ sub.itemR(pe, "emitter_distance", text="Distance")
+
+ col = layout.column(align=True)
+ col.itemL(text="Keep:")
+ col.itemR(pe, "keep_lengths", text="Lenghts")
+ col.itemR(pe, "keep_root", text="Root")
+
+ col = layout.column(align=True)
+ col.itemL(text="Draw:")
+ col.itemR(pe, "show_time", text="Time")
+ col.itemR(pe, "show_children", text="Children")
bpy.types.register(VIEW3D_PT_tools_objectmode)
bpy.types.register(VIEW3D_PT_tools_editmode_mesh)
diff --git a/source/blender/blenkernel/BKE_mball.h b/source/blender/blenkernel/BKE_mball.h
index ba78aa0682d..ff9ac693ba8 100644
--- a/source/blender/blenkernel/BKE_mball.h
+++ b/source/blender/blenkernel/BKE_mball.h
@@ -164,6 +164,7 @@ struct MetaBall *copy_mball(struct MetaBall *mb);
void make_local_mball(struct MetaBall *mb);
void tex_space_mball(struct Object *ob);
float *make_orco_mball(struct Object *ob);
+void copy_mball_properties(struct Scene *scene, struct Object *active_object);
struct Object *find_basis_mball(struct Scene *scene, struct Object *ob);
int is_basis_mball(struct Object *ob);
void metaball_polygonize(struct Scene *scene, struct Object *ob);
diff --git a/source/blender/blenkernel/BKE_nla.h b/source/blender/blenkernel/BKE_nla.h
index 241a8fd7b59..989043c1d67 100644
--- a/source/blender/blenkernel/BKE_nla.h
+++ b/source/blender/blenkernel/BKE_nla.h
@@ -80,6 +80,7 @@ short BKE_nlatrack_add_strip(struct NlaTrack *nlt, struct NlaStrip *strip);
/* ............ */
struct NlaStrip *BKE_nlastrip_find_active(struct NlaTrack *nlt);
+void BKE_nlastrip_set_active(struct AnimData *adt, struct NlaStrip *strip);
short BKE_nlastrip_within_bounds(struct NlaStrip *strip, float min, float max);
diff --git a/source/blender/blenkernel/BKE_sequence.h b/source/blender/blenkernel/BKE_sequence.h
index 949564107d0..280bf29b435 100644
--- a/source/blender/blenkernel/BKE_sequence.h
+++ b/source/blender/blenkernel/BKE_sequence.h
@@ -181,7 +181,7 @@ int check_single_seq(struct Sequence *seq);
void fix_single_seq(struct Sequence *seq);
int seq_test_overlap(struct ListBase * seqbasep, struct Sequence *test);
int shuffle_seq(struct ListBase * seqbasep, struct Sequence *test);
-void free_imbuf_seq(struct ListBase * seqbasep);
+void free_imbuf_seq(struct ListBase * seqbasep, int check_mem_usage);
// AUD_XXX
void seq_update_sound(struct Sequence *seq);
diff --git a/source/blender/blenkernel/BKE_smoke.h b/source/blender/blenkernel/BKE_smoke.h
index b37e1d08fcc..b1b42286788 100644
--- a/source/blender/blenkernel/BKE_smoke.h
+++ b/source/blender/blenkernel/BKE_smoke.h
@@ -32,7 +32,7 @@
#ifndef BKE_SMOKE_H_
#define BKE_SMOKE_H_
-void smokeModifier_do(struct SmokeModifierData *smd, struct Scene *scene, struct Object *ob, struct DerivedMesh *dm);
+void smokeModifier_do(struct SmokeModifierData *smd, struct Scene *scene, struct Object *ob, struct DerivedMesh *dm, int useRenderParams, int isFinalCalc);
void smokeModifier_free (struct SmokeModifierData *smd);
void smokeModifier_reset(struct SmokeModifierData *smd);
diff --git a/source/blender/blenkernel/BKE_softbody.h b/source/blender/blenkernel/BKE_softbody.h
index 971ac7a5f01..0d9682cf842 100644
--- a/source/blender/blenkernel/BKE_softbody.h
+++ b/source/blender/blenkernel/BKE_softbody.h
@@ -69,7 +69,7 @@ extern void sbObjectToSoftbody(struct Object *ob);
extern void sbSetInterruptCallBack(int (*f)(void));
/* writing to cache for bake editing */
-extern void sbWriteCache(struct Object *ob, int framenr);
+extern void softbody_write_cache(struct Object *ob, struct SoftBody *soft, int cfra);
#endif
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 787519ecabe..269fe2b325d 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -27,7 +27,7 @@
FILE(GLOB SRC intern/*.c)
SET(INC
- . ../../../intern/guardedalloc ../editors/include ../blenlib ../makesdna
+ . ../../../intern/guardedalloc ../../../intern/memutil ../editors/include ../blenlib ../makesdna
../render/extern/include ../../../intern/decimation/extern
../imbuf ../avi ../../../intern/elbeem/extern ../../../intern/opennl/extern
../../../intern/iksolver/extern ../blenloader ../quicktime
diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript
index a27299078a9..ce0ee5cf3c8 100644
--- a/source/blender/blenkernel/SConscript
+++ b/source/blender/blenkernel/SConscript
@@ -3,7 +3,7 @@ Import ('env')
sources = env.Glob('intern/*.c')
-incs = '. #/intern/guardedalloc ../editors/include ../blenlib ../makesdna'
+incs = '. #/intern/guardedalloc #/intern/memutil ../editors/include ../blenlib ../makesdna'
incs += ' ../render/extern/include #/intern/decimation/extern ../makesrna'
incs += ' ../imbuf ../avi #/intern/elbeem/extern ../nodes'
incs += ' #/intern/iksolver/extern ../blenloader'
diff --git a/source/blender/blenkernel/intern/Makefile b/source/blender/blenkernel/intern/Makefile
index fe7187200aa..f60bdffa282 100644
--- a/source/blender/blenkernel/intern/Makefile
+++ b/source/blender/blenkernel/intern/Makefile
@@ -41,6 +41,7 @@ CPPFLAGS += -I$(OPENGL_HEADERS)
CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
+CPPFLAGS += -I../../../../intern/memutil
# Reference to the types in makesdna and imbuf
CPPFLAGS += -I../../makesdna
CPPFLAGS += -I../../makesrna
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 7278fee5ab8..560ae76e4d1 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -71,7 +71,7 @@ static short id_has_animdata (ID *id)
switch (GS(id->name)) {
/* has AnimData */
case ID_OB:
- case ID_CU:
+ case ID_MB: case ID_CU:
case ID_KE:
case ID_PA:
case ID_MA: case ID_TE: case ID_NT:
@@ -1442,6 +1442,9 @@ void BKE_animsys_evaluate_all_animation (Main *main, float ctime)
// TODO: we probably need the same hack as for curves (ctime-hack)
EVAL_ANIM_IDS(main->key.first, ADT_RECALC_ANIM);
+ /* metaballs */
+ EVAL_ANIM_IDS(main->mball.first, ADT_RECALC_ANIM);
+
/* curves */
/* we need to perform a special hack here to ensure that the ctime
* value of the curve gets set in case there's no animation for that
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index 74d56e81a87..3ca7dac4bc9 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -55,6 +55,7 @@
#include "BKE_main.h"
/* #include "BKE_object.h" */
+#include "BKE_animsys.h"
#include "BKE_scene.h"
#include "BKE_blender.h"
#include "BKE_library.h"
@@ -68,10 +69,10 @@
/* Global variables */
-float thresh= 0.6f;
-int totelem=0;
-MetaElem **mainb;
-octal_tree *metaball_tree = NULL;
+static float thresh= 0.6f;
+static int totelem=0;
+static MetaElem **mainb;
+static octal_tree *metaball_tree = NULL;
/* Functions */
void unlink_mball(MetaBall *mb)
@@ -90,6 +91,7 @@ void free_mball(MetaBall *mb)
{
unlink_mball(mb);
+ if(mb->adt) BKE_free_animdata((ID *)mb);
if(mb->mat) MEM_freeN(mb->mat);
if(mb->bb) MEM_freeN(mb->bb);
BLI_freelistN(&mb->elems);
@@ -278,6 +280,47 @@ int is_basis_mball(Object *ob)
return 1;
}
+/* \brief copy some properties from object to other metaball object with same base name
+ *
+ * When some properties (wiresize, threshold, update flags) of metaball are changed, then this properties
+ * are copied to all metaballs in same "group" (metaballs with same base name: MBall,
+ * MBall.001, MBall.002, etc). The most important is to copy properties to the base metaball,
+ * because this metaball influence polygonisation of metaballs. */
+void copy_mball_properties(Scene *scene, Object *active_object)
+{
+ Base *base;
+ Object *ob;
+ MetaBall *active_mball = (MetaBall*)active_object->data;
+ int basisnr, obnr;
+ char basisname[32], obname[32];
+
+ splitIDname(active_object->id.name+2, basisname, &basisnr);
+
+ /* XXX recursion check, see scene.c, just too simple code this next_object() */
+ if(F_ERROR==next_object(scene, 0, 0, 0))
+ return;
+
+ while(next_object(scene, 1, &base, &ob)) {
+ if (ob->type==OB_MBALL) {
+ if(ob!=active_object){
+ splitIDname(ob->id.name+2, obname, &obnr);
+
+ /* Object ob has to be in same "group" ... it means, that it has to have
+ * same base of its name */
+ if(strcmp(obname, basisname)==0){
+ MetaBall *mb= ob->data;
+
+ /* Copy properties from selected/edited metaball */
+ mb->wiresize= active_mball->wiresize;
+ mb->rendersize= active_mball->rendersize;
+ mb->thresh= active_mball->thresh;
+ mb->flag= active_mball->flag;
+ }
+ }
+ }
+ }
+}
+
/** \brief This function finds basic MetaBall.
*
* Basic MetaBall doesn't include any number at the end of
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index d86d563aaa2..f8795edc878 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -5844,7 +5844,7 @@ static void smokeModifier_deformVerts(
CDDM_apply_vert_coords(dm, vertexCos);
CDDM_calc_normals(dm);
- smokeModifier_do(smd, md->scene, ob, dm);
+ smokeModifier_do(smd, md->scene, ob, dm, useRenderParams, isFinalCalc);
if(dm != derivedData) dm->release(dm);
}
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 1871ec006f4..c41c4ae78e4 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -993,6 +993,28 @@ NlaStrip *BKE_nlastrip_find_active (NlaTrack *nlt)
return NULL;
}
+/* Make the given NLA-Strip the active one within the given block */
+void BKE_nlastrip_set_active (AnimData *adt, NlaStrip *strip)
+{
+ NlaTrack *nlt;
+ NlaStrip *nls;
+
+ /* sanity checks */
+ if (adt == NULL)
+ return;
+
+ /* loop over tracks, deactivating*/
+ for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
+ for (nls= nlt->strips.first; nls; nls= nls->next) {
+ if (nls != strip)
+ nls->flag &= ~NLASTRIP_FLAG_ACTIVE;
+ else
+ nls->flag |= NLASTRIP_FLAG_ACTIVE;
+ }
+ }
+}
+
+
/* Does the given NLA-strip fall within the given bounds (times)? */
short BKE_nlastrip_within_bounds (NlaStrip *strip, float min, float max)
{
@@ -1403,6 +1425,9 @@ void BKE_nla_action_pushdown (AnimData *adt)
// FIXME: this needs to be more automated, since user can rearrange strips
strip->extendmode= NLASTRIP_EXTEND_HOLD_FORWARD;
}
+
+ /* make strip the active one... */
+ BKE_nlastrip_set_active(adt, strip);
}
}
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index e463d007a2d..150a5aa97aa 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -91,6 +91,7 @@
#include "BKE_constraint.h"
#include "BKE_curve.h"
#include "BKE_displist.h"
+#include "BKE_fcurve.h"
#include "BKE_group.h"
#include "BKE_icons.h"
#include "BKE_key.h"
@@ -1402,11 +1403,32 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
ob->parent= target->parent; /* libdata */
Mat4CpyMat4(ob->parentinv, target->parentinv);
-#if 0 // XXX old animation system
- ob->ipo= target->ipo; /* libdata */
-#endif // XXX old animation system
- /* skip constraints, constraintchannels, nla? */
+ /* copy animdata stuff - drivers only for now... */
+ if ((target->adt) && (target->adt->drivers.first)) {
+ FCurve *fcu;
+
+ /* add new animdata block */
+ ob->adt= BKE_id_add_animdata(&ob->id);
+
+ /* make a copy of all the drivers (for now), then correct any links that need fixing */
+ copy_fcurves(&ob->adt->drivers, &target->adt->drivers);
+
+ for (fcu= ob->adt->drivers.first; fcu; fcu= fcu->next) {
+ ChannelDriver *driver= fcu->driver;
+ DriverTarget *dtar;
+
+ for (dtar= driver->targets.first; dtar; dtar= dtar->next) {
+ if ((Object *)dtar->id == target)
+ dtar->id= (ID *)ob;
+ else
+ id_lib_extern((ID *)dtar->id);
+ }
+ }
+ }
+
+ /* skip constraints? */
+ // FIXME: this is considered by many as a bug
/* set object type and link to data */
ob->type= target->type;
@@ -1442,6 +1464,9 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
armature_set_id_extern(ob);
}
+
+ /* copy drawtype info */
+ ob->dt= target->dt;
}
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 4bb571aa8ca..beb72c2c13f 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -310,7 +310,7 @@ int BKE_ptcache_file_write_floats(PTCacheFile *pf, float *f, int tot)
static int ptcache_pid_elemsize(PTCacheID *pid)
{
if(pid->type==PTCACHE_TYPE_SOFTBODY)
- return 0; // TODO
+ return 6 * sizeof(float);
else if(pid->type==PTCACHE_TYPE_PARTICLES)
return sizeof(ParticleKey);
else if(pid->type==PTCACHE_TYPE_CLOTH)
@@ -320,8 +320,10 @@ static int ptcache_pid_elemsize(PTCacheID *pid)
}
static int ptcache_pid_totelem(PTCacheID *pid)
{
- if(pid->type==PTCACHE_TYPE_SOFTBODY)
- return 0; // TODO
+ if(pid->type==PTCACHE_TYPE_SOFTBODY) {
+ SoftBody *soft = pid->data;
+ return soft->totpoint;
+ }
else if(pid->type==PTCACHE_TYPE_PARTICLES) {
ParticleSystem *psys = pid->data;
return psys->totpart;
diff --git a/source/blender/blenkernel/intern/sequence.c b/source/blender/blenkernel/intern/sequence.c
index b6b9a1d0c65..59b7e528d91 100644
--- a/source/blender/blenkernel/intern/sequence.c
+++ b/source/blender/blenkernel/intern/sequence.c
@@ -32,6 +32,7 @@
#include <math.h>
#include "MEM_guardedalloc.h"
+#include "MEM_CacheLimiterC-Api.h"
#include "DNA_listBase.h"
#include "DNA_sequence_types.h"
@@ -127,7 +128,7 @@ void new_tstripdata(Sequence *seq)
/* free */
-static void free_proxy_seq(Sequence *seq)
+void free_proxy_seq(Sequence *seq)
{
if (seq->strip && seq->strip->proxy && seq->strip->proxy->anim) {
IMB_free_anim(seq->strip->proxy->anim);
@@ -3063,12 +3064,37 @@ void free_imbuf_seq_except(Scene *scene, int cfra)
SEQ_END
}
-void free_imbuf_seq(ListBase * seqbase)
+void free_imbuf_seq(ListBase * seqbase, int check_mem_usage)
{
Sequence *seq;
TStripElem *se;
int a;
+ if (check_mem_usage) {
+ /* Let the cache limitor take care of this (schlaile) */
+ /* While render let's keep all memory available for render
+ (ton)
+ At least if free memory is tight...
+ This can make a big difference in encoding speed
+ (it is around 4 times(!) faster, if we do not waste time
+ on freeing _all_ buffers every time on long timelines...)
+ (schlaile)
+ */
+
+ uintptr_t mem_in_use;
+ uintptr_t mmap_in_use;
+ uintptr_t max;
+
+ mem_in_use= MEM_get_memory_in_use();
+ mmap_in_use= MEM_get_mapped_memory_in_use();
+ max = MEM_CacheLimiter_get_maximum();
+
+ if (max == 0 || mem_in_use + mmap_in_use <= max) {
+ return;
+ }
+ }
+
+
for(seq= seqbase->first; seq; seq= seq->next) {
if(seq->strip) {
for(a = 0, se = seq->strip->tstripdata;
@@ -3100,7 +3126,11 @@ void free_imbuf_seq(ListBase * seqbase)
}
}
if(seq->type==SEQ_META) {
- free_imbuf_seq(&seq->seqbase);
+ free_imbuf_seq(&seq->seqbase, FALSE);
+ }
+ if(seq->type==SEQ_SCENE) {
+ /* FIXME: recurs downwards,
+ but do recurs protection somehow! */
}
}
@@ -3198,88 +3228,6 @@ void free_imbuf_seq_with_ipo(Scene *scene, struct Ipo *ipo)
SEQ_END
}
-#if 0
-/* bad levell call... */
-void do_render_seq(RenderResult *rr, int cfra)
-{
- static int recurs_depth = 0
- ImBuf *ibuf;
-
- recurs_depth++;
-
- ibuf= give_ibuf_seq(rr->rectx, rr->recty, cfra, 0, 100.0);
-
- recurs_depth--;
-
- if(ibuf) {
- if(ibuf->rect_float) {
- if (!rr->rectf)
- rr->rectf= MEM_mallocN(4*sizeof(float)*rr->rectx*rr->recty, "render_seq rectf");
-
- memcpy(rr->rectf, ibuf->rect_float, 4*sizeof(float)*rr->rectx*rr->recty);
-
- /* TSK! Since sequence render doesn't free the *rr render result, the old rect32
- can hang around when sequence render has rendered a 32 bits one before */
- if(rr->rect32) {
- MEM_freeN(rr->rect32);
- rr->rect32= NULL;
- }
- }
- else if(ibuf->rect) {
- if (!rr->rect32)
- rr->rect32= MEM_mallocN(sizeof(int)*rr->rectx*rr->recty, "render_seq rect");
-
- memcpy(rr->rect32, ibuf->rect, 4*rr->rectx*rr->recty);
-
- /* if (ibuf->zbuf) { */
- /* if (R.rectz) freeN(R.rectz); */
- /* R.rectz = BLI_dupallocN(ibuf->zbuf); */
- /* } */
- }
-
- /* Let the cache limitor take care of this (schlaile) */
- /* While render let's keep all memory available for render
- (ton)
- At least if free memory is tight...
- This can make a big difference in encoding speed
- (it is around 4 times(!) faster, if we do not waste time
- on freeing _all_ buffers every time on long timelines...)
- (schlaile)
- */
- if (recurs_depth == 0) { /* with nested scenes, only free on toplevel... */
- uintptr_t mem_in_use;
- uintptr_t mmap_in_use;
- uintptr_t max;
-
- mem_in_use= MEM_get_memory_in_use();
- mmap_in_use= MEM_get_mapped_memory_in_use();
- max = MEM_CacheLimiter_get_maximum();
-
- if (max != 0 && mem_in_use + mmap_in_use > max) {
- fprintf(stderr, "Memory in use > maximum memory\n");
- fprintf(stderr, "Cleaning up, please wait...\n"
- "If this happens very often,\n"
- "consider "
- "raising the memcache limit in the "
- "user preferences.\n");
- free_imbuf_seq();
- }
- free_proxy_seq(seq);
- }
- }
- else {
- /* render result is delivered empty in most cases, nevertheless we handle all cases */
- if (rr->rectf)
- memset(rr->rectf, 0, 4*sizeof(float)*rr->rectx*rr->recty);
- else if (rr->rect32)
- memset(rr->rect32, 0, 4*rr->rectx*rr->recty);
- else
- rr->rect32= MEM_callocN(sizeof(int)*rr->rectx*rr->recty, "render_seq rect");
- }
-}
-
-#endif
-
/* seq funcs's for transforming internally
notice the difference between start/end and left/right.
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index fbf6beb835f..3f23fbda484 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -48,6 +48,7 @@
#include "BLI_kdtree.h"
#include "BLI_kdopbvh.h"
+#include "BKE_bvhutils.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_customdata.h"
#include "BKE_DerivedMesh.h"
@@ -125,6 +126,82 @@ void calcTriangleDivs(Object *ob, MVert *verts, int numverts, MFace *tris, int n
#define TRI_UVOFFSET (1./4.)
+
+BVHTree *bvhtree_build_from_smoke ( float mat[4][4], MFace *mfaces, unsigned int numfaces, MVert *x, unsigned int numverts, float epsilon )
+{
+ BVHTree *tree;
+ float co[12];
+ int i;
+ MFace *tface = mfaces;
+
+ // calc quads
+ // todo
+
+ tree = BLI_bvhtree_new ( numfaces, epsilon, 2, 6 );
+
+ // fill tree
+ for ( i = 0; i < numfaces; i++, tface++ )
+ {
+ VECCOPY ( &co[0*3], x[tface->v1].co );
+ Mat4MulVecfl (mat, &co[0*3]);
+ VECCOPY ( &co[1*3], x[tface->v2].co );
+ Mat4MulVecfl (mat, &co[1*3]);
+ VECCOPY ( &co[2*3], x[tface->v3].co );
+ Mat4MulVecfl (mat, &co[2*3]);
+
+ if ( tface->v4 )
+ {
+ VECCOPY ( &co[3*3], x[tface->v4].co );
+ Mat4MulVecfl (mat, &co[3*3]);
+ }
+
+ BLI_bvhtree_insert ( tree, i, co, ( mfaces->v4 ? 4 : 3 ) );
+ }
+
+ // balance tree
+ BLI_bvhtree_balance ( tree );
+
+ return tree;
+}
+
+void bvhtree_update_from_smoke ( float mat[4][4], BVHTree * bvhtree, MFace *faces, int numfaces, MVert *x, int numverts)
+{
+ int i;
+ MFace *mfaces = faces;
+ float co[12];
+ int ret = 0;
+
+ if ( !bvhtree )
+ return;
+
+ if ( x )
+ {
+ for ( i = 0; i < numfaces; i++, mfaces++ )
+ {
+ VECCOPY ( &co[0*3], x[mfaces->v1].co );
+ Mat4MulVecfl (mat, &co[0*3]);
+ VECCOPY ( &co[1*3], x[mfaces->v2].co );
+ Mat4MulVecfl (mat, &co[1*3]);
+ VECCOPY ( &co[2*3], x[mfaces->v3].co );
+ Mat4MulVecfl (mat, &co[2*3]);
+
+ if ( mfaces->v4 )
+ {
+ VECCOPY ( &co[3*3], x[mfaces->v4].co );
+ Mat4MulVecfl (mat, &co[3*3]);
+ }
+
+ ret = BLI_bvhtree_update_node ( bvhtree, i, co, NULL, ( mfaces->v4 ? 4 : 3 ) );
+
+ // check if tree is already full
+ if ( !ret )
+ break;
+ }
+
+ BLI_bvhtree_update_tree ( bvhtree );
+ }
+}
+
int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, DerivedMesh *dm)
{
if((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain && !smd->domain->fluid)
@@ -134,7 +211,9 @@ int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, Derive
float size[3];
MVert *verts = dm->getVertArray(dm);
float scale = 0.0;
- int res = smd->domain->maxres;
+ int res;
+
+ res = smd->domain->maxres;
// get BB of domain
for(i = 0; i < dm->getNumVerts(dm); i++)
@@ -199,7 +278,9 @@ int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, Derive
}
}
- printf("res[0]: %d, res[1]: %d, res[2]: %d\n", smd->domain->res[0], smd->domain->res[1], smd->domain->res[2]);
+ // TODO: put in failsafe if res<=0 - dg
+
+ // printf("res[0]: %d, res[1]: %d, res[2]: %d\n", smd->domain->res[0], smd->domain->res[1], smd->domain->res[2]);
// dt max is 0.1
smd->domain->fluid = smoke_init(smd->domain->res, smd->domain->amplify, smd->domain->p0, smd->domain->p1, 2.5 / FPS);
@@ -222,10 +303,14 @@ int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, Derive
return 1;
}
- else if((smd->type & MOD_SMOKE_TYPE_COLL) && smd->coll)
+ else if((smd->type & MOD_SMOKE_TYPE_COLL))
{
smd->time = scene->r.cfra;
+ // todo: delete this when loading colls work -dg
+ if(!smd->coll)
+ smokeModifier_createType(smd);
+
if(!smd->coll->points)
{
// init collision points
@@ -364,6 +449,11 @@ int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, Derive
MEM_freeN(tridivs);
}
+ if(!smd->coll->bvhtree)
+ {
+ smd->coll->bvhtree = bvhtree_build_from_smoke ( ob->obmat, dm->getFaceArray(dm), dm->getNumFaces(dm), dm->getVertArray(dm), dm->getNumVerts(dm), 0.0 );
+ }
+
}
return 0;
@@ -516,6 +606,12 @@ void smokeModifier_freeCollision(SmokeModifierData *smd)
smd->coll->points = NULL;
}
+ if(smd->coll->bvhtree)
+ {
+ BLI_bvhtree_free(smd->coll->bvhtree);
+ smd->coll->bvhtree = NULL;
+ }
+
MEM_freeN(smd->coll);
smd->coll = NULL;
}
@@ -568,6 +664,12 @@ void smokeModifier_reset(struct SmokeModifierData *smd)
MEM_freeN(smd->coll->points);
smd->coll->points = NULL;
}
+
+ if(smd->coll->bvhtree)
+ {
+ BLI_bvhtree_free(smd->coll->bvhtree);
+ smd->coll->bvhtree = NULL;
+ }
}
}
}
@@ -600,9 +702,9 @@ void smokeModifier_createType(struct SmokeModifierData *smd)
smd->domain->eff_group = NULL;
smd->domain->fluid_group = NULL;
smd->domain->coll_group = NULL;
- smd->domain->maxres = 48;
+ smd->domain->maxres = 32;
smd->domain->amplify = 2;
- smd->domain->omega = 0.5;
+ smd->domain->omega = 1.0;
smd->domain->alpha = -0.001;
smd->domain->beta = 0.1;
smd->domain->flags = 0;
@@ -644,6 +746,7 @@ void smokeModifier_createType(struct SmokeModifierData *smd)
smd->coll->smd = smd;
smd->coll->points = NULL;
smd->coll->numpoints = 0;
+ smd->coll->bvhtree = NULL;
}
}
}
@@ -651,8 +754,8 @@ void smokeModifier_createType(struct SmokeModifierData *smd)
// forward declaration
void smoke_calc_transparency(struct SmokeModifierData *smd, float *light, int big);
-void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedMesh *dm)
-{
+void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedMesh *dm, int useRenderParams, int isFinalCalc)
+{
if(scene->r.cfra >= smd->time)
smokeModifier_init(smd, ob, scene, dm);
@@ -661,6 +764,25 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM
if(scene->r.cfra > smd->time)
{
// XXX TODO
+ smd->time = scene->r.cfra;
+ }
+ else if(scene->r.cfra < smd->time)
+ {
+ smd->time = scene->r.cfra;
+ smokeModifier_reset(smd);
+ }
+ }
+ else if(smd->type & MOD_SMOKE_TYPE_COLL)
+ {
+ if(scene->r.cfra > smd->time)
+ {
+ // XXX TODO
+ smd->time = scene->r.cfra;
+
+ if(smd->coll->bvhtree)
+ bvhtree_update_from_smoke ( ob->obmat, smd->coll->bvhtree, dm->getFaceArray(dm), dm->getNumFaces(dm), dm->getVertArray(dm), dm->getNumVerts(dm));
+ else
+ printf("smoke coll with no bvh\n");
}
else if(scene->r.cfra < smd->time)
{
@@ -668,7 +790,7 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM
smokeModifier_reset(smd);
}
}
- else if((smd->type & MOD_SMOKE_TYPE_DOMAIN))
+ else if(smd->type & MOD_SMOKE_TYPE_DOMAIN)
{
SmokeDomainSettings *sds = smd->domain;
@@ -769,9 +891,9 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM
for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++)
{
int cell[3];
- int valid = 1;
size_t i = 0;
size_t index = 0;
+ int badcell = 0;
if(pa->alive == PARS_KILLED) continue;
else if(pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0) continue;
@@ -786,33 +908,63 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM
// check if cell is valid (in the domain boundary)
for(i = 0; i < 3; i++)
+ {
if((cell[i] > sds->res[i] - 1) || (cell[i] < 0))
- valid = 0;
-
- if(!valid)
+ {
+ badcell = 1;
+ break;
+ }
+ }
+
+ if(badcell)
continue;
// 2. set cell values (heat, density and velocity)
index = smoke_get_index(cell[0], sds->res[0], cell[1], sds->res[1], cell[2]);
- heat[index] = sfs->temp;
- density[index] = sfs->density;
- velocity_x[index] = pa->state.vel[0];
- velocity_y[index] = pa->state.vel[1];
- velocity_z[index] = pa->state.vel[2];
-
- // we need different handling for the high-res feature
- if(bigdensity)
+ if(!(sfs->type & MOD_SMOKE_FLOW_TYPE_OUTFLOW)) // this is inflow
+ {
+ heat[index] = sfs->temp;
+ density[index] = sfs->density;
+ velocity_x[index] = pa->state.vel[0];
+ velocity_y[index] = pa->state.vel[1];
+ velocity_z[index] = pa->state.vel[2];
+
+ // we need different handling for the high-res feature
+ if(bigdensity)
+ {
+ // init all surrounding cells according to amplification, too
+ int i, j, k;
+ for(i = 0; i < smd->domain->amplify; i++)
+ for(j = 0; j < smd->domain->amplify; j++)
+ for(k = 0; k < smd->domain->amplify; k++)
+ {
+ index = smoke_get_index(smd->domain->amplify * cell[0] + i, bigres[0], smd->domain->amplify * cell[1] + j, bigres[1], smd->domain->amplify * cell[2] + k);
+ bigdensity[index] = sfs->density;
+ }
+ }
+ }
+ else // outflow
{
- // init all surrounding cells according to amplification, too
- int i, j, k;
- for(i = 0; i < smd->domain->amplify; i++)
- for(j = 0; j < smd->domain->amplify; j++)
- for(k = 0; k < smd->domain->amplify; k++)
- {
- index = smoke_get_index(smd->domain->amplify * cell[0] + i, bigres[0], smd->domain->amplify * cell[1] + j, bigres[1], smd->domain->amplify * cell[2] + k);
- bigdensity[index] = sfs->density;
- }
+ heat[index] = 0.f;
+ density[index] = 0.f;
+ velocity_x[index] = 0.f;
+ velocity_y[index] = 0.f;
+ velocity_z[index] = 0.f;
+
+ // we need different handling for the high-res feature
+ if(bigdensity)
+ {
+ // init all surrounding cells according to amplification, too
+ int i, j, k;
+ for(i = 0; i < smd->domain->amplify; i++)
+ for(j = 0; j < smd->domain->amplify; j++)
+ for(k = 0; k < smd->domain->amplify; k++)
+ {
+ index = smoke_get_index(smd->domain->amplify * cell[0] + i, bigres[0], smd->domain->amplify * cell[1] + j, bigres[1], smd->domain->amplify * cell[2] + k);
+ bigdensity[index] = 0.f;
+ }
+ }
}
}
}
@@ -888,26 +1040,35 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM
// we got nice collision object
SmokeCollSettings *scs = smd2->coll;
int cell[3];
- int valid = 1;
size_t index = 0;
size_t i, j;
unsigned char *obstacles = smoke_get_obstacle(smd->domain->fluid);
+ // int BLI_bvhtree_find_nearest(BVHTree *tree, const float *co, BVHTreeNearest *nearest, BVHTree_NearestPointCallback callback, void *userdata);
+
for(i = 0; i < scs->numpoints; i++)
{
+ int badcell = 0;
+
// 1. get corresponding cell
get_cell(smd, &scs->points[3 * i], cell, 0);
// check if cell is valid (in the domain boundary)
for(j = 0; j < 3; j++)
if((cell[j] > sds->res[j] - 1) || (cell[j] < 0))
- valid = 0;
-
- if(!valid)
+ {
+ badcell = 1;
+ break;
+ }
+
+ if(badcell)
continue;
-
+
// 2. set cell values (heat, density and velocity)
index = smoke_get_index(cell[0], sds->res[0], cell[1], sds->res[1], cell[2]);
+
+ // printf("cell[0]: %d, cell[1]: %d, cell[2]: %d\n", cell[0], cell[1], cell[2]);
+ // printf("res[0]: %d, res[1]: %d, res[2]: %d, index: %d\n\n", sds->res[0], sds->res[1], sds->res[2], index);
obstacles[index] = 1;
@@ -990,7 +1151,7 @@ void smoke_prepare_View(SmokeModifierData *smd, float *light)
// formula taken from "Visual Simulation of Smoke" / Fedkiw et al. pg. 4
// T_vox = exp(-C_ext * h)
// C_ext/sigma_t = density * C_ext
- smoke_set_tvox(smd, index, exp(-density[index] * 4.0 * smd->domain->dx));
+ smoke_set_tvox(smd, index, exp(-density[index] * 7.0 * smd->domain->dx));
}
smoke_calc_transparency(smd, light, 0);
}
@@ -1022,7 +1183,7 @@ void smoke_prepare_bigView(SmokeModifierData *smd, float *light)
// formula taken from "Visual Simulation of Smoke" / Fedkiw et al. pg. 4
// T_vox = exp(-C_ext * h)
// C_ext/sigma_t = density * C_ext
- smoke_set_bigtvox(smd, i, exp(-density[i] * 4.0 * smd->domain->dx / smd->domain->amplify) );
+ smoke_set_bigtvox(smd, i, exp(-density[i] * 7.0 * smd->domain->dx / smd->domain->amplify) );
}
smoke_calc_transparency(smd, light, 1);
}
@@ -1218,15 +1379,15 @@ static void get_cell(struct SmokeModifierData *smd, float *pos, int *cell, int c
if(correct)
{
- cell[0] = MIN2(smd->domain->res[0] - 1, MAX2(0, (int)(tmp[0] + 0.5)));
- cell[1] = MIN2(smd->domain->res[1] - 1, MAX2(0, (int)(tmp[1] + 0.5)));
- cell[2] = MIN2(smd->domain->res[2] - 1, MAX2(0, (int)(tmp[2] + 0.5)));
+ cell[0] = MIN2(smd->domain->res[0] - 1, MAX2(0, (int)floor(tmp[0])));
+ cell[1] = MIN2(smd->domain->res[1] - 1, MAX2(0, (int)floor(tmp[1])));
+ cell[2] = MIN2(smd->domain->res[2] - 1, MAX2(0, (int)floor(tmp[2])));
}
else
{
- cell[0] = (int)(tmp[0] + 0.5);
- cell[1] = (int)(tmp[1] + 0.5);
- cell[2] = (int)(tmp[2] + 0.5);
+ cell[0] = (int)floor(tmp[0]);
+ cell[1] = (int)floor(tmp[1]);
+ cell[2] = (int)floor(tmp[2]);
}
}
static void get_bigcell(struct SmokeModifierData *smd, float *pos, int *cell, int correct)
@@ -1241,15 +1402,15 @@ static void get_bigcell(struct SmokeModifierData *smd, float *pos, int *cell, in
if(correct)
{
- cell[0] = MIN2(res[0] - 1, MAX2(0, (int)(tmp[0] + 0.5)));
- cell[1] = MIN2(res[1] - 1, MAX2(0, (int)(tmp[1] + 0.5)));
- cell[2] = MIN2(res[2] - 1, MAX2(0, (int)(tmp[2] + 0.5)));
+ cell[0] = MIN2(res[0] - 1, MAX2(0, (int)floor(tmp[0])));
+ cell[1] = MIN2(res[1] - 1, MAX2(0, (int)floor(tmp[1])));
+ cell[2] = MIN2(res[2] - 1, MAX2(0, (int)floor(tmp[2])));
}
else
{
- cell[0] = (int)(tmp[0] + 0.5);
- cell[1] = (int)(tmp[1] + 0.5);
- cell[2] = (int)(tmp[2] + 0.5);
+ cell[0] = (int)floor(tmp[0]);
+ cell[1] = (int)floor(tmp[1]);
+ cell[2] = (int)floor(tmp[2]);
}
}
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index fe63585ae1c..0a1963c84f2 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -3687,64 +3687,85 @@ static void softbody_to_object(Object *ob, float (*vertexCos)[3], int numVerts,
}
}
-void sbWriteCache(Object *ob, int framenr)
+static void softbody_write_state(int index, void *soft_v, float *data)
{
- SoftBody *sb= ob->soft;
- BodyPoint *bp;
- PTCacheID pid;
- PTCacheFile *pf;
- int a;
+ SoftBody *soft= soft_v;
+ BodyPoint *bp = soft->bpoint + index;
- if(sb->totpoint == 0)
- return;
+ memcpy(data, bp->pos, 3 * sizeof(float));
+ memcpy(data + 3, bp->vec, 3 * sizeof(float));
+}
+static void softbody_read_state(int index, void *soft_v, float *data)
+{
+ SoftBody *soft= soft_v;
+ BodyPoint *bp = soft->bpoint + index;
+
+ memcpy(bp->pos, data, 3 * sizeof(float));
+ memcpy(bp->vec, data + 3, 3 * sizeof(float));
+}
+static void softbody_cache_interpolate(int index, void *soft_v, float frs_sec, float cfra, float cfra1, float cfra2, float *data1, float *data2)
+{
+ SoftBody *soft= soft_v;
+ BodyPoint *bp = soft->bpoint + index;
+ ParticleKey keys[4];
+ float dfra;
- BKE_ptcache_id_from_softbody(&pid, ob, sb);
- pf= BKE_ptcache_file_open(&pid, PTCACHE_FILE_WRITE, framenr);
- if(!pf)
+ if(cfra1 == cfra2) {
+ softbody_read_state(index, soft, data1);
return;
-
- for(a=0, bp=sb->bpoint; a<sb->totpoint; a++, bp++)
- BKE_ptcache_file_write_floats(pf, bp->pos, 3);
+ }
- for(a=0, bp=sb->bpoint; a<sb->totpoint; a++, bp++)
- BKE_ptcache_file_write_floats(pf, bp->vec, 3);
+ memcpy(keys[1].co, data1, 3 * sizeof(float));
+ memcpy(keys[1].vel, data1 + 3, 3 * sizeof(float));
- BKE_ptcache_file_close(pf);
-}
+ memcpy(keys[2].co, data2, 3 * sizeof(float));
+ memcpy(keys[2].vel, data2 + 3, 3 * sizeof(float));
+
+ dfra = cfra2 - cfra1;
+
+ VecMulf(keys[1].vel, dfra);
+ VecMulf(keys[2].vel, dfra);
+
+ psys_interpolate_particle(-1, keys, (cfra - cfra1) / dfra, keys, 1);
-static int softbody_read_cache(Object *ob, float framenr)
+ VecMulf(keys->vel, 1.0f / dfra);
+
+ memcpy(bp->pos, keys->co, 3 * sizeof(float));
+ memcpy(bp->vec, keys->vel, 3 * sizeof(float));
+}
+void softbody_write_cache(Object *ob, SoftBody *soft, int cfra)
{
- SoftBody *sb= ob->soft;
- BodyPoint *bp;
+ PTCacheWriter writer;
PTCacheID pid;
- PTCacheFile *pf;
- int a;
-
- if(sb->totpoint == 0)
- return 0;
-
- BKE_ptcache_id_from_softbody(&pid, ob, sb);
- pf= BKE_ptcache_file_open(&pid, PTCACHE_FILE_READ, framenr);
- if(!pf)
- return 0;
- for(a=0, bp=sb->bpoint; a<sb->totpoint; a++, bp++) {
- if(!BKE_ptcache_file_read_floats(pf, bp->pos, 3)) {
- BKE_ptcache_file_close(pf);
- return 0;
- }
- }
+ BKE_ptcache_id_from_softbody(&pid, ob, soft);
- for(a=0, bp=sb->bpoint; a<sb->totpoint; a++, bp++) {
- if(!BKE_ptcache_file_read_floats(pf, bp->vec, 3)) {
- BKE_ptcache_file_close(pf);
- return 0;
- }
- }
+ writer.calldata = soft;
+ writer.cfra = cfra;
+ writer.set_elem = softbody_write_state;
+ writer.pid = &pid;
+ writer.totelem = soft->totpoint;
- BKE_ptcache_file_close(pf);
+ BKE_ptcache_write_cache(&writer);
+}
- return 1;
+int softbody_read_cache(Scene *scene, Object *ob, SoftBody *soft, float cfra, int *old_framenr)
+{
+ PTCacheReader reader;
+ PTCacheID pid;
+
+ BKE_ptcache_id_from_softbody(&pid, ob, soft);
+
+ reader.calldata = soft;
+ reader.cfra = cfra;
+ reader.interpolate_elem = softbody_cache_interpolate;
+ reader.old_frame = old_framenr;
+ reader.pid = &pid;
+ reader.scene = scene;
+ reader.set_elem = softbody_read_state;
+ reader.totelem = soft->totpoint;
+
+ return BKE_ptcache_read_cache(&reader);
}
/* +++ ************ maintaining scratch *************** */
@@ -4114,6 +4135,7 @@ void sbObjectStep(Scene *scene, Object *ob, float cfra, float (*vertexCos)[3], i
PTCacheID pid;
float dtime, timescale;
int framedelta, framenr, startframe, endframe;
+ int cache_result, old_framenr;
cache= sb->pointcache;
@@ -4128,7 +4150,7 @@ void sbObjectStep(Scene *scene, Object *ob, float cfra, float (*vertexCos)[3], i
if(sb->bpoint && numVerts != sb->totpoint) {
cache->flag &= ~PTCACHE_SIMULATION_VALID;
cache->simframe= 0;
-
+ cache->last_exact= 0;
return;
}
@@ -4136,6 +4158,7 @@ void sbObjectStep(Scene *scene, Object *ob, float cfra, float (*vertexCos)[3], i
if(framenr < startframe) {
cache->flag &= ~PTCACHE_SIMULATION_VALID;
cache->simframe= 0;
+ cache->last_exact= 0;
return;
}
@@ -4198,26 +4221,36 @@ void sbObjectStep(Scene *scene, Object *ob, float cfra, float (*vertexCos)[3], i
}
/* try to read from cache */
- if(softbody_read_cache(ob, framenr)) {
- if(sb->particles==0)
- softbody_to_object(ob, vertexCos, numVerts, sb->local);
+ cache_result = softbody_read_cache(scene, ob, sb, framenr, &old_framenr);
+ if(cache_result == PTCACHE_READ_EXACT || cache_result == PTCACHE_READ_INTERPOLATED) {
cache->flag |= PTCACHE_SIMULATION_VALID;
cache->simframe= framenr;
+ if(sb->particles==0)
+ softbody_to_object(ob, vertexCos, numVerts, sb->local);
+
return;
}
+ else if(cache_result==PTCACHE_READ_OLD) {
+ BKE_ptcache_id_reset(scene, &pid, PTCACHE_RESET_FREE);
+ cache->flag |= PTCACHE_SIMULATION_VALID;
+ cache->simframe= old_framenr;
+ }
else if(ob->id.lib || (cache->flag & PTCACHE_BAKED)) {
/* if baked and nothing in cache, do nothing */
- if(cache->flag & PTCACHE_SIMULATION_VALID) {
- cache->flag &= ~PTCACHE_SIMULATION_VALID;
- cache->simframe= 0;
- }
-
+ cache->flag &= ~PTCACHE_SIMULATION_VALID;
+ cache->simframe= 0;
+ cache->last_exact= 0;
return;
}
if(framenr == startframe) {
+ if(cache->flag & PTCACHE_REDO_NEEDED) {
+ softbody_update_positions(ob, sb, vertexCos, numVerts);
+ softbody_reset(ob, sb, vertexCos, numVerts);
+ cache->flag &= ~PTCACHE_REDO_NEEDED;
+ }
/* first frame, no simulation to do, just set the positions */
softbody_update_positions(ob, sb, vertexCos, numVerts);
@@ -4227,10 +4260,10 @@ void sbObjectStep(Scene *scene, Object *ob, float cfra, float (*vertexCos)[3], i
/* don't write cache on first frame, but on second frame write
* cache for frame 1 and 2 */
}
- else if(framedelta == 1) {
+ else {
/* if on second frame, write cache for first frame */
- if(framenr == startframe+1)
- sbWriteCache(ob, startframe);
+ if(cache->simframe == startframe && (cache->flag & PTCACHE_OUTDATED || cache->last_exact==0))
+ softbody_write_cache(ob, sb, startframe);
softbody_update_positions(ob, sb, vertexCos, numVerts);
@@ -4246,14 +4279,7 @@ void sbObjectStep(Scene *scene, Object *ob, float cfra, float (*vertexCos)[3], i
if(sb->particles==0)
softbody_to_object(ob, vertexCos, numVerts, 0);
- sbWriteCache(ob, framenr);
- }
- else {
- /* time step backwards or too large forward - do nothing */
- if(cache->flag & PTCACHE_SIMULATION_VALID) {
- cache->flag &= ~PTCACHE_SIMULATION_VALID;
- cache->simframe= 0;
- }
+ softbody_write_cache(ob, sb, framenr);
}
}
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 2ec65404697..873aa039294 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2491,7 +2491,8 @@ static void lib_link_mball(FileData *fd, Main *main)
mb= main->mball.first;
while(mb) {
if(mb->id.flag & LIB_NEEDLINK) {
-
+ if (mb->adt) lib_link_animdata(fd, &mb->id, mb->adt);
+
for(a=0; a<mb->totcol; a++) mb->mat[a]= newlibadr_us(fd, mb->id.lib, mb->mat[a]);
mb->ipo= newlibadr_us(fd, mb->id.lib, mb->ipo); // XXX depreceated - old animation system
@@ -2504,6 +2505,9 @@ static void lib_link_mball(FileData *fd, Main *main)
static void direct_link_mball(FileData *fd, MetaBall *mb)
{
+ mb->adt= newdataadr(fd, mb->adt);
+ direct_link_animdata(fd, mb->adt);
+
mb->mat= newdataadr(fd, mb->mat);
test_pointer_array(fd, (void **)&mb->mat);
@@ -5743,6 +5747,14 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
ar->regiontype= RGN_TYPE_CHANNELS;
ar->alignment= RGN_ALIGN_LEFT;
ar->v2d.scroll= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
+
+ // for some reason, this doesn't seem to go auto like for NLA...
+ ar= MEM_callocN(sizeof(ARegion), "area region from do_versions");
+ BLI_addtail(lb, ar);
+ ar->regiontype= RGN_TYPE_UI;
+ ar->alignment= RGN_ALIGN_RIGHT;
+ ar->v2d.scroll= V2D_SCROLL_RIGHT;
+ ar->v2d.flag = RGN_FLAG_HIDDEN;
break;
case SPACE_ACTION:
@@ -9490,28 +9502,14 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
sce->gm.depth= sce->r.depth;
//Physic (previously stored in world)
- //temporarily getting the correct world address
- wo = newlibadr(fd, sce->id.lib, sce->world);
- if (wo){
- sce->gm.gravity = wo->gravity;
- sce->gm.physicsEngine= wo->physicsEngine;
- sce->gm.mode = wo->mode;
- sce->gm.occlusionRes = wo->occlusionRes;
- sce->gm.ticrate = wo->ticrate;
- sce->gm.maxlogicstep = wo->maxlogicstep;
- sce->gm.physubstep = wo->physubstep;
- sce->gm.maxphystep = wo->maxphystep;
- }
- else{
- sce->gm.gravity =9.8f;
- sce->gm.physicsEngine= WOPHY_BULLET;// Bullet by default
- sce->gm.mode = WO_DBVT_CULLING; // DBVT culling by default
- sce->gm.occlusionRes = 128;
- sce->gm.ticrate = 60;
- sce->gm.maxlogicstep = 5;
- sce->gm.physubstep = 1;
- sce->gm.maxphystep = 5;
- }
+ sce->gm.gravity =9.8f;
+ sce->gm.physicsEngine= WOPHY_BULLET;// Bullet by default
+ sce->gm.mode = WO_DBVT_CULLING; // DBVT culling by default
+ sce->gm.occlusionRes = 128;
+ sce->gm.ticrate = 60;
+ sce->gm.maxlogicstep = 5;
+ sce->gm.physubstep = 1;
+ sce->gm.maxphystep = 5;
}
}
@@ -10021,6 +10019,9 @@ static void expand_mball(FileData *fd, Main *mainvar, MetaBall *mb)
for(a=0; a<mb->totcol; a++) {
expand_doit(fd, mainvar, mb->mat[a]);
}
+
+ if(mb->adt)
+ expand_animdata(fd, mainvar, mb->adt);
}
static void expand_curve(FileData *fd, Main *mainvar, Curve *cu)
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index e0df826f320..177499e1a2f 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1297,6 +1297,7 @@ static void write_mballs(WriteData *wd, ListBase *idbase)
/* direct data */
writedata(wd, DATA, sizeof(void *)*mb->totcol, mb->mat);
+ if (mb->adt) write_animdata(wd, mb->adt);
ml= mb->elems.first;
while(ml) {
diff --git a/source/blender/editors/animation/anim_channels.c b/source/blender/editors/animation/anim_channels.c
index f518b5b0a2e..235a3039b2c 100644
--- a/source/blender/editors/animation/anim_channels.c
+++ b/source/blender/editors/animation/anim_channels.c
@@ -56,6 +56,7 @@
#include "DNA_key_types.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
+#include "DNA_meta_types.h"
#include "DNA_userdef_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_windowmanager_types.h"
@@ -1066,7 +1067,7 @@ static void setflag_anim_channels (bAnimContext *ac, short setting, short mode,
case ANIMTYPE_DSPART:
{
ParticleSettings *part= (ParticleSettings*)ale->data;
-
+
if (ASUBCHANNEL_SEL_OK(ale)) {
if (setting == ACHANNEL_SETTING_EXPAND) {
ACHANNEL_SET_FLAG(part, mode, PART_DS_EXPAND);
@@ -1074,6 +1075,17 @@ static void setflag_anim_channels (bAnimContext *ac, short setting, short mode,
}
}
break;
+ case ANIMTYPE_DSMBALL:
+ {
+ MetaBall *mb= (MetaBall *)ale->data;
+
+ if (ASUBCHANNEL_SEL_OK(ale)) {
+ if (setting == ACHANNEL_SETTING_EXPAND) {
+ ACHANNEL_SET_FLAG(mb, mode, MB_DS_EXPAND);
+ }
+ }
+ }
+ break;
case ANIMTYPE_GROUP:
{
@@ -1688,6 +1700,13 @@ static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, sh
notifierFlags |= ND_ANIMCHAN_EDIT;
}
break;
+ case ANIMTYPE_DSMBALL:
+ {
+ MetaBall *mb= (MetaBall *)ale->data;
+ mb->flag2 ^= MB_DS_EXPAND;
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ break;
case ANIMTYPE_GROUP:
{
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 4e479bd75d0..4797c7946a4 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -62,6 +62,7 @@
#include "DNA_key_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
+#include "DNA_meta_types.h"
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
#include "DNA_space_types.h"
@@ -1090,6 +1091,14 @@ static int animdata_filter_dopesheet_obdata (ListBase *anim_data, bDopeSheet *ad
expanded= FILTER_CUR_OBJD(cu);
}
break;
+ case OB_MBALL: /* ------- MetaBall ---------- */
+ {
+ MetaBall *mb= (MetaBall *)ob->data;
+
+ type= ANIMTYPE_DSMBALL;
+ expanded= FILTER_MBALL_OBJD(mb);
+ }
+ break;
}
/* special exception for drivers instead of action */
@@ -1273,12 +1282,25 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
}
}
break;
+ case OB_MBALL: /* ------- MetaBall ---------- */
+ {
+ MetaBall *mb= (MetaBall *)ob->data;
+
+ if ((ads->filterflag & ADS_FILTER_NOMBA) == 0) {
+ ANIMDATA_FILTER_CASES(mb,
+ { /* AnimData blocks - do nothing... */ },
+ obdata_ok= 1;,
+ obdata_ok= 1;,
+ obdata_ok= 1;)
+ }
+ }
+ break;
}
if (obdata_ok)
items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
/* particles */
- if(ob->particlesystem.first && !(ads->filterflag & ADS_FILTER_NOPART))
+ if (ob->particlesystem.first && !(ads->filterflag & ADS_FILTER_NOPART))
items += animdata_filter_dopesheet_particles(anim_data, ads, base, filter_mode);
/* return the number of items added to the list */
@@ -1595,6 +1617,23 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int
dataOk= !(ads->filterflag & ADS_FILTER_NOCUR);)
}
break;
+ case OB_MBALL: /* ------- MetaBall ---------- */
+ {
+ MetaBall *mb= (MetaBall *)ob->data;
+ dataOk= 0;
+ ANIMDATA_FILTER_CASES(mb,
+ if ((ads->filterflag & ADS_FILTER_NOMBA)==0) {
+ /* for the special AnimData blocks only case, we only need to add
+ * the block if it is valid... then other cases just get skipped (hence ok=0)
+ */
+ ANIMDATA_ADD_ANIMDATA(mb);
+ dataOk=0;
+ },
+ dataOk= !(ads->filterflag & ADS_FILTER_NOMBA);,
+ dataOk= !(ads->filterflag & ADS_FILTER_NOMBA);,
+ dataOk= !(ads->filterflag & ADS_FILTER_NOMBA);)
+ }
+ break;
default: /* --- other --- */
dataOk= 0;
break;
@@ -1671,6 +1710,12 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int
dataOk= ANIMDATA_HAS_KEYS(cu);
}
break;
+ case OB_MBALL: /* -------- Metas ---------- */
+ {
+ MetaBall *mb= (MetaBall *)ob->data;
+ dataOk= ANIMDATA_HAS_KEYS(mb);
+ }
+ break;
default: /* --- other --- */
dataOk= 0;
break;
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 01b8224298b..ffc93340f8c 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -735,7 +735,7 @@ static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] =
/* Keying Set - "Rotation" ---------- */
BI_KS_DEFINE_BEGIN("Rotation", 0)
BI_KS_PATHS_BEGIN(1)
- BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
+ BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_PCHAN_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
BI_KS_PATHS_END
BI_KS_DEFINE_END,
@@ -751,7 +751,7 @@ static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] =
BI_KS_DEFINE_BEGIN("LocRot", 0)
BI_KS_PATHS_BEGIN(2)
BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "location", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM),
- BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
+ BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_PCHAN_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
BI_KS_PATHS_END
BI_KS_DEFINE_END,
@@ -759,7 +759,7 @@ static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] =
BI_KS_DEFINE_BEGIN("LocRotScale", 0)
BI_KS_PATHS_BEGIN(3)
BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "location", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM),
- BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM),
+ BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_PCHAN_ROT, "rotation", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM),
BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "scale", 0, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
BI_KS_PATHS_END
BI_KS_DEFINE_END,
@@ -775,7 +775,7 @@ static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] =
/* Keying Set - "Rotation" ---------- */
BI_KS_DEFINE_BEGIN("VisualRot", 0)
BI_KS_PATHS_BEGIN(1)
- BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "rotation", INSERTKEY_MATRIX, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
+ BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_PCHAN_ROT, "rotation", INSERTKEY_MATRIX, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
BI_KS_PATHS_END
BI_KS_DEFINE_END,
@@ -783,7 +783,7 @@ static bBuiltinKeyingSet def_builtin_keyingsets_v3d[] =
BI_KS_DEFINE_BEGIN("VisualLocRot", 0)
BI_KS_PATHS_BEGIN(2)
BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "location", INSERTKEY_MATRIX, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM),
- BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN, "rotation", INSERTKEY_MATRIX, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
+ BI_KSP_DEFINE(ID_OB, KSP_TEMPLATE_OBJECT|KSP_TEMPLATE_PCHAN|KSP_TEMPLATE_PCHAN_ROT, "rotation", INSERTKEY_MATRIX, KSP_FLAG_WHOLE_ARRAY, KSP_GROUP_TEMPLATE_ITEM)
BI_KS_PATHS_END
BI_KS_DEFINE_END
};
@@ -1131,7 +1131,21 @@ int modify_keyframes (bContext *C, ListBase *dsources, bAction *act, KeyingSet *
/* add property stored in KeyingSet Path */
if (BLI_dynstr_get_len(pathds))
BLI_dynstr_append(pathds, ".");
- BLI_dynstr_append(pathds, ksp->rna_path);
+
+ /* apply some further templates? */
+ if ((ksp->templates & KSP_TEMPLATE_PCHAN_ROT) && (cks->pchan)) {
+ /* if this path is exactly "rotation", and the rotation mode is set to eulers,
+ * use "euler_rotation" instead so that rotations will be keyed correctly
+ */
+ if (strcmp(ksp->rna_path, "rotation")==0 && (cks->pchan->rotmode))
+ BLI_dynstr_append(pathds, "euler_rotation");
+ else
+ BLI_dynstr_append(pathds, ksp->rna_path);
+ }
+ else {
+ /* just directly use the path */
+ BLI_dynstr_append(pathds, ksp->rna_path);
+ }
/* convert to C-string */
path= BLI_dynstr_get_cstring(pathds);
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 8f7c0ceeab6..0786d0f9be0 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -131,6 +131,7 @@ typedef enum eAnim_ChannelType {
ANIMTYPE_DSSKEY,
ANIMTYPE_DSWOR,
ANIMTYPE_DSPART,
+ ANIMTYPE_DSMBALL,
ANIMTYPE_SHAPEKEY, // XXX probably can become depreceated???
@@ -196,6 +197,7 @@ typedef enum eAnimFilter_Flags {
#define FILTER_CAM_OBJD(ca) ((ca->flag & CAM_DS_EXPAND))
#define FILTER_CUR_OBJD(cu) ((cu->flag & CU_DS_EXPAND))
#define FILTER_PART_OBJD(part) ((part->flag & PART_DS_EXPAND))
+#define FILTER_MBALL_OBJD(mb) ((mb->flag2 & MB_DS_EXPAND))
/* 'Sub-object/Action' channels (flags stored in Action) */
#define SEL_ACTC(actc) ((actc->flag & ACT_SELECTED))
#define EXPANDED_ACTC(actc) ((actc->flag & ACT_COLLAPSED)==0)
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 9ac839e1283..67ee29a1d3c 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -94,17 +94,17 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->paneltitle.uifont_id= UIFONT_DEFAULT;
style->paneltitle.points= 12;
style->paneltitle.kerning= 1;
- style->paneltitle.shadow= 5;
- style->paneltitle.shadx= 2;
- style->paneltitle.shady= -2;
- style->paneltitle.shadowalpha= 0.25f;
- style->paneltitle.shadowcolor= 0.0f;
+ style->paneltitle.shadow= 1;
+ style->paneltitle.shadx= 0;
+ style->paneltitle.shady= -1;
+ style->paneltitle.shadowalpha= 0.15f;
+ style->paneltitle.shadowcolor= 1.0f;
style->grouplabel.uifont_id= UIFONT_DEFAULT;
style->grouplabel.points= 12;
style->grouplabel.kerning= 1;
style->grouplabel.shadow= 3;
- style->grouplabel.shadx= 1;
+ style->grouplabel.shadx= 0;
style->grouplabel.shady= -1;
style->grouplabel.shadowalpha= 0.25f;
@@ -112,9 +112,9 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->widgetlabel.points= 11;
style->widgetlabel.kerning= 1;
style->widgetlabel.shadow= 3;
- style->widgetlabel.shadx= 1;
+ style->widgetlabel.shadx= 0;
style->widgetlabel.shady= -1;
- style->widgetlabel.shadowalpha= 0.3f;
+ style->widgetlabel.shadowalpha= 0.15f;
style->widgetlabel.shadowcolor= 1.0f;
style->widget.uifont_id= UIFONT_DEFAULT;
diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c
index 6c66ae468fa..e32dd0e8ac7 100644
--- a/source/blender/editors/mesh/editmesh.c
+++ b/source/blender/editors/mesh/editmesh.c
@@ -1160,7 +1160,7 @@ void load_editMesh(Scene *scene, Object *ob)
if(pid.type == PTCACHE_TYPE_CLOTH)
cloth_write_cache(ob, pid.data, pid.cache->editframe);
else if(pid.type == PTCACHE_TYPE_SOFTBODY)
- sbWriteCache(ob, pid.cache->editframe);
+ softbody_write_cache(ob, pid.data, pid.cache->editframe);
}
/* the edges */
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index e470689f28c..a6bd38752ae 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -2744,7 +2744,6 @@ void make_vertex_parent(Scene *scene, Object *obedit, View3D *v3d)
/* present menu listing the possible objects within the group to proxify */
static void proxy_group_objects_menu (bContext *C, wmOperator *op, Object *ob, Group *group)
{
- PointerRNA gob_ptr;
uiPopupMenu *pup;
uiLayout *layout;
GroupObject *go;
@@ -2760,22 +2759,16 @@ static void proxy_group_objects_menu (bContext *C, wmOperator *op, Object *ob, G
pup= uiPupMenuBegin(C, "Make Proxy For:", 0);
layout= uiPupMenuLayout(pup);
- /* make RNA pointer for object that group belongs to */
- RNA_id_pointer_create((ID *)ob, &gob_ptr);
-
for (go= group->gobject.first; go; go= go->next) {
if (go->ob) {
- PointerRNA props_ptr, ob_ptr;
-
- /* create pointer for this object */
- RNA_id_pointer_create((ID *)go->ob, &ob_ptr);
+ PointerRNA props_ptr;
/* create operator properties, and assign the relevant pointers to that,
* and add a menu entry which uses these props
*/
WM_operator_properties_create(&props_ptr, op->idname);
- RNA_pointer_set(&props_ptr, "object", ob_ptr);
- RNA_pointer_set(&props_ptr, "group_object", gob_ptr);
+ RNA_string_set(&props_ptr, "object", go->ob->id.name+2);
+ RNA_string_set(&props_ptr, "group_object", go->ob->id.name+2);
uiItemFullO(layout, go->ob->id.name+2, 0, op->idname, props_ptr.data, WM_OP_EXEC_REGION_WIN);
}
}
@@ -2802,16 +2795,13 @@ static int make_proxy_invoke (bContext *C, wmOperator *op, wmEvent *evt)
else if (ob->id.lib) {
uiPopupMenu *pup= uiPupMenuBegin(C, "OK?", ICON_QUESTION);
uiLayout *layout= uiPupMenuLayout(pup);
- PointerRNA ob_ptr, props_ptr;
-
- /* create pointer for this object */
- RNA_id_pointer_create((ID *)ob, &ob_ptr);
+ PointerRNA props_ptr;
/* create operator properties, and assign the relevant pointers to that,
* and add a menu entry which uses these props
*/
WM_operator_properties_create(&props_ptr, op->idname);
- RNA_pointer_set(&props_ptr, "object", ob_ptr);
+ RNA_string_set(&props_ptr, "object", ob->id.name+2);
uiItemFullO(layout, op->type->name, 0, op->idname, props_ptr.data, WM_OP_EXEC_REGION_WIN);
/* present the menu and be done... */
@@ -2828,11 +2818,39 @@ static int make_proxy_invoke (bContext *C, wmOperator *op, wmEvent *evt)
static int make_proxy_exec (bContext *C, wmOperator *op)
{
- PointerRNA ob_ptr= RNA_pointer_get(op->ptr, "object");
- PointerRNA gob_ptr= RNA_pointer_get(op->ptr, "group_object");
- Object *ob= ob_ptr.data;
- Object *gob= gob_ptr.data;
+ Object *ob=NULL, *gob=NULL;
Scene *scene= CTX_data_scene(C);
+ char ob_name[21], gob_name[21];
+
+ /* get object and group object
+ * - firstly names
+ * - then pointers from context
+ */
+ RNA_string_get(op->ptr, "object", ob_name);
+ RNA_string_get(op->ptr, "group_object", gob_name);
+
+ if (gob_name[0]) {
+ Group *group;
+ GroupObject *go;
+
+ /* active object is group object... */
+ // FIXME: we should get the nominated name instead
+ gob= CTX_data_active_object(C);
+ group= gob->dup_group;
+
+ /* find the object to affect */
+ for (go= group->gobject.first; go; go= go->next) {
+ if ((go->ob) && strcmp(go->ob->id.name+2, gob_name)==0) {
+ ob= go->ob;
+ break;
+ }
+ }
+ }
+ else {
+ /* just use the active object for now */
+ // FIXME: we should get the nominated name instead
+ ob= CTX_data_active_object(C);
+ }
if (ob) {
Object *newob;
@@ -2864,6 +2882,8 @@ static int make_proxy_exec (bContext *C, wmOperator *op)
/* depsgraph flushes are needed for the new data */
DAG_scene_sort(scene);
DAG_object_flush_update(scene, newob, OB_RECALC);
+
+ WM_event_add_notifier(C, NC_OBJECT, NULL);
}
else {
BKE_report(op->reports, RPT_ERROR, "No object to make proxy for");
@@ -2889,8 +2909,8 @@ void OBJECT_OT_proxy_make (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_pointer(ot->srna, "object", "Object", "Proxy Object", "Lib-linked/grouped object to make a proxy for.");
- RNA_def_pointer(ot->srna, "group_object", "Object", "Group Object", "Group instancer (if applicable).");
+ RNA_def_string(ot->srna, "object", "", 19, "Proxy Object", "Name of lib-linked/grouped object to make a proxy for.");
+ RNA_def_string(ot->srna, "group_object", "", 19, "Group Object", "Name of group instancer (if applicable).");
}
/* ******************** make parent operator *********************** */
diff --git a/source/blender/editors/physics/ed_pointcache.c b/source/blender/editors/physics/ed_pointcache.c
index 4bf6612df67..5d0a6d21fac 100644
--- a/source/blender/editors/physics/ed_pointcache.c
+++ b/source/blender/editors/physics/ed_pointcache.c
@@ -146,6 +146,113 @@ void PTCACHE_OT_free_bake_all(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
+/**************************** softbody **********************************/
+static int ptcache_bake_softbody_poll(bContext *C)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_active_object(C);
+ SoftBody *sb = ob->soft;
+
+ if(!scene || !ob || ob->id.lib || !sb)
+ return 0;
+
+ return 1;
+}
+
+static int ptcache_bake_softbody_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_active_object(C);
+ SoftBody *sb = ob->soft;
+ PTCacheID pid;
+ PTCacheBaker baker;
+
+ BKE_ptcache_id_from_softbody(&pid, ob, sb);
+
+ baker.scene = scene;
+ baker.pid = &pid;
+ baker.bake = RNA_boolean_get(op->ptr, "bake");
+ baker.render = 0;
+ baker.anim_init = 0;
+ baker.quick_step = 1;
+ baker.break_test = cache_break_test;
+ baker.break_data = NULL;
+ baker.progressbar = (void (*)(void *, int))WM_timecursor;
+ baker.progresscontext = CTX_wm_window(C);
+
+ BKE_ptcache_make_cache(&baker);
+
+ WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+
+ return OPERATOR_FINISHED;
+}
+static int ptcache_free_bake_softbody_exec(bContext *C, wmOperator *op)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_active_object(C);
+ SoftBody *sb = ob->soft;
+ PTCacheID pid;
+
+ BKE_ptcache_id_from_softbody(&pid, ob, sb);
+ pid.cache->flag &= ~PTCACHE_BAKED;
+
+ WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
+
+ return OPERATOR_FINISHED;
+}
+void PTCACHE_OT_cache_softbody(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Bake Softbody";
+ ot->idname= "PTCACHE_OT_cache_softbody";
+
+ /* api callbacks */
+ ot->exec= ptcache_bake_softbody_exec;
+ ot->poll= ptcache_bake_softbody_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_boolean(ot->srna, "bake", 0, "Bake", "");
+}
+void PTCACHE_OT_free_bake_softbody(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Free SoftBody Bake";
+ ot->idname= "PTCACHE_OT_free_bake_softbody";
+
+ /* api callbacks */
+ ot->exec= ptcache_free_bake_softbody_exec;
+ ot->poll= ptcache_bake_softbody_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+static int ptcache_bake_from_softbody_cache_exec(bContext *C, wmOperator *op)
+{
+ Object *ob= CTX_data_active_object(C);
+ SoftBody *sb = ob->soft;
+ PTCacheID pid;
+
+ BKE_ptcache_id_from_softbody(&pid, ob, sb);
+ pid.cache->flag |= PTCACHE_BAKED;
+
+ return OPERATOR_FINISHED;
+}
+void PTCACHE_OT_bake_from_softbody_cache(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Bake From Cache";
+ ot->idname= "PTCACHE_OT_bake_from_softbody_cache";
+
+ /* api callbacks */
+ ot->exec= ptcache_bake_from_softbody_cache_exec;
+ ot->poll= ptcache_bake_softbody_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
/**************************** cloth **********************************/
static int ptcache_bake_cloth_poll(bContext *C)
{
@@ -371,6 +478,9 @@ void ED_operatortypes_pointcache(void)
WM_operatortype_append(PTCACHE_OT_cache_cloth);
WM_operatortype_append(PTCACHE_OT_free_bake_cloth);
WM_operatortype_append(PTCACHE_OT_bake_from_cloth_cache);
+ WM_operatortype_append(PTCACHE_OT_cache_softbody);
+ WM_operatortype_append(PTCACHE_OT_free_bake_softbody);
+ WM_operatortype_append(PTCACHE_OT_bake_from_softbody_cache);
}
//void ED_keymap_pointcache(wmWindowManager *wm)
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index 216ff3993dd..6e86748adae 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -60,6 +60,7 @@
#include "DNA_key_types.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
+#include "DNA_meta_types.h"
#include "DNA_userdef_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_windowmanager_types.h"
@@ -653,6 +654,22 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
strcpy(name, part->id.name+2);
}
break;
+ case ANIMTYPE_DSMBALL: /* metaball (dopesheet) expand widget */
+ {
+ MetaBall *mb = (MetaBall *)ale->data;
+
+ group = 4;
+ indent = 1;
+ special = ICON_META_DATA;
+
+ if (FILTER_MBALL_OBJD(mb))
+ expand = ICON_TRIA_DOWN;
+ else
+ expand = ICON_TRIA_RIGHT;
+
+ strcpy(name, mb->id.name+2);
+ }
+ break;
case ANIMTYPE_GROUP: /* action group */
diff --git a/source/blender/editors/space_action/action_header.c b/source/blender/editors/space_action/action_header.c
index 7f5e2851070..d3929a22342 100644
--- a/source/blender/editors/space_action/action_header.c
+++ b/source/blender/editors/space_action/action_header.c
@@ -167,6 +167,7 @@ static void act_edit_transformmenu(bContext *C, uiLayout *layout, void *arg_unus
static void act_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "ACT_OT_snap", "type", ACTKEYS_SNAP_CFRA);
uiItemEnumO(layout, NULL, 0, "ACT_OT_snap", "type", ACTKEYS_SNAP_NEAREST_FRAME);
uiItemEnumO(layout, NULL, 0, "ACT_OT_snap", "type", ACTKEYS_SNAP_NEAREST_SECOND);
@@ -175,6 +176,7 @@ static void act_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
static void act_edit_mirrormenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "ACT_OT_mirror", "type", ACTKEYS_MIRROR_CFRA);
uiItemEnumO(layout, NULL, 0, "ACT_OT_mirror", "type", ACTKEYS_MIRROR_YAXIS);
uiItemEnumO(layout, NULL, 0, "ACT_OT_mirror", "type", ACTKEYS_MIRROR_XAXIS);
@@ -183,6 +185,7 @@ static void act_edit_mirrormenu(bContext *C, uiLayout *layout, void *arg_unused)
static void act_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_FREE);
uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_AUTO);
uiItemEnumO(layout, NULL, 0, "ACT_OT_handle_type", "type", HD_VECT);
@@ -192,6 +195,7 @@ static void act_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unused
static void act_edit_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type", "type", BEZT_IPO_CONST);
uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type", "type", BEZT_IPO_LIN);
uiItemEnumO(layout, NULL, 0, "ACT_OT_interpolation_type", "type", BEZT_IPO_BEZ);
@@ -199,6 +203,7 @@ static void act_edit_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
static void act_edit_expomenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "ACT_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_CONSTANT);
uiItemEnumO(layout, NULL, 0, "ACT_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_LINEAR);
}
@@ -381,6 +386,7 @@ void action_header_buttons(const bContext *C, ARegion *ar)
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Lamps");
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Cameras");
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Curves");
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display MetaBalls");
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Particles");
uiBlockEndAlign(block);
xco += 30;
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index 105ecf23c3e..f6915c4db01 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -51,6 +51,7 @@
#include "DNA_key_types.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
+#include "DNA_meta_types.h"
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
@@ -1158,6 +1159,22 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar)
strcpy(name, part->id.name+2);
}
break;
+ case ANIMTYPE_DSMBALL: /* metaball (dopesheet) expand widget */
+ {
+ MetaBall *mb = (MetaBall *)ale->data;
+
+ group = 4;
+ indent = 1;
+ special = ICON_META_DATA;
+
+ if (FILTER_MBALL_OBJD(mb))
+ expand = ICON_TRIA_DOWN;
+ else
+ expand = ICON_TRIA_RIGHT;
+
+ strcpy(name, mb->id.name+2);
+ }
+ break;
case ANIMTYPE_GROUP: /* action group */
diff --git a/source/blender/editors/space_graph/graph_header.c b/source/blender/editors/space_graph/graph_header.c
index 5a7b7d654b1..2c9017db649 100644
--- a/source/blender/editors/space_graph/graph_header.c
+++ b/source/blender/editors/space_graph/graph_header.c
@@ -158,6 +158,7 @@ static void graph_edit_transformmenu(bContext *C, uiLayout *layout, void *arg_un
static void graph_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_CFRA);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_NEAREST_FRAME);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_snap", "type", GRAPHKEYS_SNAP_NEAREST_SECOND);
@@ -166,6 +167,7 @@ static void graph_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
static void graph_edit_mirrormenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_mirror", "type", GRAPHKEYS_MIRROR_CFRA);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_mirror", "type", GRAPHKEYS_MIRROR_YAXIS);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_mirror", "type", GRAPHKEYS_MIRROR_XAXIS);
@@ -174,6 +176,7 @@ static void graph_edit_mirrormenu(bContext *C, uiLayout *layout, void *arg_unuse
static void graph_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_handle_type", "type", HD_FREE);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_handle_type", "type", HD_AUTO);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_handle_type", "type", HD_VECT);
@@ -183,6 +186,7 @@ static void graph_edit_handlesmenu(bContext *C, uiLayout *layout, void *arg_unus
static void graph_edit_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_interpolation_type", "type", BEZT_IPO_CONST);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_interpolation_type", "type", BEZT_IPO_LIN);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_interpolation_type", "type", BEZT_IPO_BEZ);
@@ -190,6 +194,7 @@ static void graph_edit_ipomenu(bContext *C, uiLayout *layout, void *arg_unused)
static void graph_edit_expomenu(bContext *C, uiLayout *layout, void *arg_unused)
{
+ uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); // xxx?
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_CONSTANT);
uiItemEnumO(layout, NULL, 0, "GRAPH_OT_extrapolation_type", "type", FCURVE_EXTRAPOLATE_LINEAR);
}
@@ -305,13 +310,14 @@ void graph_header_buttons(const bContext *C, ARegion *ar)
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Lamps");
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Cameras");
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Curves");
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display MetaBalls");
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Particles");
uiBlockEndAlign(block);
xco += 30;
}
else {
// XXX this case shouldn't happen at all... for now, just pad out same amount of space
- xco += 9*XIC + 30;
+ xco += 10*XIC + 30;
}
/* auto-snap selector */
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index a87ab36714c..7184737e0ba 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -210,7 +210,6 @@ static void nla_panel_animdata (const bContext *C, Panel *pa)
/* Active Action Properties ------------------------------------- */
/* action */
row= uiLayoutRow(layout, 1);
- uiLayoutSetEnabled(row, (adt->flag & ADT_NLA_EDIT_ON)==0);
uiItemR(row, NULL, 0, &adt_ptr, "action", 0, 0, 0);
/* extrapolation */
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index 98dacc8ef5b..ab918519ec0 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -45,6 +45,7 @@
#include "DNA_key_types.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
+#include "DNA_meta_types.h"
#include "DNA_userdef_types.h"
#include "DNA_windowmanager_types.h"
#include "DNA_world_types.h"
@@ -320,6 +321,22 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
notifierFlags |= ND_ANIMCHAN_EDIT;
}
break;
+ case ANIMTYPE_DSMBALL:
+ {
+ MetaBall *mb= (MetaBall *)ale->data;
+ AnimData *adt= ale->adt;
+
+ if ( (adt) && (x >= (NLACHANNEL_NAMEWIDTH-NLACHANNEL_BUTTON_WIDTH)) ) {
+ /* toggle mute */
+ adt->flag ^= ADT_NLA_EVAL_OFF;
+ }
+ else {
+ /* toggle expand */
+ mb->flag2 ^= MB_DS_EXPAND;
+ }
+ notifierFlags |= ND_ANIMCHAN_EDIT;
+ }
+ break;
case ANIMTYPE_NLATRACK:
{
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 3feefcc11ab..a7a854a7277 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -46,6 +46,7 @@
#include "DNA_key_types.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
+#include "DNA_meta_types.h"
#include "DNA_particle_types.h"
#include "DNA_userdef_types.h"
#include "DNA_windowmanager_types.h"
@@ -908,6 +909,31 @@ void draw_nla_channel_list (bAnimContext *ac, SpaceNla *snla, ARegion *ar)
strcpy(name, part->id.name+2);
}
break;
+ case ANIMTYPE_DSMBALL: /* metaball (dopesheet) expand widget */
+ {
+ MetaBall *mb = (MetaBall *)ale->data;
+ AnimData *adt= ale->adt;
+
+ group = 4;
+ indent = 1;
+ special = ICON_META_DATA;
+
+ if (FILTER_MBALL_OBJD(mb))
+ expand = ICON_TRIA_DOWN;
+ else
+ expand = ICON_TRIA_RIGHT;
+
+ /* NLA evaluation on/off button */
+ if (adt) {
+ if (adt->flag & ADT_NLA_EVAL_OFF)
+ mute = ICON_MUTE_IPO_ON;
+ else
+ mute = ICON_MUTE_IPO_OFF;
+ }
+
+ strcpy(name, mb->id.name+2);
+ }
+ break;
case ANIMTYPE_NLATRACK: /* NLA Track */
{
diff --git a/source/blender/editors/space_nla/nla_header.c b/source/blender/editors/space_nla/nla_header.c
index 20343adef03..04c2db08bda 100644
--- a/source/blender/editors/space_nla/nla_header.c
+++ b/source/blender/editors/space_nla/nla_header.c
@@ -261,13 +261,14 @@ void nla_header_buttons(const bContext *C, ARegion *ar)
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Lamps");
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Cameras");
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Curves");
+ uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display MetaBalls");
uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Particles");
uiBlockEndAlign(block);
xco += 15;
}
else {
// XXX this case shouldn't happen at all... for now, just pad out same amount of space
- xco += 7*XIC + 15;
+ xco += 10*XIC + 15;
}
xco += (XIC + 8);
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index b1489a4018a..da6507188e8 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -1711,7 +1711,7 @@ static int sequencer_refresh_all_exec(bContext *C, wmOperator *op)
if(ed==NULL)
return OPERATOR_CANCELLED;
- free_imbuf_seq(&ed->seqbase);
+ free_imbuf_seq(&ed->seqbase, FALSE);
ED_area_tag_redraw(CTX_wm_area(C));
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index fc700d8a8ad..f9d46cff9e6 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -4399,7 +4399,7 @@ static int drawmball(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
if(ml==NULL) return 1;
/* in case solid draw, reset wire colors */
- if(mb->editelems && (ob->flag & SELECT)) {
+ if(ob->flag & SELECT) {
if(ob==OBACT) UI_ThemeColor(TH_ACTIVE);
else UI_ThemeColor(TH_SELECT);
}
@@ -5344,7 +5344,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
int x, y, z, i;
float viewnormal[3];
int mainaxis[3] = {0,0,0};
- float align = 0;
+ float align = 0, signed_align = 0;
int max_textures = 0, counter_textures = 0;
float *buffer = NULL;
int res[3];
@@ -5386,6 +5386,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
{
mainaxis[0] = i;
align = ABS(viewnormal[i]);
+ signed_align = viewnormal[i];
}
}
mainaxis[1] = (mainaxis[0] + 1) % 3;
@@ -5438,8 +5439,23 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
if(new > 1)
{
- float light[3] = {0.0,0.0,2.0};
-
+ float light[3] = {0.0,0.0,2.0}; // TODO: take real LAMP coordinates - dg
+ Base *base_tmp = NULL;
+
+ for(base_tmp = scene->base.first; base_tmp; base_tmp= base_tmp->next)
+ {
+ if(base_tmp->object->type == OB_LAMP)
+ {
+ Lamp *la = (Lamp *)base_tmp->object->data;
+
+ if(la->type == LA_LOCAL)
+ {
+ VECCOPY(light, base_tmp->object->obmat[3]);
+ break;
+ }
+ }
+ }
+
if(!big && !(smd->domain->viewsettings & MOD_SMOKE_VIEW_SMALL))
{
smoke_prepare_View(smd, light);
@@ -5486,7 +5502,17 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
mod_texture = MAX3(1, smd->domain->visibility, (int)(res[mainaxis[0]] / smd->domain->max_textures ));
- for (z = 0; z < res[mainaxis[0]]; z++) // 2
+ // align order of billboards to be front or backview (e.g. +x or -x axis)
+ if(signed_align < 0)
+ {
+ z = res[mainaxis[0]] - 1;
+ }
+ else
+ {
+ z = 0;
+ }
+
+ for (; signed_align > 0 ? (z < res[mainaxis[0]]) : (z >= 0); signed_align > 0 ? z++ : z--) // 2
{
float quad[4][3];
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index a50502e8265..4b7f7ebed29 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -1002,74 +1002,6 @@ static void view3d_panel_transform_spaces(const bContext *C, Panel *pa)
}
#endif // XXX not used
-static void weight_paint_buttons(Scene *scene, uiBlock *block)
-{
- VPaint *wpaint= scene->toolsettings->wpaint;
- Object *ob;
- ob= OBACT;
-
- if(ob==NULL || ob->type!=OB_MESH) return;
-
- /* XXX
- uiBlockBeginAlign(block);
- uiDefButF(block, NUMSLI, B_REDR, "Weight:",10,170,225,19, &wpaint->weight, 0, 1, 10, 0, "Sets the current vertex group's bone deformation strength");
-
- uiDefBut(block, BUT, B_WEIGHT0_0 , "0", 10,150,45,19, 0, 0, 0, 0, 0, "");
- uiDefBut(block, BUT, B_WEIGHT1_4 , "1/4", 55,150,45,19, 0, 0, 0, 0, 0, "");
- uiDefBut(block, BUT, B_WEIGHT1_2 , "1/2", 100,150,45,19, 0, 0, 0, 0, 0, "");
- uiDefBut(block, BUT, B_WEIGHT3_4 , "3/4", 145,150,45,19, 0, 0, 0, 0, 0, "");
- uiDefBut(block, BUT, B_WEIGHT1_0 , "1", 190,150,45,19, 0, 0, 0, 0, 0, "");
-
- uiDefButF(block, NUMSLI, B_NOP, "Opacity ", 10,130,225,19, &wpaint->a, 0.0, 1.0, 0, 0, "The amount of pressure on the brush");
-
- uiDefBut(block, BUT, B_OPA1_8 , "1/8", 10,110,45,19, 0, 0, 0, 0, 0, "");
- uiDefBut(block, BUT, B_OPA1_4 , "1/4", 55,110,45,19, 0, 0, 0, 0, 0, "");
- uiDefBut(block, BUT, B_OPA1_2 , "1/2", 100,110,45,19, 0, 0, 0, 0, 0, "");
- uiDefBut(block, BUT, B_OPA3_4 , "3/4", 145,110,45,19, 0, 0, 0, 0, 0, "");
- uiDefBut(block, BUT, B_OPA1_0 , "1", 190,110,45,19, 0, 0, 0, 0, 0, "");
-
- uiDefButF(block, NUMSLI, B_NOP, "Size ", 10,90,225,19, &wpaint->size, 2.0, 64.0, 0, 0, "The size of the brush");
-
- uiBlockBeginAlign(block);
- uiDefButS(block, ROW, B_NOP, "Mix", 250,170,60,17, &wpaint->mode, 1.0, 0.0, 0, 0, "Mix the vertex colors");
- uiDefButS(block, ROW, B_NOP, "Add", 250,152,60,17, &wpaint->mode, 1.0, 1.0, 0, 0, "Add the vertex colors");
- uiDefButS(block, ROW, B_NOP, "Sub", 250,134,60,17, &wpaint->mode, 1.0, 2.0, 0, 0, "Subtract from the vertex color");
- uiDefButS(block, ROW, B_NOP, "Mul", 250,116,60,17, &wpaint->mode, 1.0, 3.0, 0, 0, "Multiply the vertex color");
- uiDefButS(block, ROW, B_NOP, "Blur", 250, 98,60,17, &wpaint->mode, 1.0, 4.0, 0, 0, "Blur the weight with surrounding values");
- uiDefButS(block, ROW, B_NOP, "Lighter", 250, 80,60,17, &wpaint->mode, 1.0, 5.0, 0, 0, "Paint over darker areas only");
- uiDefButS(block, ROW, B_NOP, "Darker", 250, 62,60,17, &wpaint->mode, 1.0, 6.0, 0, 0, "Paint over lighter areas only");
- uiBlockEndAlign(block);
- */
-
- /* draw options same as below */
- uiBlockBeginAlign(block);
- if (FACESEL_PAINT_TEST) {
- Mesh *me= ob->data;
- uiDefButBitI(block, TOG, ME_DRAWFACES, B_REDR, "Faces", 10,45,60,19, &me->drawflag, 0, 0, 0, 0, "Displays all faces as shades");
- uiDefButBitI(block,TOG, ME_DRAWEDGES, B_REDR,"Edges",70,45,60,19, &me->drawflag, 2.0, 0, 0, 0, "Displays edges of visible faces");
- uiDefButBitI(block,TOG, ME_HIDDENEDGES, B_REDR,"Hidden Edges",130,45,100,19, &me->drawflag, 2.0, 1.0, 0, 0, "Displays edges of hidden faces");
- } else{
- uiDefButBitC(block, TOG, OB_DRAWWIRE, B_REDR, "Wire", 10,45,75,19, &ob->dtx, 0, 0, 0, 0, "Displays the active object's wireframe in shaded drawing modes");
- }
- uiBlockEndAlign(block);
-
- uiBlockBeginAlign(block);
- uiDefButBitS(block, TOG, VP_AREA, 0, "All Faces", 10,20,60,19, &wpaint->flag, 0, 0, 0, 0, "Paint on all faces inside brush (otherwise only on face under mouse cursor)");
- uiDefButBitS(block, TOG, VP_SOFT, 0, "Vert Dist", 70,20,60,19, &wpaint->flag, 0, 0, 0, 0, "Use distances to vertices (instead of all vertices of face)");
- uiDefButBitS(block, TOGN, VP_HARD, 0, "Soft", 130,20,60,19, &wpaint->flag, 0, 0, 0, 0, "Use a soft brush");
- uiDefButBitS(block, TOG, VP_NORMALS, 0, "Normals", 190,20,60,19, &wpaint->flag, 0, 0, 0, 0, "Applies the vertex normal before painting");
- uiDefButBitS(block, TOG, VP_SPRAY, 0, "Spray", 250,20,55,19, &wpaint->flag, 0, 0, 0, 0, "Keep applying paint effect while holding mouse");
- uiBlockEndAlign(block);
-
- if(ob) {
- uiBlockBeginAlign(block);
- uiDefButBitS(block, TOG, VP_ONLYVGROUP, B_REDR, "Vgroup", 10,0,100,19, &wpaint->flag, 0, 0, 0, 0, "Only paint on vertices in the selected vertex group.");
- uiDefButBitS(block, TOG, VP_MIRROR_X, B_REDR, "X-Mirror", 110,0,100,19, &wpaint->flag, 0, 0, 0, 0, "Mirrored Paint, applying on mirrored Weight Group name");
- uiDefBut(block, BUT, B_CLR_WPAINT, "Clear", 210,0,100,19, NULL, 0, 0, 0, 0, "Removes reference to this deform group from all vertices");
- uiBlockEndAlign(block);
- }
-}
-
static void brush_idpoin_handle(bContext *C, ID *id, int event)
{
Brush **br = current_brush_source(CTX_data_scene(C));
@@ -1155,23 +1087,6 @@ static void view3d_panel_object(const bContext *C, Panel *pa)
else if(ob->flag & OB_POSEMODE) {
v3d_posearmature_buts(block, v3d, ob, lim);
}
- else if(G.f & G_WEIGHTPAINT) {
- BLI_strncpy(pa->drawname, "Weight Paint Properties", sizeof(pa->drawname));
- weight_paint_buttons(scene, block);
- }
- else if(G.f & (G_VERTEXPAINT|G_TEXTUREPAINT)) {
- static float hsv[3], old[3]; // used as temp mem for picker
- Brush **br = current_brush_source(scene);
-
- BLI_strncpy(pa->drawname, "Paint Properties", sizeof(pa->drawname));
- if(br && *br)
- /* 'f' is for floating panel */
- uiBlockPickerButtons(block, (*br)->rgb, hsv, old, hexcol, 'f', B_REDR);
- }
- else if(G.f & G_PARTICLEEDIT){
- BLI_strncpy(pa->drawname, "Particle Edit Properties", sizeof(pa->drawname));
-// XXX particle_edit_buttons(block);
- }
else {
BoundBox *bb = NULL;
@@ -1257,133 +1172,6 @@ static void view3d_panel_object(const bContext *C, Panel *pa)
}
}
-#if 0 // XXX not used anymore
-static void view3d_panel_background(const bContext *C, Panel *pa)
-{
- View3D *v3d= CTX_wm_view3d(C);
- uiBlock *block;
-
- block= uiLayoutFreeBlock(pa->layout);
- uiBlockSetHandleFunc(block, do_view3d_region_buttons, NULL);
-
- if(v3d->flag & V3D_DISPBGPIC) {
- if(v3d->bgpic==NULL) {
- v3d->bgpic= MEM_callocN(sizeof(BGpic), "bgpic");
- v3d->bgpic->size= 5.0;
- v3d->bgpic->blend= 0.5;
- v3d->bgpic->iuser.fie_ima= 2;
- v3d->bgpic->iuser.ok= 1;
- }
- }
-
- if(!(v3d->flag & V3D_DISPBGPIC)) {
- uiDefButBitS(block, TOG, V3D_DISPBGPIC, B_REDR, "Use Background Image", 10, 180, 150, 20, &v3d->flag, 0, 0, 0, 0, "Display an image in the background of this 3D View");
- uiDefBut(block, LABEL, 1, " ", 160, 180, 150, 20, NULL, 0.0, 0.0, 0, 0, "");
- }
- else {
- uiBlockBeginAlign(block);
- uiDefButBitS(block, TOG, V3D_DISPBGPIC, B_REDR, "Use", 10, 225, 50, 20, &v3d->flag, 0, 0, 0, 0, "Display an image in the background of this 3D View");
- uiDefButF(block, NUMSLI, B_REDR, "Blend:", 60, 225, 150, 20, &v3d->bgpic->blend, 0.0,1.0, 0, 0, "Set the transparency of the background image");
- uiDefButF(block, NUM, B_REDR, "Size:", 210, 225, 100, 20, &v3d->bgpic->size, 0.1, 250.0*v3d->grid, 100, 0, "Set the size (width) of the background image");
-
- uiDefButF(block, NUM, B_REDR, "X Offset:", 10, 205, 150, 20, &v3d->bgpic->xof, -250.0*v3d->grid,250.0*v3d->grid, 10, 2, "Set the horizontal offset of the background image");
- uiDefButF(block, NUM, B_REDR, "Y Offset:", 160, 205, 150, 20, &v3d->bgpic->yof, -250.0*v3d->grid,250.0*v3d->grid, 10, 2, "Set the vertical offset of the background image");
-
- ED_image_uiblock_panel(C, block, &v3d->bgpic->ima, &v3d->bgpic->iuser, B_REDR, B_REDR);
- uiBlockEndAlign(block);
- }
-}
-
-
-static void view3d_panel_properties(const bContext *C, Panel *pa)
-{
- ScrArea *sa= CTX_wm_area(C);
- ARegion *arlast;
- Scene *scene= CTX_data_scene(C);
- View3D *v3d= CTX_wm_view3d(C);
- RegionView3D *rv3d;
- uiBlock *block;
- float *curs;
-
- block= uiLayoutFreeBlock(pa->layout);
- uiBlockSetHandleFunc(block, do_view3d_region_buttons, NULL);
-
- uiDefBut(block, LABEL, 1, "Grid:", 10, 220, 150, 19, NULL, 0.0, 0.0, 0, 0, "");
- uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_REDR, "Spacing:", 10, 200, 140, 19, &v3d->grid, 0.001, 100.0, 10, 0, "Set the distance between grid lines");
- uiDefButS(block, NUM, B_REDR, "Lines:", 10, 180, 140, 19, &v3d->gridlines, 0.0, 100.0, 100, 0, "Set the number of grid lines in perspective view");
- uiDefButS(block, NUM, B_REDR, "Divisions:", 10, 160, 140, 19, &v3d->gridsubdiv, 1.0, 100.0, 100, 0, "Set the number of grid lines");
- uiBlockEndAlign(block);
-
- uiDefBut(block, LABEL, 1, "3D Display:", 160, 220, 150, 19, NULL, 0.0, 0.0, 0, 0, "");
- uiDefButBitS(block, TOG, V3D_SHOW_FLOOR, B_REDR, "Grid Floor",160, 200, 150, 19, &v3d->gridflag, 0, 0, 0, 0, "Show the grid floor in free camera mode");
- uiDefButBitS(block, TOG, V3D_SHOW_X, B_REDR, "X Axis", 160, 176, 48, 19, &v3d->gridflag, 0, 0, 0, 0, "Show the X Axis line");
- uiDefButBitS(block, TOG, V3D_SHOW_Y, B_REDR, "Y Axis", 212, 176, 48, 19, &v3d->gridflag, 0, 0, 0, 0, "Show the Y Axis line");
- uiDefButBitS(block, TOG, V3D_SHOW_Z, B_REDR, "Z Axis", 262, 176, 48, 19, &v3d->gridflag, 0, 0, 0, 0, "Show the Z Axis line");
-
- uiDefBut(block, LABEL, 1, "View Camera:", 10, 140, 140, 19, NULL, 0.0, 0.0, 0, 0, "");
-
- uiDefButF(block, NUM, B_REDR, "Lens:", 10, 120, 140, 19, &v3d->lens, 10.0, 120.0, 100, 0, "The lens angle in perspective view");
- uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_REDR, "Clip Start:", 10, 96, 140, 19, &v3d->near, v3d->grid/100.0, 100.0, 10, 0, "Set the beginning of the range in which 3D objects are displayed (perspective view)");
- uiDefButF(block, NUM, B_REDR, "Clip End:", 10, 76, 140, 19, &v3d->far, 1.0, 10000.0*v3d->grid, 100, 0, "Set the end of the range in which 3D objects are displayed (perspective view)");
- uiBlockEndAlign(block);
-
- uiDefBut(block, LABEL, 1, "3D Cursor:", 160, 150, 140, 19, NULL, 0.0, 0.0, 0, 0, "");
-
- uiBlockBeginAlign(block);
- curs= give_cursor(scene, v3d);
- uiDefButF(block, NUM, B_REDR, "X:", 160, 130, 150, 22, curs, -10000.0*v3d->grid, 10000.0*v3d->grid, 10, 0, "X co-ordinate of the 3D cursor");
- uiDefButF(block, NUM, B_REDR, "Y:", 160, 108, 150, 22, curs+1, -10000.0*v3d->grid, 10000.0*v3d->grid, 10, 0, "Y co-ordinate of the 3D cursor");
- uiDefButF(block, NUM, B_REDR, "Z:", 160, 86, 150, 22, curs+2, -10000.0*v3d->grid, 10000.0*v3d->grid, 10, 0, "Z co-ordinate of the 3D cursor");
- uiBlockEndAlign(block);
-
- uiDefBut(block, LABEL, 1, "Display:", 10, 50, 150, 19, NULL, 0.0, 0.0, 0, 0, "");
- uiBlockBeginAlign(block);
- uiDefButBitS(block, TOG, V3D_SELECT_OUTLINE, B_REDR, "Outline Selected", 10, 30, 140, 19, &v3d->flag, 0, 0, 0, 0, "Highlight selected objects with an outline, in Solid, Shaded or Textured viewport shading modes");
- uiDefButBitS(block, TOG, V3D_DRAW_CENTERS, B_REDR, "All Object Centers", 10, 10, 140, 19, &v3d->flag, 0, 0, 0, 0, "Draw the center points on all objects");
- uiDefButBitS(block, TOGN, V3D_HIDE_HELPLINES, B_REDR, "Relationship Lines", 10, -10, 140, 19, &v3d->flag, 0, 0, 0, 0, "Draw dashed lines indicating Parent, Constraint, or Hook relationships");
- uiDefButBitS(block, TOG, V3D_SOLID_TEX, B_REDR, "Solid Tex", 10, -30, 140, 19, &v3d->flag2, 0, 0, 0, 0, "Display textures in Solid draw type (Shift T)");
- uiBlockEndAlign(block);
-
- uiDefBut(block, LABEL, 1, "View Locking:", 160, 60, 150, 19, NULL, 0.0, 0.0, 0, 0, "");
- uiBlockBeginAlign(block);
- uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_REDR, "Object:", 160, 40, 150, 19, &v3d->ob_centre, "Lock view to center to this Object");
- uiDefBut(block, TEX, B_REDR, "Bone:", 160, 20, 150, 19, v3d->ob_centre_bone, 1, 31, 0, 0, "If view locked to Object, use this Bone to lock to view to");
- uiBlockEndAlign(block);
-
- /* last region is always 3d... a bit weak */
- arlast= sa->regionbase.last;
- uiBlockBeginAlign(block);
- if(arlast->alignment==RGN_ALIGN_QSPLIT) {
- arlast= arlast->prev;
- rv3d= arlast->regiondata;
-
- uiDefButO(block, BUT, "SCREEN_OT_region_foursplit", WM_OP_EXEC_REGION_WIN, "End 4-Split View", 160, -10, 150, 19, "Join the 3D View");
- uiDefButBitS(block, TOG, RV3D_LOCKED, B_RV3D_LOCKED, "Lock", 160, -30, 50, 19, &rv3d->viewlock, 0, 0, 0, 0, "");
- uiDefButBitS(block, TOG, RV3D_BOXVIEW, B_RV3D_BOXVIEW, "Box", 210, -30, 50, 19, &rv3d->viewlock, 0, 0, 0, 0, "");
- uiDefButBitS(block, TOG, RV3D_BOXCLIP, B_RV3D_BOXCLIP, "Clip", 260, -30, 50, 19, &rv3d->viewlock, 0, 0, 0, 0, "");
- }
- else
- uiDefButO(block, BUT, "SCREEN_OT_region_foursplit", WM_OP_EXEC_REGION_WIN, "4-Split View", 160, -10, 150, 19, "Split 3D View in 4 parts");
-
- uiBlockEndAlign(block);
-
-
-// XXX
-// uiDefBut(block, LABEL, 1, "Keyframe Display:", 160, -2, 150, 19, NULL, 0.0, 0.0, 0, 0, "");
-// uiBlockBeginAlign(block);
-// uiDefButBitS(block, TOG, ANIMFILTER_ACTIVE, B_REDR, "Active",160, -22, 50, 19, &v3d->keyflags, 0, 0, 0, 0, "Show keyframes for active element only (i.e. active bone or active material)");
-// uiDefButBitS(block, TOG, ANIMFILTER_MUTED, B_REDR, "Muted",210, -22, 50, 19, &v3d->keyflags, 0, 0, 0, 0, "Show keyframes in muted channels");
-// uiDefButBitS(block, TOG, ANIMFILTER_LOCAL, B_REDR, "Local",260, -22, 50, 19, &v3d->keyflags, 0, 0, 0, 0, "Show keyframes directly connected to datablock");
-// if ((v3d->keyflags & ANIMFILTER_LOCAL)==0) {
-// uiDefButBitS(block, TOGN, ANIMFILTER_NOMAT, B_REDR, "Material",160, -42, 75, 19, &v3d->keyflags, 0, 0, 0, 0, "Show keyframes for any available Materials");
-// uiDefButBitS(block, TOGN, ANIMFILTER_NOSKEY, B_REDR, "ShapeKey",235, -42, 75, 19, &v3d->keyflags, 0, 0, 0, 0, "Show keyframes for any available Shape Keys");
-// }
- uiBlockEndAlign(block);
-}
-#endif // XXX not used anymore
-
#if 0
static void view3d_panel_preview(bContext *C, ARegion *ar, short cntrl) // VIEW3D_HANDLER_PREVIEW
{
@@ -1634,13 +1422,6 @@ void view3d_buttons_register(ARegionType *art)
pt->draw= view3d_panel_properties;
BLI_addtail(&art->paneltypes, pt);
-
- pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel background");
- strcpy(pt->idname, "VIEW3D_PT_background");
- strcpy(pt->label, "Background Image");
- pt->draw= view3d_panel_background;
- BLI_addtail(&art->paneltypes, pt);
-
pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel transform spaces");
strcpy(pt->idname, "VIEW3D_PT_transform spaces");
strcpy(pt->label, "Transform Orientations");
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 0c6c04273e3..6f097ea3882 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -313,6 +313,7 @@ typedef enum DOPESHEET_FILTERFLAG {
ADS_FILTER_NOWOR = (1<<14),
ADS_FILTER_NOSCE = (1<<15),
ADS_FILTER_NOPART = (1<<16),
+ ADS_FILTER_NOMBA = (1<<17),
/* NLA-specific filters */
ADS_FILTER_NLA_NOACT = (1<<20), /* if the AnimData block has no NLA data, don't include to just show Action-line */
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index 0f5129a6c25..f75ed273164 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -631,6 +631,8 @@ typedef enum eKSP_TemplateTypes {
KSP_TEMPLATE_PCHAN = (1<<1), /* #pch - selected posechannel */
KSP_TEMPLATE_CONSTRAINT = (1<<2), /* #con - active only */
KSP_TEMPLATE_NODE = (1<<3), /* #nod - selected node */
+
+ KSP_TEMPLATE_PCHAN_ROT = (1<<16), /* modify rotation paths based on rotation mode of Pose Channel */
} eKSP_TemplateTypes;
/* ---------------- */
diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h
index 897368fd5df..8b61405b851 100644
--- a/source/blender/makesdna/DNA_meta_types.h
+++ b/source/blender/makesdna/DNA_meta_types.h
@@ -35,6 +35,7 @@
#include "DNA_ID.h"
struct BoundBox;
+struct AnimData;
struct Ipo;
struct Material;
@@ -62,18 +63,20 @@ typedef struct MetaElem {
typedef struct MetaBall {
ID id;
+ struct AnimData *adt;
struct BoundBox *bb;
ListBase elems;
ListBase disp;
ListBase *editelems; /* not saved in files, note we use pointer for editmode check */
- struct Ipo *ipo;
+ struct Ipo *ipo; // XXX... depreceated (old animation system)
/* material of the mother ball will define the material used of all others */
struct Material **mat;
- short flag, totcol;
+ char flag, flag2; /* flag is enum for updates, flag2 is bitflags for settings */
+ short totcol;
int texflag; /* used to store MB_AUTOSPACE */
/* texture space, copied as one block in editobject.c */
@@ -104,6 +107,10 @@ typedef struct MetaBall {
#define MB_UPDATE_FAST 2
#define MB_UPDATE_NEVER 3
+/* mb->flag2 */
+#define MB_DS_EXPAND (1<<0)
+
+
/* ml->type */
#define MB_BALL 0
#define MB_TUBEX 1 /* depercated */
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index bec6effecba..22cfae48132 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -147,7 +147,7 @@ typedef struct Sequence {
Strip *strip;
- struct Ipo *ipo;
+ struct Ipo *ipo; // xxx depreceated... old animation system
struct Scene *scene;
struct anim *anim;
float facf0, facf1;
diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h
index e0871e7038a..c3efc5e04dd 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -75,17 +75,22 @@ typedef struct SmokeDomainSettings {
int max_textures;
short noise; /* noise type: wave, curl, anisotropic */
short pad2;
+ int pad;
int pad3;
- int pad4;
} SmokeDomainSettings;
+
/* inflow / outflow */
+
+/* type */
+#define MOD_SMOKE_FLOW_TYPE_OUTFLOW (1<<1)
+
typedef struct SmokeFlowSettings {
struct SmokeModifierData *smd; /* for fast RNA access */
struct ParticleSystem *psys;
float density;
float temp; /* delta temperature (temp - ambient temp) */
- float velocity[3];
+ float velocity[3]; /* UNUSED, velocity taken from particles */
float vgrp_heat_scale[2]; /* min and max scaling for vgroup_heat */
short vgroup_flow; /* where inflow/outflow happens - red=1=action */
short vgroup_density;
@@ -97,6 +102,7 @@ typedef struct SmokeFlowSettings {
/* collision objects (filled with smoke) */
typedef struct SmokeCollSettings {
struct SmokeModifierData *smd; /* for fast RNA access */
+ struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth object */
float *points;
float *points_old;
float *vel;
diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h
index 200ff6d9324..64ff23dd1a8 100644
--- a/source/blender/makesdna/DNA_world_types.h
+++ b/source/blender/makesdna/DNA_world_types.h
@@ -71,12 +71,12 @@ typedef struct World {
/**
* Gravitation constant for the game world
*/
- float gravity; // moved to scene->gamedata in 2.5
+ float gravity; // XXX moved to scene->gamedata in 2.5
/**
* Radius of the activity bubble, in Manhattan length. Objects
* outside the box are activity-culled. */
- float activityBoxRadius; // moved to scene->gamedata in 2.5
+ float activityBoxRadius; // XXX moved to scene->gamedata in 2.5
short skytype;
/**
@@ -89,9 +89,9 @@ typedef struct World {
* bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling
*/
short mode; // partially moved to scene->gamedata in 2.5
- short occlusionRes; /* resolution of occlusion Z buffer in pixel */ // moved to scene->gamedata in 2.5
- short physicsEngine; /* here it's aligned */ // moved to scene->gamedata in 2.5
- short ticrate, maxlogicstep, physubstep, maxphystep; // moved to scene->gamedata in 2.5
+ short occlusionRes; /* resolution of occlusion Z buffer in pixel */ // XXX moved to scene->gamedata in 2.5
+ short physicsEngine; /* here it's aligned */ // XXX moved to scene->gamedata in 2.5
+ short ticrate, maxlogicstep, physubstep, maxphystep; // XXX moved to scene->gamedata in 2.5
float misi, miststa, mistdist, misthi;
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 76ed62f6438..e334e2b5e90 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -38,6 +38,17 @@
#ifdef RNA_RUNTIME
+static int rna_AnimData_action_editable(PointerRNA *ptr)
+{
+ AnimData *adt= (AnimData *)ptr->data;
+
+ /* active action is only editable when it is not a tweaking strip */
+ if ((adt->flag & ADT_NLA_EDIT_ON) || (adt->actstrip) || (adt->tmpact))
+ return 0;
+ else
+ return 1;
+}
+
static void rna_ksPath_RnaPath_get(PointerRNA *ptr, char *value)
{
KS_Path *ksp= (KS_Path *)ptr->data;
@@ -191,6 +202,7 @@ void rna_def_animdata(BlenderRNA *brna)
/* Active Action */
prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Action", "Active Action for this datablock.");
+ RNA_def_property_editable_func(prop, "rna_AnimData_action_editable");
/* Active Action Settings */
prop= RNA_def_property(srna, "action_extrapolation", PROP_ENUM, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index d84d6f159d8..d08e59c11dc 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -141,7 +141,21 @@ StructRNA *rna_ConstraintType_refine(struct PointerRNA *ptr)
static char *rna_Constraint_path(PointerRNA *ptr)
{
- return BLI_sprintfN("constraints[%s]", ((bConstraint*)ptr->data)->name);
+ Object *ob= ptr->id.data;
+ bConstraint *con= ptr->data;
+ bPoseChannel *pchan= get_active_posechannel(ob);
+ ListBase *actlist= get_active_constraints(ob);
+ short inList = 0;
+
+ /* check if constraint is in the given list */
+ if (actlist)
+ inList= (BLI_findindex(actlist, con) != -1);
+
+ /* if constraint is in the list, the list is for the active bone... */
+ if ((inList) && (actlist != &ob->constraints) && (pchan))
+ return BLI_sprintfN("pose.pose_channels[\"%s\"].constraints[\"%s\"]", pchan->name, con->name);
+ else
+ return BLI_sprintfN("constraints[\"%s\"]", con->name);
}
static void rna_Constraint_update(bContext *C, PointerRNA *ptr)
@@ -906,6 +920,11 @@ static void rna_def_constraint_stretch_to(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
+
+ prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "subtarget");
+ RNA_def_property_ui_text(prop, "Sub-Target", "");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "volume", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "volmode");
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index faf6c3a1f75..92b4dead516 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -33,6 +33,8 @@
#include "DNA_material_types.h"
#include "DNA_scene_types.h"
+#include "BKE_font.h"
+
EnumPropertyItem beztriple_handle_type_items[] = {
{HD_FREE, "FREE", 0, "Free", ""},
{HD_AUTO, "AUTO", 0, "Auto", ""},
@@ -52,6 +54,10 @@ EnumPropertyItem beztriple_interpolation_mode_items[] = {
#include "DNA_object_types.h"
#include "BKE_curve.h"
+#include "BKE_depsgraph.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
StructRNA *rna_Curve_refine(PointerRNA *ptr)
{
@@ -142,6 +148,15 @@ static void rna_BPoint_array_begin(CollectionPropertyIterator *iter, PointerRNA
rna_iterator_array_begin(iter, (void*)nu->bp, sizeof(BPoint*), nu->pntsv>0 ? nu->pntsu*nu->pntsv : nu->pntsu, 0, NULL);
}
+static void rna_Curve_update(bContext *C, PointerRNA *ptr)
+{
+ Scene *scene= CTX_data_scene(C);
+ Object *obedit= CTX_data_edit_object(C);
+
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, scene);
+}
+
#else
static void rna_def_bpoint(BlenderRNA *brna)
@@ -157,32 +172,38 @@ static void rna_def_bpoint(BlenderRNA *brna)
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f1", 0);
RNA_def_property_ui_text(prop, "Selected", "Selection status");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "hide", 0);
RNA_def_property_ui_text(prop, "Hidden", "Visibility status");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
/* Vector value */
prop= RNA_def_property(srna, "point", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_array(prop, 4);
RNA_def_property_float_sdna(prop, NULL, "vec");
RNA_def_property_ui_text(prop, "Point", "Point coordinates");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
/* Number values */
prop= RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alfa");
/*RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/
RNA_def_property_ui_text(prop, "Tilt", "Tilt in 3d View");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01f, 100.0f);
RNA_def_property_ui_text(prop, "Weight", "Softbody goal weight");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "bevel_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "radius");
/*RNA_def_property_range(prop, 0.0f, 1.0f);*/
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bevel Radius", "Radius for bevelling");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
}
static void rna_def_beztriple(BlenderRNA *brna)
@@ -198,67 +219,80 @@ static void rna_def_beztriple(BlenderRNA *brna)
prop= RNA_def_property(srna, "selected_handle1", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f1", 0);
RNA_def_property_ui_text(prop, "Handle 1 selected", "Handle 1 selection status");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "selected_handle2", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f3", 0);
RNA_def_property_ui_text(prop, "Handle 2 selected", "Handle 2 selection status");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "selected_control_point", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f2", 0);
RNA_def_property_ui_text(prop, "Control Point selected", "Control point selection status");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "hide", 0);
RNA_def_property_ui_text(prop, "Hidden", "Visibility status");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
/* Enums */
prop= RNA_def_property(srna, "handle1_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "h1");
RNA_def_property_enum_items(prop, beztriple_handle_type_items);
RNA_def_property_ui_text(prop, "Handle 1 Type", "Handle types");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "handle2_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "h2");
RNA_def_property_enum_items(prop, beztriple_handle_type_items);
RNA_def_property_ui_text(prop, "Handle 2 Type", "Handle types");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ipo");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items);
RNA_def_property_ui_text(prop, "Interpolation", "(For F-Curves Only) Interpolation to use for segment of curve starting from current BezTriple.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
/* Vector values */
prop= RNA_def_property(srna, "handle1", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_BezTriple_handle1_get", "rna_BezTriple_handle1_set", NULL);
RNA_def_property_ui_text(prop, "Handle 1", "Coordinates of the first handle");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "control_point", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_BezTriple_ctrlpoint_get", "rna_BezTriple_ctrlpoint_set", NULL);
RNA_def_property_ui_text(prop, "Control Point", "Coordinates of the control point");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "handle2", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_BezTriple_handle2_get", "rna_BezTriple_handle2_set", NULL);
RNA_def_property_ui_text(prop, "Handle 2", "Coordinates of the second handle");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
/* Number values */
prop= RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alfa");
/*RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/
RNA_def_property_ui_text(prop, "Tilt", "Tilt in 3d View");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01f, 100.0f);
RNA_def_property_ui_text(prop, "Weight", "Softbody goal weight");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "bevel_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "radius");
/*RNA_def_property_range(prop, 0.0f, 1.0f);*/
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bevel Radius", "Radius for bevelling");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
}
static void rna_def_path(BlenderRNA *brna, StructRNA *srna)
@@ -270,23 +304,28 @@ static void rna_def_path(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "pathlen");
RNA_def_property_range(prop, 1, 32767);
RNA_def_property_ui_text(prop, "Path Length", "If no speed IPO was set, the length of path in frames.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
/* flags */
prop= RNA_def_property(srna, "path", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_PATH);
RNA_def_property_ui_text(prop, "Path", "Enable the curve to become a translation path.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "follow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FOLLOW);
RNA_def_property_ui_text(prop, "Follow", "Make curve path children to rotate along the path.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "stretch", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_STRETCH);
RNA_def_property_ui_text(prop, "Stretch", "Option for curve-deform: makes deformed child to stretch along entire path.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "offset_path_distance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_OFFS_PATHDIST);
RNA_def_property_ui_text(prop, "Offset Path Distance", "Children will use TimeOffs value as path distance offset.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
}
static void rna_def_nurbs(BlenderRNA *brna, StructRNA *srna)
@@ -297,10 +336,12 @@ static void rna_def_nurbs(BlenderRNA *brna, StructRNA *srna)
prop= RNA_def_property(srna, "uv_orco", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_UV_ORCO);
RNA_def_property_ui_text(prop, "UV Orco", "Forces to use UV coordinates for texture mapping 'orco'.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "vertex_normal_flip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CU_NOPUNOFLIP);
RNA_def_property_ui_text(prop, "Vertex Normal Flip", "Flip vertex normals towards the camera during render");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
}
static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
@@ -319,52 +360,62 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
prop= RNA_def_property(srna, "spacemode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_align_items);
RNA_def_property_ui_text(prop, "Text Align", "Text align from the object center.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
/* number values */
prop= RNA_def_property(srna, "text_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fsize");
RNA_def_property_range(prop, 0.1f, 10.0f);
RNA_def_property_ui_text(prop, "Font size", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "line_dist", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "linedist");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Distance between lines of text", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "word_spacing", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "wordspace");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Spacing between words", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "spacing", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spacing");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Global spacing between characters", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "shear", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shear");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shear", "Italic angle of the characters");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "x_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "X Offset", "Horizontal offset from the object center");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "y_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "Y Offset", "Vertical offset from the object center");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "ul_position", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ulpos");
RNA_def_property_range(prop, -0.2f, 0.8f);
RNA_def_property_ui_text(prop, "Underline position", "Vertical position of underline");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "ul_height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ulheight");
RNA_def_property_range(prop, -0.2f, 0.8f);
RNA_def_property_ui_text(prop, "Underline thickness", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "active_textbox", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "actbox");
@@ -375,6 +426,7 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
prop= RNA_def_property(srna, "family", PROP_STRING, PROP_NONE);
RNA_def_property_string_maxlength(prop, 21);
RNA_def_property_ui_text(prop, "Family", "Blender uses font from selfmade objects.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "str", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "str");
@@ -388,14 +440,17 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_pointer_sdna(prop, NULL, "textoncurve");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Text on Curve", "Curve deforming text object.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "font", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "vfont");
RNA_def_property_ui_text(prop, "Font", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "textbox", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tb");
RNA_def_property_ui_text(prop, "Textbox", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "edit_format", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curinfo");
@@ -420,21 +475,25 @@ static void rna_def_textbox(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "x");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "Textbox X Offset", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "y");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "Textbox Y Offset", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "w");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Textbox Width", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "h");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Textbox Height", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
}
static void rna_def_charinfo(BlenderRNA *brna)
@@ -450,22 +509,27 @@ static void rna_def_charinfo(BlenderRNA *brna)
prop= RNA_def_property(srna, "style", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_STYLE);
RNA_def_property_ui_text(prop, "Style", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "bold", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_BOLD);
RNA_def_property_ui_text(prop, "Bold", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "italic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_ITALIC);
RNA_def_property_ui_text(prop, "Italic", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "underline", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_UNDERLINE);
RNA_def_property_ui_text(prop, "Underline", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_WRAP);
RNA_def_property_ui_text(prop, "Wrap", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
}
static void rna_def_surface(BlenderRNA *brna)
@@ -523,31 +587,37 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 32);
RNA_def_property_ui_range(prop, 0, 32, 1.0, 0);
RNA_def_property_ui_text(prop, "Bevel Resolution", "Bevel resolution when depth is non-zero and no specific bevel object has been defined.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "width");
RNA_def_property_ui_range(prop, 0, 2.0, 0.1, 0);
RNA_def_property_ui_text(prop, "Width", "Scale the original width (1.0) based on given factor.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "extrude", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ext1");
RNA_def_property_ui_range(prop, 0, 100.0, 0.1, 0);
RNA_def_property_ui_text(prop, "Extrude", "Amount of curve extrusion when not using a bevel object.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "bevel_depth", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ext2");
RNA_def_property_ui_range(prop, 0, 100.0, 0.1, 0);
RNA_def_property_ui_text(prop, "Bevel Depth", "Bevel depth when not using a bevel object.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolu");
RNA_def_property_ui_range(prop, 1, 1024, 1, 0);
RNA_def_property_ui_text(prop, "Resolution U", "Surface resolution in U direction.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolv");
RNA_def_property_ui_range(prop, 1, 1024, 1, 0);
RNA_def_property_ui_text(prop, "Resolution V", "Surface resolution in V direction.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "render_resolution_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolu_ren");
@@ -563,34 +633,41 @@ static void rna_def_curve(BlenderRNA *brna)
prop= RNA_def_property(srna, "eval_time", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ctime");
RNA_def_property_ui_text(prop, "Evaluation Time", "Parametric position along the length of the curve that Objects 'following' it should be at.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
/* pointers */
prop= RNA_def_property(srna, "bevel_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bevobj");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bevel Object", "Curve object name that defines the bevel shape.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "taper_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "taperobj");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Taper Object", "Curve object name that defines the taper (width).");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
/* Flags */
prop= RNA_def_property(srna, "curve_2d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CU_3D);
RNA_def_property_ui_text(prop, "2D Curve", "Define curve in two dimensions only. Note that fill only works when this is enabled.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "front", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FRONT);
RNA_def_property_ui_text(prop, "Front", "Draw filled front for extruded/beveled curves.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "back", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_BACK);
RNA_def_property_ui_text(prop, "Back", "Draw filled back for extruded/beveled curves.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
prop= RNA_def_property(srna, "retopo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_RETOPO);
RNA_def_property_ui_text(prop, "Retopo", "Turn on the re-topology tool.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update");
}
static void rna_def_curve_nurb(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index eb908bcd2bd..87efe6c39c0 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -641,8 +641,8 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_fadeto_mir_items[] = {
- {MA_RAYMIR_FADETOSKY, "FADE_TO_SKY", 0, "Fade to Sky Color", ""},
- {MA_RAYMIR_FADETOMAT, "FADE_TO_MATERIAL", 0, "Fade to Material Color", ""},
+ {MA_RAYMIR_FADETOSKY, "FADE_TO_SKY", 0, "Sky", ""},
+ {MA_RAYMIR_FADETOMAT, "FADE_TO_MATERIAL", 0, "Material", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MaterialRaytraceMirror", NULL);
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index df26e6b8121..e142bc4b2aa 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -37,6 +37,7 @@
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
+#include "BKE_mball.h"
#include "BKE_depsgraph.h"
#include "WM_types.h"
@@ -51,6 +52,24 @@ static int rna_Meta_texspace_editable(PointerRNA *ptr)
static void rna_MetaBall_update_data(bContext *C, PointerRNA *ptr)
{
Scene *scene= CTX_data_scene(C);
+ Object *active_object = CTX_data_active_object(C);
+ Object *obedit= CTX_data_edit_object(C);
+
+ if(obedit) {
+ copy_mball_properties(scene, obedit);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ }
+ else if(active_object) {
+ copy_mball_properties(scene, active_object);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, active_object);
+ DAG_object_flush_update(scene, active_object, OB_RECALC_DATA);
+ }
+}
+
+static void rna_MetaElem_update_data(bContext *C, PointerRNA *ptr)
+{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
@@ -80,59 +99,59 @@ void rna_def_metaelement(BlenderRNA *brna)
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", "Metaball types.");
- RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
+ RNA_def_property_update(prop, 0, "rna_MetaElem_update_data");
/* number values */
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_float_sdna(prop, NULL, "x");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Location", "");
- RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
+ RNA_def_property_update(prop, 0, "rna_MetaElem_update_data");
prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ROTATION);
RNA_def_property_float_sdna(prop, NULL, "quat");
RNA_def_property_ui_text(prop, "Rotation", "");
- RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
+ RNA_def_property_update(prop, 0, "rna_MetaElem_update_data");
prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "rad");
RNA_def_property_ui_text(prop, "Radius", "");
- RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
+ RNA_def_property_update(prop, 0, "rna_MetaElem_update_data");
prop= RNA_def_property(srna, "sizex", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "expx");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Size X", "Size of element, use of components depends on element type.");
- RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
+ RNA_def_property_update(prop, 0, "rna_MetaElem_update_data");
prop= RNA_def_property(srna, "sizey", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "expy");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Size Y", "Size of element, use of components depends on element type.");
- RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
+ RNA_def_property_update(prop, 0, "rna_MetaElem_update_data");
prop= RNA_def_property(srna, "sizez", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "expz");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Size Z", "Size of element, use of components depends on element type.");
- RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
+ RNA_def_property_update(prop, 0, "rna_MetaElem_update_data");
prop= RNA_def_property(srna, "stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "s");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Stiffness", "Stiffness defines how much of the element to fill.");
- RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
+ RNA_def_property_update(prop, 0, "rna_MetaElem_update_data");
/* flags */
prop= RNA_def_property(srna, "negative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MB_NEGATIVE);
RNA_def_property_ui_text(prop, "Negative", "Set metaball as negative one.");
- RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
+ RNA_def_property_update(prop, 0, "rna_MetaElem_update_data");
prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MB_HIDE);
RNA_def_property_ui_text(prop, "Hide", "Hide element.");
- RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
+ RNA_def_property_update(prop, 0, "rna_MetaElem_update_data");
}
void rna_def_metaball(BlenderRNA *brna)
@@ -176,6 +195,7 @@ void rna_def_metaball(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "rendersize");
RNA_def_property_range(prop, 0.050f, 1.0f);
RNA_def_property_ui_text(prop, "Render Size", "Polygonization resolution in rendering.");
+ RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
prop= RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "thresh");
@@ -185,6 +205,9 @@ void rna_def_metaball(BlenderRNA *brna)
/* materials, textures */
rna_def_texmat_common(srna, "rna_Meta_texspace_editable");
+
+ /* anim */
+ rna_def_animdata_common(srna);
}
void RNA_def_meta(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 5192e2df611..9771e83468b 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -34,6 +34,7 @@
#include "DNA_armature_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
+#include "DNA_object_force.h"
#include "DNA_scene_types.h"
#include "BKE_bmesh.h" /* For BevelModifierData */
@@ -61,7 +62,7 @@ EnumPropertyItem modifier_type_items[] ={
{eModifierType_Mask, "MASK", ICON_MOD_MASK, "Mask", ""},
{eModifierType_MeshDeform, "MESH_DEFORM", ICON_MOD_MESHDEFORM, "Mesh Deform", ""},
{eModifierType_Mirror, "MIRROR", ICON_MOD_MIRROR, "Mirror", ""},
- {eModifierType_Multires, "MULTIRES", ICON_MOD_MULTIRES, "Multires", ""},
+ {eModifierType_Multires, "MULTIRES", ICON_MOD_MULTIRES, "Multiresolution", ""},
{eModifierType_ParticleInstance, "PARTICLE_INSTANCE", ICON_MOD_PARTICLES, "Particle Instance", ""},
{eModifierType_ParticleSystem, "PARTICLE_SYSTEM", ICON_MOD_PARTICLES, "Particle System", ""},
{eModifierType_Shrinkwrap, "SHRINKWRAP", ICON_MOD_SHRINKWRAP, "Shrinkwrap", ""},
@@ -69,7 +70,7 @@ EnumPropertyItem modifier_type_items[] ={
{eModifierType_Smoke, "SMOKE", 0, "Smoke", ""},
{eModifierType_Smooth, "SMOOTH", ICON_MOD_SMOOTH, "Smooth", ""},
{eModifierType_Softbody, "SOFTBODY", ICON_MOD_SOFT, "Soft Body", ""},
- {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subsurf", ""},
+ {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""},
{eModifierType_Surface, "SURFACE", ICON_MOD_PHYSICS, "Surface", ""},
{eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""},
{eModifierType_Wave, "WAVE", ICON_MOD_WAVE, "Wave", ""},
@@ -383,6 +384,12 @@ static PointerRNA rna_SoftBodyModifier_settings_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_SoftBodySettings, ob->soft);
}
+static PointerRNA rna_SoftBodyModifier_point_cache_get(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+ return rna_pointer_inherit_refine(ptr, &RNA_PointCache, ob->soft->pointcache);
+}
+
static PointerRNA rna_CollisionModifier_settings_get(PointerRNA *ptr)
{
Object *ob= (Object*)ptr->id.data;
@@ -883,6 +890,11 @@ static void rna_def_modifier_softbody(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "SoftBodySettings");
RNA_def_property_pointer_funcs(prop, "rna_SoftBodyModifier_settings_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Soft Body Settings", "");
+
+ prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "PointCache");
+ RNA_def_property_pointer_funcs(prop, "rna_SoftBodyModifier_point_cache_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Soft Body Point Cache", "");
}
static void rna_def_modifier_boolean(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 215a1e71e0d..e229afedc62 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -171,91 +171,91 @@ static void rna_Cache_idname_change(bContext *C, PointerRNA *ptr)
static int rna_SoftBodySettings_use_edges_get(PointerRNA *ptr)
{
- Object *data= (Object*)(ptr->data);
+ Object *data= (Object*)(ptr->id.data);
return (((data->softflag) & OB_SB_EDGES) != 0);
}
static void rna_SoftBodySettings_use_edges_set(PointerRNA *ptr, int value)
{
- Object *data= (Object*)(ptr->data);
+ Object *data= (Object*)(ptr->id.data);
if(value) data->softflag |= OB_SB_EDGES;
else data->softflag &= ~OB_SB_EDGES;
}
static int rna_SoftBodySettings_use_goal_get(PointerRNA *ptr)
{
- Object *data= (Object*)(ptr->data);
+ Object *data= (Object*)(ptr->id.data);
return (((data->softflag) & OB_SB_GOAL) != 0);
}
static void rna_SoftBodySettings_use_goal_set(PointerRNA *ptr, int value)
{
- Object *data= (Object*)(ptr->data);
+ Object *data= (Object*)(ptr->id.data);
if(value) data->softflag |= OB_SB_GOAL;
else data->softflag &= ~OB_SB_GOAL;
}
static int rna_SoftBodySettings_stiff_quads_get(PointerRNA *ptr)
{
- Object *data= (Object*)(ptr->data);
+ Object *data= (Object*)(ptr->id.data);
return (((data->softflag) & OB_SB_QUADS) != 0);
}
static void rna_SoftBodySettings_stiff_quads_set(PointerRNA *ptr, int value)
{
- Object *data= (Object*)(ptr->data);
+ Object *data= (Object*)(ptr->id.data);
if(value) data->softflag |= OB_SB_QUADS;
else data->softflag &= ~OB_SB_QUADS;
}
static int rna_SoftBodySettings_self_collision_get(PointerRNA *ptr)
{
- Object *data= (Object*)(ptr->data);
+ Object *data= (Object*)(ptr->id.data);
return (((data->softflag) & OB_SB_SELF) != 0);
}
static void rna_SoftBodySettings_self_collision_set(PointerRNA *ptr, int value)
{
- Object *data= (Object*)(ptr->data);
+ Object *data= (Object*)(ptr->id.data);
if(value) data->softflag |= OB_SB_SELF;
else data->softflag &= ~OB_SB_SELF;
}
static int rna_SoftBodySettings_new_aero_get(PointerRNA *ptr)
{
- Object *data= (Object*)(ptr->data);
+ Object *data= (Object*)(ptr->id.data);
return (((data->softflag) & OB_SB_AERO_ANGLE) != 0);
}
static void rna_SoftBodySettings_new_aero_set(PointerRNA *ptr, int value)
{
- Object *data= (Object*)(ptr->data);
+ Object *data= (Object*)(ptr->id.data);
if(value) data->softflag |= OB_SB_AERO_ANGLE;
else data->softflag &= ~OB_SB_AERO_ANGLE;
}
static int rna_SoftBodySettings_face_collision_get(PointerRNA *ptr)
{
- Object *data= (Object*)(ptr->data);
+ Object *data= (Object*)(ptr->id.data);
return (((data->softflag) & OB_SB_FACECOLL) != 0);
}
static void rna_SoftBodySettings_face_collision_set(PointerRNA *ptr, int value)
{
- Object *data= (Object*)(ptr->data);
+ Object *data= (Object*)(ptr->id.data);
if(value) data->softflag |= OB_SB_FACECOLL;
else data->softflag &= ~OB_SB_FACECOLL;
}
static int rna_SoftBodySettings_edge_collision_get(PointerRNA *ptr)
{
- Object *data= (Object*)(ptr->data);
+ Object *data= (Object*)(ptr->id.data);
return (((data->softflag) & OB_SB_EDGECOLL) != 0);
}
static void rna_SoftBodySettings_edge_collision_set(PointerRNA *ptr, int value)
{
- Object *data= (Object*)(ptr->data);
+ Object *data= (Object*)(ptr->id.data);
if(value) data->softflag |= OB_SB_EDGECOLL;
else data->softflag &= ~OB_SB_EDGECOLL;
}
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 0963f2483f3..0148ce819d4 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -58,6 +58,11 @@ static void rna_Pose_update(bContext *C, PointerRNA *ptr)
DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA);
}
+static char *rna_PoseChannel_path(PointerRNA *ptr)
+{
+ return BLI_sprintfN("pose.pose_channels[\"%s\"]", ((bPoseChannel*)ptr->data)->name);
+}
+
static void rna_BoneGroup_color_set_set(PointerRNA *ptr, int value)
{
bActionGroup *grp= ptr->data;
@@ -297,6 +302,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
srna= RNA_def_struct(brna, "PoseChannel", NULL);
RNA_def_struct_sdna(srna, "bPoseChannel");
RNA_def_struct_ui_text(srna, "Pose Channel", "Channel defining pose data for a bone in a Pose.");
+ RNA_def_struct_path_func(srna, "rna_PoseChannel_path");
RNA_def_struct_idproperties_func(srna, "rna_PoseChannel_idproperties");
prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index a4e2c39ecd8..cedbc992dde 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -118,8 +118,8 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
static EnumPropertyItem prop_noise_type_items[] = {
{MOD_SMOKE_NOISEWAVE, "NOISEWAVE", 0, "Wavelet", ""},
- {MOD_SMOKE_NOISEFFT, "NOISEFFT", 0, "FFT", ""},
- {MOD_SMOKE_NOISECURL, "NOISECURL", 0, "Curl", ""},
+ /* {MOD_SMOKE_NOISEFFT, "NOISEFFT", 0, "FFT", ""}, */
+ /* {MOD_SMOKE_NOISECURL, "NOISECURL", 0, "Curl", ""}, */
{0, NULL, 0, NULL, NULL}};
srna = RNA_def_struct(brna, "SmokeDomainSettings", NULL);
@@ -129,8 +129,8 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "maxres", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxres");
- RNA_def_property_range(prop, 32, 512);
- RNA_def_property_ui_range(prop, 32, 512, 2, 0);
+ RNA_def_property_range(prop, 24, 512);
+ RNA_def_property_ui_range(prop, 24, 512, 2, 0);
RNA_def_property_ui_text(prop, "Max Res", "Maximal resolution used in the fluid domain.");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
@@ -233,13 +233,10 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Particle Systems", "Particle systems emitted from the object.");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy");
- prop= RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VECTOR);
- RNA_def_property_float_sdna(prop, NULL, "velocity");
- RNA_def_property_range(prop, -10, 10);
- RNA_def_property_ui_range(prop, -10, 10, 1, 1);
- RNA_def_property_ui_text(prop, "Velocity", "");
+ prop= RNA_def_property(srna, "outflow", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "type", MOD_SMOKE_FLOW_TYPE_OUTFLOW);
+ RNA_def_property_ui_text(prop, "Outflow", "Deletes smoke from simulation");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
-
}
static void rna_def_smoke_coll_settings(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 224e6643944..694f980e5e9 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -1178,19 +1178,19 @@ static void rna_def_texture(BlenderRNA *brna)
static EnumPropertyItem prop_type_items[] = {
{0, "NONE", 0, "None", ""},
- {TEX_CLOUDS, "CLOUDS", 0, "Clouds", ""},
- {TEX_WOOD, "WOOD", 0, "Wood", ""},
- {TEX_MARBLE, "MARBLE", 0, "Marble", ""},
- {TEX_MAGIC, "MAGIC", 0, "Magic", ""},
- {TEX_BLEND, "BLEND", 0, "Blend", ""},
- {TEX_STUCCI, "STUCCI", 0, "Stucci", ""},
- {TEX_NOISE, "NOISE", 0, "Noise", ""},
- {TEX_IMAGE, "IMAGE", 0, "Image or Movie", ""},
- {TEX_PLUGIN, "PLUGIN", 0, "Plugin", ""},
- {TEX_ENVMAP, "ENVIRONMENT_MAP", 0, "Environment Map", ""},
- {TEX_MUSGRAVE, "MUSGRAVE", 0, "Musgrave", ""},
- {TEX_VORONOI, "VORONOI", 0, "Voronoi", ""},
- {TEX_DISTNOISE, "DISTORTED_NOISE", 0, "Distorted Noise", ""},
+ {TEX_PLUGIN, "PLUGIN", ICON_CONSTRAINT, "Plugin", ""},
+ {TEX_IMAGE, "IMAGE", ICON_RENDER_RESULT, "Image or Movie", ""},
+ {TEX_ENVMAP, "ENVIRONMENT_MAP", ICON_RENDER_RESULT, "Environment Map", ""},
+ {TEX_CLOUDS, "CLOUDS", ICON_TEXTURE, "Clouds", ""},
+ {TEX_WOOD, "WOOD", ICON_TEXTURE, "Wood", ""},
+ {TEX_MARBLE, "MARBLE", ICON_TEXTURE, "Marble", ""},
+ {TEX_MAGIC, "MAGIC", ICON_TEXTURE, "Magic", ""},
+ {TEX_BLEND, "BLEND", ICON_TEXTURE, "Blend", ""},
+ {TEX_STUCCI, "STUCCI", ICON_TEXTURE, "Stucci", ""},
+ {TEX_NOISE, "NOISE", ICON_TEXTURE, "Noise", ""},
+ {TEX_MUSGRAVE, "MUSGRAVE", ICON_TEXTURE, "Musgrave", ""},
+ {TEX_VORONOI, "VORONOI", ICON_TEXTURE, "Voronoi", ""},
+ {TEX_DISTNOISE, "DISTORTED_NOISE", ICON_TEXTURE, "Distorted Noise", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Texture", "ID");
@@ -1200,10 +1200,12 @@ static void rna_def_texture(BlenderRNA *brna)
RNA_def_struct_refine_func(srna, "rna_Texture_refine");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ //RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", "");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
+
prop= RNA_def_property(srna, "use_color_ramp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_COLORBAND);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Texture_use_color_ramp_set");
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 6a251ad7724..4744288f3a9 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -48,6 +48,7 @@
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_writeavi.h" /* <------ should be replaced once with generic movie module */
+#include "BKE_sequence.h"
#include "BKE_pointcache.h"
#include "MEM_guardedalloc.h"
@@ -2303,6 +2304,63 @@ static void renderresult_stampinfo(Scene *scene)
BKE_stamp_buf(scene, (unsigned char *)rres.rect32, rres.rectf, rres.rectx, rres.recty, 4);
}
+static void do_render_seq(Render * re)
+{
+ static int recurs_depth = 0;
+ struct ImBuf *ibuf;
+ RenderResult *rr = re->result;
+ int cfra = re->r.cfra;
+
+ recurs_depth++;
+
+ ibuf= give_ibuf_seq(re->scene, rr->rectx, rr->recty, cfra, 0, 100.0);
+
+ recurs_depth--;
+
+ if(ibuf) {
+ if(ibuf->rect_float) {
+ if (!rr->rectf)
+ rr->rectf= MEM_mallocN(4*sizeof(float)*rr->rectx*rr->recty, "render_seq rectf");
+
+ memcpy(rr->rectf, ibuf->rect_float, 4*sizeof(float)*rr->rectx*rr->recty);
+
+ /* TSK! Since sequence render doesn't free the *rr render result, the old rect32
+ can hang around when sequence render has rendered a 32 bits one before */
+ if(rr->rect32) {
+ MEM_freeN(rr->rect32);
+ rr->rect32= NULL;
+ }
+ }
+ else if(ibuf->rect) {
+ if (!rr->rect32)
+ rr->rect32= MEM_mallocN(sizeof(int)*rr->rectx*rr->recty, "render_seq rect");
+
+ memcpy(rr->rect32, ibuf->rect, 4*rr->rectx*rr->recty);
+
+ /* if (ibuf->zbuf) { */
+ /* if (R.rectz) freeN(R.rectz); */
+ /* R.rectz = BLI_dupallocN(ibuf->zbuf); */
+ /* } */
+ }
+
+ if (recurs_depth == 0) { /* with nested scenes, only free on toplevel... */
+ Editing * ed = re->scene->ed;
+ if (ed) {
+ free_imbuf_seq(&ed->seqbase, TRUE);
+ }
+ }
+ }
+ else {
+ /* render result is delivered empty in most cases, nevertheless we handle all cases */
+ if (rr->rectf)
+ memset(rr->rectf, 0, 4*sizeof(float)*rr->rectx*rr->recty);
+ else if (rr->rect32)
+ memset(rr->rect32, 0, 4*rr->rectx*rr->recty);
+ else
+ rr->rect32= MEM_callocN(sizeof(int)*rr->rectx*rr->recty, "render_seq rect");
+ }
+}
+
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* main loop: doing sequence + fields + blur + 3d render + compositing */
@@ -2316,7 +2374,7 @@ static void do_render_all_options(Render *re)
if((re->r.scemode & R_DOSEQ) && re->scene->ed && re->scene->ed->seqbase.first) {
/* note: do_render_seq() frees rect32 when sequencer returns float images */
if(!re->test_break(re->tbh))
- {}; //XXX do_render_seq(re->result, re->r.cfra);
+ do_render_seq(re);
re->stats_draw(re->sdh, &re->i);
re->display_draw(re->ddh, re->result, NULL);
diff --git a/source/gameengine/BlenderRoutines/Makefile b/source/gameengine/BlenderRoutines/Makefile
index ffa99a0c1b2..35f498aba92 100644
--- a/source/gameengine/BlenderRoutines/Makefile
+++ b/source/gameengine/BlenderRoutines/Makefile
@@ -38,7 +38,6 @@ CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(NAN_STRING)/include
CPPFLAGS += -I$(NAN_MOTO)/include
-CPPFLAGS += -I$(NAN_FUZZICS)/include
CPPFLAGS += -I$(NAN_SOUNDSYSTEM)/include
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 79ab27bee6b..f1e8d840ae8 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -1795,7 +1795,6 @@ static KX_GameObject *gameobject_from_blenderobject(
}
if (gameobj)
{
- gameobj->SetPhysicsEnvironment(kxscene->GetPhysicsEnvironment());
gameobj->SetLayer(ob->lay);
gameobj->SetBlenderObject(ob);
/* set the visibility state based on the objects render option in the outliner */
diff --git a/source/gameengine/Converter/Makefile b/source/gameengine/Converter/Makefile
index ed95aa968c7..8a41207d73c 100644
--- a/source/gameengine/Converter/Makefile
+++ b/source/gameengine/Converter/Makefile
@@ -39,7 +39,7 @@ CPPFLAGS += -I$(OPENGL_HEADERS)
CPPFLAGS += -I$(NAN_STRING)/include
CPPFLAGS += -I$(NAN_SOUNDSYSTEM)/include
CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
-CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_MOTO)/include
+CPPFLAGS += -I$(NAN_MOTO)/include
CPPFLAGS += -I$(NAN_BULLET2)/include
CPPFLAGS += -I../../blender
diff --git a/source/gameengine/GamePlayer/common/CMakeLists.txt b/source/gameengine/GamePlayer/common/CMakeLists.txt
index ce1cd217f60..1b31f2ff0bb 100644
--- a/source/gameengine/GamePlayer/common/CMakeLists.txt
+++ b/source/gameengine/GamePlayer/common/CMakeLists.txt
@@ -70,7 +70,6 @@ SET(INC
../../../../source/blender/gpu
../../../../extern/glew/include
${PYTHON_INC}
- ${SOLID_INC}
${PNG_INC}
${ZLIB_INC}
)
diff --git a/source/gameengine/GamePlayer/common/Makefile b/source/gameengine/GamePlayer/common/Makefile
index 4a952856739..218227c55e9 100644
--- a/source/gameengine/GamePlayer/common/Makefile
+++ b/source/gameengine/GamePlayer/common/Makefile
@@ -47,7 +47,6 @@ CPPFLAGS += -I../../../blender/gpu
CPPFLAGS += -I../../../kernel/gen_system
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
-CPPFLAGS += -I$(NAN_FUZZICS)/include
CPPFLAGS += -I$(NAN_STRING)/include
CPPFLAGS += -I$(NAN_MOTO)/include
CPPFLAGS += -I$(NAN_PNG)/include
diff --git a/source/gameengine/GamePlayer/common/unix/Makefile b/source/gameengine/GamePlayer/common/unix/Makefile
index 08c52ddc904..e024ebd65f9 100644
--- a/source/gameengine/GamePlayer/common/unix/Makefile
+++ b/source/gameengine/GamePlayer/common/unix/Makefile
@@ -56,7 +56,6 @@ CPPFLAGS += -I../../../../gameengine/Rasterizer
CPPFLAGS += -I../../../../gameengine/Rasterizer/RAS_OpenGLRasterizer
CPPFLAGS += -I../../../../gameengine/SceneGraph
-CPPFLAGS += -I$(NAN_FUZZICS)/include
CPPFLAGS += -I$(NAN_SOUNDSYSTEM)/include
CPPFLAGS += -I$(NAN_MOTO)/include
diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
index d09eae647c8..0d69da83081 100644
--- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
+++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
@@ -36,6 +36,7 @@
#include "MT_Matrix3x3.h"
#include "KX_GameObject.h"
#include "KX_RayCast.h"
+#include "KX_PythonInit.h" // KX_GetActiveScene
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -327,7 +328,7 @@ bool KX_ConstraintActuator::Update(double curtime, bool frame)
}
{
MT_Point3 topoint = position + (m_maximumBound) * direction;
- PHY_IPhysicsEnvironment* pe = obj->GetPhysicsEnvironment();
+ PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment();
KX_IPhysicsController *spc = obj->GetPhysicsController();
if (!pe) {
@@ -440,7 +441,7 @@ bool KX_ConstraintActuator::Update(double curtime, bool frame)
}
normal.normalize();
{
- PHY_IPhysicsEnvironment* pe = obj->GetPhysicsEnvironment();
+ PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment();
KX_IPhysicsController *spc = obj->GetPhysicsController();
if (!pe) {
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 170b7405145..fa3a336466c 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -101,7 +101,6 @@ KX_GameObject::KX_GameObject(
m_bOccluder(false),
m_pPhysicsController1(NULL),
m_pGraphicController(NULL),
- m_pPhysicsEnvironment(NULL),
m_xray(false),
m_pHitObject(NULL),
m_isDeformable(false),
@@ -2693,8 +2692,7 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCastTo,
toDir.normalize();
toPoint = fromPoint + (dist) * toDir;
}
-
- PHY_IPhysicsEnvironment* pe = GetPhysicsEnvironment();
+ PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment();
KX_IPhysicsController *spc = GetPhysicsController();
KX_GameObject *parent = GetParent();
if (!spc && parent)
@@ -2821,7 +2819,7 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCast,
return none_tuple_3();
}
- PHY_IPhysicsEnvironment* pe = GetPhysicsEnvironment();
+ PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment();
KX_IPhysicsController *spc = GetPhysicsController();
KX_GameObject *parent = GetParent();
if (!spc && parent)
diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h
index b235464259f..ba7451fdeef 100644
--- a/source/gameengine/Ketsji/KX_GameObject.h
+++ b/source/gameengine/Ketsji/KX_GameObject.h
@@ -98,8 +98,6 @@ protected:
KX_IPhysicsController* m_pPhysicsController1;
PHY_IGraphicController* m_pGraphicController;
- // used for ray casting
- PHY_IPhysicsEnvironment* m_pPhysicsEnvironment;
STR_String m_testPropName;
bool m_xray;
KX_GameObject* m_pHitObject;
@@ -337,20 +335,6 @@ public:
bool ang_vel_local
);
-
- /**
- * @return a pointer to the physics environment in use during the game, for rayCasting
- */
- PHY_IPhysicsEnvironment* GetPhysicsEnvironment()
- {
- return m_pPhysicsEnvironment;
- }
-
- void SetPhysicsEnvironment(PHY_IPhysicsEnvironment* physicsEnvironment)
- {
- m_pPhysicsEnvironment = physicsEnvironment;
- }
-
/**
* @return a pointer to the physics controller owned by this class.
*/
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index 3932a5a520d..fccaf4314f5 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -1585,11 +1585,6 @@ void KX_Scene::SetGravity(const MT_Vector3& gravity)
GetPhysicsEnvironment()->setGravity(gravity[0],gravity[1],gravity[2]);
}
-void KX_Scene::SetNodeTree(SG_Tree* root)
-{
- m_objecttree = root;
-}
-
void KX_Scene::SetSceneConverter(class KX_BlenderSceneConverter* sceneConverter)
{
m_sceneConverter = sceneConverter;
diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h
index c6031a515e4..c5aad07f5ca 100644
--- a/source/gameengine/Ketsji/KX_Scene.h
+++ b/source/gameengine/Ketsji/KX_Scene.h
@@ -120,10 +120,6 @@ protected:
// the Qlist is for objects that needs to be rescheduled
// for updates after udpate is over (slow parent, bone parent)
- /**
- * The tree of objects in the scene.
- */
- SG_Tree* m_objecttree;
/**
* The set of cameras for this scene
diff --git a/source/gameengine/Ketsji/Makefile b/source/gameengine/Ketsji/Makefile
index 8e91eb6ff9a..1c315350895 100644
--- a/source/gameengine/Ketsji/Makefile
+++ b/source/gameengine/Ketsji/Makefile
@@ -44,8 +44,7 @@ CPPFLAGS += -I../../blender/python
CPPFLAGS += -I../../blender/python/generic
CPPFLAGS += -I$(NAN_STRING)/include
CPPFLAGS += -I$(NAN_SOUNDSYSTEM)/include
-CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_MOTO)/include
-CPPFLAGS += -I$(NAN_SOLID)/include
+CPPFLAGS += -I$(NAN_MOTO)/include
CPPFLAGS += -I$(NAN_BULLET2)/include
CPPFLAGS += -I../Rasterizer/RAS_OpenGLRasterizer
CPPFLAGS += -I../Rasterizer -I../GameLogic -I../SceneGraph
diff --git a/source/gameengine/Physics/Dummy/Makefile b/source/gameengine/Physics/Dummy/Makefile
index c016a0bebcb..0e36266ae09 100644
--- a/source/gameengine/Physics/Dummy/Makefile
+++ b/source/gameengine/Physics/Dummy/Makefile
@@ -39,7 +39,7 @@ CPPFLAGS += -I$(OPENGL_HEADERS)
CPPFLAGS += -I$(NAN_STRING)/include
CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
-CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_MOTO)/include
+CPPFLAGS += -I$(NAN_MOTO)/include
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I../../Physics/common
CPPFLAGS += -I../../Physics/Dummy
diff --git a/source/gameengine/Physics/common/Makefile b/source/gameengine/Physics/common/Makefile
index f2dd0134b71..f21df7ef1ed 100644
--- a/source/gameengine/Physics/common/Makefile
+++ b/source/gameengine/Physics/common/Makefile
@@ -40,7 +40,7 @@ CPPFLAGS += -I$(NAN_STRING)/include
CPPFLAGS += -I$(NAN_SOUNDSYSTEM)/include
CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
-CPPFLAGS += -I$(NAN_FUZZICS)/include -I$(NAN_MOTO)/include
+CPPFLAGS += -I$(NAN_MOTO)/include
CPPFLAGS += -I../../blender
# these two needed because of blenkernel
CPPFLAGS += -I../../blender/makesdna
diff --git a/source/gameengine/Rasterizer/RAS_BucketManager.cpp b/source/gameengine/Rasterizer/RAS_BucketManager.cpp
index 200b1c6c89f..8b3c4990a7a 100644
--- a/source/gameengine/Rasterizer/RAS_BucketManager.cpp
+++ b/source/gameengine/Rasterizer/RAS_BucketManager.cpp
@@ -126,10 +126,7 @@ void RAS_BucketManager::OrderBuckets(const MT_Transform& cameratrans, BucketList
RAS_MaterialBucket* bucket = *bit;
RAS_MeshSlot* ms;
// remove the mesh slot form the list, it culls them automatically for next frame
- for(ms = bucket->GetNextActiveMeshSlot();
- ms!= NULL;
- ms = bucket->GetNextActiveMeshSlot())
- {
+ while((ms = bucket->GetNextActiveMeshSlot())) {
slots[i++].set(ms, bucket, pnorm);
}
}
@@ -179,9 +176,7 @@ void RAS_BucketManager::RenderSolidBuckets(
RAS_MaterialBucket* bucket = *bit;
RAS_MeshSlot* ms;
// remove the mesh slot form the list, it culls them automatically for next frame
- for(ms = bucket->GetNextActiveMeshSlot();
- ms!= NULL;
- ms = bucket->GetNextActiveMeshSlot())
+ while((ms = bucket->GetNextActiveMeshSlot()))
{
rendertools->SetClientObject(rasty, ms->m_clientObj);
while (bucket->ActivateMaterial(cameratrans, rasty, rendertools))
diff --git a/source/nan_compile.mk b/source/nan_compile.mk
index bc264fe5c1d..4a4e472fa66 100644
--- a/source/nan_compile.mk
+++ b/source/nan_compile.mk
@@ -39,8 +39,6 @@ CPPFLAGS ?= $(NAN_CPPFLAGS)
# Uncomment next lines to enable integrated game engine
ifneq ($(NAN_NO_KETSJI), true)
CFLAGS += -DGAMEBLENDER=1
- CFLAGS += -DUSE_SUMO_SOLID
- CCFLAGS += -DUSE_SUMO_SOLID
ifeq ($(NAN_USE_BULLET), true)
CFLAGS += -DUSE_BULLET -DWITH_BULLET
CCFLAGS += -DUSE_BULLET -DWITH_BULLET
diff --git a/source/nan_definitions.mk b/source/nan_definitions.mk
index fcda8ca924e..08afa8a1594 100644
--- a/source/nan_definitions.mk
+++ b/source/nan_definitions.mk
@@ -81,18 +81,9 @@ ifndef CONFIG_GUESS
endif
export NAN_MOTO ?= $(LCGDIR)/moto
-ifeq ($(FREE_WINDOWS), true)
- export NAN_SOLID ?= $(LCGDIR)/gcc/solid
- export NAN_QHULL ?= $(LCGDIR)/gcc/qhull
-else
- export NAN_SOLID ?= $(LCGDIR)/solid
- export NAN_QHULL ?= $(LCGDIR)/qhull
-endif
export BF_PROFILE ?= false
export NAN_USE_BULLET ?= true
export NAN_BULLET2 ?= $(LCGDIR)/bullet2
- export NAN_FUZZICS ?= $(SRCHOME)/gameengine/Physics/Sumo/Fuzzics
- export NAN_BLENKEY ?= $(LCGDIR)/blenkey
export NAN_DECIMATION ?= $(LCGDIR)/decimation
export NAN_GUARDEDALLOC ?= $(LCGDIR)/guardedalloc
export NAN_IKSOLVER ?= $(LCGDIR)/iksolver
@@ -161,7 +152,6 @@ endif
export NAN_JPEG ?= $(LCGDIR)/jpeg
export NAN_PNG ?= $(LCGDIR)/png
export NAN_TIFF ?= $(LCGDIR)/tiff
- export NAN_ODE ?= $(LCGDIR)/ode
export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay
export NAN_MESA ?= /usr/src/Mesa-3.1
export NAN_ZLIB ?= $(LCGDIR)/zlib
@@ -186,8 +176,6 @@ endif
export NAN_NO_OPENAL=true
endif
- # Uncomment the following line to use Mozilla inplace of netscape
- # CPPFLAGS +=-DMOZ_NOT_NET
# Location of MOZILLA/Netscape header files...
export NAN_MOZILLA_INC ?= $(LCGDIR)/mozilla/include
export NAN_MOZILLA_LIB ?= $(LCGDIR)/mozilla/lib/
@@ -212,14 +200,13 @@ endif
export FREEDESKTOP ?= true
export NAN_PYTHON ?= /usr/local
- export NAN_PYTHON_VERSION ?= 2.5
+ export NAN_PYTHON_VERSION ?= 3.1
export NAN_PYTHON_BINARY ?= $(NAN_PYTHON)/bin/python$(NAN_PYTHON_VERSION)
export NAN_PYTHON_LIB ?= $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
export NAN_OPENAL ?= /usr/local
export NAN_JPEG ?= /usr/local
export NAN_PNG ?= /usr/local
export NAN_TIFF ?= /usr/local
- export NAN_ODE ?= $(LCGDIR)/ode
export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay
export NAN_MESA ?= /usr/src/Mesa-3.1
export NAN_ZLIB ?= /usr
@@ -230,8 +217,6 @@ endif
export NAN_SDLLIBS ?= $(shell sdl-config --libs)
export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags)
- # Uncomment the following line to use Mozilla inplace of netscape
- # CPPFLAGS +=-DMOZ_NOT_NET
# Location of MOZILLA/Netscape header files...
export NAN_MOZILLA_INC ?= $(LCGDIR)/mozilla/include
export NAN_MOZILLA_LIB ?= $(LCGDIR)/mozilla/lib/
@@ -252,7 +237,7 @@ endif
export HOST = $(shell /usr/bsd/hostname -s)
#export NAN_NO_KETSJI=true
export NAN_JUST_BLENDERDYNAMIC=true
- export NAN_PYTHON_VERSION ?= 2.5
+ export NAN_PYTHON_VERSION ?= 3.1
ifeq ($(IRIX_USE_GCC), true)
export NAN_PYTHON ?= $(LCGDIR)/python_gcc
else
@@ -264,7 +249,6 @@ endif
export NAN_JPEG ?= $(LCGDIR)/jpeg
export NAN_PNG ?= $(LCGDIR)/png
export NAN_TIFF ?= $(LCGDIR)/tiff
- export NAN_ODE ?= $(LCGDIR)/ode
export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay
export NAN_MESA ?= /usr/src/Mesa-3.1
export NAN_ZLIB ?= $(LCGDIR)/zlib
@@ -288,8 +272,6 @@ endif
export NAN_OPENEXR_INC ?= -I$(NAN_OPENEXR)/include -I$(NAN_OPENEXR)/include/OpenEXR
export NAN_OPENEXR_LIBS ?= $(NAN_OPENEXR)/lib/libIlmImf.a $(NAN_OPENEXR)/lib/libHalf.a $(NAN_OPENEXR)/lib/libIex.a $(NAN_OPENEXR)/lib/libIlmThread.a
- # Uncomment the following line to use Mozilla inplace of netscape
- # CPPFLAGS +=-DMOZ_NOT_NET
# Location of MOZILLA/Netscape header files...
export NAN_MOZILLA_INC ?= $(LCGDIR)/mozilla/include
export NAN_MOZILLA_LIB ?= $(LCGDIR)/mozilla/lib/
@@ -311,14 +293,13 @@ endif
export FREEDESKTOP ?= true
export NAN_PYTHON ?= /usr
- export NAN_PYTHON_VERSION ?= 2.6
+ export NAN_PYTHON_VERSION ?= 3.1
export NAN_PYTHON_BINARY ?= $(NAN_PYTHON)/bin/python$(NAN_PYTHON_VERSION)
export NAN_PYTHON_LIB ?= $(NAN_PYTHON)/lib/libpython$(NAN_PYTHON_VERSION).a
export NAN_OPENAL ?= /usr
export NAN_JPEG ?= /usr
export NAN_PNG ?= /usr
export NAN_TIFF ?= /usr
- export NAN_ODE ?= $(LCGDIR)/ode
export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay
export NAN_MESA ?= /usr
export NAN_ZLIB ?= /usr
@@ -342,7 +323,7 @@ endif
endif
# Uncomment the following line to use Mozilla inplace of netscape
- export CPPFLAGS += -DMOZ_NOT_NET
+
# Location of MOZILLA/Netscape header files...
export NAN_MOZILLA_INC ?= /usr/include/mozilla
export NAN_MOZILLA_LIB ?= $(LCGDIR)/mozilla/lib/
@@ -371,14 +352,13 @@ endif
export FREEDESKTOP ?= true
export NAN_PYTHON ?= $(LCGDIR)/python
- export NAN_PYTHON_VERSION ?= 2.3
+ export NAN_PYTHON_VERSION ?= 3.1
export NAN_PYTHON_BINARY ?= $(NAN_PYTHON)/bin/python$(NAN_PYTHON_VERSION)
export NAN_PYTHON_LIB ?= $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
export NAN_OPENAL ?= $(LCGDIR)/openal
export NAN_JPEG ?= $(LCGDIR)/jpeg
export NAN_PNG ?= $(LCGDIR)/png
export NAN_TIFF ?= $(LCGDIR)/tiff
- export NAN_ODE ?= $(LCGDIR)/ode
export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay
export NAN_MESA ?= /usr/src/Mesa-3.1
export NAN_ZLIB ?= $(LCGDIR)/zlib
@@ -389,8 +369,6 @@ endif
export NAN_SDLLIBS ?= $(shell sdl-config --libs)
export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags)
- # Uncomment the following line to use Mozilla inplace of netscape
- # CPPFLAGS +=-DMOZ_NOT_NET
# Location of MOZILLA/Netscape header files...
export NAN_MOZILLA_INC ?= $(LCGDIR)/mozilla/include
export NAN_MOZILLA_LIB ?= $(LCGDIR)/mozilla/lib/
@@ -410,14 +388,13 @@ endif
export ID = $(shell /usr/ucb/whoami)
export HOST = $(shell hostname)
export NAN_PYTHON ?= $(LCGDIR)/python
- export NAN_PYTHON_VERSION ?= 2.5
+ export NAN_PYTHON_VERSION ?= 3.1
export NAN_PYTHON_BINARY ?= $(NAN_PYTHON)/bin/python$(NAN_PYTHON_VERSION)
export NAN_PYTHON_LIB ?= $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
export NAN_OPENAL ?= $(LCGDIR)/openal
export NAN_JPEG ?= $(LCGDIR)/jpeg
export NAN_PNG ?= $(LCGDIR)/png
export NAN_TIFF ?= /usr
- export NAN_ODE ?= $(LCGDIR)/ode
export NAN_TERRAPLAY ?=
export NAN_MESA ?= /usr/X11
export NAN_ZLIB ?= $(LCGDIR)/zlib
@@ -434,8 +411,6 @@ endif
export NAN_OPENEXR_INC ?= -I$(NAN_OPENEXR)/include -I$(NAN_OPENEXR)/include/OpenEXR
export NAN_OPENEXR_LIBS ?= $(NAN_OPENEXR)/lib/libIlmImf.a $(NAN_OPENEXR)/lib/libHalf.a $(NAN_OPENEXR)/lib/libIex.a $(NAN_OPENEXR)/lib/libIlmThread.a -lrt
- # Uncomment the following line to use Mozilla inplace of netscape
- # CPPFLAGS +=-DMOZ_NOT_NET
# Location of MOZILLA/Netscape header files...
export NAN_MOZILLA_INC ?= $(LCGDIR)/mozilla/include
export NAN_MOZILLA_LIB ?= $(LCGDIR)/mozilla/lib/
@@ -455,7 +430,7 @@ endif
export ID = $(LOGNAME)
export NAN_PYTHON ?= $(LCGDIR)/python
export NAN_ICONV ?= $(LCGDIR)/iconv
- export NAN_PYTHON_VERSION ?= 2.5
+ export NAN_PYTHON_VERSION ?= 3.1
export NAN_OPENAL ?= $(LCGDIR)/openal
export NAN_JPEG ?= $(LCGDIR)/jpeg
export NAN_PNG ?= $(LCGDIR)/png
@@ -470,7 +445,6 @@ endif
export NAN_PYTHON_BINARY ?= $(NAN_PYTHON)/bin/python$(NAN_PYTHON_VERSION)
export NAN_PYTHON_LIB ?= $(NAN_PYTHON)/lib/lib25_vs2005/libpython25.a
export NAN_FREETYPE ?= $(LCGDIR)/gcc/freetype
- export NAN_ODE ?= $(LCGDIR)/gcc/ode
export NAN_SDL ?= $(LCGDIR)/gcc/sdl
export NAN_OPENEXR ?= $(LCGDIR)/gcc/openexr
export NAN_OPENEXR_INC ?= -I$(NAN_OPENEXR)/include -I$(NAN_OPENEXR)/include/OpenEXR
@@ -481,7 +455,6 @@ endif
export NAN_PYTHON_BINARY ?= python
export NAN_PYTHON_LIB ?= $(NAN_PYTHON)/lib/python23.lib
export NAN_FREETYPE ?= $(LCGDIR)/freetype
- export NAN_ODE ?= $(LCGDIR)/ode
export NAN_SDL ?= $(LCGDIR)/sdl
export NAN_OPENEXR ?= $(LCGDIR)/openexr
export NAN_OPENEXR_INC ?= -I$(NAN_OPENEXR)/include -I$(NAN_OPENEXR)/include/IlmImf -I$(NAN_OPENEXR)/include/Imath -I$(NAN_OPENEXR)/include/Iex
@@ -490,8 +463,7 @@ endif
export NAN_SDLCFLAGS ?= -I$(NAN_SDL)/include
export NAN_WINTAB ?= $(LCGDIR)/wintab
- # Uncomment the following line to use Mozilla inplace of netscape
- # CPPFLAGS +=-DMOZ_NOT_NET
+
# Location of MOZILLA/Netscape header files...
export NAN_MOZILLA_INC ?= $(LCGDIR)/mozilla/include
export NAN_MOZILLA_LIB ?= $(LCGDIR)/mozilla/lib/
@@ -511,7 +483,7 @@ endif
else # Platform not listed above
export NAN_PYTHON ?= $(LCGDIR)/python
- export NAN_PYTHON_VERSION ?= 2.3
+ export NAN_PYTHON_VERSION ?= 3.1
export NAN_PYTHON_BINARY ?= python
export NAN_PYTHON_LIB ?= $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
@@ -520,7 +492,6 @@ endif
export NAN_PNG ?= $(LCGDIR)/png
export NAN_TIFF ?= $(LCGDIR)/tiff
export NAN_SDL ?= $(LCGDIR)/sdl
- export NAN_ODE ?= $(LCGDIR)/ode
export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay
export NAN_MESA ?= /usr/src/Mesa-3.1
export NAN_ZLIB ?= $(LCGDIR)/zlib
@@ -531,8 +502,6 @@ endif
export NAN_SDLLIBS ?= $(shell sdl-config --libs)
export NAN_SDLCFLAGS ?= $(shell sdl-config --cflags)
- # Uncomment the following line to use Mozilla inplace of netscape
- # CPPFLAGS +=-DMOZ_NOT_NET
# Location of MOZILLA/Netscape header files...
export NAN_MOZILLA_INC ?= $(LCGDIR)/mozilla/include
export NAN_MOZILLA_LIB ?= $(LCGDIR)/mozilla/lib/
diff --git a/source/nan_link.mk b/source/nan_link.mk
index 63c9a578498..4e32366956a 100644
--- a/source/nan_link.mk
+++ b/source/nan_link.mk
@@ -97,7 +97,6 @@ ifeq ($(OS),linux)
COMMENT = "MESA 3.1"
LLIBS = -L$(NAN_MESA)/lib -L/usr/X11R6/lib -lXmu -lXext -lX11 -lXi
LLIBS += -lutil -lc -lm -ldl -lpthread
-# LLIBS += -L$(NAN_ODE)/lib -lode
LOPTS = -export-dynamic
DADD = -lGL -lGLU
SADD = $(NAN_MESA)/lib/libGL.a $(NAN_MESA)/lib/libGLU.a