Jump to content
3DCoat Forums
haikalle

Blender Applink

Recommended Posts

@haikalle

So I finally return true version which work well ^^;  I believe, your means daily build version which include recent blender app link ,seems 2.91 alpha..right?

the version of app link show 4.9.34 for me.. anyway it worked with workflow 1 without problem.(with recent 2.91 which I test now)

  I may try to change texture path etc with export option.

 but I remember your add on seems record path and re-arrange for UDIM number, so I suppose even though I change texture path with option it should work.. (And a few weeks ago it have worked,,though I did not test UDIM at that time,,)

anyway,, I may copy and paste current version, and test with another version (like 2.83 LTS it seems most stable, at current for me,,) thanks!!   

Share this post


Link to post
Share on other sites

I found small bug? (or if it need, I hope you confirm) as I said, I need to set expot option carefully.  

I start from your youtube set-up, but 3d coat remember, my texture-prefix. then without I remove it, app-link not generate nodes correctly.

to applink work (generate 3d coat nodes)

 I need to set texture prefix as empty. or app link do not generate nodes.

And I need to activate "use model name as texture prefix" too.

at least these 2 option need to set so, as same as ExportUV sets as Tiles option. (with my monkey scene)

And I think, after export mesh from blender by app-link, I can not change texture-path. 

eg 1 set material in 3d coat, then when export, I set texture-path , then up-date in blender , material.

then in 3d coat I edit again, but this time I hope to change texture-path, then up-date in blender, click get-buck, it not work.

To change texrue path, I need to re-export same obj again.  (Usually I may once shut-down, 3d coat, to confirm) (then current link up-date I suppose)

I may hope to save texture sets as different folda, or hope to use texture-perfix. but at current if I use UDIM tile with material group, it seems not work.

I can not use "texture prefix" and can not change texture path, untill reflesh link I thin. (so hope more test from other user)

Without it, I need manually change nodes or move textures set etc, for each mesh.. eg I often make 2 or 3 texture sets for character, shut etc,,

So hope to use "texture prefix" like (style1 or colorful etc) or hope to set texture path, when I export..without remove link. 

(if I set texture prefix,  app link never generate nodes for me,, at least for UDIM (material) mesh, I think.. I do not know if more simple mesh may work.(eg without UDIM tile etc)

Edited by tokikake

Share this post


Link to post
Share on other sites
35 minutes ago, haikalle said:

@tokikake

Please try this version. This version should not care how you name your textures.

io_coat3D_v03.zip

 

Thanks!!  I really did not like auto applied mesh name need to be used for saved texture,  So hope it work.^_^

===

Yes even though I did not use object name, and set texture  prefix, , it work like magic !! I really apreciate this up-date.

Ideally I hope to change texture-pre fix when I need,, but it seems better keep same texture untill remove link once? 

At current, if I re- edit texture in 3d coat, (re-apply or change material) then change texture-prefix , export, it not change texture. 

(of course if I use same texrue prefix (and keep full file path with texture name), it should be overwritten when export, but it means I lost the old version texture-set.

hope you know understand what I means... )

1. make texture set in 3d coat >> export with set1 prefix. 

2. up-date in blender (it work)

3. keep current link, then change material in 3d coat >> export with set2 prefix

4. up-date in blender (get-buck),   then I hope to change texture of current 3d coat nodes. 

if it work I can make 2 texture set for same mesh, without break link etc.  (then manually change when I need)

Or I may expect, if I can, change folda name (path of texture) , when export different set I suppose.. ( set1 folda, set2 folda for same mesh)

then when export, app link change current texture in 3d coat nodes as same as current 3d coat material which I edit. without overwrite texture.

 

Edited by tokikake

Share this post


Link to post
Share on other sites
1 hour ago, haikalle said:

@tokikake

Here is version that should work when you change prefix.

io_coat3D_v04.zip

 

really ? anytime I change mat in 3d coat,, (make another set), then when export change prefix,, (save as another name textuer) then it will be rendered as current material without remove link?!!

I test again..thanks..^_^

Share this post


Link to post
Share on other sites
2 hours ago, haikalle said:

@tokikake

Here is version that should work when you change prefix.

io_coat3D_v04.zip

 

quick report. I see now it generate 3d coat nodes, and try to exchange all texture when I change prefix . so I clear see it almost work.

One problem is, if I second export , it now  gather textures with new prefix, but somehow miss set texturel with UDIM number.

eg  the material which need to use 1011 use 1001 textures. hope you check it.

(so partially update correctly, with change prefix. )

eg the Leye and Reye material groups are actually locate as UDIM 1011 , then when I frist time export it correctly pick the texture 1011 of prefix.

but when next I export, (with use same option, only change prefix), it pick 1001 texture (with new prefix) for eye parts. 

so something change when second export (I use same option, I confirm) to apply texture for each tile. 

(I keep using same scene, to do test correctly)

textureid.thumb.JPG.09df9969f24484b22c92ceed3fe3a904.JPG

 

Edited by tokikake

Share this post


Link to post
Share on other sites

@tokikake

That's the way how it works. Blender needs only 1001 and it will calculate automaticly the right texture into right tile.

There is other bug I found and I fixed it in my special exe. Right now 3d-coat links textures into fbx files, and when blender imports it, it will also import textures. This is maybe wanted behaviour for normal situation but not for applink where I want to control everything :) and there is no option in 3d-coat export or blender import to exclude textures. 

