HDRI Community
http://www.hdrlabs.com/cgi-bin/forum/YaBB.pl
Smart IBL >> 3d application scripts >> Win32 OLE Server
http://www.hdrlabs.com/cgi-bin/forum/YaBB.pl?num=1251379750

Message started by keksonja on 08/27/09 at 14:29:10

Title: Win32 OLE Server
Post by keksonja on 08/27/09 at 14:29:10
I am trying sIBL GUI Standalone with 3dsmax 2010 64 bit and I get this:

sIBL_GUI Error

Remote Connnection On Win32 OLE Server "MAX.Application' Failed!

How to I set this OLE Server?

Title: Re: Win32 OLE Server
Post by Kel Solaar on 08/27/09 at 17:22:52
Mmmh :) Let me check, I need to dive into the sIBL_Framework thread, but the reply is in the thread :)

KS

Title: Re: Win32 OLE Server
Post by Kel Solaar on 08/27/09 at 17:27:41
Check this post : http://www.hdrlabs.com/cgi-bin/forum/YaBB.pl?num=1219865135/40#40

and can you run sIBL_GUI in Debug Mode and try to check the output log so you have the exact message error ?

KS

Edit : Notice also that the Templates For 3dsmax are not working, they are proof of concept Dschaga did when I started sIBL_GUI one year ago, 3dsmax evolved and sIBL_GUI too, nobody reworked on them since their first Release.

Title: Re: Win32 OLE Server
Post by Dschaga on 09/01/09 at 12:47:57
i think it's time to work on a connection which is stable and will not change in future.


the script i wrote before was this one:
[code]
fn ExecuteLoaderScript obj = (
         try(
              execute obj
              return true
          )catch(
              return false
              )
      )
      registerOLEInterface #(ExecuteLoaderScript)
[/code]

I think the Objectname is the critical factor - if the phyton script is sending the script with a different objectname (then "obj") to max  it will fail. (?)

don't know if it's that way, but before the sIBL framework don't work proper on max we don't have to think of more templates.

btw.. i want to suggest few changes to the framework too:
The renderer selection is somehow odd. Wouldn't it be better to have
1. Current software
2. Current Renderer
3. Current Template  (if there are more then one templates for one renderer)

Title: Re: Win32 OLE Server
Post by Kel Solaar on 09/01/09 at 13:41:25

wrote on 09/01/09 at 12:47:57:
i think it's time to work on a connection which is stable and will not change in future.


the script i wrote before was this one:
[code]
fn ExecuteLoaderScript obj = (
         try(
              execute obj
              return true
          )catch(
              return false
              )
      )
      registerOLEInterface #(ExecuteLoaderScript)
[/code]

I think the Objectname is the critical factor - if the phyton script is sending the script with a different objectname (then "obj") to max  it will fail. (?)

don't know if it's that way, but before the sIBL framework don't work proper on max we don't have to think of more templates.


sIBL_Framework except for those Namespace Attributes thingy and the Dynamic Lights didn't changed. The remote connection should work.


wrote on 09/01/09 at 12:47:57:
btw.. i want to suggest few changes to the framework too:
The renderer selection is somehow odd. Wouldn't it be better to have
1. Current software
2. Current Renderer
3. Current Template  (if there are more then one templates for one renderer)


Yes definitely, now we have a bunch of Templates that make sense ( though it will need to add a new Attributes to the Templates ) :)

KS

Title: Re: Win32 OLE Server
Post by Kel Solaar on 09/01/09 at 13:53:41
sIBL_Framework didn't changed, but I checked and the object called in sIBL_GUI is  ExecuteSIBLLoaderScript not ExecuteLoaderScript :


Code (] cConnection = win32com.client.Dispatch( sIBL_Parser.sIBL_GetExtraAttributeComponents( cRemoteConnectionAttributes["Remote Connection|TargetApplication"):
, "Value" ) )
cConnection._FlagAsMethod( "ExecuteSIBLLoaderScript" )
cConnectionCommand = sIBL_Parser.sIBL_GetExtraAttributeComponents( cRemoteConnectionAttributes["Remote Connection|ExecutionCommand"], "Value" ).replace( "$loaderScriptPath", cEnvVariable.replace( "\\", "/" ) + "/" + sIBL_Parser.sIBL_GetExtraAttributeComponents( cTemplateAttributes["Template|OutputScript"], "Value" ) )
cLogger.debug( "> Current Connection Command : '%s'.", cConnectionCommand )
cConnection.ExecuteSIBLLoaderScript( cConnectionCommand )


