JMonkeyEngine - Substance Painter integration/link


#1

This is the missing link between JME and SP.

It can be used to quickly edit materials from your game or from your favorite jme scene editor with Substance Painter and get them back as jme materials.

It handles everything for you automagically: projects, save, export, texture compression, persistent edits.

This is the first working version and I’ve tested it only on linux.

I’ll do more tests and write proper documentation in the following days (or weeks?), but there is already a working TestScene for people who fear nothing: you launch SP -> launch the test scene -> Right Click=Select E=Edit. (Report issues on github plz)

Also you need to copy src/main/painter_plugin/jme-link inside your SP plugin folder.


#2

I have Substance Painter 1.X. Would it work with this version?

Also, by ‘test scene’ do you mean the ‘test_scene.blend’ and ‘test_scene.f3b’ file inside ‘src\test\resources\wf\frk\substancejlink\resources’ folder?

I tried to open test_scene.blend with SP 1.X and I get the following error,(I can not see the scene)

[Scene 3D] 3D scene successfully loaded
[Scene 3D] 3D scene successfully loaded
[Scene 3D] 3D scene successfully loaded
[Scene 3D] 3D scene successfully loaded
[Scene 3D] 3D scene successfully loaded
[Scene 3D] Failed to load 3D scene.
BLEND: Number of UV faces is larger than the corresponding UV face array (#1)


#3

No, i’m sorry. It requires SP 2017.2+

I mean TestScene.java, you just leave SP open and TestScene.java will handle the loading of the models etc.


#4

Thanks.

I can not resolve f3b dependency. Here is a screenshot,

Is there any simpler way to resolve the dependency other then downloading your f3b repo, compiling and installing it to local repository?


#5

Yes, actually it should work, it should download it from bintray.
Can you post the gradle logs?


#6

After opening the project in intellij IDEA, I am running the main function of TestScene.java. This is the jME log,

C:\Java\jdk1.8.0_131\bin\java "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.4\lib\idea_rt.jar=65019:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.4\bin" -Dfile.encoding=UTF-8 -classpath C:\Java\jdk1.8.0_131\jre\lib\charsets.jar;C:\Java\jdk1.8.0_131\jre\lib\deploy.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\access-bridge-64.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\cldrdata.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\dnsns.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\jaccess.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\jfxrt.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\localedata.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\nashorn.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\sunec.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\sunjce_provider.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\sunmscapi.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\sunpkcs11.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\zipfs.jar;C:\Java\jdk1.8.0_131\jre\lib\javaws.jar;C:\Java\jdk1.8.0_131\jre\lib\jce.jar;C:\Java\jdk1.8.0_131\jre\lib\jfr.jar;C:\Java\jdk1.8.0_131\jre\lib\jfxswt.jar;C:\Java\jdk1.8.0_131\jre\lib\jsse.jar;C:\Java\jdk1.8.0_131\jre\lib\management-agent.jar;C:\Java\jdk1.8.0_131\jre\lib\plugin.jar;C:\Java\jdk1.8.0_131\jre\lib\resources.jar;C:\Java\jdk1.8.0_131\jre\lib\rt.jar;C:\Users\Irfan\Desktop\jME\JMELink-SP-master\out\test\classes;C:\Users\Irfan\Desktop\jME\JMELink-SP-master\out\test\resources;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.riccardobl.DDSWriter\dds_writer__rgtc_lwjgl2_delegate\1.0\8080523df56e261f48dc3e9c686f6f6de6c97a1e\dds_writer__rgtc_lwjgl2_delegate-1.0.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.jMonkeyEngine.jmonkeyengine\jme3-desktop\99a98da76df22fa8a10babe1c4c1978a41508f98\911e545f9a449317bbf8b984d1a299f33dbdf6fd\jme3-desktop-99a98da76df22fa8a10babe1c4c1978a41508f98.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.jMonkeyEngine.jmonkeyengine\jme3-testdata\99a98da76df22fa8a10babe1c4c1978a41508f98\16f46ccca72ae3d3b885d381c5ac000318d1f784\jme3-testdata-99a98da76df22fa8a10babe1c4c1978a41508f98.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.jMonkeyEngine.jmonkeyengine\jme3-effects\99a98da76df22fa8a10babe1c4c1978a41508f98\65d82c92a88d56f771c77e647d9dc177099c2106\jme3-effects-99a98da76df22fa8a10babe1c4c1978a41508f98.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.google.code.gson\gson\2.8.0\c4ba5371a29ac9b2ad6129b1d39ea38750043eff\gson-2.8.0.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.f3b\jme3_f3b\0.3.4\ff93205a79a620e9787064841cdf8c7320c327b8\jme3_f3b-0.3.4.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.riccardobl.DDSWriter\dds_format\1.0\221cdb66592f4ef5586c8ef70a089bb3e37da39\dds_format-1.0.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.2\d7ef6ad7ff0711dd12fe409d62d72d6ed14516e0\log4j-api-2.2.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-core\2.2\c707664e020218f8529b9a5e55016ee15f0f82ac\log4j-core-2.2.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.riccardobl.DDSWriter\dds_writer__lwjgl2_blockcompression_delegate\1.0\c844002885424333f177a4afde79e666dd8ceb9c\dds_writer__lwjgl2_blockcompression_delegate-1.0.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl\2.9.3\3df168ac74e4a8c96562cdff24ad352e255bf89c\lwjgl-2.9.3.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.jMonkeyEngine.jmonkeyengine\jme3-lwjgl\99a98da76df22fa8a10babe1c4c1978a41508f98\1e3d3b0fd743d892bac2e6824fa84ac4d67689e2\jme3-lwjgl-99a98da76df22fa8a10babe1c4c1978a41508f98.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.jMonkeyEngine.jmonkeyengine\jme3-core\99a98da76df22fa8a10babe1c4c1978a41508f98\b523556d40b3fa1f706afb89a00715e81c8e7400\jme3-core-99a98da76df22fa8a10babe1c4c1978a41508f98.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.riccardobl.DDSWriter\dds_writer__cli\1.0\c1fce8bd8d07c05da4bf496758a0f9820e2495ee\dds_writer__cli-1.0.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.riccardobl\jme3_physicsloader\0.6.1\31041774886f013514d461750025672adc855b41\jme3_physicsloader-0.6.1.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.riccardobl.DDSWriter\dds_writer__s3tc_lwjgl2_delegate\1.0\2a3cd9965ab4eea176b574aba67de18ca2b9c9c6\dds_writer__s3tc_lwjgl2_delegate-1.0.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.google.protobuf\protobuf-java\2.6.1\d9521f2aecb909835746b7a5facf612af5e890e8\protobuf-java-2.6.1.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl-platform\2.9.3\fbc2afb3e288578e9942578decb6291a490549a0\lwjgl-platform-2.9.3-natives-windows.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl-platform\2.9.3\b1eafe80093381c56415731e1d64279e6140bcd0\lwjgl-platform-2.9.3-natives-linux.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl-platform\2.9.3\6686cf6ddaa20b4290aa6599a09bc0d17369be05\lwjgl-platform-2.9.3-natives-osx.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput\2.0.5\39c7796b469a600f72380316f6b1f11db6c2c7c4\jinput-2.0.5.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\net.java.jutils\jutils\1.0.0\e12fe1fda814bd348c1579329c86943d2cd3c6a6\jutils-1.0.0.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput-platform\2.0.5\7ff832a6eb9ab6a767f1ade2b548092d0fa64795\jinput-platform-2.0.5-natives-linux.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.riccardobl.DDSWriter\dds_writer\1.0\cd2e065980f879998c4d4886f867a7370b94e66e\dds_writer-1.0.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput-platform\2.0.5\53f9c919f34d2ca9de8c51fc4e1e8282029a9232\jinput-platform-2.0.5-natives-osx.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput-platform\2.0.5\385ee093e01f587f30ee1c8a2ee7d408fd732e16\jinput-platform-2.0.5-natives-windows.jar;C:\Users\Irfan\Desktop\jME\JMELink-SP-master\out\production\classes;C:\Users\Irfan\Desktop\jME\JMELink-SP-master\out\production\resources TestScene
Aug 13, 2017 5:10:30 AM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.2-HEAD-6287
 * Branch: HEAD
 * Git Hash: 99a98da
 * Build Date: 2017-08-12
Aug 13, 2017 5:10:31 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: LWJGL 2.9.3 context running on thread jME3 Main
 * Graphics Adapter: C:\WINDOWS\System32\DriverStore\FileRepository\nvlti.inf_amd64_8f4ffe68757ba0a5\nvldumdx.dll,C:\WINDOWS\System32\DriverStore\FileRepository\nvlti.inf_amd64_8f4ffe68757ba0a5\nvldumdx.dll,C:\WINDOWS\System32\DriverStore\FileRepository\nvlti.inf_amd64_8f4ffe68757ba0a5\nvldumdx.dll,C:\WINDOWS\System32\DriverStore\FileRepository\nvlti.inf_amd64_8f4ffe68757ba0a5\nvldumdx.dll
 * Driver Version: null
 * Scaling Factor: 1
Aug 13, 2017 5:10:31 AM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFO: OpenGL Renderer Information
 * Vendor: NVIDIA Corporation
 * Renderer: GeForce GT 750M/PCIe/SSE2
 * OpenGL Version: 4.5.0 NVIDIA 382.53
 * GLSL Version: 4.50 NVIDIA
 * Profile: Compatibility
Aug 13, 2017 5:10:31 AM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.MeshLoader
Aug 13, 2017 5:10:31 AM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.SkeletonLoader
Aug 13, 2017 5:10:31 AM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.MaterialLoader
Aug 13, 2017 5:10:31 AM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.SceneLoader
Aug 13, 2017 5:10:31 AM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.blender.BlenderModelLoader
Aug 13, 2017 5:10:31 AM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.fbx.FbxLoader
Aug 13, 2017 5:10:31 AM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.audio.plugins.OGGLoader
Aug 13, 2017 5:10:31 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio Renderer Information
 * Device: OpenAL Soft
 * Vendor: OpenAL Community
 * Renderer: OpenAL Soft
 * Version: 1.1 ALSOFT 1.15.1
 * Supported channels: 64
 * ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_loopback
 * AL extensions: AL_EXT_ALAW AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_LOKI_quadriphonic AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data AL_SOFTX_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points AL_SOFT_source_latency
Aug 13, 2017 5:10:31 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
WARNING: Pausing audio device not supported.
Aug 13, 2017 5:10:31 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio effect extension version: 1.0
Aug 13, 2017 5:10:31 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio max auxiliary sends: 4
Aug 13, 2017 5:10:33 AM com.jme3.material.Material checkSetParam
WARNING: Material parameter being set: Texture with type Texture2D doesn't match definition types TextureCubeMap
Aug 13, 2017 5:10:33 AM com.jme3.material.Material checkTextureParamColorSpace
WARNING: The texture Textures/Sky/Path.hdr has linear color space, but the material parameter Texture specifies no color space requirement, this may lead to unexpected behavior.
Check if the image was not set to another material parameter with a linear color space, or that you did not set the ColorSpace to Linear using texture.getImage.setColorSpace().
Aug 13, 2017 5:10:34 AM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.NoClassDefFoundError: f3b/Datas$Data
	at wf.frk.f3b.jme3.F3bLoader.load(F3bLoader.java:43)
	at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:259)
	at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:373)
	at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:416)
	at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:420)
	at TestScene.simpleInitApp(TestScene.java:120)
	at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: f3b.Datas$Data
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 10 more

