|
11 | 11 |
|
12 | 12 | from .utils.addon import addon_set_fast64_path |
13 | 13 | from .material.parser import f64_parse_obj_light |
14 | | -from .common import ObjRenderInfo, draw_f64_obj, get_scene_render_state, collect_obj_info |
| 14 | +from .common import draw_f64_obj, get_scene_render_state, collect_obj_info, check_if_using_renderer |
15 | 15 | from .properties import F64RenderProperties, F64RenderSettings |
16 | 16 | from .globals import F64_GLOBALS |
17 | 17 |
|
@@ -424,36 +424,10 @@ def draw(self, context): |
424 | 424 |
|
425 | 425 |
|
426 | 426 | def draw_render_settings(self, context: bpy.types.Context): |
427 | | - space_data = context.space_data |
428 | | - if ( |
429 | | - context.scene.render.engine == Fast64RenderEngine.bl_idname |
430 | | - and space_data.type == "VIEW_3D" |
431 | | - and space_data.shading.type in {"MATERIAL", "RENDERED"} |
432 | | - ): |
| 427 | + if check_if_using_renderer(context): |
433 | 428 | self.layout.popover(F64RenderSettingsPanel.bl_idname) |
434 | 429 |
|
435 | 430 |
|
436 | | -# The light color is only shown in the UI in the DATA_PT_EEVEE_light panel, |
437 | | -# which is only shown with EEVEE enabled. The DATA_PT_light panel is shown otherwise, |
438 | | -# but only allows changing the light type. |
439 | | -# This panel extends the DATA_PT_light panel to allow setting the light color. |
440 | | -class LightDataPanel(bpy.types.Panel): |
441 | | - bl_label = "f64render light data" |
442 | | - bl_idname = "DATA_PT_f64render_light_data" |
443 | | - bl_space_type = "PROPERTIES" |
444 | | - bl_region_type = "WINDOW" |
445 | | - bl_context = "data" |
446 | | - bl_parent_id = "DATA_PT_light" |
447 | | - bl_options = {"HIDE_HEADER"} |
448 | | - |
449 | | - @classmethod |
450 | | - def poll(cls, context): |
451 | | - return context.scene is not None and context.scene.render.engine == Fast64RenderEngine.bl_idname |
452 | | - |
453 | | - def draw(self, context): |
454 | | - self.layout.prop(context.light, "color") |
455 | | - |
456 | | - |
457 | 431 | # By default blender will hide quite a few panels like materials or vertex attributes |
458 | 432 | # Add this method to override the check blender does by render engine |
459 | 433 | def get_panels(): |
|
0 commit comments