[Bf-blender-cvs] [1c09344] fracture_modifier: Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier

Martin Felke noreply at git.blender.org
Sun Feb 21 20:26:26 CET 2016


Commit: 1c09344dbaaff3e54cf436c40a3008ac7c81f8c1
Author: Martin Felke
Date:   Sun Feb 21 13:27:17 2016 +0100
Branches: fracture_modifier
https://developer.blender.org/rB1c09344dbaaff3e54cf436c40a3008ac7c81f8c1

Merge remote-tracking branch 'refs/remotes/origin/master' into fracture_modifier

Conflicts:
	CMakeLists.txt
	SConstruct
	build_files/build_environment/install_deps.sh
	build_files/scons/tools/Blender.py
	build_files/scons/tools/btools.py
	extern/CMakeLists.txt
	extern/SConscript
	extern/bullet2/CMakeLists.txt
	intern/cycles/blender/blender_camera.cpp
	intern/cycles/blender/blender_texture.cpp
	intern/cycles/kernel/geom/geom_triangle_intersect.h
	intern/cycles/kernel/kernel_compat_cpu.h
	intern/cycles/kernel/svm/svm_voxel.h
	intern/cycles/util/util_path.cpp
	intern/ghost/intern/GHOST_ContextGLX.cpp
	intern/iksolver/intern/IK_Solver.cpp
	release/datafiles/locale
	release/scripts/addons
	release/scripts/startup/bl_ui/space_userpref.py
	source/blender/blenkernel/BKE_blender.h
	source/blender/blenkernel/BKE_bvhutils.h
	source/blender/blenkernel/SConscript
	source/blender/blenkernel/intern/DerivedMesh.c
	source/blender/blenkernel/intern/armature.c
	source/blender/blenkernel/intern/cdderivedmesh.c
	source/blender/blenkernel/intern/editderivedmesh.c
	source/blender/blenkernel/intern/image.c
	source/blender/blenkernel/intern/mesh_remap.c
	source/blender/blenkernel/intern/particle.c
	source/blender/blenkernel/intern/rigidbody.c
	source/blender/blenlib/intern/string.c
	source/blender/blenloader/intern/readfile.c
	source/blender/editors/interface/interface.c
	source/blender/editors/interface/interface_handlers.c
	source/blender/editors/mesh/editmesh_knife.c
	source/blender/editors/mesh/editmesh_select.c
	source/blender/editors/object/object_bake_api.c
	source/blender/editors/space_graph/graph_ops.c
	source/blender/editors/space_outliner/outliner_intern.h
	source/blender/editors/space_outliner/outliner_tools.c
	source/blender/editors/space_sequencer/sequencer_edit.c
	source/blender/editors/space_view3d/drawmesh.c
	source/blender/editors/space_view3d/drawobject.c
	source/blender/editors/transform/transform_conversions.c
	source/blender/editors/transform/transform_input.c
	source/blender/editors/transform/transform_snap.c
	source/blender/makesdna/intern/makesdna.c
	source/blender/makesrna/SConscript
	source/blender/makesrna/intern/SConscript
	source/blender/makesrna/intern/rna_modifier.c
	source/blender/makesrna/intern/rna_nodetree.c
	source/blender/makesrna/intern/rna_rigidbody.c
	source/blender/modifiers/SConscript
	source/blender/python/mathutils/mathutils_geometry.c
	source/blender/render/extern/include/RE_render_ext.h
	source/blender/render/intern/source/bake_api.c
	source/blender/render/intern/source/pipeline.c
	source/blender/render/intern/source/pointdensity.c
	source/blender/render/intern/source/renderdatabase.c
	source/blender/windowmanager/WM_api.h
	source/blender/windowmanager/intern/wm_files.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
	source/gameengine/Ketsji/BL_Action.cpp

===================================================================



===================================================================

