[Plugin] MXM Reporter (Maxwell Render)
-
Hang on wait a minute!!!
What your saying is:
- You have just started using SU,
- Just started to learn ruby,
- This is your first post to these forums!
What is going on here! Are you god?
I've been asking for this type of dialogue for the last 4 years and you give it to us in two days of learning ruby! You are god hey, come on own up to it, we'll work it out at some time surely so you might as well be honest now!!!
Well done mate and a huge thank you, thank you, thank you!!!
I'd love to see the option for the material to be linked straight from the list per material, I know this is asking for more than I could ever have expected from anyone to grant when you are not directly aligned with the plugin development!
-
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...
-
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?
-
Want all the maxwell material attributes for the exporter to be editable within MXM Reporter (completely sidestepping the maxwell material panel)
-
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!
-
-
@vodkamartini said:
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!
I have an old Mac Mini at home I use for testing purposes. Does this plugin require Maxweel to be installed? Or can it be tested by any machine as long as the model is set up for maxwell? (If the only thing it uses is the attributes.)
-
Alrighty, I managed to work on it a bit during my trip home.
MXM Reporter - Version 0.3
Enhancements:
-
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.
-
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.
-
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:
- Forgot to escape html characters when displaying auto mxm filenames.
- When default material was manually selected, material observer was passsing nil, causing an exception.
- 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.
-
-
Mate
I've got to get in and test and see what your workflow is to know now if you have hit my request on the head, though in short what I was suggesting is that all linking or re-linking could be done from the Reporter!
Meaning the full material SU (in model) material list is shown and clicking in the corresponding maxwell material opens the link dialogue (I think you have done this now!).
BTW the clear material button is a real blessing, I could never find anyway to unlink materials to just use a standard colour. Since V7 Even if you created a new material a link would be produced as a new material is created from the one currently selected.
I think you have covered pretty much all bases now and eased a great deal of workflow toward leaving all material assignment till just prior to export where one can have a greater level of assurance all is linked!
Seriously mate this is a very appreciated effort this end! If your ever in Australia - trust the beers are on me!!!
-
Ok I just installed and checked!
The functionality to double click the linked material for opening the editior is great, but again what I'm hinting at it to allow the current SU/MXM to be relinked to another material - and best I guess if it could go to the same folder as the current link. Mind you the current MR plugin lacks this functionality to take you to the same folder and you have to painstakingly navigate!
So say I have a SU material called "Garage Brick" and it is currently linked to an MXM "Brick Dark Brown Reflective", I can click (maybe in a third column "relink") relink - the browser opens in my Face Brick Folder (where the "Brick Dark Brown Reflective" material is hosted) and I can select an alternative material!
Also would be really cool if a link could be dragged from one material to another. I tried copy paste but that doesn't work!
Just been playing and this is very cool!
-
I see what you mean now, Richard. I've tried to tailor it some more to your liking...
MXM Reporter - Version 0.4
Enhancements:
-
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.
-
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)
- 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!
-
-
Mate! I'm amazed again!
Could you please enquire about taking over plugin development for the whole job!
I've always wondered you know why there aren't places you can buy alternative plugin exporters that feauture simplicity of use export to render apps than those that maybe avaiable free. Yours is a good example!
I wouldn't suggest for one minute that Pavol hasn't done a good job of the plug for SU > MR, though development has been fairly slow, though it took NL some time to develop export to MR from Modo! Which I think you would be wise to grab Modo, would do the same if things weren't so quiet!The HDRI lighting in preview has me licking my lips!
Mate I reckon you should talk with the Guys at thea too - if developing is a hobby or interest!
Thanks a heap again mate!
-
Hi Vodka,
I am on OSX and your rb does not work for me.
Everytime I open de dialog mxm conversion is disabled and I have to manually enable it. Then the path does not stick in the box either. The path I copy paste in to right folder does not stay there after I close and reopen the dailog.All my materials remain "no materials assigned" no matter what I seem to do.
Could you look into this for an OSX user.The plugin looks very promising though. Thanks in advance.
Francois -
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?
-
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.
Advertisement