Jump to content
3DCoat Forums

Blender Applink


haikalle
 Share

Recommended Posts

  • Advanced Member

Then if we hope to save 2 texture set withou

5 minutes ago, haikalle said:

Here you are :)

io_coat3D.zip

Too quick work ^^ ,, thanks :hi:

Then I do not know if it is useful for others, so anytime you change if others not hope it (not auto-add fake user). (blender data-block sometimes annoying,)

===

btw if user hope to keep 2 material for same mesh, another way is add fake user for material, and make new material, export again with app-link, so it work correctly.. (I do not know which is best option,, maybe change material, and exporr again is good workfolow for complex mesh (which have many uvtile or UDIM etc)

Edited by tokikake
Link to comment
Share on other sites

  • Applink Developer

This is what I was thinking too. If I could choose I maybe would leave it as it was, no fake users. But if there is more user feedback about this topic lets then discuss more about it... but I think that there is pros and cons in both ways and I can happily leave it like this at the moment.

Link to comment
Share on other sites

  • Advanced Member

Any advice on my predicament gratefully recieved .

 

Blender 2.83.9 (Same Results with Blender 2.8 In Testing)

Having no luck with the 3D-Coat Applink on my Mac and have been trying for hours to resolve things with no luck.

If I press send Per-Pixel Painting to 3DCoat 4.9.62 nothing happens.
If I press send Per-Pixel Painting to 3DCoat  4.9.02 It lets me proceed to begin painting a texture
When I’ve painted a texture and press Open In Original App I see no texture applied in Blender in Rendered or Material Preview.

I can find no imported image applied as a texture on my uv’ed mesh but I do see a strange node arrangement. When I press cntrl + T on the Principled BDSF Shader I can also find no available list of texture maps.

As a btw there is a Blender Cycles option but no option for Blender Applink in the 'Open In Original App' drop down - nor is there a Get Back Button in Blender - just a Send Option.

nodes.jpg

Link to comment
Share on other sites

  • Applink Developer

@The Candy-floss Kid Sorry to hear. If you coudl help me a bit then I'm sure we can tackle these issues one by one. I don't have mac computer so testing addon in that platform gives some extra headache for me :) First could you download latest 2.90 daily build that includes the latest applink.

Then with basic cube if you try to export that as ppp into 3d-coat. does that works and if not does blender show any errors in log window? If you could share short video too that would be very helpful.

Link to comment
Share on other sites

  • Advanced Member

@haikalle

Many thanks for your reply.

I loaded a clean new OS on an external HD - my current one does not run Blender 2.9.

This gives me a totally fresh load of both Blender 2.9 and 3DCoat 4.9.62.

Sadly I didn't get it too work but here is the report error that appeared which will hopefuly be of help with regard tracking the issue.

 

applink error report.jpg

Link to comment
Share on other sites

  • Applink Developer

@The Candy-floss Kid

It seams that you are still using old version of applink. Are you able to manually copy addon into your blender folder. If yes then exctract and copy this folder to there:

io_coat3D.zip             

This most likely dosen't fix that bug yet but I want to make sure that you have latest addon version.

Edited by haikalle
Link to comment
Share on other sites

  • Advanced Member

@haikalle

Installed the latest Applink as you so kindly made available.

Had no luck at first getting the ’Send’ to open in 3DCoat 4.9.62 so I loaded the latest Mac Version 3DCoat 4.9.65. This version did import the Blender ‘Send’ of the default cube to Per Pixel Painting.

Having finished > 3DCoat > Open In Original App
Blender >’Get Back’  ……… Fail with Error Report.  Image attached below.

get back.jpg

Link to comment
Share on other sites

  • Advanced Member

So the error log show, you have no data.json file in the directory. 

I am not mac user, but can you check add on directory, where you installed 3d coat? 

Though I do not check all version but even though I use windows, I need to use aprication add on directory about this add on.  

If you install add on in user custom directory, it may cause issue.

As you can see, the console show 2 different add on directory. 

I can see,  you install io_coat3d  in

pathA  "..../Blender 2.9.app/Contents/Resouce..../Scripts/addons/io_coat3d"