That is causing that everytime when you import mesh. It will bring extra textures into blender scene. Right now you can uncheck "Export geometry" after first "GetBack". Other way is just use my exe and this is taken care for you. Here is latest applink and exe

io_coat3D_v04.zip

3DCoatGL64_v04.zip

 

Share this post


Link to post
Share on other sites
1 minute ago, haikalle said:

@tokikake

That's the way how it works. Blender needs only 1001 and it will calculate automaticly the right texture into right tile.

There is other bug I found and I fixed it in my special exe. Right now 3d-coat links textures into fbx files, and when blender imports it, it will also import textures. This is maybe wanted behaviour for normal situation but not for applink where I want to control everything :) and there is no option in 3d-coat export or blender import to exclude textures. 

That is causing that everytime when you import mesh. It will bring extra textures into blender scene. Right now you can uncheck "Export geometry" after first "GetBack". Other way is just use my exe and this is taken care for you. Here is latest applink and exe

io_coat3D_v04.zip

3DCoatGL64_v04.zip

 

Really thanks,, I know what seems going on ^^  

Actually now I am planining to offer some infomation about new blender 2.82 later UDIM how work.

==================

 To work as UDIM, blender need to gather all tile textures as one "UDIM texture set",   but to work it correctly, user need to gather and set UDIM tile for each texture in UV editor.

eg I make "UDIMset1"  (blender texture data name). which  assgin each texture for each tiles   then when we add it in texture nodes, we may only use one texture set name.

like my pic.

UDIMset.thumb.JPG.741370ec7228fffe0f1f5200520d3f38.JPG

But  If we do not make "UDIMtextureset" maybe blender try to serch 1001, and serch other number texture, then  auto-apply  with UV tile. so I supposed if it may confilict add on way.

