Loki
03-28-2008, 04:25 PM
Hi All,
How can I set an "if" condition to skip objects with no Texture Projection?
I made this script that turns on the UVW Wrapping in the Texture Projections of selected objects...
Selection = Application.GetValue("SelectionList")
for obj in Application.Selection :
oObjName = obj.name
Application.SelectObj(oObjName)
oSel = Application.Selection(0).Material.CurrentUV.FullNa me
Application.SetValue(oSel + ".Texture_Projection_Def.wrap_u", 1, "")
Application.SetValue(oSel + ".Texture_Projection_Def.wrap_v", 1, "")
Application.SetValue(oSel + ".Texture_Projection_Def.wrap_w", 1, "")
Application.SelectObj(Selection)
But if an object has no Texture Projection, the script crashes with errors.
How can I set an "if" condition to skip objects with no Texture Projection?
How can I set an "if" condition to skip objects with no Texture Projection?
I made this script that turns on the UVW Wrapping in the Texture Projections of selected objects...
Selection = Application.GetValue("SelectionList")
for obj in Application.Selection :
oObjName = obj.name
Application.SelectObj(oObjName)
oSel = Application.Selection(0).Material.CurrentUV.FullNa me
Application.SetValue(oSel + ".Texture_Projection_Def.wrap_u", 1, "")
Application.SetValue(oSel + ".Texture_Projection_Def.wrap_v", 1, "")
Application.SetValue(oSel + ".Texture_Projection_Def.wrap_w", 1, "")
Application.SelectObj(Selection)
But if an object has no Texture Projection, the script crashes with errors.
How can I set an "if" condition to skip objects with no Texture Projection?