Jump to content
3DCoat Forums

Blender Applink


haikalle
 Share

Recommended Posts

  • Advanced Member
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..^_^

Link to comment
Share on other sites

  • Advanced Member
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
Link to comment
Share on other sites

  • Applink Developer

@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

 

Link to comment
Share on other sites

  • Advanced Member
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. 

 

Link to comment
Share on other sites

  • Advanced Member
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
Link to comment
Share on other sites

  • Member
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
Link to comment
Share on other sites

  • Advanced Member

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Advanced Member
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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Member

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

 

Link to comment
Share on other sites

  • Applink Developer
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

Link to comment
Share on other sites

  • Advanced Member

@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
Link to comment
Share on other sites

  • Member

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

Link to comment
Share on other sites

  • Applink Developer

Now there is some realtime updating in applink. you still have getback button so don't worry :) and you need to use it when you bring your mesh into blender first time. But now applink will update textures that has already texture node in blender. This hopefully decrease some "getBack" clicks. 

Included alredy in daily 2.90 builds. 

Link to comment
Share on other sites

  • Advanced Member

Yes the live up-date work-flow seems reasonable for me.:rofl:

I have one question,,  when  I export  2nd  texture set  as individual name from 3d coat,  

 app link will auto add " Fake User" for all import textures, so blender may not auto delete texture path when we save the scene?

 

 

 

Link to comment
Share on other sites

  • Applink Developer

I decided to rewrite small part of applink that includes folders/paths functions. Nothing new for end user this time, but to maintain this code became a bit easier I hope :)

 io_coat3D.zip

@tokikake Sorry I don't fully understand how I should change the code in applink for you request.

Edited by haikalle
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • Advanced Member

I up-date 2.91 alpha (git master)  (today), then activate 3d coat app-link add on again.   Now it seems lost "Exchange" directory, then I set my exchange directory and, "apply folda" but app-link not show any button to send mesh for 3d coat from blender.

I use user custom 3d coat link directory in another HD volume ,

like "I:\myfile\3dcoat\link\3D-CoatLink\Exchange\"   so it is not 3d coat default, is it matter?  or  Do I need to download your new zip here?  (I had used same exchange directory, then other version had worked without problem)

exchange.thumb.JPG.ad8cf3f7b0a2665f941e52751a69427c.JPG

And I did not get any error log about this, (in console) but when I de-activate or activate app-link add-on, it show error,

"""Python: Traceback (most recent call last):
  File "C:\myprograms\blender-git\build_windows_Release_x64_vc15_Release\bin\Release\2.91\scripts\addons\io_coat3D\__init__.py", line 1460, in draw
    coat3D = bpy.context.scene.coat3D
AttributeError: 'Scene' object has no attribute 'coat3D'"""

(though if  I try same thing again,  now it added correctly but I afraid if it realated this problem  (script miss up-date some scene variables etc)

====
Ok now it seems work,  I quit then re-run blender. now it return buttons thanks.. I will test and request again, about texture (or material data-block) things.

Then  I needed to check how current app-link  work  untill  request correclty :blush:

Above request is related how we keep 2 different material, when we use app-link to make and save "material variation" for same mesh and save as blender data- block.

1 way is "save as different material with fake-user" , 2nd way is save as "different texture (if we keep to use same material) with fake user" then exchange "texture" in the "image texture nodes"  of material. (it may need more work because we need to exchange all texture for all shader nodes which use image"

I needed to confirm current app-link manner..(with change material in blender etc) untill request you. (but now I simply can not export mesh ^^;)

Edited by tokikake
add log and pic
Link to comment
Share on other sites

  • Advanced Member
39 minutes ago, haikalle said:

I did several commitments for 2.90 daily builds and It may happenned that you got version that was not finished yet. Now it should work in daily builds and here is also download zip

io_coat3D.zip

Hi thanks now I could test again.^_^

Then what I means (save texture as Fake user) is  when I export textures from 3d coat with app-link,  it generate 3d coat nodes for the material.

I know (already test), we should not change " material slot"  in blender when we use app-link (or we need to re-export mesh from blender again)

Keep material as same as before, then app-link can overwrite textures when we edit and export from 3d coat.  (it is reasonable I feel)

Then  I hope to keep 2 texture for same nodes (like diffuse) then export texture as different pre-fix from 3d coat. 

 app-link can change path correctly.   then What I hope is,  just apply texture as Fake user,, when export  textuers from 3d coat,

like this pic,,, (in the pic those 3 exported texture not fake user, so they will be removed from data-block) 

fakeuser.thumb.JPG.61a4b3ed071357edece5d2fe611fe275.JPG

fakepython.thumb.JPG.2afffe1630a23f7977337cf9ced74041.JPG

if app-link auto add " fake user" for those textures, saved blender scene can keep it. (texture path with texture data block name) then I can exchange them manually without serching around texture which I imported before..

And I think It only need when user use "Get Buck" button, because if we hope auto-up-date, it usually not change texture path, (use same texture to overwrite).  but if user use "get back" that means, we may hope to make new texture as variation I suppose.

(hope you understand what I means :blush:

Edited by tokikake
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...