Moi3d model has a quick way to import keyshot.

Next
 From:  feirui445
10431.1 
Moi3d model has a quick way to import keyshot. The model can be updated

1. Create shortcut keys X :script:moi.geometryDatabase.saveAs( 'c:\\test.igs');

2. moi3d import.py copy to C:\Users\Administrator\Documents\KeyShot 10\Scripts

3. Press the shortcut key X in moi3d

4. Run the script (moi3d import.py) in keyshot and the model will be imported


lux.importFile("C:\TEST.igs", showOpts =False)

SAVE moi3d import.py

EDITED: 26 Aug 2021 by FEIRUI445

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

Previous
Next
 From:  feirui445
10431.2 In reply to 10431.1 



EDITED: 31 Aug 2021 by FEIRUI445

Attachments:

Image Attachments:
Size: 3.4 MB, Downloaded: 73 times, Dimensions: 1916x1032px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  nameless
10431.3 
That is some great information. Thank you!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  feirui445
10431.4 In reply to 10431.3 
shortcut keys
(saveOBJ ) script:moi.geometryDatabase.saveAs( 'c:\\test.obj', 'Angle=180;Output=quads' );
(ImportSubD) script:moi.geometryDatabase.fileImportSubD( 'c:\\test.obj' );

Form a shortcut:
script:moi.geometryDatabase.saveAs( 'c:\\test.obj', 'NoUI=true;Angle=180;Output=quads' );script:moi.geometryDatabase.deleteAll();script:moi.geometryDatabase.fileImportSubD( 'c:\\test.obj' );

EDITED: 18 Feb 2022 by FEIRUI445

Image Attachments:
Size: 1 MB, Downloaded: 58 times, Dimensions: 1916x1032px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  feirui445
10431.5 In reply to 10431.4 
These two shortcuts improve the steps to save the object and import the file
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Cemortan_Tudor
10431.6 
keyshot can render rhino formats (3dm)
moi has same extension so u can open in keyshot moi file
- Tudor -
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  feirui445
10431.7 In reply to 10431.6 
_ImportObj Open the specified file
Do you have a shortcut code?
like: script:moi.geometryDatabase.fileImportSubD( 'c:\\test.obj' );
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
10431.8 In reply to 10431.7 
Hi feirui445,

re:
> _ImportObj Open the specified file
> Do you have a shortcut code?
> like: script:moi.geometryDatabase.fileImportSubD( 'c:\\test.obj' );

_ImportOBJ is a plug-in so first you need to install it, you can get it at Max's file archive page:
http://moi.maxsm.net/media/files/

Install instructions here:
http://moi3d.com/faq#Q:_How_do_I_install_a_plug-in_script.3F

Then for the shortcut key you would put in:
_ImportObj

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

Previous
Next
 From:  feirui445
10431.9 In reply to 10431.8 
Thank you. I want to press a shortcut key to open C: \ \ test obj,Use_ Importobj command, open directly without file dialog box
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
10431.10 In reply to 10431.9 
Hi feirui445,

re:
> Thank you. I want to press a shortcut key to open C: \ \ test obj,Use_ Importobj
> command, open directly without file dialog box

That command script was not set up to do that so you'll need to make some slight changes to the command.

Open up the file _ImportObj.js and find line number 4 which has this:

code:
var objPath = moi.filesystem.getOpenFileName( 'Import OBJ', ' (*.obj)|*.obj' );

remove that and put in this instead:

code:
var objPath = moi.command.getCommandLineParams();
if ( !objPath ) objPath = moi.filesystem.getOpenFileName( 'Import OBJ', ' (*.obj)|*.obj' );


Then you should be able to give a command line parameter in the shortcut key, like this (no doubled \\ in this case):

_ImportObj c:\test.obj

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

Previous
Next
 From:  feirui445
10431.11 In reply to 10431.10 
Thank you.

EDITED: 19 Feb 2022 by FEIRUI445

Image Attachments:
Size: 7.9 MB, Downloaded: 44 times, Dimensions: 1920x1080px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  feirui445
10431.12 In reply to 10431.11 
The imported box does not change the shape of an egg. What's wrong with the code?
After I use three shortcut keys, the fault appears

Q: script:moi.geometryDatabase.saveAs( 'c:\\test.obj', 'NoUI=true;Angle=180;Output=quads' );script:moi.geometryDatabase.deleteAll();script:moi.geometryDatabase.fileImportSubD( 'c:\\test.obj' );
A: script:moi.geometryDatabase.saveAs( 'c:\\test.obj', 'NoUI=true;Angle=180;Output=quads' );
Z: _ImportObj c:\test.obj

EDITED: 3 Mar 2022 by FEIRUI445

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

Previous
 From:  Michael Gibson
10431.13 In reply to 10431.12 
Hi feirui445,

re:
> After I use three shortcut keys, the fault appears

Do you mean you're pressing these 3 keys in sequence or are you using just the first one which already does an combined export and reimport?

Your 3rd key has:

> Z: _ImportObj c:\test.obj

The _ImportObj plug-in brings in polygons as planar faces in MoI, it does not apply sub-d smoothing. If you want to use the native MoI sub-d converter use this instead for your importing step:
script: moi.geometryDatabase.fileImportSubD( 'c:\\test.obj' );

Another thing which may be a problem is that by default Windows restricts programs from writing to the root c:\ directory so you might need to run MoI with administrator privileges for it to be able to write to that location.

- Michael
  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