forked from bartvdbraak/blender
Merge branch 'master' into blender2.8
This commit is contained in:
commit
264d0cc6a0
@ -134,7 +134,10 @@ if(NOT DEFINED LIBDIR)
|
|||||||
message(STATUS "32 bit compiler detected.")
|
message(STATUS "32 bit compiler detected.")
|
||||||
set(LIBDIR_BASE "windows")
|
set(LIBDIR_BASE "windows")
|
||||||
endif()
|
endif()
|
||||||
if(MSVC_VERSION EQUAL 1910)
|
if(MSVC_VERSION EQUAL 1911)
|
||||||
|
message(STATUS "Visual Studio 2017 detected.")
|
||||||
|
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
|
||||||
|
elseif(MSVC_VERSION EQUAL 1910)
|
||||||
message(STATUS "Visual Studio 2017 detected.")
|
message(STATUS "Visual Studio 2017 detected.")
|
||||||
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
|
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
|
||||||
elseif(MSVC_VERSION EQUAL 1900)
|
elseif(MSVC_VERSION EQUAL 1900)
|
||||||
|
@ -167,12 +167,6 @@ void ED_widgetgroup_manipulator2d_draw_prepare(const struct bContext *C, struct
|
|||||||
|
|
||||||
/* Snapping */
|
/* Snapping */
|
||||||
|
|
||||||
typedef enum SnapSelect {
|
|
||||||
SNAP_ALL = 0,
|
|
||||||
SNAP_NOT_SELECTED = 1,
|
|
||||||
SNAP_NOT_ACTIVE = 2,
|
|
||||||
} SnapSelect;
|
|
||||||
|
|
||||||
#define SNAP_MIN_DISTANCE 30
|
#define SNAP_MIN_DISTANCE 30
|
||||||
|
|
||||||
bool peelObjectsTransform(
|
bool peelObjectsTransform(
|
||||||
@ -195,11 +189,7 @@ bool snapObjectsTransform(
|
|||||||
/* return args */
|
/* return args */
|
||||||
float r_loc[3], float r_no[3]);
|
float r_loc[3], float r_no[3]);
|
||||||
bool snapNodesTransform(
|
bool snapNodesTransform(
|
||||||
struct TransInfo *t, const int mval[2], SnapSelect snap_select,
|
struct TransInfo *t, const int mval[2],
|
||||||
/* return args */
|
|
||||||
float r_loc[2], float *r_dist_px, char *r_node_border);
|
|
||||||
bool snapNodesContext(
|
|
||||||
struct bContext *C, const int mval[2], SnapSelect snap_select,
|
|
||||||
/* return args */
|
/* return args */
|
||||||
float r_loc[2], float *r_dist_px, char *r_node_border);
|
float r_loc[2], float *r_dist_px, char *r_node_border);
|
||||||
|
|
||||||
|
@ -42,6 +42,12 @@ struct bContext;
|
|||||||
|
|
||||||
/* ED_transform_snap_object_*** API */
|
/* ED_transform_snap_object_*** API */
|
||||||
|
|
||||||
|
typedef enum SnapSelect {
|
||||||
|
SNAP_ALL = 0,
|
||||||
|
SNAP_NOT_SELECTED = 1,
|
||||||
|
SNAP_NOT_ACTIVE = 2,
|
||||||
|
} SnapSelect;
|
||||||
|
|
||||||
/** used for storing multiple hits */
|
/** used for storing multiple hits */
|
||||||
struct SnapObjectHitDepth {
|
struct SnapObjectHitDepth {
|
||||||
struct SnapObjectHitDepth *next, *prev;
|
struct SnapObjectHitDepth *next, *prev;
|
||||||
|
@ -51,7 +51,6 @@
|
|||||||
|
|
||||||
#include "ED_screen.h"
|
#include "ED_screen.h"
|
||||||
#include "ED_view3d.h"
|
#include "ED_view3d.h"
|
||||||
#include "ED_transform.h"
|
|
||||||
#include "ED_transform_snap_object_context.h"
|
#include "ED_transform_snap_object_context.h"
|
||||||
#include "ED_space_api.h"
|
#include "ED_space_api.h"
|
||||||
|
|
||||||
|
@ -49,7 +49,6 @@
|
|||||||
|
|
||||||
#include "ED_screen.h"
|
#include "ED_screen.h"
|
||||||
#include "ED_space_api.h"
|
#include "ED_space_api.h"
|
||||||
#include "ED_transform.h"
|
|
||||||
#include "ED_transform_snap_object_context.h"
|
#include "ED_transform_snap_object_context.h"
|
||||||
|
|
||||||
#include "PIL_time.h" /* smoothview */
|
#include "PIL_time.h" /* smoothview */
|
||||||
|
@ -1001,7 +1001,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
|
|||||||
float dist_px = SNAP_MIN_DISTANCE; // Use a user defined value here
|
float dist_px = SNAP_MIN_DISTANCE; // Use a user defined value here
|
||||||
char node_border;
|
char node_border;
|
||||||
|
|
||||||
if (snapNodesTransform(t, t->mval, t->tsnap.modeSelect, loc, &dist_px, &node_border)) {
|
if (snapNodesTransform(t, t->mval, loc, &dist_px, &node_border)) {
|
||||||
copy_v2_v2(t->tsnap.snapPoint, loc);
|
copy_v2_v2(t->tsnap.snapPoint, loc);
|
||||||
t->tsnap.snapNodeBorder = node_border;
|
t->tsnap.snapNodeBorder = node_border;
|
||||||
|
|
||||||
@ -1397,22 +1397,11 @@ static bool snapNodes(
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool snapNodesTransform(
|
bool snapNodesTransform(
|
||||||
TransInfo *t, const int mval[2], SnapSelect snap_select,
|
TransInfo *t, const int mval[2],
|
||||||
float r_loc[2], float *r_dist_px, char *r_node_border)
|
float r_loc[2], float *r_dist_px, char *r_node_border)
|
||||||
{
|
{
|
||||||
return snapNodes(
|
return snapNodes(
|
||||||
t->settings, t->sa->spacedata.first, t->ar, mval, snap_select,
|
t->settings, t->sa->spacedata.first, t->ar, mval, t->tsnap.modeSelect,
|
||||||
r_loc, r_dist_px, r_node_border);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool snapNodesContext(
|
|
||||||
bContext *C, const int mval[2], SnapSelect snap_select,
|
|
||||||
float r_loc[2], float *r_dist_px, char *r_node_border)
|
|
||||||
{
|
|
||||||
Scene *scene = CTX_data_scene(C);
|
|
||||||
ARegion *ar = CTX_wm_region(C);
|
|
||||||
return snapNodes(
|
|
||||||
scene->toolsettings, CTX_wm_space_node(C), ar, mval, snap_select,
|
|
||||||
r_loc, r_dist_px, r_node_border);
|
r_loc, r_dist_px, r_node_border);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -748,8 +748,6 @@ static bool raycastObj(
|
|||||||
ray_start, ray_dir,
|
ray_start, ray_dir,
|
||||||
ob, dm, obmat, ob_index,
|
ob, dm, obmat, ob_index,
|
||||||
ray_depth, r_loc, r_no, r_index, r_hit_list);
|
ray_depth, r_loc, r_no, r_index, r_hit_list);
|
||||||
|
|
||||||
dm->release(dm);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user