sIBL_GUI last developement Trunk is always available here :

http://github.com/KelSolaar/sIBL_Framework/tree/master

and the latest Branches ( if I'm not lazy) are always Refactoring and Templates.

Anyway I'll start looking at the Templates soon, to at least provide a working base.

KS

Title: Re: Win32 OLE Server
Post by keksonja on 09/05/09 at 04:15:09
I placed the new sIBL OLE_ExecutionCommand.ms in scripts/startup but still it gives me the same error.... in sIBL GUI 2.1.0

Remote Connection On Win32 OLE Server "Max.Application' Failed!

how do i run in debug mode to see what the problem is?

Title: Re: Win32 OLE Server
Post by keksonja on 09/05/09 at 04:52:19
INFO     : 'sIBL_GUI | Loader Script Output Done !'.
DEBUG    : ---<<< 'sIBL_GUI_Message Function' >>>---
DEBUG    : ---<<< 'sIBL_GUI.setLoaderScript Method' >>>---
INFO     : sIBL_GUI | Starting Remote Connection !
DEBUG    : --->>> 'sIBL_Parser.getSectionAttributes Method' <<<---
DEBUG    : > Current Section Attributes : '['Template|Release', 'Template|EMail', 'Template|Comment', 'Template|Author', 'Template|Version', 'Template|Software', 'Template|Url', 'Template|OutputScript', 'Template|Date']'.
DEBUG    : ---<<< 'sIBL_Parser.getSectionAttributes Method' >>>---
DEBUG    : --->>> 'sIBL_Parser.getSectionAttributes Method' <<<---
DEBUG    : > Current Section Attributes : '['Remote Connection|TargetApplication', 'Remote Connection|ConnectionType', 'Remote Connection|ExecutionCommand']'.
DEBUG    : ---<<< 'sIBL_Parser.getSectionAttributes Method' >>>---
DEBUG    : --->>> 'sIBL_GetExtraAttributeComponents Function' <<<---
DEBUG    : > Current Attribute Values : '@ConnectionType | Win32 | String'.
DEBUG    : > Current Seeked Key : 'Value'.
DEBUG    : > Current Key Value : 'Win32'.
DEBUG    : ---<<< 'sIBL_GetExtraAttributeComponents Function' >>>---
DEBUG    : --->>> 'sIBL_GetExtraAttributeComponents Function' <<<---
DEBUG    : > Current Attribute Values : '@TargetApplication | MAX.Application | String'.
DEBUG    : > Current Seeked Key : 'Value'.
DEBUG    : > Current Key Value : 'MAX.Application'.
DEBUG    : ---<<< 'sIBL_GetExtraAttributeComponents Function' >>>---
DEBUG    : --->>> 'sIBL_GetExtraAttributeComponents Function' <<<---
DEBUG    : > Current Attribute Values : '@TargetApplication | MAX.Application | String'.
DEBUG    : > Current Seeked Key : 'Value'.
DEBUG    : > Current Key Value : 'MAX.Application'.
DEBUG    : ---<<< 'sIBL_GetExtraAttributeComponents Function' >>>---
DEBUG    : --->>> 'sIBL_GUI_Message Function' <<<---
DEBUG    : > Launching sIBL_GUI_Message().
DEBUG    : > Message Type : 'Error'.
DEBUG    : > Title : 'Error'.
DEBUG    : > Message : 'Remote Connection On Win32 OLE Server 'MAX.Application' Failed !'.
ERROR    : 'sIBL_GUI | Remote Connection On Win32 OLE Server 'MAX.Application' Failed !'.
DEBUG    : ---<<< 'sIBL_GUI_Message Function' >>>---

Title: Re: Win32 OLE Server
Post by Kel Solaar on 09/05/09 at 11:14:41
Hi :)

I'm not at home this weekend, so I can't really help, and my Mac got crappity smacked up by Snow Leopard, I can't build PyQt again, so sIBL_GUI doesn't compile anymore, and Eclipse ( my IDE ) has a lot of problems.

I'll need to format and reinstall all my crap :(

KS

Title: Re: Win32 OLE Server
Post by keksonja on 09/05/09 at 14:11:42
so I should not attempt on installing snow on my box :)....


Title: Re: Win32 OLE Server
Post by Kel Solaar on 09/25/09 at 20:42:53

wrote on 09/05/09 at 14:11:42:
so I should not attempt on installing snow on my box :)....


Yeah :) Definitely wait 5 or 6 months they release a service pack :D