(add on need not set texture set , but pick each texture individually without make texture set, I suppose..

as far far future,, I suppose if script can auto generate texture-set like blender manner, maybe add on can use it for 3d-coat nodes.. but I do not think it really need, untill there are another case, which may work better. 

 

Share this post


Link to post
Share on other sites
37 minutes ago, haikalle said:

@tokikake

That's the way how it works. Blender needs only 1001 and it will calculate automaticly the right texture into right tile.

I think, if you set textuer node option from "single texture" to  "UDIM" tile blender may auto-serch other texture with number,, but 3d coat nodes did not set "UDIM", but use "single texture"

UDIMtile.JPG.1ae0142b1e82d8dab2c1ad2a10db9544.JPG

 

Then I afraid it may not work as you expect.. but I may test again.

(actually I keep "uncheck "Export geometry"  for all export option, so I feel if it not matter of this issue,,I afraid)

 

 

Edited by tokikake

Share this post


Link to post
Share on other sites
On 9/10/2020 at 12:07 PM, haikalle said:

@Drocket

Please find Exchange_folder.txt file from your computer and delete it. That should fix that problem.

Hi, Just installed applink for the first time. I was stumped for about half an hour trying to get it to work due to it not finding the exchange folder and then not linking with 3d coat , and visa versa.  And then found this mention.
It fixed sending to 3d coat but when i try and GetBack in blender (2.9) I`m getting an error.
Thanks
image.thumb.png.207963fd2176c69e99a289bdf4f130f9.png
image.thumb.png.e02474f89b14947ffa93e32705d53be8.png

Edited by pr1970

Share this post


Link to post
Share on other sites

From your error log, you seems install duplicate version in  your user AppData directory. but 3d coat applink  already packed as official, so you should not install this in user AppData directory. 

If you test another version, basically you may need to overwrite the one in program directory.. 

So I may recommend,, once remove 3d coat add on from  your user AppData blender addon  directory. 

and from blender property activate default one which already installed in your blender package.

(then about this add on, you can not change package folda name (maybe, this folda name is used for valuable etc)

 so if you change version (eg test attached version), you may need to overwrite "io_coat3D" perfectly.

I usually rename default one, then keep it (but never activate), then install other version in the aprication add on directory (not user directory). then  activate the overwrite version.

 

Edited by tokikake
  • Like 1

Share this post


Link to post
Share on other sites

@haikalle

Thanks for all the tweak nodes in the combined node.

Esp the color ramps for the Metallic and Roughness for tweaking them which I set up too when manually setting up the maps without the applink.

Thanks.jpg

Share this post


Link to post
Share on other sites
1 hour ago, tokikake said:

I usually rename default one, then keep it (but never activate), then install other version in the aprication add on directory (not user directory). then  activate the overwrite version.

 

Thanks, that worked. I had to do a blender repair (reinstall) and then i left the default one unchecked in preferences and installed the latest version from the zip.

Share this post


Link to post
Share on other sites
6 minutes ago, pr1970 said:

Thanks, that worked. I had to do a blender repair (reinstall) and then i left the default one unchecked in preferences and installed the latest version from the zip.

I forget to mention one thing, sometimes blender complain even though you do not activate, default one, if there are 2 same name add on.

(so basically I move the default one, then keep it  in another location, but if your current work-flow worked without problem, It seems OK.

(I actually have experienced same issue, (test too many version, with mix use user add on directory), then remember how I soloved it.

Share this post


Link to post
Share on other sites
2 hours ago, tokikake said:

I forget to mention one thing, sometimes blender complain even though you do not activate, default one, if there are 2 same name add on.

(so basically I move the default one, then keep it  in another location, but if your current work-flow worked without problem, It seems OK.

(I actually have experienced same issue, (test too many version, with mix use user add on directory), then remember how I soloved it.

I did seem to get an error if i renamed the default one when sending an asset to 3d coat, saying it couldnt find it. So i kept the folder the same name and just didnt enable it.

Share this post


Link to post
Share on other sites

Hello, Please help me understand what the plugin swears at when you click the button "GetBack":)

Traceback (most recent call last):
File "E:\E_cycles_2.83.4_v20200807_win\Release\2.83\scripts\addons\io_coat3D\__init__.py", line 339, in invoke
workflow 1(ExportFolder)
File "E:\E_cycles_2.83.4_v20200807_win\Release\2.83\scripts\addons\io_coat3D\__init__.py", line 1356, in workflow 1
blender_3D C_blender(texturelist)
File "E:\E_cycles_2.83.4_v20200807_win\Release\2.83\scripts\addons\io_coat3D\__init__.py", line 1134, in blender_3D C_blender
os.remove(path3b_n)
FileNotFoundError: [WinError 2] the specified file cannot be found: 'C:\\Users\\ole4k\\Documents\\Applinks\\3D-Coat\\Exchange\\last_saved_3b_file.txt'

location: <unknown location>:-1

 

Share this post


Link to post
Share on other sites
32 minutes ago, Alex_Velger said:

Hello, Please help me understand what the plugin swears at when you click the button "GetBack":)

Traceback (most recent call last):
File "E:\E_cycles_2.83.4_v20200807_win\Release\2.83\scripts\addons\io_coat3D\__init__.py", line 339, in invoke
workflow 1(ExportFolder)
File "E:\E_cycles_2.83.4_v20200807_win\Release\2.83\scripts\addons\io_coat3D\__init__.py", line 1356, in workflow 1
blender_3D C_blender(texturelist)
File "E:\E_cycles_2.83.4_v20200807_win\Release\2.83\scripts\addons\io_coat3D\__init__.py", line 1134, in blender_3D C_blender
os.remove(path3b_n)
FileNotFoundError: [WinError 2] the specified file cannot be found: 'C:\\Users\\ole4k\\Documents\\Applinks\\3D-Coat\\Exchange\\last_saved_3b_file.txt'

location: <unknown location>:-1

 

Could you try this version and see does it fix the problem.

io_coat3D.zip

Share this post


Link to post
Share on other sites

@haikalle 

I could confirm your add on success to import deformed mesh (in geometry editor room)  to blender again. and could confrim it keep vertex order, and counts without problem,

at least one mesh.

So I hope as future request, (though at current I only thik about paint -room <> geometry editor (tweak) room workflow. 

when" I open in original app" with export geometry, now it add new shape key. (with option) ^^

Though most of case I may not plan seriously to tweak mesh in geometry edit room, but it seems useful untill 3d coat perfectly remove geometry editor room.

If you offer the option, actually we have new option to make morphs with 3d coat . (eg when paint mesh, at same time you find some un-expected mesh flow, then in 3d coat, geometry edito room,  tweak with brush , or adjust part  position etc,, then import it as new shape key,,)

 import export options are located in scene proeprty >3d coat > up-date section, so I hope one more option near by "Update mesh UV",

labelled "import as shape key" etc.. (of course it need to work only when we choose "update mesh UV" and actually export mesh from 3d coat export option. )

=========

And I found some unique behavor,,, at current if the mesh have some shape key, then I edit in 3d coat >> open in original  app> get-buck,

it actually export editted geometry as FBX, but not up-date correctly in blender. But  if I remove the shape keys, blender suddenly up-date geometry.

Edited by tokikake

Share this post


Link to post
Share on other sites

I can't send anything to 3d coat. I get this bug everytime. 

 

Traceback (most recent call last):
  File "C:\Users\spraw\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\io_coat3D\__init__.py", line 579, in invoke
    bpy.ops.export_applink.pilgway_3d_coat()
  File "D:\program files\steamapps\common\Blender\2.90\scripts\modules\bpy\ops.py", line 201, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Traceback (most recent call last):
  File "C:\Users\spraw\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\io_coat3D\__init__.py", line 613, in execute
    coat3D.exchangedir = set_exchange_folder()
  File "C:\Users\spraw\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\io_coat3D\__init__.py", line 137, in set_exchange_folder
    if(source != coat3D.exchangedir and coat3D.exchangedir != '' and coat3D.exchangedir.rfind('Exchange') >= 0):
UnboundLocalError: local variable 'source' referenced before assignment

location: D:\program files\steamapps\common\Blender\2.90\scripts\modules\bpy\ops.py:201

location: <unknown location>:-1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×