Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_data_modifier.py
| Show First 20 Lines • Show All 873 Lines • ▼ Show 20 Lines | def SOLIDIFY(self, layout, ob, md): | ||||
| row.active = md.use_rim | row.active = md.use_rim | ||||
| row.prop(md, "material_offset_rim", text="Rim") | row.prop(md, "material_offset_rim", text="Rim") | ||||
| def SUBSURF(self, layout, ob, md): | def SUBSURF(self, layout, ob, md): | ||||
| layout.row().prop(md, "subdivision_type", expand=True) | layout.row().prop(md, "subdivision_type", expand=True) | ||||
| split = layout.split() | split = layout.split() | ||||
| col = split.column() | col = split.column() | ||||
| engine = bpy.context.scene.render.engine | |||||
| if engine == "CYCLES" and md == ob.modifiers[-1] and bpy.context.scene.cycles.feature_set == "EXPERIMENTAL": | |||||
| col.label(text="Preview:") | |||||
| col.prop(md, "levels", text="Levels") | |||||
| col.label(text="Render:") | |||||
| col.prop(ob.cycles, "use_adaptive_subdivision", text="Adaptive") | |||||
| if ob.cycles.use_adaptive_subdivision: | |||||
| col.prop(ob.cycles, "dicing_rate") | |||||
| else: | |||||
| col.prop(md, "render_levels", text="Levels") | |||||
| else: | |||||
| col.label(text="Subdivisions:") | col.label(text="Subdivisions:") | ||||
| col.prop(md, "levels", text="View") | col.prop(md, "levels", text="View") | ||||
| col.prop(md, "render_levels", text="Render") | col.prop(md, "render_levels", text="Render") | ||||
| col = split.column() | col = split.column() | ||||
| col.label(text="Options:") | col.label(text="Options:") | ||||
| col.prop(md, "use_subsurf_uv") | col.prop(md, "use_subsurf_uv") | ||||
| col.prop(md, "show_only_control_edges") | col.prop(md, "show_only_control_edges") | ||||
| if hasattr(md, "use_opensubdiv"): | if hasattr(md, "use_opensubdiv"): | ||||
| col.prop(md, "use_opensubdiv") | col.prop(md, "use_opensubdiv") | ||||
| def SURFACE(self, layout, ob, md): | def SURFACE(self, layout, ob, md): | ||||
| layout.label(text="Settings are inside the Physics tab") | layout.label(text="Settings are inside the Physics tab") | ||||
brecht: I think ideally we could arrange the UI something like this:
```
Viewport:
- Levels
Render… | |||||
| def UV_PROJECT(self, layout, ob, md): | def UV_PROJECT(self, layout, ob, md): | ||||
| split = layout.split() | split = layout.split() | ||||
| col = split.column() | col = split.column() | ||||
| col.label(text="Image:") | col.label(text="Image:") | ||||
| col.prop(md, "image", text="") | col.prop(md, "image", text="") | ||||
| col = split.column() | col = split.column() | ||||
| ▲ Show 20 Lines • Show All 542 Lines • Show Last 20 Lines | |||||
I think ideally we could arrange the UI something like this:
You could also check here if the modifier is the last modifier, to grey out or hide these options when they have no effect.
It would be good if we could do this in the addon somehow as well, instead of modifying the Blender code, but I'm not sure how at the moment.