[Bf-blender-cvs] [9f466a4f978] custom-manipulators: Merge branch 'blender2.8' into custom-manipulators
Campbell Barton
noreply at git.blender.org
Mon May 29 04:23:30 CEST 2017
Commit: 9f466a4f978e9624d4407d09674ca124e3c04e00
Author: Campbell Barton
Date: Mon May 29 12:17:35 2017 +1000
Branches: custom-manipulators
https://developer.blender.org/rB9f466a4f978e9624d4407d09674ca124e3c04e00
Merge branch 'blender2.8' into custom-manipulators
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/properties_data_mesh.py
index fe55bc61dd7,4dc6b8ee6ce..4b7d4907bfe
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@@ -238,50 -227,9 +238,50 @@@ class DATA_PT_vertex_groups(MeshButtons
layout.prop(context.tool_settings, "vertex_group_weight", text="Weight")
+class DATA_PT_face_maps(MeshButtonsPanel, Panel):
+ bl_label = "Face Maps"
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
+
+ @classmethod
+ def poll(cls, context):
+ obj = context.object
+ return (obj and obj.type == 'MESH')
+
+ def draw(self, context):
+ layout = self.layout
+
+ ob = context.object
+ facemap = ob.face_maps.active
+
+ rows = 2
+ if facemap:
+ rows = 4
+
+ row = layout.row()
+ row.template_list("MESH_UL_fmaps", "", ob, "face_maps", ob.face_maps, "active_index", rows=rows)
+
+ col = row.column(align=True)
+ col.operator("object.face_map_add", icon='ZOOMIN', text="")
+ col.operator("object.face_map_remove", icon='ZOOMOUT', text="")
+ if facemap:
+ col.separator()
+ col.operator("object.face_map_move", icon='TRIA_UP', text="").direction = 'UP'
+ col.operator("object.face_map_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
+
+ if ob.face_maps and (ob.mode == 'EDIT' and ob.type == 'MESH'):
+ row = layout.row()
+
+ sub = row.row(align=True)
+ sub.operator("object.face_map_assign", text="Assign")
+ sub.operator("object.face_map_remove_from", text="Remove")
+
+ sub = row.row(align=True)
+ sub.operator("object.face_map_select", text="Select")
+ sub.operator("object.face_map_deselect", text="Deselect")
+
class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
bl_label = "Shape Keys"
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY'}
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
@classmethod
def poll(cls, context):
diff --cc source/blender/blenkernel/CMakeLists.txt
index 321d657cc0e,7af0b5d092a..2a21e0fe2d9
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@@ -103,8 -103,8 +103,9 @@@ set(SR
intern/editderivedmesh.c
intern/editmesh.c
intern/editmesh_bvh.c
+ intern/editmesh_tangent.c
intern/effect.c
+ intern/facemap.c
intern/fcurve.c
intern/fluidsim.c
intern/fmodifier.c
@@@ -235,8 -234,8 +235,9 @@@
BKE_dynamicpaint.h
BKE_editmesh.h
BKE_editmesh_bvh.h
+ BKE_editmesh_tangent.h
BKE_effect.h
+ BKE_facemap.h
BKE_fcurve.h
BKE_fluidsim.h
BKE_font.h
diff --cc source/blender/blenkernel/intern/customdata.c
index 6c02cc0ba1e,f5b7c7de9c3..6a6d9c8e5f3
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@@ -1342,15 -1312,15 +1323,15 @@@ const CustomDataMask CD_MASK_MESH
CD_MASK_MDEFORMVERT |
CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_MDISPS |
CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL | CD_MASK_MPOLY | CD_MASK_MLOOP |
- CD_MASK_MTEXPOLY | CD_MASK_RECAST | CD_MASK_PAINT_MASK |
+ CD_MASK_RECAST | CD_MASK_PAINT_MASK |
CD_MASK_GRID_PAINT_MASK | CD_MASK_MVERT_SKIN | CD_MASK_FREESTYLE_EDGE | CD_MASK_FREESTYLE_FACE |
- CD_MASK_CUSTOMLOOPNORMAL;
+ CD_MASK_CUSTOMLOOPNORMAL | CD_MASK_FACEMAP;
const CustomDataMask CD_MASK_EDITMESH =
CD_MASK_MDEFORMVERT | CD_MASK_MLOOPUV |
- CD_MASK_MLOOPCOL | CD_MASK_MTEXPOLY | CD_MASK_SHAPE_KEYINDEX |
+ CD_MASK_MLOOPCOL | CD_MASK_SHAPE_KEYINDEX |
CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR |
CD_MASK_MDISPS | CD_MASK_SHAPEKEY | CD_MASK_RECAST | CD_MASK_PAINT_MASK |
- CD_MASK_GRID_PAINT_MASK | CD_MASK_MVERT_SKIN | CD_MASK_CUSTOMLOOPNORMAL;
+ CD_MASK_GRID_PAINT_MASK | CD_MASK_MVERT_SKIN | CD_MASK_CUSTOMLOOPNORMAL | CD_MASK_FACEMAP;
const CustomDataMask CD_MASK_DERIVEDMESH =
CD_MASK_MDEFORMVERT |
CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_CLOTH_ORCO |
@@@ -1358,9 -1328,9 +1339,9 @@@
CD_MASK_PROP_STR | CD_MASK_ORIGSPACE | CD_MASK_ORIGSPACE_MLOOP | CD_MASK_ORCO | CD_MASK_TANGENT |
CD_MASK_PREVIEW_MCOL | CD_MASK_SHAPEKEY | CD_MASK_RECAST |
CD_MASK_ORIGINDEX | CD_MASK_MVERT_SKIN | CD_MASK_FREESTYLE_EDGE | CD_MASK_FREESTYLE_FACE |
- CD_MASK_CUSTOMLOOPNORMAL;
+ CD_MASK_CUSTOMLOOPNORMAL | CD_MASK_FACEMAP;
const CustomDataMask CD_MASK_BMESH =
- CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL | CD_MASK_MTEXPOLY |
+ CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL |
CD_MASK_MDEFORMVERT | CD_MASK_PROP_FLT | CD_MASK_PROP_INT |
CD_MASK_PROP_STR | CD_MASK_SHAPEKEY | CD_MASK_SHAPE_KEYINDEX | CD_MASK_MDISPS |
CD_MASK_CREASE | CD_MASK_BWEIGHT | CD_MASK_RECAST | CD_MASK_PAINT_MASK |
diff --cc source/blender/editors/include/ED_screen.h
index 71eb5a59fda,1208b1f31b6..ad36e978660
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@@ -73,11 -75,9 +75,12 @@@ void ED_region_header(const struct b
void ED_region_cursor_set(struct wmWindow *win, struct ScrArea *sa, struct ARegion *ar);
void ED_region_toggle_hidden(struct bContext *C, struct ARegion *ar);
void ED_region_info_draw(struct ARegion *ar, const char *text, float fill_color[4], const bool full_redraw);
+ void ED_region_info_draw_multiline(ARegion *ar, const char *text_array[], float fill_color[4], const bool full_redraw);
void ED_region_image_metadata_draw(int x, int y, struct ImBuf *ibuf, const rctf *frame, float zoomx, float zoomy);
void ED_region_grid_draw(struct ARegion *ar, float zoomx, float zoomy);
+void ED_region_draw_backdrop_view3d(const struct bContext *C, struct Object *camera, const float alpha,
+ const float width, const float height, const float x, const float y,
+ const float zoomx, const float zoomy, const bool draw_background);
float ED_region_blend_factor(struct ARegion *ar);
void ED_region_visible_rect(struct ARegion *ar, struct rcti *rect);
diff --cc source/blender/editors/include/ED_view3d.h
index d67d2f29bd3,02243738d6c..f72a6bd9cc3
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@@ -40,8 -40,8 +40,9 @@@ struct BPoint
struct BaseLegacy;
struct BezTriple;
struct BoundBox;
+ struct Depsgraph;
struct EditBone;
+struct wmEvent;
struct ImBuf;
struct MVert;
struct Main;
diff --cc source/blender/editors/interface/interface_intern.h
index 252cd47704f,ace3bb5b4f8..2148ebe4b8c
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@@ -748,8 -749,20 +749,23 @@@ void UI_OT_eyedropper_id(struct wmOpera
void UI_OT_eyedropper_depth(struct wmOperatorType *ot);
void UI_OT_eyedropper_driver(struct wmOperatorType *ot);
+ /* interface_util.c */
+
+ /**
+ * For use with #ui_rna_collection_search_cb.
+ */
+ typedef struct uiRNACollectionSearch {
+ PointerRNA target_ptr;
+ PropertyRNA *target_prop;
+
+ PointerRNA search_ptr;
+ PropertyRNA *search_prop;
+
+ bool *but_changed; /* pointer to uiBut.changed */
+ } uiRNACollectionSearch;
+ void ui_rna_collection_search_cb(const struct bContext *C, void *arg, const char *str, uiSearchItems *items);
+/* interface_generic_widgets.c */
+void UI_OT_lamp_position(struct wmOperatorType *ot);
+
#endif /* __INTERFACE_INTERN_H__ */
diff --cc source/blender/editors/space_node/space_node.c
index d88b63e7100,235eadd6f51..b233d33b3dc
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@@ -750,10 -737,10 +750,12 @@@ static void node_header_region_draw(con
}
/* used for header + main region */
- static void node_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn)
+ static void node_region_listener(
+ bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar,
+ wmNotifier *wmn, const Scene *UNUSED(scene))
{
+ wmManipulatorMap *mmap = ar->manipulator_map;
+
/* context changes */
switch (wmn->category) {
case NC_SPACE:
diff --cc source/blender/editors/space_view3d/drawobject.c
index 61bdfa82f64,7bb95ba6d15..3542c203006
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@@ -9698,49 -9766,3 +9767,49 @@@ void draw_object_instance(Scene *scene
break;
}
}
+
+void ED_draw_object_facemap(Scene *scene, Object *ob, const float col[4], const int facemap)
+{
+ DerivedMesh *dm = NULL;
+
+ /* happens on undo */
+ if (ob->type != OB_MESH || !ob->data)
+ return;
+
+ dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH);
+ if (!dm || !CustomData_has_layer(&dm->polyData, CD_FACEMAP))
+ return;
+
+ DM_update_materials(dm, ob);
+
+ glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW);
+
+ /* add polygon offset so we draw above the original surface */
+ glPolygonOffset(1.0, 1.0);
+
+ dm->totfmaps = BLI_listbase_count(&ob->fmaps);
+
+ GPU_facemap_setup(dm);
+
+ glColor4fv(col);
+
- glPushAttrib(GL_ENABLE_BIT);
++ gpuPushAttrib(GL_ENABLE_BIT);
+ glEnable(GL_BLEND);
+ glDisable(GL_LIGHTING);
+
+ /* always draw using backface culling */
+ glEnable(GL_CULL_FACE);
+ glCullFace(GL_BACK);
+
+ if (dm->drawObject->facemapindices) {
+ glDrawElements(GL_TRIANGLES, dm->drawObject->facemap_count[facemap] * 3, GL_UNSIGNED_INT,
+ (int *)NULL + dm->drawObject->facemap_start[facemap] * 3);
+ }
- glPopAttrib();
++ gpuPopAttrib();
+
+ GPU_buffers_unbind();
+
+ glPolygonOffset(0.0, 0.0);
+ dm->release(dm);
+}
+
diff --cc source/blender/editors/transform/transform_manipulator2d.c
index 05cc3b37fa6,00000000000..b0ed816bd3f
mode 100644,000000..100644
--- a/source/blender/editors/transform/transform_manipulator2d.c
+++ b/source/blender/editors/transform/transform_manipulator2d.c
@@@ -1,274 -1,0 +1,271 @@@
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list