Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Sun, 19 Mar 2017 22:25:39 +0000 (09:25 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 19 Mar 2017 22:32:40 +0000 (09:32 +1100)
19 files changed:
1  2 
release/scripts/startup/bl_operators/clip.py
release/scripts/startup/bl_operators/freestyle.py
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_operators/rigidbody.py
release/scripts/startup/bl_ui/__init__.py
release/scripts/startup/bl_ui/properties_collection.py
release/scripts/startup/bl_ui/properties_data_camera.py
release/scripts/startup/bl_ui/properties_data_lamp.py
release/scripts/startup/bl_ui/properties_data_mesh.py
release/scripts/startup/bl_ui/properties_physics_cloth.py
release/scripts/startup/bl_ui/properties_render.py
release/scripts/startup/bl_ui/properties_render_layer.py
release/scripts/startup/bl_ui/space_info.py
release/scripts/startup/bl_ui/space_outliner.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/editors/interface/interface.c
source/blender/modifiers/intern/MOD_surfacedeform.c
tests/python/CMakeLists.txt

index 7cbdeb6e61d31c4d7568083f1a0d7ce13273198e,0000000000000000000000000000000000000000..ddfc656da08fdcfbed2f9be595c99d8220443f23
mode 100644,000000..100644
--- /dev/null
@@@ -1,138 -1,0 +1,147 @@@
-     bpy.utils.register_module(__name__)
 +# ##### 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.
++    from bpy.utils import register_class
++    for cls in classes:
++        register_class(cls)
index 90d46a6ee47a2b83129efc1f332d98aa5a2fb36b,a7e8d9273ad969096431c1ccee8aa65cacf88ad6..43c89a32a52f3e04cfe73946b8f6f47c50cd10e2
@@@ -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)
index 2545eadc792db91ce4866ecd57ddd8944e35f79a,084bc387822fec28b49617c14cf5a82aae5b5af7..d6905cd19758eb312f6e1c051442c0b6725faaca
@@@ -130,5 -227,16 +130,14 @@@ class RENDERLAYER_PT_views(RenderLayerB
              row.prop(rv, "camera_suffix", text="")
  
  
 -    RENDERLAYER_PT_layer_options,
 -    RENDERLAYER_PT_layer_passes,
+ classes = (
+     RENDERLAYER_UL_renderlayers,
+     RENDERLAYER_PT_layers,
+     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)
index bc90b754da8c7ef40dd509919cbcd368ccdc13b8,a2f11fa116a786b3f29a1c3d11bcaa8c75078cb4..aca73aadaeec74abc71dbd2fade4b22f5dc222db
@@@ -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,
 -    VIEW3D_MT_object_showhide,
+     VIEW3D_MT_make_single_user,
+     VIEW3D_MT_make_links,
+     VIEW3D_MT_object_game,
+     VIEW3D_MT_brush,
+     VIEW3D_MT_brush_paint_modes,
+     VIEW3D_MT_paint_vertex,
+     VIEW3D_MT_hook,
+     VIEW3D_MT_vertex_group,
+     VIEW3D_MT_paint_weight,
+     VIEW3D_MT_sculpt,
+     VIEW3D_MT_hide_mask,
+     VIEW3D_MT_particle,
+     VIEW3D_MT_particle_specials,
+     VIEW3D_MT_particle_showhide,
+     VIEW3D_MT_pose,
+     VIEW3D_MT_pose_transform,
+     VIEW3D_MT_pose_slide,
+     VIEW3D_MT_pose_propagate,
+     VIEW3D_MT_pose_library,
+     VIEW3D_MT_pose_motion,
+     VIEW3D_MT_pose_group,
+     VIEW3D_MT_pose_ik,
+     VIEW3D_MT_pose_constraints,
+     VIEW3D_MT_pose_showhide,
+     VIEW3D_MT_pose_apply,
+     VIEW3D_MT_pose_specials,
+     VIEW3D_MT_bone_options_toggle,
+     VIEW3D_MT_bone_options_enable,
+     VIEW3D_MT_bone_options_disable,
+     VIEW3D_MT_edit_mesh_specials,
+     VIEW3D_MT_edit_mesh_select_mode,
+     VIEW3D_MT_edit_mesh_extrude,
+     VIEW3D_MT_edit_mesh_vertices,
+     VIEW3D_MT_edit_mesh_edges,
+     VIEW3D_MT_edit_mesh_faces,
+     VIEW3D_MT_edit_mesh_normals,
+     VIEW3D_MT_edit_mesh_clean,
+     VIEW3D_MT_edit_mesh_delete,
+     VIEW3D_MT_edit_mesh_showhide,
+     VIEW3D_MT_edit_gpencil,
+     VIEW3D_MT_edit_gpencil_delete,
+     VIEW3D_MT_edit_curve,
+     VIEW3D_MT_edit_curve_ctrlpoints,
+     VIEW3D_MT_edit_curve_segments,
+     VIEW3D_MT_edit_curve_specials,
+     VIEW3D_MT_edit_curve_delete,
+     VIEW3D_MT_edit_curve_showhide,
+     VIEW3D_MT_edit_surface,
+     VIEW3D_MT_edit_font,
+     VIEW3D_MT_edit_text_chars,
+     VIEW3D_MT_edit_meta,
+     VIEW3D_MT_edit_meta_showhide,
+     VIEW3D_MT_edit_lattice,
+     VIEW3D_MT_edit_armature,
+     VIEW3D_MT_armature_specials,
+     VIEW3D_MT_edit_armature_parent,
+     VIEW3D_MT_edit_armature_roll,
+     VIEW3D_MT_edit_armature_delete,
+     VIEW3D_MT_edit_gpencil_transform,
+     VIEW3D_MT_edit_gpencil_interpolate,
++    VIEW3D_PT_viewport_debug,
+     VIEW3D_PT_grease_pencil,
+     VIEW3D_PT_grease_pencil_palettecolor,
+     VIEW3D_PT_view3d_properties,
+     VIEW3D_PT_view3d_cursor,
+     VIEW3D_PT_view3d_name,
+     VIEW3D_PT_view3d_display,
+     VIEW3D_PT_view3d_stereo,
+     VIEW3D_PT_view3d_shading,
+     VIEW3D_PT_view3d_motion_tracking,
+     VIEW3D_PT_view3d_meshdisplay,
+     VIEW3D_PT_view3d_meshstatvis,
+     VIEW3D_PT_view3d_curvedisplay,
+     VIEW3D_PT_background_image,
+     VIEW3D_PT_transform_orientations,
+     VIEW3D_PT_etch_a_ton,
+     VIEW3D_PT_context_properties,
+ )
+ if __name__ == "__main__":  # only for live edit.
+     from bpy.utils import register_class
+     for cls in classes:
+         register_class(cls)
Simple merge