Jump to content
3DCoat Forums

Blender Applink


haikalle
 Share

Recommended Posts

  • Member
16 hours ago, The Candy-floss Kid said:

@Archnila

3D-Coat itself creates an Applinks Folder, inside this folder is a folder called ’Exchange’ it is this that you will set in the 3DApplink within Blender for your exchange address.

Here’s what I’d try - delete your Applinks folder (Created by 3D-Coat)  and your 3DC2Blender Folder (Created by The 3D-Coat Applink) .
Restart your computer. Open 3D-Coat and let it create a new Applink Folder. Close 3D-Coat.
Open Blender and make sure that the ‘Exchange’ folder within the Applinks folder (created by 3D-Coat) is the chosen Exchange address - navigate to the Exchange folder within the Applinks folder and set this in as the address >  Apply this Exchange Folder Address.

Press Send in the 3D-Coat Applink > now open 3D-Coat - if it does not first connect > Blender >Press Send (again).

Hopefully that will work particularly if it was working for you before with no issue.
I’ve noted that on occasion that the 3DCoat Applink drops it’s Exchange Folder address when you reopen Blender.

p.s I'd also check that you haven't double installed another Applink version i.e the one pre-installed in your default Blender addons with one installed over it from outwith Blender - found in Blender Preferences. In short check for duplicates.

On the Mac that is Users/username/Library/Application Support/Blender(version number)/scripts/addons

 

Ok I tried using the zip version of the addon, tried it with a new scene and default cube, works fine, but for some reason, it doesn't want to work with the scene I'm working on. Maybe I'll bring the objects into a new project.Update : It works now, for some reason, I think something must have happened with the old file, but anyhow, creating a new blend file solved the problem; I also noticed that I would have to reset the location of the exchange folder every time I create a new project. 

Edited by Archnila
Link to comment
Share on other sites

  • Member

Ok so far so good, the addon works, but just a quick question, for some reason when I send my mesh to 3dcoat for painting, and do the usual steps; finish painting the model, export geo and textures from 3dcoat to get the model back via the export to Blender function in 3dcoat to get the applink setup, and if I wanted to make changes, go back to 3dcoat to do so and with the export geo box unchecked, and the export texture box checked. It somehow creates a new mesh in Blender, which shouldn't be the case according to the official 3dcoat youtube tutorial. Only the textures should be updated. 

Link to comment
Share on other sites

  • Member
13 hours ago, haikalle said:

Are you using "Open in original App" option. That option only updates the mesh you have brought from blender. If you use Export to -> Blender option, that will always creates new mesh.

Ah I see! I'll try that instead then. Thanks!

Link to comment
Share on other sites

  • Advanced Member

@haikalle

I remove add on for 2.91 build once, then up-date 2.91 release from blender -git, build again. then activate, re-activate 3d coat add on. 

So I suppose, current my 2.91 use recent version or stable version of 3d coat to blender.

Then I do same test.. I could set exchange folda path , I could export cube.  to 3d coat. then I use "open in original app" and set texture options.

finally I click, "Get back" now I see this error.

location: <unknown location>:-1
Error: Python: Traceback (most recent call last):
  File "C:\myprograms\blender291-git\build_windows_Release_x64_vc16_Release\bin\Release\2.91\scripts\addons\io_coat3D\__init__.py", line 235, in invoke
    Export_folder  = global_exchange_folder
NameError: name 'global_exchange_folder' is not defined

location: <unknown location>:-1

Though I hope if I shut down and re-run blender, next time it will work .

Then as recent versions I had seen strange erroer about folda setting etc with blender 2.92 release 

sometimes it say "can not generate same folda which already generated, "  when I set the Exchange folda"  then the folda name is not exchange but "3DC2Blender "

I suppose, build in 2.91 is newer than 2.92 ?  or if you up-date for 2.92 but 2.91 build, not up-date?  because I had seen different erroer message for 2 version blender and coat plug in.

 

Link to comment
Share on other sites

  • Advanced Member

And it is important , when set paths for 3d coat exporter..  

I use non default directory to store blush smart material,,  or scene etc,  for 3d coat.  then save them in another drive volume.

we can set it from 3d coat .

top menu Edit> re locate 3d coat data then set the data folda path. 