Process finished with exit code 0

When I run the gradle build task I get the following log,

5:14:19 AM: Executing external task 'build'...
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar UP-TO-DATE
:assemble UP-TO-DATE
:compileTestJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':testCompileClasspath'.
> Could not find wf.frk.f3b:f3b:0.3.
  Searched in the following locations:
      https://jitpack.io/wf/frk/f3b/f3b/0.3/f3b-0.3.pom
      https://jitpack.io/wf/frk/f3b/f3b/0.3/f3b-0.3.jar
      https://jcenter.bintray.com/wf/frk/f3b/f3b/0.3/f3b-0.3.pom
      https://jcenter.bintray.com/wf/frk/f3b/f3b/0.3/f3b-0.3.jar
      file:/C:/Users/Irfan/.m2/repository/wf/frk/f3b/f3b/0.3/f3b-0.3.pom
      file:/C:/Users/Irfan/.m2/repository/wf/frk/f3b/f3b/0.3/f3b-0.3.jar
  Required by:
      project : > com.github.f3b:jme3_f3b:0.3.4

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.016 secs
Could not find wf.frk.f3b:f3b:0.3.
Searched in the following locations:
    https://jitpack.io/wf/frk/f3b/f3b/0.3/f3b-0.3.pom
    https://jitpack.io/wf/frk/f3b/f3b/0.3/f3b-0.3.jar
    https://jcenter.bintray.com/wf/frk/f3b/f3b/0.3/f3b-0.3.pom
    https://jcenter.bintray.com/wf/frk/f3b/f3b/0.3/f3b-0.3.jar
    file:/C:/Users/Irfan/.m2/repository/wf/frk/f3b/f3b/0.3/f3b-0.3.pom
    file:/C:/Users/Irfan/.m2/repository/wf/frk/f3b/f3b/0.3/f3b-0.3.jar
Required by:
    project : > com.github.f3b:jme3_f3b:0.3.4
5:14:20 AM: External task execution finished 'build'.

#7

Ok, it should be fixed now in version 0.1.3


#8

Thanks, the problem is solved now.

New problem:
After loading the TestScene, I click on a box and press E and nothing happens to at Substance Painter, and this is the jME log, (I excluded the logs before selecting the box on the testscene; forum word count limitation)

Aug 13, 2017 5:35:25 AM com.jme3.asset.DesktopAssetManager locateAsset
WARNING: Cannot locate resource: substances/substances.json
Aug 13, 2017 5:35:33 AM TestScene onAction
INFO: Select Sky (Geometry)
Invalid material or missing name
Aug 13, 2017 5:35:33 AM TestScene onAction
INFO: Select Plane_0 (Geometry)
>>> alg.project.close();
>>> texturesChanged();
java.net.ConnectException: Connection refused: connect
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
	at sun.net.www.http.HttpClient.New(HttpClient.java:339)
	at sun.net.www.http.HttpClient.New(HttpClient.java:357)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1202)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291)
	at wf.frk.jmesplink.link.SubstanceLink.sendPacket(SubstanceLink.java:178)
	at wf.frk.jmesplink.link.SubstanceLink.cmd(SubstanceLink.java:164)
	at wf.frk.jmesplink.link.SubstanceLink.openProject(SubstanceLink.java:132)
	at wf.frk.jmesplink.SubstanceProject.open(SubstanceProject.java:40)
	at wf.frk.jmesplink.SubstanceLinkAppState.editSelected(SubstanceLinkAppState.java:300)
	at TestScene.onAction(TestScene.java:230)
	at com.jme3.input.InputManager.invokeActions(InputManager.java:169)
	at com.jme3.input.InputManager.onKeyEventQueued(InputManager.java:462)
	at com.jme3.input.InputManager.processQueue(InputManager.java:855)
	at com.jme3.input.InputManager.update(InputManager.java:907)
	at com.jme3.app.LegacyApplication.update(LegacyApplication.java:725)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:227)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
	at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:197)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:232)
	at java.lang.Thread.run(Thread.java:748)
>>> texturesChanged();
java.net.ConnectException: Connection refused: connect
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
	at sun.net.www.http.HttpClient.New(HttpClient.java:339)
	at sun.net.www.http.HttpClient.New(HttpClient.java:357)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1202)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291)
	at wf.frk.jmesplink.link.SubstanceLink.sendPacket(SubstanceLink.java:178)
	at wf.frk.jmesplink.link.SubstanceLink.cmd(SubstanceLink.java:164)
	at wf.frk.jmesplink.link.SubstanceLink.texturesChanged(SubstanceLink.java:52)
	at wf.frk.jmesplink.SubstanceProject.needReload(SubstanceProject.java:56)
	at wf.frk.jmesplink.SubstanceLinkAppState.applySubstances(SubstanceLinkAppState.java:307)
	at wf.frk.jmesplink.SubstanceLinkAppState.access$500(SubstanceLinkAppState.java:51)
	at wf.frk.jmesplink.SubstanceLinkAppState$6.run(SubstanceLinkAppState.java:367)
java.net.ConnectException: Connection refused: connect
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
	at sun.net.www.http.HttpClient.New(HttpClient.java:339)
	at sun.net.www.http.HttpClient.New(HttpClient.java:357)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1202)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291)
	at wf.frk.jmesplink.link.SubstanceLink.sendPacket(SubstanceLink.java:178)
	at wf.frk.jmesplink.link.SubstanceLink.cmd(SubstanceLink.java:164)
	at wf.frk.jmesplink.link.SubstanceLink.texturesChanged(SubstanceLink.java:52)
	at wf.frk.jmesplink.SubstanceProject.needReload(SubstanceProject.java:56)
	at wf.frk.jmesplink.SubstanceLinkAppState.applySubstances(SubstanceLinkAppState.java:307)
	at wf.frk.jmesplink.SubstanceLinkAppState.access$500(SubstanceLinkAppState.java:51)
	at wf.frk.jmesplink.SubstanceLinkAppState$6.run(SubstanceLinkAppState.java:367)
>>> texturesChanged();
java.net.ConnectException: Connection refused: connect
>>> texturesChanged();
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
	at sun.net.www.http.HttpClient.New(HttpClient.java:339)
	at sun.net.www.http.HttpClient.New(HttpClient.java:357)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1202)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291)
	at wf.frk.jmesplink.link.SubstanceLink.sendPacket(SubstanceLink.java:178)
	at wf.frk.jmesplink.link.SubstanceLink.cmd(SubstanceLink.java:164)
	at wf.frk.jmesplink.link.SubstanceLink.texturesChanged(SubstanceLink.java:52)
	at wf.frk.jmesplink.SubstanceProject.needReload(SubstanceProject.java:56)
	at wf.frk.jmesplink.SubstanceLinkAppState.applySubstances(SubstanceLinkAppState.java:307)
	at wf.frk.jmesplink.SubstanceLinkAppState.access$500(SubstanceLinkAppState.java:51)
	at wf.frk.jmesplink.SubstanceLinkAppState$6.run(SubstanceLinkAppState.java:367)
>>> texturesChanged();
java.net.ConnectException: Connection refused: connect
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
	at sun.net.www.http.HttpClient.New(HttpClient.java:339)
	at sun.net.www.http.HttpClient.New(HttpClient.java:357)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1202)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291)
	at wf.frk.jmesplink.link.SubstanceLink.sendPacket(SubstanceLink.java:178)
	at wf.frk.jmesplink.link.SubstanceLink.cmd(SubstanceLink.java:164)
	at wf.frk.jmesplink.link.SubstanceLink.texturesChanged(SubstanceLink.java:52)
	at wf.frk.jmesplink.SubstanceProject.needReload(SubstanceProject.java:56)
	at wf.frk.jmesplink.SubstanceLinkAppState.applySubstances(SubstanceLinkAppState.java:307)
	at wf.frk.jmesplink.SubstanceLinkAppState.access$500(SubstanceLinkAppState.java:51)
	at wf.frk.jmesplink.SubstanceLinkAppState$6.run(SubstanceLinkAppState.java:367)
>>> texturesChanged();
java.net.ConnectException: Connection refused: connect
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
	at sun.net.www.http.HttpClient.New(HttpClient.java:339)
	at sun.net.www.http.HttpClient.New(HttpClient.java:357)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1202)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291)
	at wf.frk.jmesplink.link.SubstanceLink.sendPacket(SubstanceLink.java:178)
	at wf.frk.jmesplink.link.SubstanceLink.cmd(SubstanceLink.java:164)
	at wf.frk.jmesplink.link.SubstanceLink.texturesChanged(SubstanceLink.java:52)
	at wf.frk.jmesplink.SubstanceProject.needReload(SubstanceProject.java:56)
	at wf.frk.jmesplink.SubstanceLinkAppState.applySubstances(SubstanceLinkAppState.java:307)
	at wf.frk.jmesplink.SubstanceLinkAppState.access$500(SubstanceLinkAppState.java:51)
	at wf.frk.jmesplink.SubstanceLinkAppState$6.run(SubstanceLinkAppState.java:367)
java.net.ConnectException: Connection refused: connect
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
	at sun.net.www.http.HttpClient.New(HttpClient.java:339)
	at sun.net.www.http.HttpClient.New(HttpClient.java:357)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1202)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:966)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291)
	at wf.frk.jmesplink.link.SubstanceLink.sendPacket(SubstanceLink.java:178)
	at wf.frk.jmesplink.link.SubstanceLink.cmd(SubstanceLink.java:164)
	at wf.frk.jmesplink.link.SubstanceLink.texturesChanged(SubstanceLink.java:52)
	at wf.frk.jmesplink.SubstanceProject.needReload(SubstanceProject.java:56)
	at wf.frk.jmesplink.SubstanceLinkAppState.applySubstances(SubstanceLinkAppState.java:307)
	at wf.frk.jmesplink.SubstanceLinkAppState.access$500(SubstanceLinkAppState.java:51)
	at wf.frk.jmesplink.SubstanceLinkAppState$6.run(SubstanceLinkAppState.java:367)

#9

I place the jme-link in the wrong directory. It should be in C:\Users<user>\Documents\Allegorithmic\Substance Painter\plugins, instead of C:\Program Files\Allegorithmic\Substance Painter\PlugIns

But, now I have a different issue. After I fpress E, I see the following log on Substance Painter, (There is no model on screen)

[Engine Configuration] Export resolution clamped to 4k. More than 2GB of VRAM are required to allows 8k export (2018MB detected).
[Scene 3D] 3D scene successfully loaded
[Plugins] Loading plugin jme-link
[Plugins] Loading plugin photoshop-export
[Plugins] Loading plugin resources-updater
[Plugins] Loading plugin substance-source
[GPUIssuesCheck] The current TDR (GPU hang recovery) delay is low: 2s.
   Substance Painter can be interrupted by the OS when doing a long computation.
   See https://support.allegorithmic.com/documentation/display/SPDOC/GPU+drivers+crash+with+long+computations
[Scene 3D] 3D scene successfully loaded
[Scene 3D] 3D scene successfully loaded
[Scene 3D] 3D scene successfully loaded
[Plugin] :45: ProjectError: can't close, no project loaded
[Plugin] :78: ProjectError: failed to open file://C:/Users/Irfan/AppData/Local/Temp//sblinktest/projects/5fff83a1-c960-4d25-ab26-e64b3a0c74fe.spp
[Plugin] :124: ProjectError: failed to retrieve project url

#10

Probably an issue with the path on windows, this should fix it: https://github.com/riccardobl/JMELink-SP/commit/61a606d692145ddce30b6747bd1996d79cea4367

Also manually delete this folder if it exists C:/Users/Irfan/AppData/Local/Temp/sblinktest


#11

Getting different error this time,

[Engine Configuration] Export resolution clamped to 4k. More than 2GB of VRAM are required to allows 8k export (2018MB detected).
[Scene 3D] 3D scene successfully loaded
[Plugins] Loading plugin jme-link
[Plugins] Loading plugin photoshop-export
[Plugins] Loading plugin resources-updater
[Plugins] Loading plugin substance-source
[GPUIssuesCheck] The current TDR (GPU hang recovery) delay is low: 2s.
   Substance Painter can be interrupted by the OS when doing a long computation.
   See https://support.allegorithmic.com/documentation/display/SPDOC/GPU+drivers+crash+with+long+computations
[Scene 3D] 3D scene successfully loaded
[Scene 3D] 3D scene successfully loaded
[Scene 3D] 3D scene successfully loaded
[Plugin] :45: ProjectError: can't close, no project loaded
[Plugin] :111: ProjectError: meshFile file://C:/Users/Irfan/AppData/Local/Temp/substancejmelink8532829062803474918.obj isn't a valid url on an existing file
[Plugin] :171: ProjectError: can't save, no project loaded
[Plugin] :58: ProjectError: can't save and close, no project loaded
[Plugin] :45: ProjectError: can't close, no project loaded
[Plugin] :111: ProjectError: meshFile file://C:/Users/Irfan/AppData/Local/Temp/substancejmelink3660040358442561917.obj isn't a valid url on an existing file
[Plugin] :171: ProjectError: can't save, no project loaded
[Plugin] :58: ProjectError: can't save and close, no project loaded
[Plugin] :45: ProjectError: can't close, no project loaded
[Plugin] :111: ProjectError: meshFile file://C:/Users/Irfan/AppData/Local/Temp/substancejmelink8194716525989832925.obj isn't a valid url on an existing file
[Plugin] :171: ProjectError: can't save, no project loaded

#12

And no error on jme side? can you check if the file C:/Users/Irfan/AppData/Local/Temp/substancejmelink3660040358442561917.obj exists?

EDIT: I think i’ve fixed it in 0.1.4


#13

(sorry for delay, went to sleep)

One of the changes to the file PathUtils.java bricked the program. Now the TestScene does not run and it gives me the following error,

C:\Java\jdk1.8.0_131\bin\java "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.4\lib\idea_rt.jar=51665:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.4\bin" -Dfile.encoding=UTF-8 -classpath C:\Java\jdk1.8.0_131\jre\lib\charsets.jar;C:\Java\jdk1.8.0_131\jre\lib\deploy.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\access-bridge-64.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\cldrdata.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\dnsns.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\jaccess.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\jfxrt.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\localedata.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\nashorn.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\sunec.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\sunjce_provider.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\sunmscapi.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\sunpkcs11.jar;C:\Java\jdk1.8.0_131\jre\lib\ext\zipfs.jar;C:\Java\jdk1.8.0_131\jre\lib\javaws.jar;C:\Java\jdk1.8.0_131\jre\lib\jce.jar;C:\Java\jdk1.8.0_131\jre\lib\jfr.jar;C:\Java\jdk1.8.0_131\jre\lib\jfxswt.jar;C:\Java\jdk1.8.0_131\jre\lib\jsse.jar;C:\Java\jdk1.8.0_131\jre\lib\management-agent.jar;C:\Java\jdk1.8.0_131\jre\lib\plugin.jar;C:\Java\jdk1.8.0_131\jre\lib\resources.jar;C:\Java\jdk1.8.0_131\jre\lib\rt.jar;C:\Users\Irfan\Desktop\jME\JMELink-SP-master\out\test\classes;C:\Users\Irfan\Desktop\jME\JMELink-SP-master\out\test\resources;C:\Users\Irfan\Desktop\jME\JMELink-SP-master\out\production\classes;C:\Users\Irfan\Desktop\jME\JMELink-SP-master\out\production\resources;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.riccardobl.DDSWriter\dds_writer\1.0\cd2e065980f879998c4d4886f867a7370b94e66e\dds_writer-1.0.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.riccardobl.DDSWriter\dds_writer__s3tc_lwjgl2_delegate\1.0\2a3cd9965ab4eea176b574aba67de18ca2b9c9c6\dds_writer__s3tc_lwjgl2_delegate-1.0.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.riccardobl.DDSWriter\dds_writer__rgtc_lwjgl2_delegate\1.0\8080523df56e261f48dc3e9c686f6f6de6c97a1e\dds_writer__rgtc_lwjgl2_delegate-1.0.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.riccardobl.DDSWriter\dds_writer__cli\1.0\c1fce8bd8d07c05da4bf496758a0f9820e2495ee\dds_writer__cli-1.0.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.jMonkeyEngine.jmonkeyengine\jme3-core\99a98da76df22fa8a10babe1c4c1978a41508f98\b523556d40b3fa1f706afb89a00715e81c8e7400\jme3-core-99a98da76df22fa8a10babe1c4c1978a41508f98.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.jMonkeyEngine.jmonkeyengine\jme3-lwjgl\99a98da76df22fa8a10babe1c4c1978a41508f98\1e3d3b0fd743d892bac2e6824fa84ac4d67689e2\jme3-lwjgl-99a98da76df22fa8a10babe1c4c1978a41508f98.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.jMonkeyEngine.jmonkeyengine\jme3-desktop\99a98da76df22fa8a10babe1c4c1978a41508f98\911e545f9a449317bbf8b984d1a299f33dbdf6fd\jme3-desktop-99a98da76df22fa8a10babe1c4c1978a41508f98.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.jMonkeyEngine.jmonkeyengine\jme3-testdata\99a98da76df22fa8a10babe1c4c1978a41508f98\16f46ccca72ae3d3b885d381c5ac000318d1f784\jme3-testdata-99a98da76df22fa8a10babe1c4c1978a41508f98.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.jMonkeyEngine.jmonkeyengine\jme3-effects\99a98da76df22fa8a10babe1c4c1978a41508f98\65d82c92a88d56f771c77e647d9dc177099c2106\jme3-effects-99a98da76df22fa8a10babe1c4c1978a41508f98.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.google.code.gson\gson\2.8.0\c4ba5371a29ac9b2ad6129b1d39ea38750043eff\gson-2.8.0.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.f3b\jme3_f3b\0.3.4\ff93205a79a620e9787064841cdf8c7320c327b8\jme3_f3b-0.3.4.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.riccardobl.DDSWriter\dds_format\1.0\221cdb66592f4ef5586c8ef70a089bb3e37da39\dds_format-1.0.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.2\d7ef6ad7ff0711dd12fe409d62d72d6ed14516e0\log4j-api-2.2.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-core\2.2\c707664e020218f8529b9a5e55016ee15f0f82ac\log4j-core-2.2.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.riccardobl.DDSWriter\dds_writer__lwjgl2_blockcompression_delegate\1.0\c844002885424333f177a4afde79e666dd8ceb9c\dds_writer__lwjgl2_blockcompression_delegate-1.0.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl\2.9.3\3df168ac74e4a8c96562cdff24ad352e255bf89c\lwjgl-2.9.3.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.github.riccardobl\jme3_physicsloader\0.6.1\31041774886f013514d461750025672adc855b41\jme3_physicsloader-0.6.1.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\wf.frk.f3b\f3b\0.3\a60feaa765c501c0b70c411c98ad98c4746dc69c\f3b-0.3.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\com.google.protobuf\protobuf-java\2.6.1\d9521f2aecb909835746b7a5facf612af5e890e8\protobuf-java-2.6.1.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl-platform\2.9.3\fbc2afb3e288578e9942578decb6291a490549a0\lwjgl-platform-2.9.3-natives-windows.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl-platform\2.9.3\b1eafe80093381c56415731e1d64279e6140bcd0\lwjgl-platform-2.9.3-natives-linux.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl-platform\2.9.3\6686cf6ddaa20b4290aa6599a09bc0d17369be05\lwjgl-platform-2.9.3-natives-osx.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput\2.0.5\39c7796b469a600f72380316f6b1f11db6c2c7c4\jinput-2.0.5.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\net.java.jutils\jutils\1.0.0\e12fe1fda814bd348c1579329c86943d2cd3c6a6\jutils-1.0.0.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput-platform\2.0.5\7ff832a6eb9ab6a767f1ade2b548092d0fa64795\jinput-platform-2.0.5-natives-linux.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput-platform\2.0.5\385ee093e01f587f30ee1c8a2ee7d408fd732e16\jinput-platform-2.0.5-natives-windows.jar;C:\Users\Irfan\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput-platform\2.0.5\53f9c919f34d2ca9de8c51fc4e1e8282029a9232\jinput-platform-2.0.5-natives-osx.jar TestScene
Aug 13, 2017 11:20:58 AM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.2-HEAD-6287
 * Branch: HEAD
 * Git Hash: 99a98da
 * Build Date: 2017-08-12
Aug 13, 2017 11:21:01 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: LWJGL 2.9.3 context running on thread jME3 Main
 * Graphics Adapter: C:\WINDOWS\System32\DriverStore\FileRepository\nvlti.inf_amd64_8f4ffe68757ba0a5\nvldumdx.dll,C:\WINDOWS\System32\DriverStore\FileRepository\nvlti.inf_amd64_8f4ffe68757ba0a5\nvldumdx.dll,C:\WINDOWS\System32\DriverStore\FileRepository\nvlti.inf_amd64_8f4ffe68757ba0a5\nvldumdx.dll,C:\WINDOWS\System32\DriverStore\FileRepository\nvlti.inf_amd64_8f4ffe68757ba0a5\nvldumdx.dll
 * Driver Version: null
 * Scaling Factor: 1
Aug 13, 2017 11:21:01 AM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFO: OpenGL Renderer Information
 * Vendor: NVIDIA Corporation
 * Renderer: GeForce GT 750M/PCIe/SSE2
 * OpenGL Version: 4.5.0 NVIDIA 382.53
 * GLSL Version: 4.50 NVIDIA
 * Profile: Compatibility
