[Bf-blender-cvs] [3f818c7898] blender2.8: Merge branch 'master' into blender2.8
Campbell Barton
noreply at git.blender.org
Sun Mar 19 23:27:54 CET 2017
Commit: 3f818c7898af20eed05b05e911a697a25287c432
Author: Campbell Barton
Date: Mon Mar 20 09:25:39 2017 +1100
Branches: blender2.8
https://developer.blender.org/rB3f818c7898af20eed05b05e911a697a25287c432
Merge branch 'master' into blender2.8
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/properties_collection.py
index 7cbdeb6e61,0000000000..ddfc656da0
mode 100644,000000..100644
--- a/release/scripts/startup/bl_ui/properties_collection.py
+++ b/release/scripts/startup/bl_ui/properties_collection.py
@@@ -1,138 -1,0 +1,147 @@@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
+import bpy
+from bpy.types import Panel
+
+
+class CollectionButtonsPanel:
+ bl_space_type = 'PROPERTIES'
+ bl_region_type = 'WINDOW'
+ bl_context = "collection"
+
+
+class COLLECTION_PT_context_collection(CollectionButtonsPanel, Panel):
+ bl_label = ""
+ bl_options = {'HIDE_HEADER'}
+
+ def draw(self, context):
+ layout = self.layout
+ space = context.space_data
+
+ collection = context.layer_collection
+ name = collection.name
+ if name == 'Master Collection':
+ layout.label(text=name, icon='COLLAPSEMENU')
+ else:
+ layout.prop(collection, "name", text="", icon='COLLAPSEMENU')
+
+
+def template_engine_settings(col, settings, name, use_icon_view=False):
+ icons = {
+ False: 'ZOOMIN',
+ True: 'X',
+ }
+
+ use_name = "{0}_use".format(name)
+ use = getattr(settings, use_name)
+
+ row = col.row()
+ col = row.column()
+ col.active = use
+
+ if use_icon_view:
+ col.template_icon_view(settings, name)
+ else:
+ col.prop(settings, name)
+
+ row.prop(settings, "{}_use".format(name), text="", icon=icons[use], emboss=False)
+
+
+class COLLECTION_PT_clay_settings(CollectionButtonsPanel, Panel):
+ bl_label = "Render Settings"
+ COMPAT_ENGINES = {'BLENDER_CLAY'}
+
+ @classmethod
+ def poll(cls, context):
+ scene = context.scene
+ return scene and (scene.render.engine in cls.COMPAT_ENGINES)
+
+ def draw(self, context):
+ layout = self.layout
+
+ collection = context.layer_collection
+ settings = collection.get_engine_settings()
+
+ col = layout.column()
+ template_engine_settings(col, settings, "type")
+ template_engine_settings(col, settings, "matcap_icon", use_icon_view=True)
+ template_engine_settings(col, settings, "matcap_rotation")
+ template_engine_settings(col, settings, "matcap_hue")
+ template_engine_settings(col, settings, "matcap_saturation")
+ template_engine_settings(col, settings, "matcap_value")
+ template_engine_settings(col, settings, "ssao_factor_cavity")
+ template_engine_settings(col, settings, "ssao_factor_edge")
+ template_engine_settings(col, settings, "ssao_distance")
+ template_engine_settings(col, settings, "ssao_attenuation")
+
+
+class COLLECTION_PT_object_mode_settings(CollectionButtonsPanel, Panel):
+ bl_label = "Object Mode Settings"
+
+ @classmethod
+ def poll(cls, context):
+ ob = context.object
+ return ob and (ob.mode == 'OBJECT')
+
+ def draw(self, context):
+ layout = self.layout
+
+ collection = context.layer_collection
+ settings = collection.get_mode_settings('OBJECT')
+
+ col = layout.column()
+ template_engine_settings(col, settings, "show_wire")
+ template_engine_settings(col, settings, "show_backface_culling")
+
+
+class COLLECTION_PT_edit_mode_settings(CollectionButtonsPanel, Panel):
+ bl_label = "Edit Mode Settings"
+
+ @classmethod
+ def poll(cls, context):
+ ob = context.object
+ return ob and (ob.mode == 'EDIT')
+
+ def draw(self, context):
+ layout = self.layout
+
+ collection = context.layer_collection
+ settings = collection.get_mode_settings('EDIT')
+
+ col = layout.column()
+ template_engine_settings(col, settings, "show_occlude_wire")
+ template_engine_settings(col, settings, "backwire_opacity")
+ template_engine_settings(col, settings, "face_normals_show")
+ template_engine_settings(col, settings, "vert_normals_show")
+ template_engine_settings(col, settings, "loop_normals_show")
+ template_engine_settings(col, settings, "normals_length")
+
+
++classes = (
++ COLLECTION_PT_context_collection,
++ COLLECTION_PT_clay_settings,
++ COLLECTION_PT_object_mode_settings,
++ COLLECTION_PT_edit_mode_settings,
++)
++
+if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
++ from bpy.utils import register_class
++ for cls in classes:
++ register_class(cls)
diff --cc release/scripts/startup/bl_ui/properties_render.py
index 90d46a6ee4,a7e8d9273a..43c89a32a5
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@@ -584,24 -584,24 +584,44 @@@ class RENDER_PT_bake(RenderButtonsPanel
sub.prop(rd, "bake_user_scale", text="User Scale")
+class RENDER_PT_clay(RenderButtonsPanel, Panel):
+ bl_label = "Default Clay"
+ COMPAT_ENGINES = {'BLENDER_CLAY'}
+
+ def draw(self, context):
+ layout = self.layout;
+ settings = context.scene.active_engine_settings
+ layout.template_icon_view(settings, "matcap_icon")
+ layout.prop(settings, "matcap_rotation")
+ layout.prop(settings, "matcap_hue")
+ layout.prop(settings, "matcap_saturation")
+ layout.prop(settings, "matcap_value")
+ layout.prop(settings, "ssao_factor_cavity")
+ layout.prop(settings, "ssao_factor_edge")
+ layout.prop(settings, "ssao_distance")
+ layout.prop(settings, "ssao_attenuation")
+ layout.prop(settings, "ssao_samples")
+
+
+ classes = (
+ RENDER_MT_presets,
+ RENDER_MT_ffmpeg_presets,
+ RENDER_MT_framerate_presets,
+ RENDER_PT_render,
+ RENDER_PT_dimensions,
+ RENDER_PT_antialiasing,
+ RENDER_PT_motion_blur,
+ RENDER_PT_shading,
+ RENDER_PT_performance,
+ RENDER_PT_post_processing,
+ RENDER_PT_stamp,
+ RENDER_PT_output,
+ RENDER_PT_encoding,
+ RENDER_PT_bake,
++ RENDER_PT_clay,
+ )
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --cc release/scripts/startup/bl_ui/properties_render_layer.py
index 2545eadc79,084bc38782..d6905cd197
--- a/release/scripts/startup/bl_ui/properties_render_layer.py
+++ b/release/scripts/startup/bl_ui/properties_render_layer.py
@@@ -130,5 -227,16 +130,14 @@@ class RENDERLAYER_PT_views(RenderLayerB
row.prop(rv, "camera_suffix", text="")
+ classes = (
+ RENDERLAYER_UL_renderlayers,
+ RENDERLAYER_PT_layers,
- RENDERLAYER_PT_layer_options,
- RENDERLAYER_PT_layer_passes,
+ RENDERLAYER_UL_renderviews,
+ RENDERLAYER_PT_views,
+ )
+
if __name__ == "__main__": # only for live edit.
- bpy.utils.register_module(__name__)
+ from bpy.utils import register_class
+ for cls in classes:
+ register_class(cls)
diff --cc release/scripts/startup/bl_ui/space_view3d.py
index bc90b754da,a2f11fa116..aca73aadae
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@@ -3811,13 -3787,142 +3811,142 @@@ class VIEW3D_PT_context_properties(Pane
# Draw with no edit button
rna_prop_ui.draw(self.layout, context, member, object, False)
-
- def register():
- bpy.utils.register_module(__name__)
-
-
- def unregister():
- bpy.utils.unregister_module(__name__)
-
- if __name__ == "__main__":
- register()
+ classes = (
+ VIEW3D_HT_header,
+ VIEW3D_MT_editor_menus,
+ VIEW3D_MT_transform,
+ VIEW3D_MT_transform_base,
+ VIEW3D_MT_transform_object,
+ VIEW3D_MT_transform_armature,
+ VIEW3D_MT_mirror,
+ VIEW3D_MT_snap,
+ VIEW3D_MT_uv_map,
+ VIEW3D_MT_edit_proportional,
+ VIEW3D_MT_view,
+ VIEW3D_MT_view_navigation,
+ VIEW3D_MT_view_align,
+ VIEW3D_MT_view_align_selected,
+ VIEW3D_MT_view_cameras,
+ VIEW3D_MT_select_object,
+ VIEW3D_MT_select_object_more_less,
+ VIEW3D_MT_select_pose,
+ VIEW3D_MT_select_pose_more_less,
+ VIEW3D_MT_select_particle,
+ VIEW3D_MT_edit_mesh,
+ VIEW3D_MT_edit_mesh_select_similar,
+ VIEW3D_MT_edit_mesh_select_by_trait,
+ VIEW3D_MT_edit_mesh_select_more_less,
+ VIEW3D_MT_select_edit_mesh,
+ VIEW3D_MT_select_edit_curve,
+ VIEW3D_MT_select_edit_surface,
+ VIEW3D_MT_select_edit_text,
+ VIEW3D_MT_select_edit_metaball,
+ VIEW3D_MT_select_edit_lattice,
+ VIEW3D_MT_select_edit_armature,
+ VIEW3D_MT_select_gpencil,
+ VIEW3D_MT_select_paint_mask,
+ VIEW3D_MT_select_paint_mask_vertex,
+ VIEW3D_MT_angle_control,
+ INFO_MT_mesh_add,
+ INFO_MT_curve_add,
+ INFO_MT_surface_add,
+ INFO_MT_metaball_add,
+ INFO_MT_edit_curve_add,
+ INFO_MT_edit_armature_add,
+ INFO_MT_armature_add,
+ INFO_MT_lamp_add,
+ INFO_MT_add,
+ VIEW3D_MT_object,
+ VIEW3D_MT_object_animation,
+ VIEW3D_MT_object_clear,
+ VIEW3D_MT_object_specials,
+ VIEW3D_MT_object_apply,
+ VIEW3D_MT_object_parent,
+ VIEW3D_MT_object_track,
+ VIEW3D_MT_object_group,
+ VIEW3D_MT_object_constraints,
+ VIEW3D_MT_object_quick_effects,
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list