diff --cc CMakeLists.txt
index 1980e28,891539e..50d46d9
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@@ -2911,7 -3018,7 +3019,8 @@@ if(FIRST_RUN
  	info_cfg_option(WITH_CYCLES)
  	info_cfg_option(WITH_FREESTYLE)
  	info_cfg_option(WITH_OPENCOLORIO)
 +	info_cfg_option(WITH_VORO)
+ 	info_cfg_option(WITH_OPENVDB)
  
  	info_cfg_text("Compiler Options:")
  	info_cfg_option(WITH_BUILDINFO)
diff --cc extern/CMakeLists.txt
index d7f315e,1cce7dc..8157c2e
--- a/extern/CMakeLists.txt
+++ b/extern/CMakeLists.txt
@@@ -91,8 -83,13 +83,17 @@@ if(WITH_X11 AND WITH_GHOST_XDND
  	add_subdirectory(xdnd)
  endif()
  
 +if(WITH_VORO)
 +	add_subdirectory(voro++)
++
+ if(WITH_LIBMV)
+ 	add_subdirectory(ceres)
+ endif()
+ 
+ if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
+ 	add_subdirectory(gflags)
+ 	add_subdirectory(glog)
++	
  endif()
  
  if(WITH_GTESTS)
diff --cc extern/bullet2/CMakeLists.txt
index 35ef63d,949a8b0..fe70c89
--- a/extern/bullet2/CMakeLists.txt
+++ b/extern/bullet2/CMakeLists.txt
@@@ -141,18 -146,10 +146,12 @@@ set(SR
  	src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp
  	src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp
  	src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp
- 	src/BulletDynamics/ConstraintSolver/btGearConstraint.cpp
- 	src/BulletDynamics/ConstraintSolver/btFixedConstraint.cpp
- 	src/BulletDynamics/ConstraintSolver/btCompoundConstraint.cpp
+ 	src/BulletDynamics/Dynamics/Bullet-C-API.cpp
  	src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
 +	src/BulletDynamics/Dynamics/btFractureDynamicsWorld.cpp
  	src/BulletDynamics/Dynamics/btRigidBody.cpp
 +	src/BulletDynamics/Dynamics/btFractureBody.cpp
  	src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp
- 	src/BulletDynamics/Dynamics/Bullet-C-API.cpp
- 	src/BulletDynamics/Vehicle/btRaycastVehicle.cpp
- 	src/BulletDynamics/Vehicle/btWheelInfo.cpp
- 	src/BulletDynamics/Character/btKinematicCharacterController.cpp
  	src/BulletDynamics/Featherstone/btMultiBody.cpp
  	src/BulletDynamics/Featherstone/btMultiBodyConstraint.cpp
  	src/BulletDynamics/Featherstone/btMultiBodyConstraintSolver.cpp
@@@ -305,8 -311,9 +313,10 @@@
  	src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h
  	src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h
  	src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h
- 	src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.h
- 	
+ 
+ 	src/BulletDynamics/Character/btCharacterControllerInterface.h
+ 	src/BulletDynamics/Character/btKinematicCharacterController.h
++	src/BulletDynamics/ConstraintSolver/btCompoundConstraint.h
  	src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h
  	src/BulletDynamics/ConstraintSolver/btConstraintSolver.h
  	src/BulletDynamics/ConstraintSolver/btContactConstraint.h
diff --cc release/datafiles/locale
index fd35c7b,9628dc1..8c99467
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit fd35c7b0d55c59a7dfacc19ed1247379ff8ba049
 -Subproject commit 9628dc1922be2fb6281bc66f5f7512c2a57c294a
++Subproject commit 8c99467b0f95f4e1fd700ba8d961afb704f05b30
diff --cc source/blender/blenkernel/intern/customdata.c
index 88ab634,c0ebcfa..eef7a97
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@@ -931,8 -938,8 +938,9 @@@ static void layerInterp_mloopuv
  	}
  
  	/* delay writing to the destination incase dest is in sources */
 +	((MLoopUV *)dest)->flag = ((MLoopUV *)sources)->flag;
  	copy_v2_v2(((MLoopUV *)dest)->uv, uv);
+ 	((MLoopUV *)dest)->flag = flag;
  }
  
  /* origspace is almost exact copy of mloopuv's, keep in sync */
diff --cc source/blender/blenkernel/intern/rigidbody.c
index ba8ad08,0f1f9b4..935688b
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@@ -62,10 -56,9 +62,11 @@@
  #include "BKE_cdderivedmesh.h"
  #include "BKE_depsgraph.h"
  #include "BKE_effect.h"
 +#include "BKE_fracture.h"
  #include "BKE_global.h"
 +#include "BKE_group.h"
  #include "BKE_library.h"
+ #include "BKE_library_query.h"
  #include "BKE_mesh.h"
  #include "BKE_object.h"
  #include "BKE_pointcache.h"
@@@ -1546,904 -869,159 +1547,918 @@@ static void rigidbody_validate_sim_cons
  	if (rbw && rbw->physics_world && rbc->physics_constraint) {
  		RB_dworld_add_constraint(rbw->physics_world, rbc->physics_constraint, rbc->flag & RBC_FLAG_DISABLE_COLLISIONS);
  	}
 -}
  
 -/* --------------------- */
 +	if (rbc->physics_constraint)
 +	{
 +		/*
 +		char id[64];
 +		char *rest = id;
 +		char *ptr;
 +		char ptr2[64] = "0";
  
 -/* Create physics sim world given RigidBody world settings */
 -// NOTE: this does NOT update object references that the scene uses, in case those aren't ready yet!
 -void BKE_rigidbody_validate_sim_world(Scene *scene, RigidBodyWorld *rbw, bool rebuild)
 -{
 -	/* sanity checks */
 -	if (rbw == NULL)
 -		return;
 +		strncpy(id, ob->id.name + 2, strlen(ob->id.name) - 2);
  
 -	/* create new sim world */
 -	if (rebuild || rbw->physics_world == NULL) {
 -		if (rbw->physics_world)
 -			RB_dworld_delete(rbw->physics_world);
 -		rbw->physics_world = RB_dworld_new(scene->physics_settings.gravity);
 -	}
 +		ptr = strtok_r(id, ".", &rest);
 +		while (ptr != NULL)
 +		{
 +			strncpy(ptr2, ptr, strlen(ptr));
 +			ptr = strtok_r(NULL, ".", &rest);
 +		}*/
  
 -	RB_dworld_set_solver_iterations(rbw->physics_world, rbw->num_solver_iterations);
 -	RB_dworld_set_split_impulse(rbw->physics_world, rbw->flag & RBW_FLAG_USE_SPLIT_IMPULSE);
 +		RB_constraint_set_id(rbc->physics_constraint, ob->id.name + 2);
 +	}
  }
  
 -/* ************************************** */
 -/* Setup Utilities - Create Settings Blocks */
 -
 -/* Set up RigidBody world */
 -RigidBodyWorld *BKE_rigidbody_create_world(Scene *scene)
 +static void rigidbody_set_springs_active(RigidBodyShardCon *rbc, bool active)
  {
 -	/* try to get whatever RigidBody world that might be representing this already */
 -	RigidBodyWorld *rbw;
 +	if (rbc && rbc->physics_constraint && rbc->type == RBC_TYPE_6DOF_SPRING)
 +	{
 +		if (active) //XXX TEST purpose only
 +		{
 +			RB_constraint_set_spring_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_X, rbc->flag & RBC_FLAG_USE_SPRING_X);
 +			RB_constraint_set_stiffness_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_X, rbc->spring_stiffness_x);
 +			RB_constraint_set_damping_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_X, rbc->spring_damping_x);
  
 -	/* sanity checks
 -	 *	- there must be a valid scene to add world to
 -	 *	- there mustn't be a sim world using this group already
 -	 */
 -	if (scene == NULL)
 -		return NULL;
 +			RB_constraint_set_spring_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Y, rbc->flag & RBC_FLAG_USE_SPRING_Y);
 +			RB_constraint_set_stiffness_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Y, rbc->spring_stiffness_y);
 +			RB_constraint_set_damping_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Y, rbc->spring_damping_y);
  
 -	/* create a new sim world */
 -	rbw = MEM_callocN(sizeof(RigidBodyWorld), "RigidBodyWorld");
 +			RB_constraint_set_spring_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Z, rbc->flag & RBC_FLAG_USE_SPRING_Z);
 +			RB_constraint_set_stiffness_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Z, rbc->spring_stiffness_z);
 +			RB_constraint_set_damping_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Z, rbc->spring_damping_z);
 +		}
 +		else
 +		{
 +			RB_constraint_set_spring_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_X, rbc->flag & RBC_FLAG_USE_SPRING_X);
 +			RB_constraint_set_stiffness_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_X, 0);
 +			RB_constraint_set_damping_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_X, rbc->spring_damping_x);
  
 -	/* set default settings */
 -	rbw->effector_weights = BKE_add_effector_weights(NULL);
 +			RB_constraint_set_spring_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Y, rbc->flag & RBC_FLAG_USE_SPRING_Y);
 +			RB_constraint_set_stiffness_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Y, 0);
 +			RB_constraint_set_damping_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Y, rbc->spring_damping_y);
  
 -	rbw->ltime = PSFRA;
 +			RB_constraint_set_spring_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Z, rbc->flag & RBC_FLAG_USE_SPRING_Z);
 +			RB_constraint_set_stiffness_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Z, 0);
 +			RB_constraint_set_damping_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Z, rbc->spring_damping_z);
 +		}
 +	}
 +}
  
 -	rbw->time_scale = 1.0f;
 +static void rigidbody_create_shard_physics_constraint(FractureModifierData* fmd, Object* ob, RigidBodyShardCon *rbc, RigidBodyWorld *rbw)
 +{
 +	float loc[3];
 +	float rot[4];
 +	float lin_lower;
 +	float lin_upper;
 +	float ang_lower;
 +	float ang_upper;
 +	rbRigidBody *rb1;
 +	rbRigidBody *rb2;
  
 -	rbw->steps_per_second = 60; /* Bullet default (60 Hz) */
 -	rbw->num_solver_iterations = 10; /* 10 is bullet default */
 +	if (rbc && rbc->mi1 && rbc->mi2)
 +	{
 +		rb1 = rbc->mi1->rigidbody->physics_object;
 +		rb2 = rbc->mi2->rigidbody->physics_object;
 +	}
 +	else
 +	{
 +		return;
 +	}
  
 -	rbw->pointcache = BKE_ptcache_add(&(rbw->ptcaches));
 -	rbw->pointcache->step = 1;
 +	if (fmd->fracture_mode == MOD_FRACTURE_EXTERNAL)
 +	{
 +		mul_v3_m4v3(loc, ob->obmat, rbc->pos);
 +		mat4_to_quat(rot, ob->obmat);
 +		mul_qt_qtqt(rot, rot, rbc->orn);
 +	}
 +	else
 +	{
 +		/* keep old constraint calculation for other fracture modes ! */
 +		/* do this for all constraints */
 +		/* location for fixed constraints doesnt matter, so keep old setting */
 +		if (rbc->type == RBC_TYPE_FIXED) {
 +			copy_v3_v3(rbc->pos, rbc->mi1->rigidbody->pos);
 +		}
 +		else {
 +			/* else set location to center */
 +			add_v3_v3v3(rbc->pos, rbc->mi1->rigidbody->pos, rbc->mi2->rigidbody->pos);
 +			mul_v3_fl(rbc->pos, 0.5f);
 +		}
  
 -	/* return this sim world */
 -	return rbw;
 -}
 +		copy_qt_qt(rbc->orn, rbc->mi1->rigidbody->orn);
 +		copy_v3_v3(loc, rbc->pos);
 +		copy_qt_qt(rot, rbc->orn);
 +	}
  
 -RigidBodyWorld *BKE_rigidbody_world_copy(RigidBodyWorld *rbw)
 -{
 -	RigidBodyWorld *rbwn = MEM_dupallocN(rbw);
 +	if (rb1 && rb2)

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list