Advertisement
danfalck

getGroup.py

Jun 23rd, 2013
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. def getGroup(ob,exportList):
  2.     '''
  3.    checks if the object is part of a group-if it is use group label for layer name
  4.    otherwise default to layer name '0'
  5.    '''
  6.     if (ob.TypeId == "App::DocumentObjectGroup"):
  7.         return ob.Label
  8.     else:
  9.         if len(ob.InList)==0:
  10.             return "0"
  11.         else:
  12.             return ob.InList[0].Label
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement