[Bf-blender-cvs] [13c6a6c] wiggly-widgets: Merge branch 'master' into wiggly-widgets
Julian Eisel
noreply at git.blender.org
Sat Dec 19 13:09:25 CET 2015
Commit: 13c6a6cdb0c226c907989739d34fa58447b68266
Author: Julian Eisel
Date: Sat Dec 19 13:09:03 2015 +0100
Branches: wiggly-widgets
https://developer.blender.org/rB13c6a6cdb0c226c907989739d34fa58447b68266
Merge branch 'master' into wiggly-widgets
Conflicts:
release/scripts/modules/sys_info.py
source/blender/blenloader/intern/versioning_270.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/transform/transform_manipulator.c
===================================================================
===================================================================
diff --cc source/blender/blenloader/intern/versioning_270.c
index fae602e,72312d7..19d8a4f
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@@ -935,42 -936,98 +936,137 @@@ void blo_do_versions_270(FileData *fd,
}
}
+ if (!MAIN_VERSION_ATLEAST(main, 276, 4)) {
+ for (Scene *scene = main->scene.first; scene; scene = scene->id.next) {
+ ToolSettings *ts = scene->toolsettings;
+
+ if (ts->gp_sculpt.brush[0].size == 0) {
+ GP_BrushEdit_Settings *gset = &ts->gp_sculpt;
+ GP_EditBrush_Data *brush;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_SMOOTH];
+ brush->size = 25;
+ brush->strength = 0.3f;
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF | GP_EDITBRUSH_FLAG_SMOOTH_PRESSURE;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_THICKNESS];
+ brush->size = 25;
+ brush->strength = 0.5f;
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_GRAB];
+ brush->size = 50;
+ brush->strength = 0.3f;
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_PUSH];
+ brush->size = 25;
+ brush->strength = 0.3f;
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_TWIST];
+ brush->size = 50;
+ brush->strength = 0.3f; // XXX?
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_PINCH];
+ brush->size = 50;
+ brush->strength = 0.5f; // XXX?
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_RANDOMIZE];
+ brush->size = 25;
+ brush->strength = 0.5f;
+ brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+
+ brush = &gset->brush[GP_EDITBRUSH_TYPE_CLONE];
+ brush->size = 50;
+ brush->strength = 1.0f;
+ }
+
+ if (!DNA_struct_elem_find(fd->filesdna, "ToolSettings", "char", "gpencil_v3d_align")) {
+ #if 0 /* XXX: Cannot do this, as we get random crashes... */
+ if (scene->gpd) {
+ bGPdata *gpd = scene->gpd;
+
+ /* Copy over the settings stored in the GP datablock linked to the scene, for minimal disruption */
+ ts->gpencil_v3d_align = 0;
+
+ if (gpd->flag & GP_DATA_VIEWALIGN) ts->gpencil_v3d_align |= GP_PROJECT_VIEWSPACE;
+ if (gpd->flag & GP_DATA_DEPTH_VIEW) ts->gpencil_v3d_align |= GP_PROJECT_DEPTH_VIEW;
+ if (gpd->flag & GP_DATA_DEPTH_STROKE) ts->gpencil_v3d_align |= GP_PROJECT_DEPTH_STROKE;
+
+ if (gpd->flag & GP_DATA_DEPTH_STROKE_ENDPOINTS)
+ ts->gpencil_v3d_align |= GP_PROJECT_DEPTH_STROKE_ENDPOINTS;
+ }
+ else {
+ /* Default to cursor for all standard 3D views */
+ ts->gpencil_v3d_align = GP_PROJECT_VIEWSPACE;
+ }
+ #endif
+
+ ts->gpencil_v3d_align = GP_PROJECT_VIEWSPACE;
+ ts->gpencil_v2d_align = GP_PROJECT_VIEWSPACE;
+ ts->gpencil_seq_align = GP_PROJECT_VIEWSPACE;
+ ts->gpencil_ima_align = GP_PROJECT_VIEWSPACE;
+ }
+ }
+
+ for (bGPdata *gpd = main->gpencil.first; gpd; gpd = gpd->id.next) {
+ bool enabled = false;
+
+ /* Ensure that the datablock's onionskinning toggle flag
+ * stays in sync with the status of the actual layers
+ */
+ for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
+ if (gpl->flag & GP_LAYER_ONIONSKIN) {
+ enabled = true;
+ }
+ }
+
+ if (enabled)
+ gpd->flag |= GP_DATA_SHOW_ONIONSKINS;
+ else
+ gpd->flag &= ~GP_DATA_SHOW_ONIONSKINS;
+ }
+ }
++
+ {
+ if (!DNA_struct_elem_find(fd->filesdna, "SpaceNode", "float", "backdrop_zoom")) {
+ bScreen *sc;
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_NODE) {
+ SpaceNode *snode = (SpaceNode *)sl;
+ snode->backdrop_zoom = 1.0;
+ }
+ if (sl->spacetype == SPACE_SEQ) {
+ SpaceSeq *sseq = (SpaceSeq *)sl;
+ sseq->overdrop_zoom = 1.0;
+ }
+ }
+ }
+ }
+ }
+
+ if (!DNA_struct_elem_find(fd->filesdna, "SpaceIpo", "float", "backdrop_zoom")) {
+ bScreen *sc;
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_IPO) {
+ SpaceIpo *sipo = (SpaceIpo *)sl;
+ sipo->backdrop_zoom = 1.0f;
+ sipo->backdrop_opacity = 0.7f;
+ }
+ }
+ }
+ }
+ }
+ }
}
diff --cc source/blender/editors/include/ED_armature.h
index a1531af,15c6837..d325c0d
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@@ -211,14 -209,9 +212,15 @@@ int BDR_drawSketchNames(struct ViewCont
/* meshlaplacian.c */
void mesh_deform_bind(struct Scene *scene,
struct MeshDeformModifierData *mmd,
+ struct DerivedMesh *cagedm,
float *vertexcos, int totvert, float cagemat[4][4]);
-
+
+/* pose_utils.c */
+struct ThemeWireColor *ED_pchan_get_colorset(
+ struct bArmature *arm,
+ struct bPose *pose, struct bPoseChannel *pchan)
+ ATTR_WARN_UNUSED_RESULT;
+
#ifdef __cplusplus
}
#endif
diff --cc source/blender/editors/space_view3d/drawobject.c
index 92daea4,681e64f..874468f
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@@ -86,10 -86,10 +86,11 @@@
#include "BIF_gl.h"
#include "BIF_glutil.h"
++#include "GPU_buffers.h"
#include "GPU_draw.h"
- #include "GPU_extensions.h"
#include "GPU_select.h"
- #include "GPU_buffers.h"
+ #include "GPU_basic_shader.h"
+ #include "GPU_shader.h"
#include "ED_mesh.h"
#include "ED_particle.h"
diff --cc source/blender/editors/space_view3d/space_view3d.c
index b299875,fa14ca9..2808b3d
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@@ -60,15 -51,12 +60,15 @@@
#include "BKE_scene.h"
#include "BKE_screen.h"
+#include "ED_armature.h"
#include "ED_space_api.h"
#include "ED_screen.h"
+#include "ED_transform.h"
+#include "ED_view3d.h"
- #include "GPU_extensions.h"
- #include "GPU_material.h"
#include "GPU_compositing.h"
+ #include "GPU_framebuffer.h"
+ #include "GPU_material.h"
#include "BIF_gl.h"
diff --cc source/blender/editors/transform/transform_manipulator.c
index ca6cb1b,79b071e..0f62269
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@@ -547,14 -266,16 +548,16 @@@ bool gimbal_axis(Object *ob, float gmat
/* returns total items selected */
static int calc_manipulator_stats(const bContext *C)
{
- ScrArea *sa = CTX_wm_area(C);
- ARegion *ar = CTX_wm_region(C);
+ const ScrArea *sa = CTX_wm_area(C);
+ const ARegion *ar = CTX_wm_region(C);
- const View3D *v3d = sa->spacedata.first;
- RegionView3D *rv3d = ar->regiondata;
Scene *scene = CTX_data_scene(C);
Object *obedit = CTX_data_edit_object(C);
- Object *ob = OBACT;
+ View3D *v3d = sa->spacedata.first;
+ RegionView3D *rv3d = ar->regiondata;
Base *base;
+ Object *ob = OBACT;
+ bGPdata *gpd = CTX_data_gpencil_data(C);
+ const bool is_gp_edit = ((gpd) && (gpd->flag & GP_DATA_STROKE_EDITMODE));
int a, totsel = 0;
/* transform widget matrix */
@@@ -832,13 -574,17 +858,13 @@@
}
/* global, local or normal orientation? */
- if (ob && totsel) {
+ if (ob && totsel && !is_gp_edit) {
+ float mat[3][3];
switch (v3d->twmode) {
-
case V3D_MANIP_GLOBAL:
- {
break; /* nothing to do */
- }
case V3D_MANIP_GIMBAL:
- {
- float mat[3][3];
if (gimbal_axis(ob, mat)) {
copy_m4_m3(rv3d->twmat, mat);
break;
@@@ -906,274 -666,1250 +932,282 @@@ static void manipulator_drawflags_refre
}
}
- static void manipulator_prepare_mat(Scene *scene, View3D *v3d, RegionView3D *rv3d)
-
-/* ******************** DRAWING STUFFIES *********** */
-
-static float screen_aligned(RegionView3D *rv3d, float mat[4][4])
-{
- glTranslate3fv(mat[3]);
-
- /* sets view screen aligned */
- glRotatef(-360.0f * saacos(rv3d->viewquat[0]) / (float)M_PI, rv3d->viewquat[1], rv3d->viewquat[2], rv3d->viewquat[3]);
-
- return len_v3(mat[0]); /* draw scale */
-}
-
-
-/* radring = radius of doughnut rings
- * radhole = radius hole
- * start = starting segment (based on nrings)
- * end = end segment
- * nsides = amount of points in ring
- * nrigns = amount of rings
- */
-static void partial_doughnut(float radring, float radhole, int start, int end, int nsides, int nrings)
++static void manipulator_prepare_mat(const bContext *C, View3D *v3d, RegionView3D *rv3d)
{
- float theta, phi, theta1;
- float cos_theta, sin_theta;
- float cos_theta1, sin_theta1;
- float ring_delta, side_delta;
- int i, j, do_caps = true;
-
- if (start == 0 && end == nrings) do_caps = false;
-
- ring_delta = 2.0f * (float)M_PI / (float)nrings;
- side_delta = 2.0f * (float)M_PI / (float)nsides;
-
- theta = (float)M_PI + 0.5f * ring_delta;
- cos_theta = cosf(theta);
- sin_theta = sinf(theta);
-
- for (i = nrings - 1; i >= 0; i--) {
- theta1 = theta + ring_delta;
- cos_theta1 = cosf(theta1);
- sin_theta1 = sinf(theta1);
-
- if (do_caps && i == start) { // cap
- glBegin(GL_POLYGON);
- phi = 0.0;
- for (j = nsides; j >= 0; j--) {
- float cos_phi, sin_phi, dist;
-
- phi += side_delta;
- cos_phi = cosf(phi);
- sin_phi = sinf(phi);
- dist = radhole + radring * cos_phi;
-
- glVertex3f(cos_theta1 * dist, -sin_theta1 * dist, radring * sin_phi);
- }
- glEnd();
- }
- if (i >= start && i <= end) {
- glBegin(GL_QUAD_STRIP);
- phi = 0.0;
- for (j = nsides; j >= 0; j--) {
- float cos_phi, sin_phi, dist;
-
- phi += side_delta;
- cos_phi = cosf(phi);
- sin_phi = sinf(p
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list