Jump to content
3DCoat Forums

LightWave Applink


Keeks
 Share

Recommended Posts

  • Advanced Member

New plugin version 2.0 has arrived.

...

A little bit information about plugin and LW overall. So, I tried to hooked up nodes for preview final shading. Python way had a lot of bugs :(. I was thinking that c/c++ sdk will help me, in vain. One guy from TrueArt said me that it's impossible even through sdk. I can create new nodes, i have access to node editor just for making existing nodes and connecting them, BUT there is no way to set values on nodes through the code! This is f** ridicules! Only by hands! Finally, I decided to return back to Python, since it does make sense (faster to write a code). What about nodes? Actually I found one way, not simplest one, but it's possible to make it work. Need time for implementation.

I was having a hard time understanding how or why the applink is useful, as I thought I could just manually import stuff and UV map it or whatever, but after seeing your GUI here, it has become clearer how handy this could be!

I have an idea to help you with the Nodes. While I haven't developed any nodes based plugins before and didn't come across that limitation yet, I have pushed LScript beyond its limits by thinking outside the box, There have been things I couldn't access from LScript that I got access to by reading and writing files. Getting info from the LW config text files or reading binary information from Wav files is easy enough if you know the file format. You might be able to get/set the info you want from/into the nodes if you read the binary LWO file. I believe that format is available, and Andrew even is reading that info for his import, So you might be able to do it "the hard way" if you write out a new LWO with new node info - though that would take a bit of testing to be sure you don't corrupt the object. But if you really want to do it, that may be the only way until they improve the sdk and Lscript/python...

Link to comment
Share on other sites

  • Member

Hey Styler,

We're using Win 7 Enterprise, 64-bit

The name bit is in fact just 'myname' in English. I removed my actual name just in case it gets spread around on Google or something.

I've managed to get the app working by manually creating a 'Documents' folder in my user folder... your app then successfully writes all the config files.

Now I've got another problem... :D Sorry! Our Windows machines are heavily locked down, so not sure where this is going wrong unfortunately.

Basically when I create a default sphere in Layout, then choose the 'Per-Pixel-Painting' 3d-Coat doesn't run, and if it's already running it doesn't recognise that there is anything to import or anything.

The scene and object files are written to the content directory, and the import text file is written, but clearly the 'watching' or whatever 3dCoat is doing is being blocked or something.

Is it possible to let us choose where the config paths are, instead of it all being hardcoded in?

Thanks! :D I do like the self-explanatory layout and simple interface... very nice UI! :D

Link to comment
Share on other sites

lardbros

Is it possible to let us choose where the config paths are, instead of it all being hardcoded in?

Applink creates all path relative to machine specifications (OS, UserDir and etc). You can check your paths in PCore console by pressing [>>] button on Options tab.

By default Windows has Documents folder, may be your machine has custom rig. Anyway, thank you. This will be fixed in next version.

Basically when I create a default sphere in Layout, then choose the 'Per-Pixel-Painting' 3d-Coat doesn't run, and if it's already running it doesn't recognise that there is anything to import or anything. The scene and object files are written to the content directory, and the import text file is written, but clearly the 'watching' or whatever 3dCoat is doing is being blocked or something.

please, check what version you use and 'Use 3D-Coat version' on 'Options' tab.

Link to comment
Share on other sites

  • Member

Hi again,

It wouldn't surprise me if our profiles and things are non-standard to be honest... but atleast that bit is kind of sorted! Would be cool to choose where it sets these folders up though if you wouldn't mind adding that. (I realise it adds more functionality, and more options to a user that could potentially do something wrong, but it would help us greatly.)

I checked the version in the options tab, and tried v3 and v4, but neither seem to work. I am right in presuming that as soon as I click 'per-pixel painting' it should load up 3dCoat, and import the object automatically?

Or if 3dCoat is already open, I would move over to 3dCoat and it would ask if I wanted to import it?

What sort of data stream does 3dCoat use to 'pick-up' the import call from LightWave? Maybe this is something that needs unblocking from the firewall?

Link to comment
Share on other sites

Yeah, I'll extend plugin in future: extra settings and other stuff. I didn't implement "run 3D-Coat on export button" because from python it's hard to control "is application executed already?

Next beta version will contain maximum of debugging info to detect potential errors.

What might go wrong on your machine?

applink works with existing LWO file. If you create just a geometry in layout without saving - this may be an issue

Link to comment
Share on other sites

Applink creates all path relative to machine specifications (OS, UserDir and etc). You can check your paths in PCore console by pressing [>>] button on Options tab

Just a note, while I was testing I pressed the >> button and nothing happened. This is in LW 11.5 x64.

Link to comment
Share on other sites

  • Member

Hmmm... just been trying this at home, and it all works fine!

Must be some lockdowns on the OS at work.

Does anyone here know how 3d coat communicates or 'watches' the folders for importing automatically? I can ask for this to be unblocked if it's a firewall issue :D

Link to comment
Share on other sites

LW applink makes i/o operation with files in next folders:

C:/Users/xxx/Documents/

C:/Users/xxx/Documents/3D-CoatVX/Exchange/

C:/Users/xxx/Documents/3D-CoatVX/Exchange/LightWave/

../ProjectName/Objects/ - in project folder

If you have custom OS setting or restricted permit for write/read this might cause error. I'll submit new version in Monday, with full debugging info in cases like that..

Edited by Styler
Link to comment
Share on other sites

Here's a question. Does it actually look at C:/Users/xxx/Documents/ or does it look at the My Documents link? Somehow my "library" links like My Documents, My Pictures, etc., got corrupted and I just get an error when I try to open them, however if I manually go in via C:/Users it work fine. This has caused issues with a number of programs like Win Media Player. I sent a model to 3DC from LW, worked on the UV, painted a little, and sent it back to LW. In LW I didn't get any textures loaded at all, but the new UV info was there so I know the model was updated.

Link to comment
Share on other sites

Does it actually look at C:/Users/xxx/Documents/ or does it look at the My Documents link?

Applink looks at 'My Documents' folder, and gets all paths by using system calls. If your change 'My Documents' path, it will be taken correctly.

I sent a model to 3DC from LW, worked on the UV, painted a little, and sent it back to LW. In LW I didn't get any textures loaded at all, but the new UV info was there so I know the model was updated.

In general, if you have any textures they have to be there. I use the same LWO object for i/o operations. This guaranties me that all textures will be in '/Project/Objects' folder and texture paths will be relative to LWO file.

Link to comment
Share on other sites

  • 1 month later...

Beta 2 is here

What is new?

- Self test for config file

- User can set path to 3dcoat V3, V4 (manually or in automode)
- Run 3dcoat on export button, if it's not running yet
- Supported DisplacementBump

Fixed

- Replaced ">>" with "Show Diagnostics" button. Showing up PCore console button pressed

- MyDocuments folder detecting

- Crash in during VPR rendering

- Prevent exporting of objects created in the Layout.

beta2.jpg

Some notes:

"Set Path" is the manual way to setup the path to 3D-Coat. If selected "V3" in "Use 3D-Coat version, the file dialog will appear for V3, and the same for V4. By default, if 3D-Coat is not currently running, applink will suggest user to make it on fly, after pressing any export button.

3dc_applink_beta2.zip

Edited by Styler
Link to comment
Share on other sites

lardbros, The NormalMap comes with lwo file when you do export from 3dcoat. I'll will try to play with flipping channels flags.

I made it work. the new option will be available in beta3 version. ;)

