|
|
@ -15,6 +15,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
import bpy |
|
|
|
import bpy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PlasmaRenderEngine(bpy.types.RenderEngine): |
|
|
|
class PlasmaRenderEngine(bpy.types.RenderEngine): |
|
|
|
|
|
|
|
|
|
|
|
bl_idname = "PLASMA_GAME" |
|
|
|
bl_idname = "PLASMA_GAME" |
|
|
@ -30,6 +31,7 @@ properties_material.MATERIAL_PT_options.COMPAT_ENGINES.add("PLASMA_GAME") |
|
|
|
properties_material.MATERIAL_PT_preview.COMPAT_ENGINES.add("PLASMA_GAME") |
|
|
|
properties_material.MATERIAL_PT_preview.COMPAT_ENGINES.add("PLASMA_GAME") |
|
|
|
del properties_material |
|
|
|
del properties_material |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@classmethod |
|
|
|
@classmethod |
|
|
|
def _new_poll(cls, context): |
|
|
|
def _new_poll(cls, context): |
|
|
|
"""Nifty replacement for naughty built-in Blender poll()s""" |
|
|
|
"""Nifty replacement for naughty built-in Blender poll()s""" |
|
|
@ -38,6 +40,8 @@ def _new_poll(cls, context): |
|
|
|
else: |
|
|
|
else: |
|
|
|
# Dear god you better save the old poll... |
|
|
|
# Dear god you better save the old poll... |
|
|
|
return cls._old_poll(cls, context) |
|
|
|
return cls._old_poll(cls, context) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _swap_poll(cls): |
|
|
|
def _swap_poll(cls): |
|
|
|
cls._old_poll = cls.poll |
|
|
|
cls._old_poll = cls.poll |
|
|
|
cls.poll = _new_poll |
|
|
|
cls.poll = _new_poll |
|
|
|