1. #1
    New Member Follow User Gallery
    Join Date
    Dec 2013
    Posts
    10

    Default Insert .obj works sometimes

    Hey there,

    I've created this script, from bits and pieces I've found on the zbrush forums, sometimes it works other times it doesn't

    Can anyone tell me why it doesn't work?


    [IButton, cubes,,

    [If,[IExists,Transform:Edit], //Checks if 3D tool is selected
    [If,[IGet,Transform:Edit], //Checks if Edit mode is on

    [VarSet,toolID,[IGet,Tool:Item Info]]//get ID for current tool

    [If,toolID != 48,[ISet,Tool:Item Info,48]//Set to PolyMesh3D
    [VarSet,polyMeshName,[IGetTitle,Tool:Current Tool]]//get its name
    [ISet,Tool:Item Info,#toolID]//reselect current tool
    [IPress,Tool:SubTool:Append]//append
    [IPress,[StrMerge,"Popup:",#polyMeshName]]//append polymesh
    [SubToolSelect,[SubToolGetCount]-1]//select last subtool
    [FileNameSetNext,"cubes.obj"]
    [IPress,Tool:Import]//import cube obj

    ]//end if
    ]//end if
    ]//end if
    ]

  2. #2
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    I think the way the tools are numbered may have changed, so selecting 48 may no longer be reliable. But there's a simpler way of doing what you want:

    1. Duplicate a subtool. It needs to be a polymesh, so you'd need to check if the Create Displacement Map button exists.
    2. Switch to the last subtool, and delete any subdivision levels.
    3. Import your OBJ.

    If you import an OBJ into a polymesh that has no subdivision levels then the OBJ will replace the polymesh.

  3. #3
    New Member Follow User Gallery
    Join Date
    Dec 2013
    Posts
    10

    Default

    Thanks civis, ill try it out

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •