[Plugin] MXM Reporter (Maxwell Render)
-
By the way mate your cut paste option is all needed to do the job!
Hope you can get Francois sorted I know he's been having liitle joy with a few maxwell issues!
-
Hi Vodka,
yes, after I hit the scan button to right folder the list shows up and I can continue. But then I am returned to MXM reporter as it was. I can then manually assign mxm materials. Obviously that is to much of a job with a regular project.Also when I close MXM reporter and reopen it, the auto MXM is disabled again and the scan path shows "c:\materials" again instead of the path I directed it to before. The manually assigned MXM materials remain assigned though.
I am afraid you need need a Mac to further test. Any help is very appreciated though, and thanks for your efforts anyhow, for PC users your plugin must be very useful.
Francois
Indeed Richard, I have some issues... -
Glad to hear it, Richard!
Francois, I'm still confused about what you need me to test. You said you were able to scan your auto MXM path and get a list. Are no mxm files being shown in the list? If it's not finding any mxm files, can you tell me what path is shown immediately under "MXM Scan Results"?
If the scan IS finding your mxm files, what is the problem you are having after that? Are you saying that none of the mxm files that the scan found are being assigned to any sketchup materials? That everything is still shown as "no material assigned"? Are you sure the sketchup materials are named the same as your mxm files? For instance, if you have a sketchup material named "concrete" you should have an mxm file somewhere in that auto mxm path named "concrete.mxm". If you check out the screenshot of my plugin you will see what I mean by looking at the purple entries.
So, let's assume that you are naming your sketchup materials to correctly match the mxm filenames you were able to find in the scan, but none of them show up as linked when you return to the main screen. If you export to maxwell and look at the render, are the correct materials showing up then? (Keep in mind that the Maxwell exporter has its own auto mxm path set inside its options dialog).
I won't be able to test on an osx system anytime soon, but I guess I can look into installing a "hackintosh" virtual machine. I just have a strange feeling that something else is causing the problem, since the process of storing the scanned mxm filenames in a list and checking that list for each sketchup material's name is relatively straightforward and shouldn't be affected by what operating system you are running on. Once you get a list of mxm files after you hit scan, the operating system you are using should no longer be a factor. I hope you understand my reasoning..
Anyway, you're right about the auto mxm toggle being disabled, and the path being reset each time you open MXM Reporter. On the PC the auto mxm path is set to whatever the maxwell exporter is using. Since it doesn't know where to look for the exporter settings on osx, it just uses a default value of "c:\materials". Starting out with auto mxm disabled seems like the right thing to do, otherwise it might confuse people who would see it enabled and see the path set correctly and then never think that they needed to hit scan. I can make it so the auto mxm path persists when you open/close MXM Reporter, but I think the better alternative is to just find where the maxwell exporter is saving its config file on osx. This should be relatively easy using spotlight, if you want to give it a shot. On the pc this file is called "MaxwellRender.ini" and contains a line starting with "MXMPath".
Again, I'm sorry you're having trouble. I'll look into installing some sort of virtual machine to test with, but I still want to make sure that your mxm files are being located when you scan, that your sketchup materials are named correctly, and that maxwell renders the scene with the correct mxm materials regardless of what MXM Reporter says.
Thanks for your patience..
-
The MaxwellRender.ini file is just stored in the home folder of the user. I am not sure if you can set the MXM plugin to store it somewhere else.
The problem is that materials under OSX must be named glass.mxm for instance in the material panel of Sketchup. Otherwise auto MXM does not work. If I change the material in just "glass" and copy/paste the right path in MXM reporter than your rb will work well. But then of course I will not export the file properly for auto MXM to work. So the problem is with .mxm in the material names in Sketchup.
-
WOW, I had no idea osx users needed to use ".mxm" in their sketchup material names! On the pc if you have ".mxm" in the name it WON'T work on export. How strange...
Please try out the attached file and let me know if things are working better for you, Francois. The auto mxm path should hopefully default to the one set in your exporter config, and the mxm filenames should now properly match up to the sketchup materials. I'd also like to know if clicking on an assigned mxm file brings up the maxwell material editor (mxed) ok for you. Oh, I guess one last thing you could check is if the right mouse button context menu is working correctly. Manipulating the DOM via javascript and having it work in both IE and Safari is a little tricky. If everything is working then all the bases should be covered and I can update the original post.
Thanks for the help!
-
Hi Vodka,
with your latest rb I will list here my results:this works:
- the path is now correct by default
- I can manually asign the materials.
- clicking a material in the MXM reporter highlights the material in the SU material panel. Nice.
this does not:
- auto MXM remains disabled by default
- double clicking the assigned material does not open de material editor
- this the result when I hit "scan". MXM reporter should have found the assigned materials.
Auto MXM Scan Results
MXMPath = /Applications/Maxwell%1.7/materials%database/MXM%library
Located 0 Materials
Continue
Hope you still feel inspired to get it to work,
thanks Francois -
Hi Francois,
Yeah, selecting sketchup materials in MXM Reporter will always update sketchup's material panel, and vice versa.
Auto MXM will always start out as disabled whenever you start MXM Reporter. This seems to really bother you though, so I guess I'll change it up so that it remembers your setting between opening/closing MXM Reporter (but only if you have files scanned in that it can use).
I doubt those "%" characters are supposed to be in your path like that. Can you open up the "MaxwellRender.ini" file in your home directory with a text editor and look for the line that starts with "MXMPATH="? See if those "%" characters are being used in there instead of spaces.
Getting closer.. lol
-
yes those "%" characters are in the ini file when I open it with a texteditor.......
I also thought there might be a problem. But your previous rb actually found the right path when I typed it in so if you changed nothing there it should not give a problem now.
You are getting closer I think as well -
@frv said:
this does not:
- auto MXM remains disabled by default
I think that is an issue on the Mac that the Mac doesn't seem to turn a toolbar on just because it was on last time SU was used. Someone figured out this little code snippet and it seems to work:
case toolbar.get_last_state when 1 toolbar.restore when -1 toolbar.show end
where "
toolbar
" is the variable name of your toolbar object. Add that line after all the menus and toolbars have been loaded in your script. That should do the trick to make it be turned on when a Mac users starts up SU.Chris
-
Sheesh, it really seems like two different people made the pc/osx versions of the maxwell exporter & plugin. I don't understand why there are so many inconsistencies. Ah well.
Try this new version, Francois. The plugin should now replace those "%" characters with spaces. I'm not sure why their osx exporter is saving it in that format, though. I'm curious what would happen if people used "%" in their folder names. You OSX people have it rough, lol!
If you enable auto mxm and scan a folder, those auto mxm settings will now persist throughout the sketchup session. So now if you close and reopen MXM Reporter you won't need to reenable or rescan anything.
That just leaves the maxwell material editor (mxed) to deal with. Francois, can you use spotlight and search for where "mxed" is located on your system? Let me know if it has a goofy extension like ".exe" or something, too. Also, can you open sketchup's "ruby console" window and then click on any of the assigned mxm files in MXM Reporter? When you click on the mxm file it should print out a line in the ruby console telling you where MXM Reporter is looking for mxed. That should help narrow down what the problem is.
Thanks again.
Btw, thanks for the suggestion, Chris. This was a different issue, though. Just some html form control settings on the webdialog that Francois wanted me to persist.
-
@vodkamartini said:
Btw, thanks for the suggestion, Chris. This was a different issue, though. Just some html form control settings on the webdialog that Francois wanted me to persist.
Ahh, gotcha. My mistake. I thought it was the lazy toolbar bug/issue popping up again.
-
Hi Vodka,
update on Version 0.4cits works !!
But....... you have to remove "MXMPath = " from your default in the auto MXM path. At first I tried your plugin but it could not locate any materials and MXM reporter kept disabling the auto MXM. As soon as I removed "MXMPath = " from the Path in your plugin MXM reporter made a proper list and things worked out.Clicking on a MXM material in the MXM reporter list does not bring on MXED though.
One material though when clicked in MXM reporter highlight the default material in Sketchup instead of the proper SU material. It happened once , but I did not check thoroughly with other files.
request:
Can you bring "continue" to the top of the scan list. In most cases I am not very interested in the scanlist and just want to move on without having to scroll down.
What is the consequence of ambiguous material names ? and why did you list in the scanlist
Can you make the MXM reporter dialogbox sizable ? Its a rather large window.
Can you skip the path from the MXM materials list that is already in the "auto MXM path box". It would be easier to quickly read the list. The path since its already shown does not need to come up with every material again.Ha, I hope I am not giving you unwanted homework to do. I am already happy with MXM reporter since it gives me a tool to debug a file before it has gone through the export MXM plugin.
Francois -
the ruby console shows up with this
MXED PATH: /Applications/Maxwell/mxed.app/Contents/MacOS/mxedThe application path in my case is
MXED PATH: /Applications/Maxwell 1.7The application mxed in my case shows up in the Maxwell 1.7 folder as just mxed. No .anything
Maybe you should have a manual path guide in MXM reporter since I think many for instance do not have a Maxwell 1.7 folder but just a Maxwell folder to locate.
Good luck,
Francois -
Hi Vodka,
some further testing show me that sometimes the .mxm path is neccesary but sometimes not. I had for instance a material that worked both ways but other only worked when I attached .mxm to the material name in SU.more request, maybe impossible.
Can you make the list in MXM reported a little more interactive. Like the option to change material names in the list or rename them and maybe even to delete a set of materials from the SU file. In SU I can not delete more than one material at once. Can you imagine deleting 20 materials by deleting them one by one.....Ok, thanks again a lot,
Francois -
Ok, I'm now parsing the MXMPath line in the MaxwellRender.ini config to accommodate any spaces before the equals sign. That was just another case of a formatting difference between windows and osx.
I hardcoded in the "/Applications/Maxwell 1.7" path for mxed. It should work for you now but I'd like to find a more generalized solution in case someone changes their installation directory or upgrades to a new version of maxwell. On windows there is an environment variable (MAXWELL_ROOT) that will always point to the correct folder. Would it be possible for you to send me the MaxwellExport.rb from your plugins folder so I can look and see if NextLimit is just hardcoding their path as well?
I changed the display of assigned auto mxm files (the purple entries) to not include the auto mxm path, like you had asked.
I'm not sure about moving the continue button on the scan list though. I kind of did it that way so that people would see any highlighted "ambiguous" mxm files. Right now you can hit the "end" button on your keyboard to jump to the bottom of the list. I guess I can add a "jump to bottom" link or something.
Also, that "ambiguous material names" list is just showing you that there are mxm files with the same name in different subfolders within your auto mxm path. So you might have a file named concrete.mxm in an "outdoors" folder, and another file named concrete.mxm in a "construction" folder. I don't know what method the exporter is using to decide which file gets applied on export. My plugin will just assume the first mxm file it finds is the correct one, and will highlight any other mxm files with the same name in red to let you know that they won't be used by MXM Reporter. So it's best to use the "ambiguous material names" list to help you rename your mxm files so that they're all unique.
The MXM Reporter dialog box should already be resizable, and it should remember its size and position when you close and reopen it. I do have it set to a minimum size of 640x480, however. Are you trying to make it smaller than that? For me things start to get pretty cramped and unreadable when you go that small. Maybe you have safari's font size set to be smaller than normal? Anyway, I just changed the minimum size to be 400x300. Hopefully that's small enough for you.
I would definitely like to know the official policy on naming the sketchup materials. The helpfile that comes with the maxwell plugin on windows doesn't mention using .mxm extentions at all. Right now I have it set so that on OSX you can have the sketchup materials named with or without the .mxm extension and they will be matched up with the auto mxm files in MXM Reporter. If the maxwell exporter always works with the .mxm extensions then just use them exclusively. I bet there is something about the filenames that are causing some to work without the extension and others not to. If you experimented enough you could probably figure it out.
I would rather wait and make sure all these other issues are squared away before I start adding more features. From what I've seen the sketchup api doesn't even allow you to rename materials, so I would be doing hackish workarounds like creating a new material and copying over all the attributes. Then I would have to make sure all the stuff you had painted with the old material is now referencing the new material, etc, etc, etc. As far as deleting 20 sketchup materials like in the example you gave, I would do it by using the "purge unused" command in the sketchup material panel. In the future I can probably add more options for things like that in the context menus that pop up when using the right mouse button.
Anyway, let me know how this version works out, and remember to send the MaxwellExport.rb file if possible. It would also be nice if you could find a way to recreate that bug you mentioned seeing one time where selecting a material in MXM Reporter doesn't select it in sketchup's material panel. I know you can do it by renaming a sketchup material and not hitting "refresh" in MXM Reporter, but other than that it shouldn't happen. You can also cause problems if you keep MXM Reporter open while switching between different .skp files. In those cases you should close and reopen MXM Reporter so that it binds itself to the current model. This seems to be another case of the sketchup api missing important functionaility (sending notification when the current model changes).
-
Thanks for sending the MaxwellExport.rb file. You can remove it from your post if you'd like.
They are simply hardcoding the "/Applications/Maxwell/mxed.app/Contents/MacOS/mxed" path that I was originally using, which begs the question... does mxed even come up when used from the maxwell material panel?!
I can't think of a reason why selecting the materials in sketchup won't highlight them in MXM Reporter on osx. It's pretty much the exact same code path as when you select the material from directly within MXM Reporter. Very strange. There are too many little things I would have to test to figure it out, so I won't waste your time on it.
So yeah, the MXED issue seems to be the only major incompatibility left. I would really like to get that one figured out for an official 0.5 version. I've included one last test version that will print out a few addition details in the ruby console when you click on an mxm file. I realize things are pretty much working for you now, but if you find the time to test it out I'd appreciate it.
Thanks for all your help, Francois.
-
Hi Vodka,
it works now. Maybe I have just overlooked the proper highlight. I can not reproduce the wrong link to the SU material panel.What not works, there is no mxed link when you double click materials in the MXM reporter. When you double click a material in MXM reporter the associated material highlights in the SU material panel but there is no other vise versa link.
Still, thanks a lot. It makes life a little easier this way being able to actually see a listing and getting a visual on what to expect from auto MXM.
The ambigious names are indeed handy, I am starting to clean up my MXM library to make sure there are no longer doublures.
Francois -
Good news, when I use the color picker in SU then the material highlights in MXM reporter. That's probably also the way it is inteneded to work Very handy, makes MXM reporter even a lot more functional.
Here is the ruby console readout when I double click on a MXM reporter material
COULD NOT FIND MXED: /Applications/Maxwell 1.7/mxed
FOUND FILE: /Applications/Maxwell 1.7/materials database/MXM library/BZKII materialen (Maxwell)/glas.mxmNow, that's exactly where the app mxed is located.
mxed does not come up either through the Maxwell export material panel. If someone reads this and has it working under OSX please let me know.
Thanks again,
Francois -
It seems to me that 100% white materials get confused with the default material in the SU material panel. I noticed before that Maxwell does not understand 100 % white SU materials. I have not tested this thoroughly.
But when I want to reproduce the bug it always shows up with 100% white materials, when clicked in MXM reporter the SU default highlights.
Hope this helps,
thanks Francois -
I find it hard to believe that even the official Maxwell Plugin won't let you use mxed. You ARE using the latest version of the maxwell plugin, right?. And I assume you can start mxed manually? Is that how you've been editing your mxm files, or have you always been using mxs studio? If you can start mxed from the osx finder, you should be able to do it from a terminal (by just typing in that "/Applications/Maxwell 1.7/mxed" path.)
Can any other osx maxwell users chime in on this one?
Anyway, If choosing a color in the sketchup material panel causes the material to highlight in MXM Reporter, then that may be a possible bug in the sketchup api on osx. It sounds like it's not firing the "set current material" event when you click on materials, but rather when you edit them.
As far as maxwell having problems with white materials in sketchup... that one is beyond me. I haven't seen anything like that over here. MXM Reporter only uses material names to distinguish between the sketchup materials, it doesn't care about colors or any other attributes. So, yeah I don't know.. if you can't find a method to recreate this bug it may have to wait until I can play on an osx machine.
Advertisement