ZBrushCentral

undo history export

Hello zbrush scripters

I’m a completly noob when it comes to scripting, and I have this idea of creating an animated obj sequence out of undo history.

That should be doable through scripting… right ?

Is there someone out there that would like to help me?
Or have any idea how to start a script like this I would be very thankful.

Thanks /

David

http://www.zbrushcentral.com/showthread.php?182111-how-do-i-output-obj-sequence-file-on-timeline&highlight=Obj+sequence

Hello Dave,

Also, don’t forget that you can already use the Undo History to create a movie in ZBrush. See here:
http://docs.pixologic.com/user-guide/movies/undo-history-movies/

Thanks Doug I’ll check this out!

@marcus Yes I just want to use another renderer :slight_smile:

OK, well all you really need to to is set the undo history to zero, export your first OBJ and then continue incrementing the slider by 1 each time.

Let me know if you need more help.

Thanks Marcus,

But how do I automate this process so that I don’t go insane :slight_smile:

@Davve. Did you check the link I posted? More specifically >> http://www.zbrushcentral.com/showthread.php?182111-how-do-i-output-obj-sequence-file-on-timeline&p=1055781&viewfull=1#post1055781

Yes I did. It only works with the timeline though.
I also tried to record a macro of the undo history slider, but it didn’t register anything.
Thought I maybe could replace the timeline part of the script with the undo history part.

Well I think I don’t go further with this, thanks anyway

Maybe there’s another script, seems as though marcus_civis would have mentioned it, if it existed. I though it worked from undo history…

Don’t worry, I’ll post something tomorrow. Have not had time today.

Found the code :wink: , you’ll still have to name it ExportObjs or something.

//*Save this file to your ZBrush /ZStartup/Macros/Misc folder and press Macro>Reload All Macros
//ZBrush macro by marcus_civis July 2013
[IButton,???,“Export OBJ sequence from Undo History”,
[If,[IExists,Edit:Tool:UndoCounter],
[VarSet,fileName,[FileNameAsk,"OBJ(
.obj)|
.obj||",“mesh.obj”,“Save file…”]]
[VarSet,fileName,[StrMerge,[FileNameExtract,fileName,3],“0000.obj”]]
[VarSet,numUndos,[IGetMax,Edit:Tool:UndoCounter]]
[Loop,#numUndos,
[ISet,Edit:Tool:UndoCounter,[Val,n+1]]
[FileNameSetNext,fileName]
[IPress,Tool:Export]
[VarSet,fileName,[FileNameAdvance,#fileName,4]]
,n]
]
,]//end of macro

tried the script and it works great.

Thanks guys.