1. #1
    Senior Member Follow User Gallery
    Join Date
    Jun 2010
    Age
    33
    Posts
    437

    Default Communicating with Python

    I saw a couple of threads about communicating with other things from outside of ZBrush but could not really figure out how they would apply to my case.

    So, This is what I'm trying to do and I hope it is possible to implement! A temporary obj file gets written out with ZScript along with a user driven input variable, then the obj file and the input variable(how to send this variable to Python?) must get read by the Python script, after doing bunch of stuff, the Python script writes back the obj file and now the ZScript should read back the file again.

    How may I go about doing this?


    Yasin Hasanian | CG Artist

    LinkedIn

    ZBC forum

    ArtStation

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

    Default

    There's no direct way to communicate with Python from ZBrush. If you wrote a complete app in Python you could use the ZFileUtils DLL to launch the app with the file but that way you wouldn't automatically get the file back into ZBrush (though in theory your Python app could launch ZBrush with a zscript file).

    It's probably simpler, and more efficient, to learn some C++ so you can write your own DLL to do what you want with the OBJ file. You can then use the zscript [FileExecute] command to communicate with the dll and reimport the OBJ when it's done.

    For the ZFileUtils see here:
    http://docs.pixologic.com/user-guide...ng/zfileutils/

Posting Permissions

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