Maybe half of 3d coat user prefer it. (without they have enough space in main drive (ssd etc )  Then I afraid if it cause issue .

because as default 3d coat exchange directory. or  3DC2Blender will be generated in the Data directory I suppose. Then anyway I made Exchange folda in the data directory which I set, and set Exchange path from 3d coat plug in UI. (there are 2 ways,, but usually when I up-date 3d coat, I need to set path again from 3d coat N key panell of blender (then sometimes it show erroer when I set exchange path ) 

mysetting.thumb.JPG.f2b5bf67f9d2b4e7cca44d6d6c8e703e.JPG

but your plug in seems still try to generate 3dc2blender in my documents... (though if it not cause issue, I do not care,,) but I may hope not generate any folda in my doucments by apricaitons, (utnill I really hope it)   but hope to make it in user customize 3d coat data directory... 

and it is my request,,

So there seems 3 directory and some setting files. which related with 3d coat exporter.  I hope to get clear knowledge about them...

we must set "Exchange " folda.. then we can set "Object and Texture" folda as blender property>scene>3d coat. do I still need "3dc2blender"?   I thought if the folda is used only for other version exporter..  

 

Edited by tokikake
Link to comment
Share on other sites

  • Applink Developer

daily 2.92 has the latest version. I checked and indeed 2.91 has older version of applink. I will try to update that too. I would like see the error you get with 2.92 version.

EDIT: I didn't know that you can change exchange path in 3d-coat.....interesting.

Edited by haikalle
Link to comment
Share on other sites

  • Advanced Member
39 minutes ago, haikalle said:

daily 2.92 has the latest version. I checked and indeed 2.91 has older version of applink. I will try to update that too. I would like see the error you get with 2.92 version.

EDIT: I didn't know that you can change exchange path in 3d-coat.....interesting.

I may re-build 2.92 (I aifraid, so I often import your offered test version, when I re-build blender not change it,,then I may remove once, and clean up-date and re-build ^^;)

And I think I could change exchange path from your plug in UI..  the interesting one, is 3d coat massive data directory which save all texture or blush etc ^^;

It was long time request, many user asked it,, then there were setting file before.. (we need to edit it )  and it gradually improved, then finally 3d coat offer UI command, we can set 3d coat data path.

Then I can not remember any more, as default where 3d coat exchange folda will be generated. but anyway I hope to keep default file strcuture, then I made exchange directory, in my 3d coat data (which I set , not in my documents,,  ) and I set the path as 3d coat exchange folda. (from your plug in UI)

So I set exchange file paht from blender UI, (not in 3d coat ^^;,  I really feel difficult to understand, which aprication (3d coat, or your coat plug in) do what about those improter directory,, so do not know detail ^^;

Anyway I can recommend for all user, you can change 3d coat massive huge data folda, as you like.. it need to be announced  with loud voice I feel ^^;)

 

Link to comment
Share on other sites

  • Advanced Member

@haikalle

1. I delete 3d coat add on, in my 2.92 build add on directory. (default location )

2. I update 2.92 master, then build again. (use blender offer batch) "make release"

3. it generate 3d coat add on (I suppose recent or your confirmed version) . so I once de-activate and activate.

4. about this time, 3d coat not show "please set exchange directory" as user UI, so I only see "send" and "Get Budk"

5. I confrimed, I have exchange folda, where I set before and it is same, in scene 3d coat exchange file path.

4.  load cube. set default material (principled bsdf attached)

5. click "Send" 

6. it show erroer (and it is what I had seen, and could not solve it )

location: <unknown location>:-1
Error: Python: Traceback (most recent call last):
  File "C:\myprograms\blender-git\build_windows_Release_x64_vc16_Release\bin\Release\2.92\scripts\addons\io_coat3D\__init__.py", line 501, in invoke
    bpy.ops.export_applink.pilgway_3d_coat()
  File "C:\myprograms\blender-git\build_windows_Release_x64_vc16_Release\bin\Release\2.92\scripts\modules\bpy\ops.py", line 132, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Python: Traceback (most recent call last):
  File "C:\myprograms\blender-git\build_windows_Release_x64_vc16_Release\bin\Release\2.92\scripts\addons\io_coat3D\__init__.py", line 511, in execute
    foundExchangeFolder, global_exchange_folder = folders.InitFolders()
  File "C:\myprograms\blender-git\build_windows_Release_x64_vc16_Release\bin\Release\2.92\scripts\addons\io_coat3D\folders.py", line 33, in InitFolders
    os.makedirs(os.path.dirname(exchangeFile))
  File "C:\myprograms\blender-git\build_windows_Release_x64_vc16_Release\bin\Release\2.92\python\lib\os.py", line 223, in makedirs
    mkdir(name, mode)
FileExistsError: [WinError 183] 譌「縺ォ蟄伜惠縺吶k繝輔ぃ繧、繝ォ繧剃ス懈・縺吶k縺薙→縺ッ縺ァ 縺阪∪縺帙s縲・ 'C:\\Users\\TAKE\\Documents\\3DC2Blender'

The Win Error seems Garbled characters, but when I send, I catch it with info window. as japanese readable word.

That means " you can not generate fle, which you already made" = 3dc2blender (directory?)

or it is same as the linked erroer

https://stackoverflow.com/questions/54491021/why-am-i-getting-the-error-fileexistserror-winerror-183-cannot-create-a-file

Then I afraid, if my setting is matter (change 3d coat data directory,, and it not work with your current version)

error.thumb.JPG.1d1b0e41bc43222aa6d79c83dde9d45c.JPG

just to confrim, I keep to use same 3d coat data directory longtime, then it worked before.

And I remember I requested, to offer option to set Exchange directory as I like.. then you kindly offer way, so it worked

Only recent versions show this issue. and I did not remember when plug in return 3dc2blender directory. again,,,

Anyway  I can not export "cube" from your add on  with recent versions. ^^;  (I do not remember which version worked for me,,)

Edited by tokikake
Link to comment
Share on other sites

  • Advanced Member

And I arelady tried once remove all generate folda (3DC2blender, and Exchange , directory, files which generated in them)

then start again. but after all I set Exchange directory from your plug in UI, then cube with mat, try to "Send", it say , same error.

so I suppose,, when  set Exchange path, plug in will auto generate 3DC2blender. after that click "send" then it maybe generate file in 3DC2blender

but it try to generate same directory "3DC2blender" again. with files. (but I know, it is just my assamption, and you know more than for me) 

just hope you can solve without many dificulity. 

Link to comment
Share on other sites

  • Advanced Member

And I test again, this time only delete the problem folda "3DC2blender" but keep Exchange directory. 

if I remove the 3DC2blender directory (there is no file in the directory)  , and launch blender,  plug in not ask me to set Exchange path.

but when I click" send", plug in seems lost Exchange folda path setting. then ask me again. like this pic.

askme.thumb.JPG.e3ca57463d9353f0016809d0d40e77f6.JPG

then on the time, there is no "3DC2blender" directory. 

I click "Apply folda">> then I check my document,, yes when I click "apply folda" to set "Exchange" path, your plug in genearte empty "3DC2Blender" in my document already.

then I click "send",, now it show the error (the directory is already exist so you can not genearte again)

Hope it help something,, to solve issue. (so I do not know why other win user can export without problem ^^; maybe version ?)

Link to comment
Share on other sites

  • Advanced Member

@haikalle

If there will be up-date (or you can confirm this  problem)  reply  please.  At current I can not use plug in for the erroer to paint in 3d coat. I think folda.py seems something wrong to generate those folda with file. (there are many if condition in the code for each PC , then maybe with my case (windows 10)   , plug in try to re generate the folda which already generated again. 

it seems happen when I set exchange path . (so once it worked, I think I may not see this problem, because your plug in need not re-assgin exchange directory, then may not generate 3dc2blender again . I happend to reset the exchange path, so maybe it cause issue.

I am afraid if it only happen with my PC  or I need to use default location for Exchange directory. At current with my setting,, I set path of Exchange in I volume 3d coat data.  but 3dc2blender always be generated in my documents directory by plug- in.  . I do not think I need to change my 3d coat data directory, but if I need to set default location for exchange directory, I simply change it..  

 

Link to comment
Share on other sites

  • Advanced Member

OK I could solve my issue.  it seems once I delete the Exchange_folda.txt,  script could not generate it again. (maybe it try to generate , but cause erroer, because it try to generate 3dc2blender which already generated when I set "Exchange" folda path.. then script start loop or sotp by erroer (FileExistsError: [WinError 183] , it actually complain, the3dc2blender is already exits. (but there is no "Exchange_floda.txt" still)

Then what I did is, actually make the empty "Exchange_folda.txt" manually,, and locate it in the "3dc2blender". at same time, I hide 

def InitFolders():

    platform = os.sys.platform
    coat3D = bpy.context.scene.coat3D

    #    Global variable foundExchangeFolder (True / False) guides these steps
    # 1. Read Exchange_folder.txt, if not success ->
    # 2. Try to find exchange folder from system hard drive, if not success -->
    # 3. Leave foundExchangeFolder = False 

    # 1. #################################################################

    if(platform == 'win32' or platform == 'darwin'):
        exchangeFile = os.path.expanduser("~") + os.sep + 'Documents' + os.sep + '3DC2Blender' + os.sep + 'Exchange_folder.txt'
    else:
        exchangeFile = os.path.expanduser("~") + os.sep + '3DC2Blender' + os.sep + 'Exchange_folder.txt'
    if(os.path.isfile(exchangeFile)):
        folderPath = ''

        folderPathh = open(exchangeFile)
        for line in folderPathh:
            folderPath = line
            break
        folderPathh.close()

        if(os.path.isdir(os.path.abspath(folderPath)) and folderPath.rfind('Exchange') >= 0):
            coat3D.exchangeFolder = folderPath
            return True, coat3D.exchangeFolder
    #else:
        #os.makedirs(os.path.dirname(exchangeFile)) __ I hide here, so script stop to generate the dir (not file) which already exit when set "Exchange"

the section, which tried to make directory = 3dc2blender,,  

the problem seems script check file exist or not,, then try to make directory.  (but directory is already generated  for my case by set Exchange folda)

Now I could return textures as same as before ^^  (it temp work,, so when haikalle find time,, check it please,, some if condition to detect user setting, seems make things more complex I feel,, you try to make things work for all case, but it include un-necessary double check then cause non intended erroer,, (try to generaete same folda etc) 

Then if other win user see same issue, then try to this edit of code,  you need to manually generate "Exchange_folda.txt"  too.

 hide the section from the folda.py   can stop FileExistsError: [WinError 183] , but script can not find exchangeFile = "Exchane_folda.txt" so it request to set "Exchange" path again. then cause forever loop.  (you can not do anything ^^;)

Edited by tokikake
Link to comment
Share on other sites

  • Advanced Member

Late summer, early autumn the Blender applink stopped working on my Windows 10 I7-4770S / GTX 1060 computer. Previously it worked flawlessly. I was building a replacement computer based on the Ryzen 7 3700 CPU and RTX 2060 so I put up with it,  believing when I do a fresh  install of Windows, Photoshop, Lightroom, 3DC, Blender and DAZ Studio, everything would work fine. And everything is...

EXCEPT the Blender applink is not working on my Ryzen pc.

I suspect a Windows update broke something.

I do have folders "C:\Users\kenmo\Documents\3DC2Blender" and an exchange folder in the folder I've defined for my 3DC assets - "G:\3DCOAT\3D-CoatV48\Exchange"

I did not create these two folders. They appeared after I installed the 3DC addon in Blender 2.9.0.1 and launching 3DC & Blender.

However NOTHING appears in the folder.

Perhaps I using the wrong Blender version? 

If that is the case WHY doesn't this forum have a link for the correct Blender Addon as they do for Modo, 3DMax, etc instead of telling users to search Github for it?

As I've said this plugin worked flawlessly a couple of months ago and then suddenly it was broken.

And now on a pristine install of Windows, 3DC & Blender it still is not working.

 

 

Link to comment
Share on other sites

  • Advanced Member

I just installed Alpha ver 2.9.2 of Blender and I get this error message.

 

 

3DC-Blender.png

Link to comment
Share on other sites

  • Advanced Member

Launching the command prompt as Administrator and doing a directory listing for  hidden files - there was nothing in the 3DC2BLender folder

Directory.JPG

Link to comment
Share on other sites

  • Advanced Member

I uninstalled the addon that ships with Blender 2.9.1 and installed the one in this thread "io_coat3D_new5.zip" and it does put some models in FBX format into folder

C:\Users\kenmo\Documents\3DC2Blender\ApplinkObjects

But they are not passed onto 3DC 4.9.65 GL

DirFull.JPG

Link to comment
Share on other sites

  • Advanced Member

I imported a model I created in MOI3D into Blender 2.9.2 and tried an exchange to 3DC for per pixel painting.

MOI-Blender.JPG

Link to comment
Share on other sites

  • Advanced Member

The model appears in the ApplinkObjects folder. But is not passed on to 3DC 4.9.64

 

 

MOI-Dir.JPG

Link to comment
Share on other sites

  • Advanced Member

However I can import the model into 3DCoat using file import.

Is there a setting in the 3DC that I am not aware of?

Moi-3DC.JPG

Link to comment
Share on other sites

  • Advanced Member
11 hours ago, kenmo said:

I just installed Alpha ver 2.9.2 of Blender and I get this error message.

 

 

3DC-Blender.png

That is why I need to manuall edit.  (but I am not the author so I can not full edit to work without some step)

The erroer happen,  script try to generate the 3dc2blender which already generated by same add on script, when you set the Exchange folda.

Thare are many conditions, when script try to generate the directory,, so some code seems need to be clean up by author. 

then try 

1. make empty new txt file save as  "Exchange_folder.txt"  without lauch any aprication.

2. set the "Exchange_folder.txt" in the "3dc2blender" directory. where script already generated . 

empty.thumb.JPG.b32ccbeb78f89cd19b375d77889b7c05.JPG

 if you had removed the  "3dc2blender"directory,, re-launch script then force it to make 3dc2blender

 (though it show same erroer) , then quit blender, locate empty "" txt in the 3dc2blender.

basically once you make the "Exchange_folder.txt", this add on (3d coat applink)  not try to generate the problem directory. 

then auto discribe  your " Exchange path" in the  "Exchange_folder.txt. txt" correctly.  (so you need not manuall set path)

 

If it still not work for you, you may need to edit code, but I suppose it work with my up-date test .

Edited by tokikake
Link to comment
Share on other sites

  • Advanced Member

And I remember when export mesh from blender, you may need to set material (pricinpled bsdf) for each material slot. (or at least you need one material slot which assgined and set the material  (default principled bsdf is OK). , then app link can generate original nodes when you import textures . 

sometimes i forget to set material, then paint in 3d coat, return, plug in can not set 3d coat nodes. (so I usually apply default principled bsdf for each material slots)

 

Link to comment
Share on other sites

  • Advanced Member

And one more,, recent versions (which packed 2.92 alpha) plug in , tex.py there is one simple error. 

I suppose some version once resolved it, but anyway, today I up-date with Git blender 2.92 then force to generate app-link again, I found the issue.

(it happen when you open in original app >> get back)  blender show error log.

I could solve it 

        else:
            for texture_info in texturelist:
                if (os.path.isfile(texture_list[3])):

to change

        else:
            for texture_info in texturelist:
                if (os.path.isfile(texture_info[3])):

(I suppose it should be)^_^

then now I could return and generate coat texture nodes without problem. then basically about some case (your export setting), app-link generate nodes, but

set UDIM tile, then could not apply it correctly. (So you may better not use "Skip UV set name if there is one uv tile option" when you export textures from 3d coat)

Link to comment
Share on other sites

  • Advanced Member
1 hour ago, haikalle said:

@tokikake Thats great. Thank you. Do you have access to make commits into blender git? 

No when I up-date one add on for blender 2.8,   I was asked by other developer to up-load  with git.  But I do not know how it work well , and may not plan to lern it..

 (so I afraid, I break something etc,, for official)    Then at curent  I only use Git to download blender versions and branches ... sorry ^^;

 

Link to comment
Share on other sites

  • Advanced Member

Then about both is caused you try to up-date by our request so frequently for all versions , then it seems some solved issue return or sometimes change with new version I feel.

(at current win user may only see the win erroer 183, when they once clean up folda and txt for setting.. (so it only happen for some user)

another one (itexture_info[3]) is simple type miss I feel. I could catch the erroer before, then forgot it,, but today I test to confirm my way, then I see the erroer. 

Then I do not know if it is right or not, so haikalle check please.. (If it need to use other list,,) . I really like this plug-in, then hope it stable and easy to use when user first try it.

and I really apreciate, you just make this add on for other user  (I sometimes have thought you are one of 3d coat dev team,, but  you are not ^^;  if you did not offer this add on,, I think many blender user may hesitate to try 3d coat I feel...   your add on is really important for us.  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...