sketchucation logo sketchucation
    • Login
    1. Home
    2. vodkamartini
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    V
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 15
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: [Plugin] MXM Reporter (Maxwell Render)

      Hey, Stefan.

      Sorry for the late response. I should get an email whenever someone posts in this thread, but that didn't happen for some reason. Luckily, I just saw the comment you left the other day in the Maxwell V2 thread.

      Call me goofy, but I didn't include a toolbar in the plugin because I liked the simplicity of having it be a single script file (e.g. all the html and javascript are embedded). I made a quick edit to the code to search for "mxmReporterLarge.png" and "mxmReporterSmall.png". If you place those image files alongside mxm_reporter.rb in the plugins folder you will have your toolbar. You'll need to enable it the first time you use it (View ->Toolbars->MXM Reporter).

      The localization part is a bit tricky. Does the actual plugin fail to work when you use those characters in material names / autoMXM paths? I can imagine there being some unicode issues with that.

      Also, I haven't pulled the trigger on Maxwell V2, so I can't make any claims as to how compatible this plugin remains with it. It doesn't sound like anything has really changed with the sketchup plugin/exporter, but some of the problems people are having with autoMXM in V2 concerns me.


      MXM Reporter 0.4g

      posted in Plugins
      V
      vodkamartini
    • RE: [Plugin] MXM Reporter (Maxwell Render)

      Yeah, I can understand the osx version of sketchup having problems. I was just trying to ensure it had nothing to do with my plugin. That said, I completely forgot that modal dialog windows acted differently in osx. This new version of MXM Reporter should now stay on top like you expect. I also made the "scan results" window start out at the bottom so you can quickly click on the continue button like you had asked for earlier.

      I tried setting up an osx virtual machine last weekend, but was never able to get sketchup running inside it. I'm being honest when I say I don't think I'll be able to borrow a macbook and install sketchup & maxwell on it anytime soon. This plugin was never really meant to do anything but help me diagnose a few issues I was having when toying around with sketchup renders. I've since moved on to modo, and have been dealing with writing python scripts for it. Regardless, I'm still trying to accommodate you as best I can, and as long as you keep bringing osx issues to my attention I'll keep trying to fix them. Right now it seems like launching mxed is the only one left, and unless you experiment with some of the earlier suggestions I made or someone else chimes in it probably won't get fixed. But yeah, I wish I had a nice big mac pro to work on, I really do.. =(


      MXM Reporter 0.4f

      posted in Plugins
      V
      vodkamartini
    • RE: [Plugin] MXM Reporter (Maxwell Render)

      I have to admit you've lost me, Francois. Are you saying that selecting sketchup materials in MXM Reporter DOES highlight the proper material in sketchup's material panel, but the color picker doesn't update to reflect that material? And if you simply click on the currently selected material in sketchup's material panel (the one that was just set via MXM Reporter) the color picker will update? If that's all that is happening then it's just an osx sketchup bug.

      So just to be clear... as long as clicking on a sketchup material in MXM Reporter correctly sets the current material in sketchup's material panel, everything is fine with the plugin. So for instance, if you have the paint bucket tool active and click on the various sketchup material names in MXM Reporter, you will always be painting the correct colors regardless of what the color picker shows.. is that the behavior you see?

      posted in Plugins
      V
      vodkamartini
    • RE: [Plugin] MXM Reporter (Maxwell Render)

      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.

      posted in Plugins
      V
      vodkamartini
    • RE: [Plugin] MXM Reporter (Maxwell Render)

      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.


      MXM Reporter 0.4e

      posted in Plugins
      V
      vodkamartini
    • RE: [Plugin] MXM Reporter (Maxwell Render)

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


      MXM Reporter 0.4d

      posted in Plugins
      V
      vodkamartini
    • RE: [Plugin] MXM Reporter (Maxwell Render)

      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.


      MXM Reporter 0.4c

      posted in Plugins
      V
      vodkamartini
    • RE: [Plugin] MXM Reporter (Maxwell Render)

      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

      posted in Plugins
      V
      vodkamartini
    • RE: [Plugin] MXM Reporter (Maxwell Render)

      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!


      MXM Reporter 0.4b

      posted in Plugins
      V
      vodkamartini
    • RE: [Plugin] MXM Reporter (Maxwell Render)

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

      posted in Plugins
      V
      vodkamartini
    • RE: [Plugin] MXM Reporter (Maxwell Render)

      Hi, Francois.

      Sorry you're having trouble. Are you hitting the "scan" button after you paste in the path? After you paste in the "auto mxm path" and hit "scan", you should see a list of all the mxm files the plugin could locate within that path. Once you hit the "continue" button at the bottom of this list you should be back to the main screen and see all the appropriate materials highlighted (those that are named the same as mxm files).

      So I guess my question at this point is.. what happens when you paste in your path and hit scan? Do you get a listing of files, or does nothing happen at all? Even if you typed in some nonsense path you should still be seeing a list telling you no mxm files were found...

      Also, are you able to manually assign mxm files? If you click the "no material assigned" text, does it open a file browser and allow you to choose your mxm files that way?

      posted in Plugins
      V
      vodkamartini
    • RE: [Plugin] MXM Reporter (Maxwell Render)

      I see what you mean now, Richard. I've tried to tailor it some more to your liking...

      MXM Reporter - Version 0.4

      Enhancements:

      1. The "Choose MXM" file browser will now open up to the folder of the last successfully assigned mxm file. If this is the first mxm assignment you are making, it will try to open up whatever folder is currently entered in the "auto MXM path" input box. If that fails too, it will simply open up whatever default folder sketchup decides on.

      2. Added a context menu that pops up when clicking the right mouse button over entries in the maxwell column. This allows you to reassign new mxm files to sketchup materials that already have an mxm assigned (previously you would have had to "clear selected" first). The context menu will also allow you to quickly copy & paste mxm assignments between materials.

      Bug Fixes: (and potential introductions)

      1. Started using more javascript DOM manipulation instead of simply regenerating the entire table. UI response should be quicker and you should no longer have to scroll back down through a long list of materials every time you add, remove, or make mxm assignments. The page will only reload when you enable/disable auto mxm or you manually press the refresh button (which is only necessary if you rename sketchup materials or make changes via the maxwell material panel). The downside to all of this is added complexity and compatibility issues.

      Anywho, I'm currently evaluating Modo to see if I should jump in and preorder 401 before it's too late. As a result I won't have enough free time during the next few days to add anything fancy like your drag & drop idea. I kinda think the context menu will be quicker for you, though. Once the weekend rolls around I can give it a go if you still think it's warranted. Thanks for all the suggestions, btw. I'm glad someone's actually making use of this thing, lol!

      posted in Plugins
      V
      vodkamartini
    • RE: [Plugin] MXM Reporter (Maxwell Render)

      Alrighty, I managed to work on it a bit during my trip home.

      MXM Reporter - Version 0.3

      Enhancements:

      1. Clicking on mxm filenames will now open them for editing inside the Maxwell Material Editor (mxed). On windows platforms, the mxed process will not block the main sketchup process. This enables you to open multiple mxed windows and edit materials while you continue to work within sketchup (great for multi-monitor setups). Since I don't have OSX to test with, I wasn't confident enough to implement the same functionality over there. OSX users should experience the same blocking behavior as if you had clicked the edit button from the maxwell material panel.

      2. Clicking on "unassigned" maxwell material entries will pop up the familiar "open file" dialog window. Combined with the previous enhancement, the material assignment workflow is now considerably streamlined. You no longer need to use the maxwell material panel to assign and edit mxm files.

      3. Two buttons were added to the bottom of the MXM Reporter window. "Clear Selected" will remove all maxwell material attributes from the currently selected sketchup material. "Clear All" will remove them from ALL sketchup materials. This solves several annoyances I was having (not being able to use auto mxm once attributes were assigned, maxwell's material panel automatically adding attributes to newly created materials, etc). Please note that these buttons will NOT remove any other maxwell attributes that are applied elsewhere in your model (ie. the camera, environment, hdri, object attributes).

      Bug Fixes:

      1. Forgot to escape html characters when displaying auto mxm filenames.
      2. When default material was manually selected, material observer was passsing nil, causing an exception.
      3. File separators were inconsistent between mxm and auto mxm filenames.

      thomthom, thanks for the offer to test - It probably isn't worth the trouble, though. You're right about it working without the maxwell plugin, but testing in that way wouldn't cover the majority of use cases. I'm sure some osx maxwell user will eventually chime in if there are issues to resolve.

      Thanks for all the feedback. As always, let me know if there are any problems.

      posted in Plugins
      V
      vodkamartini
    • RE: [Plugin] MXM Reporter (Maxwell Render)

      Thanks for all the feedback so far. You're embarrassing me, though - the gods are the other people in this forum flexing their linear algebra muscles. I'm just some dope who generates an html table, lol. Learning new languages is pretty straightforward since I'm a CS grad and have worked with dozens already. It's just like moving between 3d modeling packages - once you understand the concepts (nurbs, polygons, subds, etc) it simply becomes a matter of learning the interface (or in this case, the syntax).

      Richard, could you expand a little more on the functionality you would like to see? I want to make sure I understand what you're looking for. Do you...

      1. Want mxm files that are assigned to sketchup materials (the green & purple entries) to be "hyperlinks" to open them in the maxwell material editor (mxed) so you can immediately edit them?

      2. Want all the maxwell material attributes for the exporter to be editable within MXM Reporter (completely sidestepping the maxwell material panel)

      3. Want a dropdown list filled with all of the scanned auto mxm filenames to appear alongside each sketchup material name, so that you can quickly choose to rename your sketchup material to one that matches an auto mxm filename.

      All of those are technically possible. If I had to guess right now I would think you were asking for the first option. I can try to add that in tomorrow morning during my flight home. The second option would be stepping on nextlimit's toes a bit, but I doubt they would mind. Both the second and third options would clutter up the table a bit, so that's something to consider.

      Anyways, I'm still worried about bugs and compatibility issues. I was hesitant to even release it publicly since I'm not a seasoned sketchup user and can't even test it out on OSX. But yeah, I'll keep monitoring the thread, so please let me know if there are any problems!

      posted in Plugins
      V
      vodkamartini
    • [Plugin] MXM Reporter (Maxwell Render)

      I started learning sketchup a few days ago and was eager to try some renders via the maxwell plugin. I ran into trouble when it came to assigning materials, and needed a way to diagnose some of the problems I was having. I spent the last two nights learning ruby and going over the sketchup api in hopes of better understanding what was going on behind the scenes. When I saw how straightforward everything looked I decided to hack together a plugin of my own. I've only been using it for a couple of hours, but so far I'm finding it extremely helpful at finding & eliminating problems in the maxwell material assignment process.

      So what does it do? Well, when you use the maxwell plugin to assign materials, you're simply attaching extra attributes onto the sketchup materials in your sketchup file. My plugin simply reads those attributes and presents them in a useful manner. It generates a table listing all of the sketchup materials and their associated maxwell attributes. You can select the individual sketchup materials, and if the maxwell material panel is enabled it will pop up as it normally would. My plugin also allows you to specify an auto MXM directory, which it can use to ensure that your sketchup material names match up with mxm filenames within that directory structure.

      Anyways, I wanted to make it available in case anyone was interested. There will most likely be compatibility problems and bugs I haven't run into yet, but I will try to fix any issues I encounter or those that are brought to my attention. Just keep in mind that this isn't a professional app, and is something I hacked together in a couple of hours.

      Important Issues

      1. Don't switch between sketchup files while the MXM Reporter is open, as it gets bound to the active model whenever it is started. Simply close & reopen MXM Reporter if you ever switch between sketchup files. (The maxwell plugin has the same issue, only trickier since you have to toggle the "enable maxwell material panel" button to rebind it.)

      2. MXM Reporter will automatically update when you add or remove sketchup materials. However, renaming sketchup materials or altering the maxwell attributes will NOT automatically update the MXM Reporter window. That is what the big "Refresh" button is for. I had an implementation that worked around these two issues, but in the end I decided to take it out for maintenance reasons (the plugin is simpler without it).

      3. In order to use the auto MXM feature, you must type in the appropriate search directory and press "scan". This will recursively scan all files and subfolders within the specified directory, building a list of possible mxm files to match your sketchup material names against. If you add, remove or rename any mxm files within the search directory, you can simply "rescan" it to rebuild this list. The scanning process will also alert you to any name clashes you may have within the directory hierarchy.

      Compatibility Concerns

      1. I am using the latest version of Sketchup Pro 7 and the maxwell skp2mxs plugin (v2.2) on a Windows Vista system with IE8. Users on others systems (particularly osx) with different browsers may run into problems. I have a feeling (looking through the skp2mxs ruby file) that some of the maxwell attributes that get attached to the sketchup materials have changed over time. Attributes which can't be set with the latest maxwell plugin should be safely ignored by MXM Reporter.

      2. If you are using windows, MXM Reporter will try to retrieve the auto MXM directory from the maxwell exporter options (which are located in C:\Windows\MaxwellRender.ini). I have no idea where these settings are kept on OSX, but if anyone cares to find out I will update the plugin to look there as well.

      2009-6-15: Updated to version 0.3 (Changes)
      2009-6-16: Updated to version 0.4 (Changes)

      [Currently trying to fix compatibility issues for osx users. See recent posts if you can help!]


      MXM Reporter 0.4


      Screenshot

      posted in Plugins
      V
      vodkamartini
    • 1 / 1