KS

Title: Re: Win32 OLE Server
Post by El-d on 10/06/09 at 11:55:04
Hi all,

I've only recently experimented with Sibl and was impressed. I haven't touched it for a month or so and came to play around with sibl / 3dsmax again. I dowloaded the latest version on request and now I receive the same win32 OLE error.

I've tried running the startup script as mentioned earlier in the thread with no success. Is there any further progress on this problem?
Is there any issues with having multiple max versions installed?

Also, I've noticed that when I select max template that the ip/port options dissappear. is this correct?

Cheers

El-d

Title: Re: Win32 OLE Server
Post by Kel Solaar on 10/06/09 at 13:38:43
Hi :)

The latest 3dsmax Helper Script is available here :

http://kelsolaar.hdrlabs.com/?dir=./sIBL_Framework/3ds%20Max/Startup%20Script

Let me know if you have problems with it.

And for the Port / Adress Widget that disappear, it's a correct behavior, 3dsmax Connection is different and not Socket based :)

KS

Title: Re: Win32 OLE Server
Post by El-d on 10/06/09 at 14:17:40
Thanks Kel but that is the script I've been using. Just downloaded again to confirm. Placed script in Script/startup directory.

I've tested with both 32 and 64bit max 2008 with the same error. I'm
using XP pro64 sp2 and have also tried on Vista 32.

Cheers

El-d


PS

Just thought I'd check the logs.

sIBL_gui.exe came up with this.
Traceback (most recent call last):
 File "sIBL_Common.pyc", line 121, in sIBL_Function_Call
 File "sIBL_GUI.py", line 1812, in Send_To_Software_pushButton_OnClicked
UnboundLocalError: local variable 'cError' referenced before assignment


The others look fine upto

INFO     : sIBL_GUI | Starting Remote Connection !
ERROR    : 'sIBL_GUI | Remote Connection On Win32 OLE Server 'MAX.Application' Failed !'.







Title: Re: Win32 OLE Server
Post by Kel Solaar on 10/06/09 at 19:26:19
Hi o/

There is an error in the code for the 3dsmax connection, but I don't think that's what causing the connection failure ( the Error I speak about is coming after the connection failed ). I'll look into that issue !

KS






Title: Re: Win32 OLE Server
Post by Kel Solaar on 10/06/09 at 21:26:05
Hello Again :)

You need to register 3dsmax as an OLE Server, my 3dsmax 2010 wasn't and Connection Failed the same like you. There are some Windows Registry files around or you can use this Maxscript written by Adam Pletcher :

http://forums.cgsociety.org/attachment.php?attachmentid=133696

Here is the related post :

http://forums.cgsociety.org/showpost.php?p=5421997&postcount=212

After doing that it should work again :)

KS

Title: Re: Win32 OLE Server
Post by Dschaga on 10/07/09 at 09:03:46
Everyone can check if the server is registered by closing 3dsmax and opening siblgui trying to export an sibl to max.
It should open 3dsmax automatically.

Title: Re: Win32 OLE Server
Post by jujubee on 10/20/09 at 14:47:50
I'm getting the same error running Win7 and 2010 x64 with latest SP installed. I also ran the attached script and even rebooted Windows figuring that it put some entries into the registry. It won't launch 3dsmax.
[code]Remote Connection On Win32 OLE Server 'MAX.Application' Failed![/code]

Title: Re: Win32 OLE Server
Post by Dschaga on 10/20/09 at 15:30:07
So if there is no OLE server registered, you can't connect to max :)

Have a look at this thread:
http://forums.cgsociety.org/showpost.php?p=3808524&postcount=26

You have to change the maxversion number and the path and you should be done.

btw.. it looks like you or Autodesk have screw up your 3dsmax install, because the Autodesk Installer for max2008 registers the service automatically for you. ...maybe it's also a limitation of 64bit or win7 OS.

Title: Re: Win32 OLE Server
Post by jujubee on 10/20/09 at 16:27:53
Unfortunately, some of those values do not exist and I'm a little afraid to enter them when they don't already exist.

Title: Re: Win32 OLE Server
Post by Dschaga on 10/20/09 at 18:01:44

wrote on 10/20/09 at 16:27:53:
Unfortunately, some of those values do not exist and I'm a little afraid to enter them when they don't already exist.


... that's why you have to register the OLE server. ;)


