Page 1 of 1
Import material bug
Posted: Sat Dec 31, 2011 1:40 pm
by jc4d
Hi all,
I found a bug when you import your MXM, if you choose not to link the material when the question is prompted the result is a empty material.
Cheers
JC
Re: Import material bug
Posted: Sat Dec 31, 2011 7:36 pm
by JDHill
Could you please be more specific regarding how you are importing the MXM? I am checking various methods of doing so, but not yet seeing what you describe. I see one possible case, where you:
- open the material editor
- create a new material
- delete all of its layers
- browse to set its MXM Link path
- are asked whether you want to link to the MXM
If you answer No here, the only thing that will happen is that the link path is set. I you answer Yes, the chosen MXM is read, and the link is enabled. But this sounds like a different scenario than the one you are describing.
Re: Import material bug
Posted: Sat Dec 31, 2011 8:07 pm
by jc4d
I tried your method and if my answer is no the path is set but nothing is showing in the material editor and if I remember correctly this behavior didn´t happen with previous versions.
My steps are almost the same:
- From Material Manager create a new Maxwell Material.
- From Attributes browse any MXM.
- Answer No when the question for linking the material is prompted.
- Double click in the material that is in the Material Manager and there is nothing just the basic layer.
Your method and mine are giving the same result.
Cheers
JC
Re: Import material bug
Posted: Sat Dec 31, 2011 8:57 pm
by JDHill
Yes, that is the correct behavior; when you click the browse button, you are not reading the MXM, you are only setting the MXM path. That is why it asks you if you want to link or not -- if you do, then the existing material structure is overwritten with that of the target MXM, otherwise, the only thing that happens is that the MXM Link path is set.
I was confused, because when you wrote the material was empty, I thought you mean that the operation was somehow damaging an existing material structure, which is something that should not happen. An existing material should not be destroyed by the sequence: browse for MXM Link > answer No to the linking question; only in the case that you answer Yes, should the material be modified. The reason for that is so that if you should later open the Cinema file on a machine where the linked MXM does not exist, the embedded material definition will match that of the missing MXM file, having been read when the MXM was originally linked.
Re: Import material bug
Posted: Sat Dec 31, 2011 9:19 pm
by jc4d
But don´t you think that if the answer is no the material editor should read all the attributes of that MXM? I guess it should work in the same way when you uncheck Link To, from material editor.
I was reporting this as a bug because I remember that in previous version of the plugin, when the answer was no the material editor read all the attributes of that loaded MXM without be linked.
Cheers
JC
Re: Import material bug
Posted: Sat Dec 31, 2011 10:09 pm
by JDHill
It is possible that it worked differently before (I have not checked), but that would have been a wrong behavior. Reading the MXM file is destructive to the existing material structure (in this case, just a default material), so I only do it when you explicitly say Yes to that dialog box. Here are two sequences which are equal to each other:
- browse for MXM file, answer Yes.
- browse for MXM file, answer No, check the "Link to" box.
It should work this way both in the AM, and in the plugin material editor. Un-checking the "Link to" box doesn't do anything at all, except tell the plugin to ignore the MXM path, if there is one.
Re: Import material bug
Posted: Mon Jan 02, 2012 9:50 am
by jc4d
I understand that linking the material is destructive, but from my point of view, what is the advantage or "point" to have just the path set in the material if there is no use for it at least until the material is linked?
My workflow is this:
- Create new material.
- Import a MXM as a base.
- Edit it inside Cinema material editor for that specific project without overwriting the original MXM.
JDHill wrote: Un-checking the "Link to" box doesn't do anything at all, except tell the plugin to ignore the MXM path, if there is one.
The advantage of un-checking the Link to is edit the material inside Cinema without overwriting the original MXM that was imported.
Cheers
JC
PS. Maybe I have this idea fixed in my head only, would be nice to hear what others C4D plugin users think about this.
Re: Import material bug
Posted: Mon Jan 02, 2012 8:46 pm
by JDHill
The linking confirmation dialog is only shown for pre-existing materials. If, on the other hand, your intention is not to link, and you therefore have Preferences > Enable MXM Linking on MXM import un-checked, then an easier workflow might be: open the material editor, then click menu > Create > From MXM. You could also just drag MXMs from the Content Browser, or the MXED Browser. In any of those cases, you should obtain the same result as using the steps you wrote above, but with just one step.
Re: Import material bug
Posted: Mon Jan 02, 2012 9:10 pm
by jc4d
I see now, thanks
JDHill wrote:open the material editor, then click menu > Create > From MXM
Would be difficult to have this option directly from the material manager?
Could be something like this:
Material Manager:
File -- Maxwell Material
-- New Material
-- Import Material (what is called From MXM)
Having those two options in a sub-menu.
Cheers
JC
Re: Import material bug
Posted: Mon Jan 02, 2012 9:29 pm
by JDHill
I don't think we can do that. I could add another command for this to the plugin menu & toolbar though, so you'd have Material, and Material (from MXM) commands.
Re: Import material bug
Posted: Mon Jan 02, 2012 9:32 pm
by jc4d
Not bad idea at all, maybe this can "speed up" the workflow, having less clicks for most uses tasks.
Cheers
JC