ZBrushCentral

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

]

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.

Thanks civis, ill try it out