Quantcast
Viewing all articles
Browse latest Browse all 5797

Import obj file with python

@Alen_Russ wrote:

Hi,

I have one problem.

I have done to save the sence of rhino5 to *.obj file with python code.

import rhinoscriptsyntax as rs
import Rhino

def Export():
    # select all objects to export
    objs = rs.AllObjects(select=True, include_lights=False, include_grips=False)
    if not objs: return
        # setup path and filename in quotes
        file = chr(34) + "D:\\testFile\\test"+".obj" + chr(34)

        # create export command
        cmd = "_-export " + file + " " + " _Enter _SelNone "

        # run the command
        rc = rs.Command(cmd, False)
        if not rc:
            print "Error exporting file {}"

if __name__=="__main__":
    Export()

But I don not know how could I import *.obj file in 3dsMax with python code. It dont by -File -import file.

Does have cmd command in python do this?

Thank you for your help.

Best,
Alen

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5797

Trending Articles