Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/addon/properties.py
| Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | enum_texture_limit = ( | ||||
| ('256', "256", "Limit texture size to 256 pixels", 2), | ('256', "256", "Limit texture size to 256 pixels", 2), | ||||
| ('512', "512", "Limit texture size to 512 pixels", 3), | ('512', "512", "Limit texture size to 512 pixels", 3), | ||||
| ('1024', "1024", "Limit texture size to 1024 pixels", 4), | ('1024', "1024", "Limit texture size to 1024 pixels", 4), | ||||
| ('2048', "2048", "Limit texture size to 2048 pixels", 5), | ('2048', "2048", "Limit texture size to 2048 pixels", 5), | ||||
| ('4096', "4096", "Limit texture size to 4096 pixels", 6), | ('4096', "4096", "Limit texture size to 4096 pixels", 6), | ||||
| ('8192', "8192", "Limit texture size to 8192 pixels", 7), | ('8192', "8192", "Limit texture size to 8192 pixels", 7), | ||||
| ) | ) | ||||
| enum_view3d_shading_render_pass= ( | |||||
| ('COMBINED', "Combined", "Show the Combined Render pass", 1), | |||||
| # ('NORMAL', "Normal", "Show the Normal render pass", 3), | |||||
| # ('UV', "UV", "Show the UV render pass", 4), | |||||
| ('MIST', "Mist", "Show the Mist render pass", 32), | |||||
| ('EMISSION', "Emission", "Show the Emission render pass", 33), | |||||
| ('BACKGROUND', "Background", "Show the Background render pass", 34), | |||||
| ('', "", ""), | |||||
| ('DIFFUSE_DIRECT', "Diffuse Direct", "Show the Diffuse Direct render pass", 38), | |||||
| ('DIFFUSE_INDIRECT', "Diffuse Indirect", "Show the Diffuse Indirect render pass", 39), | |||||
| ('DIFFUSE_COLOR', "Diffuse Color", "Show the Diffuse Color render pass", 40), | |||||
| ('GLOSSY_DIRECT', "Glossy Direct", "Show the Glossy Direct render pass", 41), | |||||
| ('GLOSSY_INDIRECT', "Glossy Indirect", "Show the Glossy Indirect render pass", 42), | |||||
| ('GLOSSY_COLOR', "Glossy Color", "Show the Glossy Color render pass", 43), | |||||
| ('AO', "Ambient Occlusion", "Show the Ambient Occlusion render pass", 35), | |||||
| ('SHADOW', "Shadow", "Show the Shadow render pass", 36), | |||||
brecht: Move AO and Shadow after Background. | |||||
| ('', "", ""), | |||||
| ('TRANSMISSION_DIRECT', "Transmission Direct", "Show the Transmission Direct render pass", 44), | |||||
| ('TRANSMISSION_INDIRECT', "Transmission Indirect", "Show the Transmission Indirect render pass", 45), | |||||
| ('TRANSMISSION_COLOR', "Transmission Color", "Show the Transmission Color render pass", 46), | |||||
| ('SUBSURFACE_DIRECT', "Subsurface Direct", "Show the Subsurface Direct render pass", 47), | |||||
| ('SUBSURFACE_INDIRECT', "Subsurface Indirect", "Show the Subsurface Indirect render pass", 48), | |||||
| ('SUBSURFACE_COLOR', "Subsurface Color", "Show the Subsurface Color render pass", 49), | |||||
Done Inline ActionsSuggest to organize like this: ('', "General", ""),
('COMBINED', "Combined", "Show the Combined Render pass", 1),
('EMISSION', "Emission", "Show the Emission render pass", 33),
('BACKGROUND', "Background", "Show the Background render pass", 34),
('AO', "Ambient Occlusion", "Show the Ambient Occlusion render pass", 35),
('', "Light", ""),
('DIFFUSE_DIRECT', "Diffuse Direct", "Show the Diffuse Direct render pass", 38),
('DIFFUSE_INDIRECT', "Diffuse Indirect", "Show the Diffuse Indirect render pass", 39),
('DIFFUSE_COLOR', "Diffuse Color", "Show the Diffuse Color render pass", 40),
('GLOSSY_DIRECT', "Glossy Direct", "Show the Glossy Direct render pass", 41),
('GLOSSY_INDIRECT', "Glossy Indirect", "Show the Glossy Indirect render pass", 42),
('GLOSSY_COLOR', "Glossy Color", "Show the Glossy Color render pass", 43),
('TRANSMISSION_DIRECT', "Transmission Direct", "Show the Transmission Direct render pass", 44),
('TRANSMISSION_INDIRECT', "Transmission Indirect", "Show the Transmission Indirect render pass", 45),
('TRANSMISSION_COLOR', "Transmission Color", "Show the Transmission Color render pass", 46),
('', "", ""),
('SUBSURFACE_DIRECT', "Subsurface Direct", "Show the Subsurface Direct render pass", 47),
('SUBSURFACE_INDIRECT', "Subsurface Indirect", "Show the Subsurface Indirect render pass", 48),
('SUBSURFACE_COLOR', "Subsurface Color", "Show the Subsurface Color render pass", 49),
('VOLUME_DIRECT', "Volume Direct", "Show the Volume Direct render pass", 50),
('VOLUME_INDIRECT', "Volume Indirect", "Show the Volume Indirect render pass", 51),
('', "Data", ""),
('NORMAL', "Normal", "Show the Normal render pass", 3),
('UV', "UV", "Show the UV render pass", 4),
('MIST', "Mist", "Show the Mist render pass", 32),brecht: Suggest to organize like this:
```
('', "General", ""),
('COMBINED', "Combined"… | |||||
| ('VOLUME_DIRECT', "Volume Direct", "Show the Volume Direct render pass", 50), | |||||
| ('VOLUME_INDIRECT', "Volume Indirect", "Show the Volume Indirect render pass", 51), | |||||
| ) | |||||
| class CyclesRenderSettings(bpy.types.PropertyGroup): | class CyclesRenderSettings(bpy.types.PropertyGroup): | ||||
| device: EnumProperty( | device: EnumProperty( | ||||
| name="Device", | name="Device", | ||||
| description="Device to use for rendering", | description="Device to use for rendering", | ||||
| items=enum_devices, | items=enum_devices, | ||||
| default='CPU', | default='CPU', | ||||
| ▲ Show 20 Lines • Show All 1,308 Lines • ▼ Show 20 Lines | def draw_impl(self, layout, context): | ||||
| self._draw_devices(row, 'CUDA', cuda_devices) | self._draw_devices(row, 'CUDA', cuda_devices) | ||||
| elif self.compute_device_type == 'OPENCL': | elif self.compute_device_type == 'OPENCL': | ||||
| self._draw_devices(row, 'OPENCL', opencl_devices) | self._draw_devices(row, 'OPENCL', opencl_devices) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| self.draw_impl(self.layout, context) | self.draw_impl(self.layout, context) | ||||
| class CyclesView3DShadingSettings(bpy.types.PropertyGroup): | |||||
| render_pass: EnumProperty( | |||||
| name="Render Pass", | |||||
| description="Render pass to show in the 3D Viewport", | |||||
| items=enum_view3d_shading_render_pass, | |||||
| default='COMBINED', | |||||
| ) | |||||
| def register(): | def register(): | ||||
| bpy.utils.register_class(CyclesRenderSettings) | bpy.utils.register_class(CyclesRenderSettings) | ||||
| bpy.utils.register_class(CyclesCameraSettings) | bpy.utils.register_class(CyclesCameraSettings) | ||||
| bpy.utils.register_class(CyclesMaterialSettings) | bpy.utils.register_class(CyclesMaterialSettings) | ||||
| bpy.utils.register_class(CyclesLightSettings) | bpy.utils.register_class(CyclesLightSettings) | ||||
| bpy.utils.register_class(CyclesWorldSettings) | bpy.utils.register_class(CyclesWorldSettings) | ||||
| bpy.utils.register_class(CyclesVisibilitySettings) | bpy.utils.register_class(CyclesVisibilitySettings) | ||||
| bpy.utils.register_class(CyclesMeshSettings) | bpy.utils.register_class(CyclesMeshSettings) | ||||
| bpy.utils.register_class(CyclesObjectSettings) | bpy.utils.register_class(CyclesObjectSettings) | ||||
| bpy.utils.register_class(CyclesCurveRenderSettings) | bpy.utils.register_class(CyclesCurveRenderSettings) | ||||
| bpy.utils.register_class(CyclesDeviceSettings) | bpy.utils.register_class(CyclesDeviceSettings) | ||||
| bpy.utils.register_class(CyclesPreferences) | bpy.utils.register_class(CyclesPreferences) | ||||
| bpy.utils.register_class(CyclesRenderLayerSettings) | bpy.utils.register_class(CyclesRenderLayerSettings) | ||||
| bpy.utils.register_class(CyclesView3DShadingSettings) | |||||
| bpy.types.View3DShading.cycles = bpy.props.PointerProperty( | |||||
| name="Cycles Settings", | |||||
| type=CyclesView3DShadingSettings, | |||||
| ) | |||||
| def unregister(): | def unregister(): | ||||
| bpy.utils.unregister_class(CyclesRenderSettings) | bpy.utils.unregister_class(CyclesRenderSettings) | ||||
| bpy.utils.unregister_class(CyclesCameraSettings) | bpy.utils.unregister_class(CyclesCameraSettings) | ||||
| bpy.utils.unregister_class(CyclesMaterialSettings) | bpy.utils.unregister_class(CyclesMaterialSettings) | ||||
| bpy.utils.unregister_class(CyclesLightSettings) | bpy.utils.unregister_class(CyclesLightSettings) | ||||
| bpy.utils.unregister_class(CyclesWorldSettings) | bpy.utils.unregister_class(CyclesWorldSettings) | ||||
| bpy.utils.unregister_class(CyclesMeshSettings) | bpy.utils.unregister_class(CyclesMeshSettings) | ||||
| bpy.utils.unregister_class(CyclesObjectSettings) | bpy.utils.unregister_class(CyclesObjectSettings) | ||||
| bpy.utils.unregister_class(CyclesVisibilitySettings) | bpy.utils.unregister_class(CyclesVisibilitySettings) | ||||
| bpy.utils.unregister_class(CyclesCurveRenderSettings) | bpy.utils.unregister_class(CyclesCurveRenderSettings) | ||||
| bpy.utils.unregister_class(CyclesDeviceSettings) | bpy.utils.unregister_class(CyclesDeviceSettings) | ||||
| bpy.utils.unregister_class(CyclesPreferences) | bpy.utils.unregister_class(CyclesPreferences) | ||||
| bpy.utils.unregister_class(CyclesRenderLayerSettings) | bpy.utils.unregister_class(CyclesRenderLayerSettings) | ||||
| bpy.utils.unregister_class(CyclesView3DShadingSettings) | |||||
Move AO and Shadow after Background.