OBJ material names by style
All  1-3  4

Previous
 From:  Micha
5790.4 
Hallo Michael,

sorry for the delayed answer. Thank you very much for your help! I got it run now. :) Maybe someone like to use it too - attached the full MoI Convert script and the Rhino button script for renaming the imported OBJ meshes.

At the moment it stay one main problem, but I suppose so it can be solved by the Rhino team only - Layer names like "GrĂ¼n" are renamed to "Gr n". At the OBJ file the names are perfect, but after the import to Rhino the names are destroyed. I hope it can be fixed.

The script for bringing the meshes to the right layer is quite slow. Doe's anybody know how to get it faster? Is it because I packed it to a button script?

Best-
Micha



Here my Rhino button script:

_-import "d:\temp\#moi.obj" ImportOBJGroups=DoNotImportOBJGroups ImportOBJObjects=Yes IgnoreTextures=Yes MapOBJYToRhinoZ=No _enter
_QuadrangulateMesh _enter

_-RunScript (

Option Explicit

Call ObjToLayerByName

Sub ObjToLayerByName()
Dim arrObj, strObject, strName
arrObj = Rhino.GetObjects ("Select meshes", 32, , true)
If IsArray(arrObj) Then
For Each strObject In arrObj
strName = Rhino.ObjectName(strObject)
If InStr(strName, "[") > 0 Then
strName = Left(strName,InStr(strName, "[")-1)
End If
If Rhino.IsLayer(strName) Then
Rhino.ObjectLayer strObject, strName
Else
Rhino.AddLayer strName
Rhino.ObjectLayer strObject, strName
End If
Next
End If
End Sub
)

Visualisation for Designer and Architects | http://www.simulacrum.de
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-3  4