This duplicates the "Options" and "Viewport Display" panel of the Material properties into the sidebar of the Material node editor.
I got this working, don't know if it is right so let me know so I can fix the issues.
Differential D3926
Patch for T57723 Add all Material options to Material Editor Authored by Lucas Boutrot (thornydre) on Nov 10 2018, 12:31 AM.
Details This duplicates the "Options" and "Viewport Display" panel of the Material properties into the sidebar of the Material node editor. I got this working, don't know if it is right so let me know so I can fix the issues.
Diff Detail
Event TimelineComment Actions Thanks. However, we should not actually duplicate the code for the panel twice. This would make the code difficult to maintain over time. Instead, I believe there is a way to import panels from other areas. An example is in space_view3d_toolbar.py: from .properties_paint_common import (
UnifiedPaintPanel,
brush_texture_settings,
brush_texpaint_common,
brush_mask_texture_settings,
)You should be able to do the same here too. Comment Actions Thank you for the feedback, here is my second attempt, I got it working without duplicating the code, I didn't know if I had to keep the Panels headers duplicated or not, but if not, I can do it. At the moment the only thing that doesn't work really good is that the preview is not refreshing unless you resize the sidebar, is their a way to force it to refresh when changing the render engine, the preview mesh or any material data ? Comment Actions @Brecht Van Lommel (brecht) or @Campbell Barton (campbellbarton): Can you check if this implementation is ok with you? Comment Actions The preview render updates are handled in the properties editor C code, through the sbuts->preview. This system would need to be updated to work for the node editor as well, or be rewritten to not be tied to a specific editor so much. Unless you want to deeply dive into the C code I would leave the preview panel out of this patch. This also only does the panels for Eevee, not Cycles.
Comment Actions Thanks a lot for your feedbacks, I just have a few questions about this patch :
Comment Actions I removed the Preview panel for now, and added the Cycles panels. As I asked above, should I rename the Options panel of EEVEE for "Settings" ? Comment Actions Yes it's inconsistent that this panel is called Options in Eevee, but Settings in Cycles. Ideally we should pick the same name. I slightly prefer 'Options' here, because everything else is also a setting. These things are like extra options. Patch looks ok to me - @Brecht Van Lommel (brecht): Do you want to check if the code is ok? Comment Actions I updated the name of the Settings Panel to Options for Cycles, hope this is ok, I can change it back if not. I also added bl_category for the Panels in the node editor because they were showing in another tab (could be the way to go ?) I hope the rest is fine :) Cheers ! Comment Actions Committed now, with some modifications to reduce code, fix poll functions, and use consistent settings/options naming. Comment Actions Just saw the blender today video, the viewport display for the world node editor is empty, and still use the panels from the material nod editor, I can fix it tonight :) | ||||||