| 568 | | wxMessageBox("The texture information on this Bezier patch is in a custom format that cannot be picked for use in the dialog.\n" |
| 569 | | "You can fix the problem by assigning new texture information (using the right mouse button) to the patch first."); |
| 570 | | return; |
| 571 | | } |
| 572 | | |
| 573 | | m_SpinCtrlScaleX ->SetValue((SI.TexCoordGenMode==MatFit) ? SI.Scale[0] : 1.0/SI.Scale[0]/Patch->GetMaterial()->GetWidth()); |
| 574 | | m_SpinCtrlScaleY ->SetValue((SI.TexCoordGenMode==MatFit) ? SI.Scale[1] : 1.0/SI.Scale[1]/Patch->GetMaterial()->GetHeight()); |
| 575 | | m_SpinCtrlShiftX ->SetValue(SI.Trans[0]*Patch->GetMaterial()->GetWidth()); |
| 576 | | m_SpinCtrlShiftY ->SetValue(SI.Trans[1]*Patch->GetMaterial()->GetHeight()); |
| 577 | | m_SpinCtrlRotation->SetValue(SI.Rotate); |
| 578 | | m_TexGenModeInfo ->SetLabel(""); // The proper value is set below. |
| 579 | | |
| 580 | | Material=Patch->GetMaterial(); |
| 581 | | |
| 582 | | m_CurrentTexGenMode=SI.TexCoordGenMode; |
| 583 | | m_CurrentUAxis=SI.UAxis; |
| 584 | | m_CurrentVAxis=SI.VAxis; |
| 585 | | |
| 586 | | UpdateVectorInfo(); |
| 587 | | |
| 588 | | switch (m_CurrentTexGenMode) |
| 589 | | { |
| 590 | | case Custom: m_TexGenModeInfo->SetLabel("Mode: Custom"); break; |
| 591 | | case MatFit: m_TexGenModeInfo->SetLabel("Mode: Fit"); break; |
| 592 | | default: m_TexGenModeInfo->SetLabel(""); break; |
| | 570 | wxMessageBox("The texture information on this Bezier patch is in a custom format that cannot be picked into the dialog.\n" |
| | 571 | "You can fix the problem by assigning new texture information (using the right mouse button) to the patch."); |
| | 572 | } |
| | 573 | else |
| | 574 | { |
| | 575 | m_SpinCtrlScaleX ->SetValue((SI.TexCoordGenMode==MatFit) ? SI.Scale[0] : 1.0/SI.Scale[0]/Patch->GetMaterial()->GetWidth()); |
| | 576 | m_SpinCtrlScaleY ->SetValue((SI.TexCoordGenMode==MatFit) ? SI.Scale[1] : 1.0/SI.Scale[1]/Patch->GetMaterial()->GetHeight()); |
| | 577 | m_SpinCtrlShiftX ->SetValue(SI.Trans[0]*Patch->GetMaterial()->GetWidth()); |
| | 578 | m_SpinCtrlShiftY ->SetValue(SI.Trans[1]*Patch->GetMaterial()->GetHeight()); |
| | 579 | m_SpinCtrlRotation->SetValue(SI.Rotate); |
| | 580 | m_TexGenModeInfo ->SetLabel(""); // The proper value is set below. |
| | 581 | |
| | 582 | m_CurrentTexGenMode=SI.TexCoordGenMode; |
| | 583 | m_CurrentUAxis=SI.UAxis; |
| | 584 | m_CurrentVAxis=SI.VAxis; |
| | 585 | |
| | 586 | UpdateVectorInfo(); |
| | 587 | |
| | 588 | switch (m_CurrentTexGenMode) |
| | 589 | { |
| | 590 | case Custom: m_TexGenModeInfo->SetLabel("Mode: Custom"); break; |
| | 591 | case MatFit: m_TexGenModeInfo->SetLabel("Mode: Fit"); break; |
| | 592 | default: m_TexGenModeInfo->SetLabel(""); break; |
| | 593 | } |