but the script need to get data.json (it usually locate in  io_coat3d directory)   , then it serch   the file in 

 pathB    "...../MacOS/2.90/scripts/addons/io_coat3d" 

I suppose you have no io_coat3d folda in pathB  .  if follow the console log, you need to install io_coat3d , in path B not path A

I do not know how you install the add on, but you may need manually move io_coat3d (add on) package to path B.  (then delete io_coat3d from path A or blender may complain)

 

  • Like 1
Link to comment
Share on other sites

  • Advanced Member

@tokikake

@haikalle

Many thanks for your reply tokikake.

The Applink exchange works with no version of Blender on the Mac I use.
Taking a closer look it seems all versions seem to be looking in the wrong place for the .json file.

The Blender Download for Mac by default has the io_coat3D Addon placed here (taking Blender 2.8 as example):
Applications/Blender 2.8.app/Contents/Resources/2.80/scripts/addons/io_coat3D

The secondary location on a Mac for added scripts is here:
Users/Username /Library/Application Support/Blender/2.80>scripts/addons/io_coat3D

All errors regarding every version of the Applink I’ve tested on Blender 2.8, 2.8.3.and 2.9 seem to be stemming from the fact that the Applink is looking for the .json here: Applications/Blender 2.8.app/Contents/MacOS/2.80/scripts/addons/io_coat3D/data.json

When in fact that default location for scripts that ship with Blender is:

Applications/Blender 2.8.app/Contents/Resources/2.80/scripts/addons/io_coat3D/data.json

Whether I place the io_coat3D Applink in the default location for shipped scripts or remove it and place it instead in the the secondary location for added scripts appears to make no difference,

The operation always fails when the applink looks in a place where scripts do not exist - there is no scripts/addons/io_coat3D/data.json file at the location Applications/Blender 2.8.app/Contents/MacOS/2.80

 

Link to comment
Share on other sites

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

@tokikake

@haikalle

Many thanks for your reply tokikake.

The Applink exchange works with no version of Blender on the Mac I use.
Taking a closer look it seems all versions seem to be looking in the wrong place for the .json file.

The Blender Download for Mac by default has the io_coat3D Addon placed here (taking Blender 2.8 as example):
Applications/Blender 2.8.app/Contents/Resources/2.80/scripts/addons/io_coat3D

All errors regarding every version of the Applink I’ve tested on Blender 2.8, 2.8.3.and 2.9 seem to be stemming from the fact that the Applink is looking for the .json here: Applications/Blender 2.8.app/Contents/MacOS/2.80/scripts/addons/io_coat3D/data.json

When in fact that default location for scripts that ship with Blender is:

Applications/Blender 2.8.app/Contents/Resources/2.80/scripts/addons/io_coat3D/data.json

The operation always fails when the applink looks in a place where scripts do not exist - there is no scripts/addons/io_coat3D/data.json file at the location Applications/Blender 2.8.app/Contents/MacOS/2.80

 

I see, , to correct it, need to edit mac version script code, which serch the data.json.   Though I may try, temporally,

