Macro Texture Objects/it

=Macro Texture Objects - Campitura di Oggetti=



import FreeCADGui from PyQt4 import QtGui from pivy import coin jpgfilename = QtGui.QFileDialog.getOpenFileName(QtGui.qApp.activeWindow,'Open image file','*.jpg') for obj in FreeCADGui.Selection.getSelection: rootnode = obj.ViewObject.RootNode tex = coin.SoTexture2 tex.filename = str(jpgfilename) rootnode.insertChild(tex,1)
 * 1) get a jpg filename
 * 1) apply textures