ZBrushCentral

Subtool Append in a auto generated macro.

Alright i sure hope i can explain this properly

I have a script for max, that exports all my selected geometry to individual obj files for use in zbrush as subtools. That part works just fine.

I also have a script which generates a zbrush macro to import all the geometry and append it all to a subtool, this is where things go wrong.

If i only do the import part of my script it works exactly like i expect it to. I can see all the geometry in zbrush in the Tool pallete, named as it is in max, and the right parts.

But when i go to append, i suddenly get mismatched names and geometry in there, i’ll have one tool appended 3 times under different names. so Object1 Object2 and Object3 will all be in a subtool, but they’ll all be the same mesh.

I’ve noticed this only seems to be a problem if the names are to simliar (ie object01 object02 object03) but not if i give them totaly different names

Is there a reason why this is?
If i’m not making any sense let me know! Thanks!

Without seeing the macro script it’s difficult to be sure what is going wrong. If you can post it I’ll take a look.

Incidentally, SubTool Master has a ‘Multi Append’ function which lets you select a group of OBJs and automatically append them.

Hey marcus, thanks for the reply.

I tired out SubTool master, and the same problem happend… which makes me think that the problem might be somewhere in my export script so i’m going to take a look at that and see what i can find.

Thanks! If i’m still lost i’ll post up a zip with the macro and the obj files.

Ok, well it doesn’t seem to be my export script. When i re-import all the objs back into max, they’re all proper in the right spot and everything, if i do the import in zbrush by hand and append them all by hand they’re proper and in the right spot. But if i use this macro or us subtool master it loads the first one properly. and all the others sit on top of the 2n’d sphere.

here’s the zip, when brought in properly it should just be a line of spheres.
http://surrient.com/Zbrush/objs.zip

the macro looks for the objs in D:\objs\

If anyone can help shed some light on what i’m doign wrong that would be swell.

Thanks

For some reason ZBrush doesn’t use the OBJ scale/offset when running the script but why it should do so when doing it by hand beats me!

The simplest solution is to re-import the OBJ into the new subtool. The attached script shows how to do this for sequentially numbered files using a loop. If you can adapt this for your needs you will only need to specify the base file name & path and total number of files.

Using your original method, don’t forget to move down the subtool list before re-importing the OBJ.

HTH,

Thanks Marcus! I’ll look into incorporating that.

The big thing i’m really wondering though, is why the script works just fine if i give them totally different names

Instead of Sphere01, Sphere02, Sphere03… and so on up to Sphere11
i gave them farm animal names, rat, chicken, dog… 11 different unique names and it works just fine, It imports exactly as i think it should.

It seems to be if they are similarly named with a # at the end zbrush just doesn’t know what to do with it.

I’ve really no idea, except that perhaps both the number and the # interfere with ZBrush’s internal naming routines resulting in the problems.