[Bf-blender-cvs] [7cea6ec] temp_viewport_fx_merge: Merge branch 'master' into temp_viewport_fx_merge

Antony Riakiotakis noreply at git.blender.org
Tue Apr 14 14:13:19 CEST 2015


Commit: 7cea6ecddb4630961c1393ed2f1ada4aa81de1df
Author: Antony Riakiotakis
Date:   Tue Apr 14 14:13:02 2015 +0200
Branches: temp_viewport_fx_merge
https://developer.blender.org/rB7cea6ecddb4630961c1393ed2f1ada4aa81de1df

Merge branch 'master' into temp_viewport_fx_merge

Conflicts:
	source/blender/editors/interface/interface_widgets.c
	source/blender/editors/space_graph/graph_draw.c

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



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

diff --cc source/blender/editors/space_graph/graph_draw.c
index 97643f8,87e7cab..a0a5eec
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@@ -567,9 -570,10 +567,10 @@@ static void draw_fcurve_curve_samples(b
  	short mapping_flag = ANIM_get_normalization_flags(ac);
  
  	/* apply unit mapping */
 -	glPushMatrix();
 +	gpuPushMatrix(GPU_MODELVIEW);
- 	unit_scale = ANIM_unit_mapping_get_factor(ac->scene, id, fcu, mapping_flag);
+ 	unit_scale = ANIM_unit_mapping_get_factor(ac->scene, id, fcu, mapping_flag, &offset);
 -	glScalef(1.0f, unit_scale, 1.0f);
 -	glTranslatef(0.0f, offset, 0.0f);
 +	gpuScale(GPU_MODELVIEW, 1.0f, unit_scale, 1.0f);
++	gpuTranslate(GPU_MODELVIEW, 0.0f, offset, 0.0f);
  
  	glBegin(GL_LINE_STRIP);
  	
@@@ -666,10 -670,11 +667,11 @@@ static void draw_fcurve_curve_bezts(bAn
  	short mapping_flag = ANIM_get_normalization_flags(ac);
  	
  	/* apply unit mapping */
 -	glPushMatrix();
 +	gpuPushMatrix(GPU_MODELVIEW);
- 	unit_scale = ANIM_unit_mapping_get_factor(ac->scene, id, fcu, mapping_flag);
+ 	unit_scale = ANIM_unit_mapping_get_factor(ac->scene, id, fcu, mapping_flag, &offset);
 -	glScalef(1.0f, unit_scale, 1.0f);
 -	glTranslatef(0.0f, offset, 0.0f);
 +	gpuScale(GPU_MODELVIEW, 1.0f, unit_scale, 1.0f);
- 	
++	gpuTranslate(GPU_MODELVIEW, 0.0f, offset, 0.0f);
+ 
  	glBegin(GL_LINE_STRIP);
  	
  	/* extrapolate to left? */
@@@ -1064,10 -1070,12 +1067,12 @@@ void graph_draw_curves(bAnimContext *ac
  			}
  			else if (((fcu->bezt) || (fcu->fpt)) && (fcu->totvert)) {
  				short mapping_flag = ANIM_get_normalization_flags(ac);
- 				float unit_scale = ANIM_unit_mapping_get_factor(ac->scene, ale->id, fcu, mapping_flag);
+ 				float offset;
+ 				float unit_scale = ANIM_unit_mapping_get_factor(ac->scene, ale->id, fcu, mapping_flag, &offset);
  
 -				glPushMatrix();
 -				glScalef(1.0f, unit_scale, 1.0f);
 -				glTranslatef(0.0f, offset, 0.0f);
 +				gpuPushMatrix(GPU_MODELVIEW);
 +				gpuScale(GPU_MODELVIEW, 1.0f, unit_scale, 1.0f);
++				gpuTranslate(GPU_MODELVIEW, 0.0f, offset, 0.0f);
  
  				if (fcu->bezt) {
  					bool do_handles = draw_fcurve_handles_check(sipo, fcu);
diff --cc source/gameengine/Ketsji/KX_Camera.cpp
index be3dc4b,4456345..022c63a
--- a/source/gameengine/Ketsji/KX_Camera.cpp
+++ b/source/gameengine/Ketsji/KX_Camera.cpp
@@@ -993,11 -991,11 +993,11 @@@ KX_PYMETHODDEF_DOC_O(KX_Camera, getScre
  	}
  
  	const GLint *viewport;
 -	GLdouble win[3];
 -	GLdouble modelmatrix[16];
 -	GLdouble projmatrix[16];
 +	float win[3];
 +	float modelmatrix[16];
 +	float projmatrix[16];
  
- 	MT_Matrix4x4 m_modelmatrix = this->GetModelviewMatrix();
+ 	MT_Matrix4x4 m_modelmatrix = this->GetWorldToCamera();
  	MT_Matrix4x4 m_projmatrix = this->GetProjectionMatrix();
  
  	m_modelmatrix.getValue(modelmatrix);
@@@ -1036,11 -1034,11 +1036,11 @@@ KX_PYMETHODDEF_DOC_VARARGS(KX_Camera, g
  	MT_Point3 campos, screenpos;
  
  	const GLint *viewport;
 -	GLdouble win[3];
 -	GLdouble modelmatrix[16];
 -	GLdouble projmatrix[16];
 +	GLfloat win[3];
 +	GLfloat modelmatrix[16];
 +	GLfloat projmatrix[16];
  
- 	MT_Matrix4x4 m_modelmatrix = this->GetModelviewMatrix();
+ 	MT_Matrix4x4 m_modelmatrix = this->GetWorldToCamera();
  	MT_Matrix4x4 m_projmatrix = this->GetProjectionMatrix();
  
  	m_modelmatrix.getValue(modelmatrix);




More information about the Bf-blender-cvs mailing list