Can uvs be set manually from the texture editor
Article needs peer review
Symptom
There does not appear to be way of modifying the UV coordinates in a relative or absolute mode in Softimage XSI. This is useful when if one wants to define very precise values. For example, when repeating more than once the same texture on a cylindrical projection. Such a tool would be helpful in situations where one wouls want to perfectly align the beginning and the end of the texture support. How can one get around this problem in Softimage XSI.
Cause
At the present time, such a tool is not part of the Softimage XSI feature set. Bug reference : 68491.
Solution
There is workaround solution available in the form of scripting. Until a feature is implemented in the Texture Editor, one can still numerically set UVs through scripting with the TranslateUVW command passing the siAbsolute flag. Here are a couple of very simple scripts that could make the task a bit easier, in order to set uvs numerically. It is not the best workflow but, for now, it is better than nothing.
1. This first script creates a custom parameter set under the scene root that will take your numerical input. You run this once to setup your scene for script 2.
Script I
----------------------------------------------------------------------------
</FONT>set Root = Application.ActiveProject.ActiveScene.Root
AddProp "Custom_parameter_list", Root, , "SetUVW"
SIAddCustomParameter "SetUVW", "U", siDouble, 0.000, 0.000, 100.000, , 5, 0.000, 1.000
SIAddCustomParameter "SetUVW", "V", siDouble, 0.000, 0.000, 100.000, , 5, 0.000, 1.000
SIAddCustomParameter "SetUVW", "W", siDouble, 0.000, 0.000, 100.000, , 5, 0.000, 1.000
----------------------------------------------------------------------------
</OL>2. This script sets the selected sampled points with the values found in the custom parameter set. You can create a toolbar button in a custom toolbar. Also make sure that the TE is in Auto Sync Selection mode. Once this is setup, select the sample points, set the uvw values in the SetUVW ppg and press the toolbar button.
Script II
----------------------------------------------------------------------------
</FONT>set Root = Application.ActiveProject.ActiveScene.Root
U = GetValue( Root & ".SetUVW.U" )
V = GetValue( Root & ".SetUVW.V" )
W = GetValue( Root & ".SetUVW.W" )
set uvprop = selection(0).subcomponent.parent.parent.parent.Material.CurrentUV
TranslateUVW selection(0), uvprop , U, V, W, siAbsolute----------------------------------------------------------------------------
</BLOCKQUOTE>
ReferencesSource:
Ronald Beirouti, Team Lead - Simulation, at Softimage.
Applies To: XSI 3.0 on NT,Win2K
Posted: 11/15/2002

