Changeset View
Changeset View
Standalone View
Standalone View
render_povray/ui.py
| Context not available. | |||||
| pass | pass | ||||
| del properties_particle | del properties_particle | ||||
| class RenderButtonsPanel(): | class RenderButtonsPanel: | ||||
| bl_space_type = 'PROPERTIES' | bl_space_type = 'PROPERTIES' | ||||
| bl_region_type = 'WINDOW' | bl_region_type = 'WINDOW' | ||||
| bl_context = "render" | bl_context = "render" | ||||
| Context not available. | |||||
| return (rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES) | return (rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES) | ||||
| class MaterialButtonsPanel(): | class MaterialButtonsPanel: | ||||
| bl_space_type = 'PROPERTIES' | bl_space_type = 'PROPERTIES' | ||||
| bl_region_type = 'WINDOW' | bl_region_type = 'WINDOW' | ||||
| bl_context = "material" | bl_context = "material" | ||||
| Context not available. | |||||
| return mat and (rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES) | return mat and (rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES) | ||||
| class TextureButtonsPanel(): | class TextureButtonsPanel: | ||||
| bl_space_type = 'PROPERTIES' | bl_space_type = 'PROPERTIES' | ||||
| bl_region_type = 'WINDOW' | bl_region_type = 'WINDOW' | ||||
| bl_context = "texture" | bl_context = "texture" | ||||
| Context not available. | |||||
| # return tex and ((tex.type == cls.tex_type and not tex.use_nodes) and (engine in cls.COMPAT_ENGINES)) | # return tex and ((tex.type == cls.tex_type and not tex.use_nodes) and (engine in cls.COMPAT_ENGINES)) | ||||
| class ObjectButtonsPanel(): | class ObjectButtonsPanel: | ||||
| bl_space_type = 'PROPERTIES' | bl_space_type = 'PROPERTIES' | ||||
| bl_region_type = 'WINDOW' | bl_region_type = 'WINDOW' | ||||
| bl_context = "object" | bl_context = "object" | ||||
| Context not available. | |||||
| rd = context.scene.render | rd = context.scene.render | ||||
| return obj and (rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES) | return obj and (rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES) | ||||
| class CameraDataButtonsPanel(): | class CameraDataButtonsPanel: | ||||
| bl_space_type = 'PROPERTIES' | bl_space_type = 'PROPERTIES' | ||||
| bl_region_type = 'WINDOW' | bl_region_type = 'WINDOW' | ||||
| bl_context = "data" | bl_context = "data" | ||||
| Context not available. | |||||
| rd = context.scene.render | rd = context.scene.render | ||||
| return cam and (rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES) | return cam and (rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES) | ||||
| class WorldButtonsPanel(): | class WorldButtonsPanel: | ||||
| bl_space_type = 'PROPERTIES' | bl_space_type = 'PROPERTIES' | ||||
| bl_region_type = 'WINDOW' | bl_region_type = 'WINDOW' | ||||
| bl_context = "world" | bl_context = "world" | ||||
| Context not available. | |||||
| rd = context.scene.render | rd = context.scene.render | ||||
| return wld and (rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES) | return wld and (rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES) | ||||
| class TextButtonsPanel(): | class TextButtonsPanel: | ||||
| bl_space_type = 'TEXT_EDITOR' | bl_space_type = 'TEXT_EDITOR' | ||||
| bl_region_type = 'UI' | bl_region_type = 'UI' | ||||
| bl_label = "POV-Ray" | bl_label = "POV-Ray" | ||||
| Context not available. | |||||
| def poll(cls, context): | def poll(cls, context): | ||||
| engine = context.scene.render.engine | engine = context.scene.render.engine | ||||
| obj = context.object | obj = context.object | ||||
| return (obj and obj.pov.object_as == 'RAINBOW' and (engine in cls.COMPAT_ENGINES)) | return obj and obj.pov.object_as == 'RAINBOW' and (engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||
| return False | return False | ||||
| tex=context.texture | tex=context.texture | ||||
| mat=context.material | mat=context.material | ||||
| return (tex and (tex.pov.tex_pattern_type != 'emulator') and (engine in cls.COMPAT_ENGINES)) | return tex and (tex.pov.tex_pattern_type != 'emulator') and (engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| tex = context.texture | tex = context.texture | ||||
| Context not available. | |||||
| def poll(cls, context): | def poll(cls, context): | ||||
| engine = context.scene.render.engine | engine = context.scene.render.engine | ||||
| obj = context.object | obj = context.object | ||||
| return (obj and obj.pov.object_as == 'SPHERE' and (engine in cls.COMPAT_ENGINES)) | return obj and obj.pov.object_as == 'SPHERE' and (engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||
| def poll(cls, context): | def poll(cls, context): | ||||
| engine = context.scene.render.engine | engine = context.scene.render.engine | ||||
| obj = context.object | obj = context.object | ||||
| return (obj and obj.pov.object_as == 'CYLINDER' and (engine in cls.COMPAT_ENGINES)) | return obj and obj.pov.object_as == 'CYLINDER' and (engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||
| def poll(cls, context): | def poll(cls, context): | ||||
| engine = context.scene.render.engine | engine = context.scene.render.engine | ||||
| obj = context.object | obj = context.object | ||||
| return (obj and obj.pov.object_as == 'CONE' and (engine in cls.COMPAT_ENGINES)) | return obj and obj.pov.object_as == 'CONE' and (engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||
| def poll(cls, context): | def poll(cls, context): | ||||
| engine = context.scene.render.engine | engine = context.scene.render.engine | ||||
| obj = context.object | obj = context.object | ||||
| return (obj and obj.pov.object_as == 'SUPERELLIPSOID' and (engine in cls.COMPAT_ENGINES)) | return obj and obj.pov.object_as == 'SUPERELLIPSOID' and (engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||
| def poll(cls, context): | def poll(cls, context): | ||||
| engine = context.scene.render.engine | engine = context.scene.render.engine | ||||
| obj = context.object | obj = context.object | ||||
| return (obj and obj.pov.object_as == 'TORUS' and (engine in cls.COMPAT_ENGINES)) | return obj and obj.pov.object_as == 'TORUS' and (engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||
| def poll(cls, context): | def poll(cls, context): | ||||
| engine = context.scene.render.engine | engine = context.scene.render.engine | ||||
| obj = context.object | obj = context.object | ||||
| return (obj and obj.pov.object_as == 'SUPERTORUS' and (engine in cls.COMPAT_ENGINES)) | return obj and obj.pov.object_as == 'SUPERTORUS' and (engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||
| def poll(cls, context): | def poll(cls, context): | ||||
| engine = context.scene.render.engine | engine = context.scene.render.engine | ||||
| obj = context.object | obj = context.object | ||||
| return (obj and obj.pov.object_as == 'PARAMETRIC' and (engine in cls.COMPAT_ENGINES)) | return obj and obj.pov.object_as == 'PARAMETRIC' and (engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| engine = context.scene.render.engine | engine = context.scene.render.engine | ||||
| return (engine == 'POVRAY_RENDER') | return engine == 'POVRAY_RENDER' | ||||
| def draw(self,context): | def draw(self,context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||