simple ZBrush zscript to add a spotlight reference jpeg image to ZBrush. there may be bugs so please modify use at your own risk.
//simple ZBrush script to add a reference jpeg image to opened scene [RoutineDef, addRefImage, //get texture file from user. only supporting jpeg [VarSet, texturePath, [FileNameAsk, "JPG(*.jpg)",,"Please select jpeg texture file to import"]] //[VarSet, texturePath, "!:/Users/Nathaniel/Desktop/learning_/zbrush_dev_testing/b_tex.jpg"] //set texture file as next file path to possibly import [FileNameSetNext, texturePath] //import texture [IPress, Texture:Import] //extract file name from texture full path [VarSet, fileName, [FileNameExtract, texturePath, 2]] //[Note, fileName] [IPress, [StrMerge, "Texture:", fileName]]//[IPress, Texture:texture] [IPress, Texture:Add To Spotlight] //turn off samples spotlight projection [IUnPress, Brush:Samples:Spotlight Projection] //argument to method ,msg ] [IButton, addReferenceImage, "add reference image using spotlight", //call method [VarSet, msg, "doodle"] [RoutineCall, addRefImage, msg] ]
//Happy Sketching!