1.   make the directory first, (though it is not default location, but even though you add new directory in app directory, it may not cause problem.

Applications/Blender 2.8.app/Contents/MacOS/2.80/scripts/addons/io_coat3D/

then actually copy and paste the "json file" form add on directory,.. (but I know, it is not default add on directory, so even though it solve the error,, If it cause another issue etc,,)

I suppose with your reply,   haikalle will solve this problem.   

 

Link to comment
Share on other sites

  • Advanced Member

I think (though it may need not for haikalle, he know how it work) as console show

the tex.py line 397, which set json path,

json_address = os.path.dirname(bpy.app.binary_path) + os.sep + str(bpy.app.version[0]) + '.' + str(bpy.app.version[1]) + os.sep + 'scripts' + os.sep + 'addons' + os.sep + 'io_coat3D' + os.sep + 'data.json'

not work for mac version. 

Can you test this version tex.py please?  I use (__file__)  

then change 

json_address = os.path.dirname(os.path.abspath(__file__)) + os.sep + 'data.json'

it seems worked for me, (so maybe for mac it work too)

  (please keep default one then if it now work replace again)

tex.py

Edited by tokikake
Link to comment
Share on other sites

  • Advanced Member
6 minutes ago, haikalle said:

@The Candy-floss Kid

@tokikake

Thatnks you both. Could someone that has mac do this test for me. open blender and go to python console. Then write: 

bpy.app.binary_path
 
What do you get as result?

Though I do not know how mac install blender,, but it seems different from windows blender file structure, 

https://b3d101.org/en/pymove3d-python-3dworld/blender-python-api/

 it show exe path, but mac version may not locate add on directory as sub directory of the exe.

Link to comment
Share on other sites

  • Applink Developer

I asked this from blender chat in it looks like that:

bpy.app.binary_path = <stuff>/Blender2.82a.app/Contents/MacOS/Blender

So if I replace '/MacOS/Blender' into 'Resources'. This maybe fixes the problem? Here is test build

io_coat3D.zip

 

 

`

Edited by haikalle
Link to comment
Share on other sites

  • Advanced Member
6 hours ago, haikalle said:

@The Candy-floss Kid

@tokikake

Thatnks you both. Could someone that has mac do this test for me. open blender and go to python console. Then write: 

bpy.app.binary_path
 
What do you get as result?
 

@haikalle

The result in the console for bpy.app.binary_path

'/Applications/Blender 2.83.6.app/Contents/MacOS/Blender'
792140569_newerror.thumb.png.b6043f1f42c24e076d3b565fbb13689d.png

 

Haikalle, here's an update trying the modified Applink you so kindly provided: Managed to get Blender 2.8.3 to send this to 3DCoat V4.9

However on pressing GetBack I recieve this error

new error.png

Link to comment
Share on other sites

  • Advanced Member

 

6 hours ago, haikalle said:

Io_coat3D.zip

new try

it prints JSON_ADDRESS into console where you can check what it the path addon is trying to look for. JSON_ADDRESS should match with the actual location of data.json file

Edited 18 minutes ago by haikalle

 

 

`

Here's the error feedback on the get back - seems like things are closer

error update.png

Link to comment
Share on other sites

  • Advanced Member
On 10/24/2020 at 4:53 PM, haikalle said:

io_coat3D.zip

Thats really odd error. could you try this

On 10/24/2020 at 8:49 AM, tokikake said:

 

This seems to work. No errors reports.

It doesn't appear in Blender as textured but I can navigate to the Texture files in the 3DC folder and attach the texture manually

 

Seems like all the other features are working also. :yahoo:

Bravo and thank you.

------------------------------------------------------------------------------------------

For other Mac users I’ll write the folder structure that the 3DCoat Applink will add.

3D-Coat Applink Mac

After installing the Addon from The Blender Application (actual location of Addon, Blender App >control click >Show Package Contents /Contents/Resources/2.83/2.9 etc/scripts/addons) you will be asked to define the 'Exchange' Folder address.
NB: After assigning this you will also see it referenced in the Scene Properties Tab of Blender.

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

In 0SX 10.13 and above using 3D-Coat 4.9.65 this will be  /Users/username/Documents/Applinks/3D-Coat/Exchange/
In OSX 10.12 this will be /Users/username/AppLinks/3D-Coat/Exchange/

The 3D-Coat Applink itself will create One Folder called 3DC2Blender in Users/username/Documents/3DC2Blender
This folder is where your assets, Textures/ Uv’ed Meshes created in 3D-Coat will be saved too

Once the object for painting is sent to 3DCoat and after you have created your Texture maps in 3DCoat>File >Open In Original App >Choose Your Blender Cycles Export Preset and export.

>Back in Blender >Get Back button in The Applink.
In my case the texture files were not added to the Mesh automatically but could be added to the mesh from Users/UserName/Document called 3DC2Blender
The location for these textures can also be specified in the Scene Properties Tab of Blender you will see an option for Object/Texture Folder.

>Back in Blender >Get Back button in The Applink.

Current Errors - Hopefully To Be Fxed 10/24/2020
In my case the texture files were not added to the Mesh automatically - neither were the uv'ed Meshes these could be added to the mesh from Users/username/Documents/3DC2Blender. In the case of Uved Meshes I had to import the Meshes from from Users/username/Documents/3DC2Blender > Select the Target First >The imported UV Source Object second > Cntrl+ L > Transfer Uv’s

The location for these textures can also be specified in thee Scene Properties Tab of Blender you will see an option for Object/Texture Folder.

Link to comment
Share on other sites

  • Applink Developer

So texture nodes are not automaticly created for you.. this needs to be fixed. I think I didn'f fixed the right thing in my last build so I revert that change.

Could you test this version and when you "toggle system console" you should see TEST created all over. Do you see this effect? Also are you in discord. We could continue there cause itse easier to test fast updates int here

image.thumb.png.11998003ef88e833e3f0d2eb60e8163f.png

io_coat3D.zip

Link to comment
Share on other sites

  • Advanced Member

@haikalle

I think there should be reason, you do not use os.path.abspath(__file__) to catch the json.data directory, so just hoped to ask the reason for my learning bpy.

If I use the os.path.abspath(__file__) without check blender version etc,,  now I do not need to use default aprication add on directory. but can use user defined add on directory.

because it can serch json.data directory (= "tex.py" directory,)  with "tex.py" absolute path where python run the code..   or Mac can not use __File__ to get tex.py path?  or use __file__ may cause issue for some case ? (eg windows may add double back slash, but it may not be shown to get the path, and it stil l work without format )

Edited by tokikake
Link to comment
Share on other sites

  • Advanced Member
Quote

Could you test this version and when you "toggle system console" you should see TEST created all over. Do you see this effect? Also are you in discord. We could continue there cause itse easier to test fast updates int here

@haikalle

I have just ran the test on the latest link you have sent. No I do not see TEST repeated.

In my last communication I had thought it was just the texture not returning to Blender from 3DCoat.
Although both textures and uved meshes are being sent to the 3DC2Blender folder they are not being imported back to Blender as yet.

It escaped my attention previously because I was using a default Cube with the same uv’s and not new uv's created in 3DCoat.

I decided to test it on a project yesterday and found out when I found myself having to Transfer Uv’s.

Sorry I am not on Discord.

Link to comment
Share on other sites

  • Advanced Member

@haikalle

Yes I could see the Test generated full in console.

 windows 10 pro with 2.91 build test.

=======

And actually I had some issue when I update 3d coat, (exchange your offered version zip)

Usually add on can up-date without rre-start blender,  I only need toactivate new installed one. (and blender 2.9 offer, up-date script, basically it work , if I keep activate and edit scritp.

but some case I needed to shut down and run blender again about this add on to up-date version. (if I exchange new version)

or it usually show erroer , which could not find exchange folder (I already set it )

then if I see the up-date problem, I usually shut-down and run blender again, after that this plug in work without problem. 

Edited by tokikake
Link to comment
Share on other sites

  • Advanced Member

This version seems show new erroer for me when I get-buck texture.

I did same test with many version, and have not seen issue about recetn versions, but you attached one show erroer when I get-buck after export texture from 3d coat.

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 249, in invoke
    workflow1(ExportFolder)
  File "C:\myprograms\blender291-git\build_windows_Release_x64_vc16_Release\bin\Release\2.91\scripts\addons\io_coat3D\__init__.py", line 1285, in workflow1
    blender_3DC_blender(texturelist, new_applink_address)
  File "C:\myprograms\blender291-git\build_windows_Release_x64_vc16_Release\bin\Release\2.91\scripts\addons\io_coat3D\__init__.py", line 1061, in blender_3DC_blender
    tex.matlab(objekti,mat_list,texturelist, is_new)
  File "C:\myprograms\blender291-git\build_windows_Release_x64_vc16_Release\bin\Release\2.91\scripts\addons\io_coat3D\tex.py", line 684, in matlab
    readtexturefolder(objekti, mat_list, texturelist, is_new, udim_textures, udim_indexs)
  File "C:\myprograms\blender291-git\build_windows_Release_x64_vc16_Release\bin\Release\2.91\scripts\addons\io_coat3D\tex.py", line 194, in readtexturefolder
    if (os.path.isfile(texture_list[3])):
NameError: name 'texture_list' is not defined

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...