Help - if condition
hi guys, i need a little help from you. I use a script to position vertices from polys and splines in x/y/z position, and i need an "if" condition to make the the script work better. What i need is, if the selected object is a poly object, the script runs a line of code, if not, it continues without that line. Is it to difficult to do? i´m not a coder, i just edit some existing scripts and use macrorecorder a lot :)
i´ll put the code i have now here (this is an edited neil blevins's script):
oldGrid = activeGrid -- store curr. active grid
activeGrid = undefined -- activate the home grid
macros.run "Objects Helpers" "ActivateHomeGrid"
snapmode.active = true
-- here is where i need an if condition, to be able to use the same script to a poly and a spline. So, if the selected object is a poly, the script will run the next line:
macros.run "Editable Polygon Object" "EPoly_Convert_Sel_To_Vertex"
-- and then continues to the rest of the script:
macros.run "SoulburnScripts" "vertPlacer"
activeGrid = oldGrid -- activate prev. active grid
if the object is a spline, the line "macros.run "Editable Polygon Object" "EPoly_Convert_Sel_To_Vertex" must be ignored. Can anyone help me to do that??
thanks in advance,