Title: Re: Win32 OLE Server
Post by jujubee on 10/20/09 at 22:43:13
Okay. So I was missing one entry path and corrected it. I've attached a registry entry to this thread in case anyone is running 2k10 and x64. As always, BACK UP YOUR REGISTRY. I don't want to be held responsible if anything goes wrong lol.

Just extract it and double-click the .reg file - you should be good to go. If you're running a different version, just change the 12 using notepad/wordpad. If you're running x32 on a x64 OS for some odd reason, you'll probably need to change the file path to the Max app.

I should note:
1) If you attempt to Launch Max from the sIBL GUI by loading in a HDR, it will launch Max and may still give you a OLE 32 Error. However, if you already have Max open, it will work/load the HDRs fine.
2) I think the loader script should automatically enter the registry entries for someone dumb like me. There's probably plenty of people who install this, try to test it out, and just give up.
3dsmax-2010-x64-OLE-server.zip (Attachment deleted)

Title: Re: Win32 OLE Server
Post by Jeff Hanna on 11/10/09 at 04:02:30
Hi,

I'm a new sIBL user, I found it a few days ago while researching image based lighting to generate HDR format textures for a game. I've been coding MaxScript for close to a decade now and understand the hairpulling that getting the COM server up and running can cause.

I branched the sIBL_GUI_For_3dsMax project on GitHub and modified the sIBL_OLE_ExecutionCommand.ms startup script. My new version dynamically builds and merges the proper Registry information, registers four standard external file I/O methods, and declares and registers the ExecuteSIBLLoaderScript() function.

I included the four standard file I/O functions because registerOLEInterface() is a dumb method. Every time you call it it forgets what has previously been registered and only remembers what you have just asked it to register. By doing it the way I did the COM server gets up and running with as many known functions registered as possible.

If the maintainers (or anyone else) want to test and accept my changes you can find them on GitHub at http://github.com/JeffHanna/sIBL_GUI_For_3dsMax

I've also taken a first pass at cleaning up the 3ds Max Scanline and MentalRay sIBL_GUI templates. While the MaxScript code they generated was ok it was kind of repetitive and not necessarily making the best use of available MaxScript core functionality. My forked sIBL_Framework can be found on GitHub at http://github.com/JeffHanna/sIBL_Framework. Again, if the maintainers want to test/merge my code in to the mainline, please do.


Jeff Hanna

Title: Re: Win32 OLE Server
Post by Dschaga on 11/10/09 at 11:17:41
Wonderfull!!!
Just what we needed
:)


btw .. welcome on board!

Title: Re: Win32 OLE Server
Post by Kel Solaar on 11/10/09 at 20:13:22
Hi Jeff,

First, a big Welcome !

Second, Thanks to giving some of your time to help us :)

Third, I'll do the merge tomorrow, I'm currently really flooded, and have put sIBL_GUI in maintenance mode ( meaning I'll fix bugs, when they appears, but I'll not introduce new features etc for a few months, until things get slower for me ).

I'll need to also check a bit with Git, because as I was alone, I had the habit to do some stuffs not really clean when you work with others ( rebase, etc ).

Anyway thanks again :)

KS

Title: Re: Win32 OLE Server
Post by Kel Solaar on 11/11/09 at 12:36:50
Hi,

I merged our respective Branchs, pushed everything back on GitHub, and released everything on HDRLabs Server ! The new Templates should be available from sIBL_GUI Online Updater, and the 3dsMax Startup Script from here : http://kelsolaar.hdrlabs.com/?dir=./sIBL_Framework/3ds%20Max/Startup%20Script

KS

Title: Re: Win32 OLE Server
Post by Jeff Hanna on 11/11/09 at 21:41:37
Did integrating up from my branch work ok? I ask because last night I ended up making some local changes to the sIBL_GUI app. Currently sIBL_GUI wants to store its settings file(s) and templates in the installation folder. On Windows Vista and/or 7 this is an issue as only administrators have access to write there. I'm adjusting sIBL_GUI so that, when on Windows, it stores that data in a <home>\documents\sIBL_GUI folder.

My adjustments are not ready for release yet. I'd hate to go much further, though, if you are having any issues on GitHub integrating my work.

Title: Re: Win32 OLE Server
Post by Kel Solaar on 11/11/09 at 23:12:17
It's something I have planned doing, but it's part of much bigger Refactoring Plan, I didn't started yet. There are a lot of things to consider with the settings, especially with Mac Os X and Linux. I'm not really hot to do that now because I don't have time :)

KS