Edited by Styler
Link to comment
Share on other sites

  • 2 weeks later...
  • Member

Thanks Styler. I had just gone through the arduous process of trying to make the Applink by Ilia work on LW 11.5.1. It works, kinda. But it just seemed easier for me to export the files to a folder and open them up manually in LW or 3dcoat. It's a bummer that the LW SDK isn't more robust. Looking forward to trying out your beta Applink.

Link to comment
Share on other sites

  • 3 weeks later...
  • 5 months later...
  • 3 weeks later...
  • New Member

I can not get it to work.

 

Here is the errors I am receiving.

CPython 2.7.5 (default, May 30 2013, 10:07:04) [MSC v.1500 64 bit (AMD64)]
Traceback (most recent call last):
  File "C:\Program Files\NewTek\LightWave11.6.1\support\plugins\3dcoat\3dc_applink.py", line 676, in onTabCtrl
    self.onBoolCtl(self.isDispl, 'isDispl') # fix render ghosts on tab2
  File "C:\Program Files\NewTek\LightWave11.6.1\support\plugins\3dcoat\3dc_applink.py", line 647, in onBoolCtl
    cfg.setOpt(userdata, control.get_int())
AttributeError: 'NoneType' object has no attribute 'setOpt'
Traceback (most recent call last):
  File "C:\Program Files\NewTek\LightWave11.6.1\support\plugins\3dcoat\3dc_applink.py", line 659, in onChoiceCtl
    cfg.setOpt('iVer',control.get_int())
AttributeError: 'NoneType' object has no attribute 'setOpt'

Any help would be appreciated.

 

-RKing

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