Aug 13, 2017 11:21:01 AM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.MeshLoader
Aug 13, 2017 11:21:01 AM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.SkeletonLoader
Aug 13, 2017 11:21:01 AM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.MaterialLoader
Aug 13, 2017 11:21:01 AM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.SceneLoader
Aug 13, 2017 11:21:01 AM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.blender.BlenderModelLoader
Aug 13, 2017 11:21:01 AM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.fbx.FbxLoader
Aug 13, 2017 11:21:01 AM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.audio.plugins.OGGLoader
Aug 13, 2017 11:21:01 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio Renderer Information
 * Device: OpenAL Soft
 * Vendor: OpenAL Community
 * Renderer: OpenAL Soft
 * Version: 1.1 ALSOFT 1.15.1
 * Supported channels: 64
 * ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFT_loopback
 * AL extensions: AL_EXT_ALAW AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_LOKI_quadriphonic AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data AL_SOFTX_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points AL_SOFT_source_latency
Aug 13, 2017 11:21:01 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
WARNING: Pausing audio device not supported.
Aug 13, 2017 11:21:01 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio effect extension version: 1.0
Aug 13, 2017 11:21:01 AM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio max auxiliary sends: 4
Aug 13, 2017 11:21:05 AM com.jme3.material.Material checkSetParam
WARNING: Material parameter being set: Texture with type Texture2D doesn't match definition types TextureCubeMap
Aug 13, 2017 11:21:05 AM com.jme3.material.Material checkTextureParamColorSpace
WARNING: The texture Textures/Sky/Path.hdr has linear color space, but the material parameter Texture specifies no color space requirement, this may lead to unexpected behavior.
Check if the image was not set to another material parameter with a linear color space, or that you did not set the ColorSpace to Linear using texture.getImage.setColorSpace().
Aug 13, 2017 11:21:06 AM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.util.regex.PatternSyntaxException: Unexpected internal error near index 1
\
 ^
	at java.util.regex.Pattern.error(Pattern.java:1955)
	at java.util.regex.Pattern.compile(Pattern.java:1702)
	at java.util.regex.Pattern.<init>(Pattern.java:1351)
	at java.util.regex.Pattern.compile(Pattern.java:1028)
	at java.lang.String.replaceAll(String.java:2223)
	at wf.frk.jmesplink.PathUtils.toVirtual(PathUtils.java:11)
	at wf.frk.jmesplink.SubstanceLinkAppState.connect(SubstanceLinkAppState.java:86)
	at TestScene.simpleInitApp(TestScene.java:118)
	at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
	at java.lang.Thread.run(Thread.java:748)

#14

KEK i used replaceAll instead of replace by mistake in PathUtils line 11 and it fails because the separator for windows is a special character in regex.
Patch https://github.com/riccardobl/JMELink-SP/commit/b8b671f2621759a26e44da387a74b8fcb070762a

Also, if you can come to slack.


#15

Okey. I got it working. Here is a screenshot,

There were some weird issues with the ground box, and there were some random SP crashes when I tried to link that box. I deleted the C:/Users/Irfan/AppData/Local/Temp/sblinktest folder and the crashes disappeared.


#16

Nice! Yes, i have to add some code to catch errors for when you have corrupted data etc


#17

So, if I don’t delete the temp folder everytime, jMESPLink(We need a better name) does not work as expected.

Also, how do I export the texture/material? When I paint something and click on the jMonkey button at SP I get the following log, i.e. loads the wrong model.

[Engine Configuration] Export resolution clamped to 4k. More than 2GB of VRAM are required to allows 8k export (2018MB detected).
[Scene 3D] 3D scene successfully loaded
[Plugins] Loading plugin jme-link
[Plugins] Loading plugin photoshop-export
[Plugins] Loading plugin resources-updater
[Plugins] Loading plugin substance-source
[GPUIssuesCheck] The current TDR (GPU hang recovery) delay is low: 2s.
   Substance Painter can be interrupted by the OS when doing a long computation.
   See https://support.allegorithmic.com/documentation/display/SPDOC/GPU+drivers+crash+with+long+computations
[Scene 3D] 3D scene successfully loaded
[Scene 3D] 3D scene successfully loaded
[Scene 3D] 3D scene successfully loaded
[Plugin] :45: ProjectError: can't close, no project loaded
[Scene 3D] 3D scene successfully loaded
[Scene 3D] 3D scene successfully loaded
[GenericMaterial] Creation of the shader pbr-metal-rough successful
[GenericMaterial] Creation of the shader pbr-metal-rough successful
[Scene 3D] 3D scene successfully saved
[Plugin] :45: ProjectError: can't close, no project loaded
[Scene 3D] 3D scene successfully loaded
[Scene 3D] 3D scene successfully saved
[Plugin - jme-link] Send to jme
[Plugin] :215: ExportError: Export preset 'C:UsersIrfanAppDataLocalTempsubstancejmelink230638208197003286.spexp' not found

Path issue again, I suppose.


#18

Texture export is working from the latest build. Here is a screenshot,


#19

Thank you again for helping me with this on slack.

The release 0.1.5 has all the fixes.