Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/addon/properties.py
| Show First 20 Lines • Show All 660 Lines • ▼ Show 20 Lines | use_progressive_refine: BoolProperty( | ||||
| name="Progressive Refine", | name="Progressive Refine", | ||||
| description="Instead of rendering each tile until it is finished, " | description="Instead of rendering each tile until it is finished, " | ||||
| "refine the whole image progressively " | "refine the whole image progressively " | ||||
| "(this renders somewhat slower, " | "(this renders somewhat slower, " | ||||
| "but time can be saved by manually stopping the render when the noise is low enough)", | "but time can be saved by manually stopping the render when the noise is low enough)", | ||||
| default=False, | default=False, | ||||
| ) | ) | ||||
| bake_type: EnumProperty( | |||||
| name="Bake Type", | |||||
| default='COMBINED', | |||||
| description="Type of pass to bake", | |||||
| items=( | |||||
| ('COMBINED', "Combined", ""), | |||||
| ('AO', "Ambient Occlusion", ""), | |||||
| ('SHADOW', "Shadow", ""), | |||||
| ('NORMAL', "Normal", ""), | |||||
| ('UV', "UV", ""), | |||||
| ('ROUGHNESS', "Roughness", ""), | |||||
| ('EMIT', "Emit", ""), | |||||
| ('ENVIRONMENT', "Environment", ""), | |||||
| ('DIFFUSE', "Diffuse", ""), | |||||
| ('GLOSSY', "Glossy", ""), | |||||
| ('TRANSMISSION', "Transmission", ""), | |||||
| ), | |||||
| ) | |||||
| use_camera_cull: BoolProperty( | use_camera_cull: BoolProperty( | ||||
| name="Use Camera Cull", | name="Use Camera Cull", | ||||
| description="Allow objects to be culled based on the camera frustum", | description="Allow objects to be culled based on the camera frustum", | ||||
| default=False, | default=False, | ||||
| ) | ) | ||||
| camera_cull_margin: FloatProperty( | camera_cull_margin: FloatProperty( | ||||
| name="Camera Cull Margin", | name="Camera Cull Margin", | ||||
| ▲ Show 20 Lines • Show All 797 Lines • ▼ Show 20 Lines | def register(cls): | ||||
| type=cls, | type=cls, | ||||
| ) | ) | ||||
| @classmethod | @classmethod | ||||
| def unregister(cls): | def unregister(cls): | ||||
| del bpy.types.ViewLayer.cycles | del bpy.types.ViewLayer.cycles | ||||
| class CyclesBakePassSettings(bpy.types.PropertyGroup): | |||||
| bake_type: EnumProperty( | |||||
| name="Bake Type", | |||||
| default='COMBINED', | |||||
| description="Type of pass to bake", | |||||
| items=( | |||||
| ('COMBINED', "Combined", ""), | |||||
| ('AO', "Ambient Occlusion", ""), | |||||
| ('SHADOW', "Shadow", ""), | |||||
| ('NORMAL', "Normal", ""), | |||||
| ('UV', "UV", ""), | |||||
| ('ROUGHNESS', "Roughness", ""), | |||||
| ('EMIT', "Emit", ""), | |||||
| ('ENVIRONMENT', "Environment", ""), | |||||
| ('DIFFUSE', "Diffuse", ""), | |||||
| ('GLOSSY', "Glossy", ""), | |||||
| ('TRANSMISSION', "Transmission", ""), | |||||
| ('AOV_COLOR', "AOV Color", ""), | |||||
| ('AOV_VALUE', "AOV Value", ""), | |||||
| ), | |||||
| ) | |||||
| aov_name: StringProperty( | |||||
| name="AOV Name", | |||||
| description="Name of the AOV that will be baked", | |||||
| ) | |||||
| use_pass_ambient_occlusion: BoolProperty( | |||||
| name="AO", | |||||
| description="Add ambient occlusion contribution", | |||||
| default=True, | |||||
| ) | |||||
| use_pass_emit: BoolProperty( | |||||
| name="Emit", | |||||
| description="Add emission contribution", | |||||
| default=True, | |||||
| ) | |||||
| use_pass_direct: BoolProperty( | |||||
| name="Direct", | |||||
| description="Add direct lighting contribution", | |||||
| default=True, | |||||
| ) | |||||
| use_pass_indirect: BoolProperty( | |||||
| name="Indirect", | |||||
| description="Add indirect lighting contribution", | |||||
| default=True, | |||||
| ) | |||||
| use_pass_color: BoolProperty( | |||||
| name="Color", | |||||
| description="Color the pass", | |||||
| default=True, | |||||
| ) | |||||
| use_pass_diffuse: BoolProperty( | |||||
| name="Diffuse", | |||||
| description="Add diffuse contribution", | |||||
| default=True, | |||||
| ) | |||||
| use_pass_glossy: BoolProperty( | |||||
| name="Glossy", | |||||
| description="Add glossy contribution", | |||||
| default=True, | |||||
| ) | |||||
| use_pass_transmission: BoolProperty( | |||||
| name="Transmission", | |||||
| description="Add transmission contribution", | |||||
| default=True, | |||||
| ) | |||||
| use_pass_subsurface: BoolProperty( | |||||
| name="Subsurface", | |||||
| description="Add subsurface contribution", | |||||
| default=True, | |||||
| ) | |||||
| samples: IntProperty( | |||||
| name="Samples", | |||||
| description="Override number of render samples for this bake pass, 0 will use the scene setting", | |||||
| default=0, | |||||
| min=0, | |||||
| ) | |||||
| @classmethod | |||||
| def register(cls): | |||||
| bpy.types.BakePass.cycles = PointerProperty( | |||||
| name="Cycles Bake Pass Settings", | |||||
| description="Cycles Bake Pass Settings", | |||||
| type=cls, | |||||
| ) | |||||
| @classmethod | |||||
| def unregister(cls): | |||||
| del bpy.types.BakePass.cycles | |||||
| class CyclesDeviceSettings(bpy.types.PropertyGroup): | class CyclesDeviceSettings(bpy.types.PropertyGroup): | ||||
| id: StringProperty(name="ID") | id: StringProperty(name="ID") | ||||
| name: StringProperty(name="Name") | name: StringProperty(name="Name") | ||||
| use: BoolProperty(name="Use", default=True) | use: BoolProperty(name="Use", default=True) | ||||
| type: EnumProperty(name="Type", items=enum_device_type, default='CUDA') | type: EnumProperty(name="Type", items=enum_device_type, default='CUDA') | ||||
| class CyclesPreferences(bpy.types.AddonPreferences): | class CyclesPreferences(bpy.types.AddonPreferences): | ||||
| ▲ Show 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | def register(): | ||||
| 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(CyclesAOVPass) | bpy.utils.register_class(CyclesAOVPass) | ||||
| bpy.utils.register_class(CyclesRenderLayerSettings) | bpy.utils.register_class(CyclesRenderLayerSettings) | ||||
| bpy.utils.register_class(CyclesView3DShadingSettings) | bpy.utils.register_class(CyclesView3DShadingSettings) | ||||
| bpy.utils.register_class(CyclesBakePassSettings) | |||||
| bpy.types.View3DShading.cycles = bpy.props.PointerProperty( | bpy.types.View3DShading.cycles = bpy.props.PointerProperty( | ||||
| name="Cycles Settings", | name="Cycles Settings", | ||||
| type=CyclesView3DShadingSettings, | 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(CyclesAOVPass) | bpy.utils.unregister_class(CyclesAOVPass) | ||||
| bpy.utils.unregister_class(CyclesRenderLayerSettings) | bpy.utils.unregister_class(CyclesRenderLayerSettings) | ||||
| bpy.utils.unregister_class(CyclesView3DShadingSettings) | bpy.utils.unregister_class(CyclesView3DShadingSettings) | ||||
| bpy.utils.unregister_class(CyclesBakePassSettings) | |||||