* Valve220: fix patch.CapTexture (patch had invalid control points: define basis)
* Curve->Simple patch mesh: CapTexture() instead of NaturalTexture() for convinience
This commit is contained in:
parent
0dfdf77c18
commit
097c1e8fc5
|
|
@ -660,6 +660,7 @@ void Patch::CapTexture(){
|
||||||
Vector3 normal = Calculate_AvgNormal();
|
Vector3 normal = Calculate_AvgNormal();
|
||||||
TextureProjection projection;
|
TextureProjection projection;
|
||||||
TexDef_Construct_Default( projection );
|
TexDef_Construct_Default( projection );
|
||||||
|
ComputeAxisBase( normal, projection.m_basis_s, projection.m_basis_t ); /* Valve220 */
|
||||||
ProjectTexture( projection, normal );
|
ProjectTexture( projection, normal );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -1563,6 +1564,9 @@ void Patch::ConstructPrefab( const AABB& aabb, EPatchPrefab eType, int axis, std
|
||||||
InsertRemove( true, false, true );
|
InsertRemove( true, false, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( eType == ePlane )
|
||||||
|
CapTexture();
|
||||||
|
else
|
||||||
NaturalTexture();
|
NaturalTexture();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -519,12 +519,9 @@ static void OnBtnPatchFit( GtkWidget *widget, gpointer data ){
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OnBtnReset( GtkWidget *widget, gpointer data ){
|
static void OnBtnReset( GtkWidget *widget, gpointer data ){
|
||||||
//globalOutputStream() << "--> [OnBtnAxial]...\n";
|
|
||||||
UndoableCommand undo( "textureDefault" );
|
UndoableCommand undo( "textureDefault" );
|
||||||
TextureProjection projection;
|
TextureProjection projection;
|
||||||
//globalOutputStream() << " TexDef_Construct_Default()...\n";
|
|
||||||
TexDef_Construct_Default( projection );
|
TexDef_Construct_Default( projection );
|
||||||
//globalOutputStream() << " Select_SetTexdef()...\n";
|
|
||||||
|
|
||||||
#if TEXTOOL_ENABLED
|
#if TEXTOOL_ENABLED
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user