Title: Re: Win32 OLE Server
Post by Jeff Hanna on 11/12/09 at 00:53:04
I figured OSX and Linux would be different. That's why I put an OS conditional around my changes. I can test on Windows and OS X, to a limited extent. The only 3D package I have on my Mac is Blender.

If you don't want to merge things to the mainline I'm fine with that. I'm just getting sIBL_GUI fitted into my OS and workflow at work..

Title: Re: Win32 OLE Server
Post by Kel Solaar on 11/12/09 at 08:25:08
Hi Jeff :)

No I don't have anything against your tweaks, they are logical, I planned to put Settings / Log Files / Export in User Space, as for the Templates it's really more complicated since they are part of the application, a bit like plugins, they can of course be in the User Space, but there are a lot of stuff to consider doing that ( Installation and Deployement on the different OS, what happen when you need to Update, etc ).

Those questions are part of what I'll try to answer when I refactor / improve the code, I have kind of roadmap, with a Mini Plan with features I'll do for sIBL_GUI 2.5, this pan will comprise those User Spaces needs.

And after that I have my Big Plan where I'll probably rewrite 90% of the Software, it will be certainly Python 3 and I have eventually thought about changing my Qt Bind with PySide. I'm learning tricks and stuff everyday in Python, there are things I did, I would not do now or not the same way.

As for the merge, I think it will no happen with a release immediatly, because I'm too flooded and pressured at work,  and when I get home, I don't have the willing to spend more time coding my stuff. But I want to let you know that I'm f$$king happy that you do that code tweak to fit your needs.
That's why sIBL_GUI is open source, even if legally I have to put the code since I'm using Qt with it's GPL license, I could have bought a license and keep everything for me, price is a bit expensive, but when you spend so much time on something, it's affordable in the end :)
No I have thought about this for long enough, Open Source is the good way :) Everybody can fit the tool to his needs, if I don't wanna continue, someone can take the flag etc, and the project don't disappear in Shadows :)

Keep it up !

KS

Title: Re: Win32 OLE Server
Post by jujubee on 11/14/09 at 19:11:19
You guys are speaking a slightly different language than me now. I just want to make sure I had some idea what is happening with Jeff's changes.

So am I correct in saying/summarizing that Jeff has helped us all out in doing the following with the latest sIBL_GUI install for Max:

1) Changing the OLE server error by implementing it (registry changes) automatically into the server?

2) Optimizing some general code?

3) Restructuring the template file path for more seamless installation on Windows 7 (easier install without administration privileges?)

Which leaves me with the following question:

1) Should I (or 'we', general users) wait before 'upgrading' our previous build and testing this new one out?

Title: Re: Win32 OLE Server
Post by Jeff Hanna on 11/15/09 at 04:08:26
Yes to 1 and 2. Not yet for 3. I haven't pushed the 'store the settings and templates in the appdata folder' change to sIBL_GUI back to the main build directories yet. Since sIBL_GUI is written to run on three different operating systems I want to make sure my changes regarding where settings and templates are stored integrate well with the rest of the code and don't break things for OS X or Linux users.

Title: Re: Win32 OLE Server
Post by jujubee on 12/31/09 at 01:50:19
I downloaded the latest sIBL_GUI_For_3dsMax_Startup_ Script.zip, installed it and am receiving the Win32 OLE server error again. I really need a fix in order to test out all the new sIBL libraries I just created.

Is there a way to revert back to the previous startup script? I didn't see it archived. Thanks.

Title: Re: Win32 OLE Server
Post by jujubee on 12/31/09 at 02:01:45
Update: Apparently I had to go in and delete the temp files located where the output loader script stores them. In this case, "\\Users\username\AppData\Local\Temp\" <-- and that seemed to do the trick. I hope I didn't break something else...

Title: Re: Win32 OLE Server
Post by Kel Solaar on 12/31/09 at 09:56:20
Hello :)

I don't version releases archives of the 3dsmax / Maya Helper / Startup Scripts BUT the Source Code itself is versionned on GitHub :

http://github.com/KelSolaar/sIBL_GUI_For_3dsMax/commits/master

and here for my GitHub Projects :

http://github.com/KelSolaar

KS

Title: Re: Win32 OLE Server
Post by jujubee on 12/31/09 at 16:12:52
Okay - thank you. I might revert back later today. I still get the OLE 32 error with the current version (I can't predict why or when it happens) but sending the sIBLs to Max still works occasionally (assuming that I'm sending an older sIBL with the 'Sun' parameters versus 'Light' parameters.)

HDRI Community » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2021. All Rights Reserved.