forked from bartvdbraak/blender
Merge branch 'master' into blender2.8
This commit is contained in:
commit
585208e0e9
2
extern/curve_fit_nd/intern/generic_heap.c
vendored
2
extern/curve_fit_nd/intern/generic_heap.c
vendored
@ -305,3 +305,5 @@ void *HEAP_node_ptr(HeapNode *node)
|
||||
{
|
||||
return node->ptr;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
@ -575,7 +575,6 @@ void BKE_node_preview_set_pixel(struct bNodePreview *preview, const f
|
||||
|
||||
/** \} */
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Node Type Access
|
||||
* \{ */
|
||||
@ -605,6 +604,7 @@ void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpufu
|
||||
void node_type_internal_links(struct bNodeType *ntype, void (*update_internal_links)(struct bNodeTree *, struct bNode *));
|
||||
void node_type_compatibility(struct bNodeType *ntype, short compatibility);
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Node Generic Functions
|
||||
@ -701,7 +701,7 @@ void BKE_nodetree_remove_layer_n(struct bNodeTree *ntree, struct Scene *scene, c
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Shader Nodes
|
||||
*/
|
||||
* \{ */
|
||||
struct ShadeInput;
|
||||
struct ShadeResult;
|
||||
|
||||
@ -827,7 +827,7 @@ void ntreeGPUMaterialDomain(struct bNodeTree *ntree, bool *has_surfac
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Composite Nodes
|
||||
*/
|
||||
* \{ */
|
||||
|
||||
/* output socket defines */
|
||||
#define RRES_OUT_IMAGE 0
|
||||
@ -1011,7 +1011,7 @@ void ntreeCompositColorBalanceSyncFromCDL(bNodeTree *ntree, bNode *node);
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Texture Nodes
|
||||
*/
|
||||
* \{ */
|
||||
|
||||
struct TexResult;
|
||||
|
||||
|
@ -2387,6 +2387,7 @@ void BKE_mesh_calc_volume(
|
||||
}
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
|
@ -199,6 +199,8 @@ void BLI_gset_clear(GSet *gs, GSetKeyFreeFP keyfreefp);
|
||||
void *BLI_gset_lookup(GSet *gh, const void *key) ATTR_WARN_UNUSED_RESULT;
|
||||
void *BLI_gset_pop_key(GSet *gs, const void *key) ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
/** \} */
|
||||
|
||||
/** \name GSet Iterator
|
||||
* \{ */
|
||||
|
||||
@ -286,7 +288,7 @@ double BLI_gset_calc_quality(GSet *gs);
|
||||
*
|
||||
* \note '_p' suffix denotes void pointer arg,
|
||||
* so we can have functions that take correctly typed args too.
|
||||
* \{ */
|
||||
*/
|
||||
|
||||
unsigned int BLI_ghashutil_ptrhash(const void *key);
|
||||
bool BLI_ghashutil_ptrcmp(const void *a, const void *b);
|
||||
|
@ -1345,7 +1345,7 @@ void *BLI_gset_lookup(GSet *gs, const void *key)
|
||||
|
||||
/**
|
||||
* Returns the pointer to the key if it's found, removing it from the GSet.
|
||||
* \node Caller must handle freeing.
|
||||
* \note Caller must handle freeing.
|
||||
*/
|
||||
void *BLI_gset_pop_key(GSet *gs, const void *key)
|
||||
{
|
||||
|
@ -1924,6 +1924,7 @@ void BLI_bvhtree_ray_cast_all(
|
||||
BLI_bvhtree_ray_cast_all_ex(tree, co, dir, radius, hit_dist, callback, userdata, BVH_RAYCAST_DEFAULT);
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
|
@ -299,7 +299,7 @@ typedef struct BChunk {
|
||||
} BChunk;
|
||||
|
||||
/**
|
||||
* Links to store #BChunk data in #BChunkList.chunks.
|
||||
* Links to store #BChunk data in #BChunkList.chunk_refs.
|
||||
*/
|
||||
typedef struct BChunkRef {
|
||||
struct BChunkRef *next, *prev;
|
||||
@ -749,6 +749,7 @@ static void bchunk_list_fill_from_array(
|
||||
ASSERT_CHUNKLIST_DATA(chunk_list, data);
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Internal Table Lookup Functions
|
||||
@ -1013,6 +1014,10 @@ static const BChunkRef *table_lookup(
|
||||
|
||||
/** \} */
|
||||
|
||||
/** \name Main Data De-Duplication Function
|
||||
*
|
||||
* \{ */
|
||||
|
||||
/**
|
||||
* \param data: Data to store in the returned value.
|
||||
* \param data_len_original: Length of data in bytes.
|
||||
@ -1504,6 +1509,8 @@ void BLI_array_store_clear(
|
||||
BLI_mempool_clear(bs->memory.chunk);
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/** \name BArrayStore Statistics
|
||||
* \{ */
|
||||
|
||||
|
@ -265,7 +265,8 @@ static void polyedge_rotate(
|
||||
struct HalfEdge *e)
|
||||
{
|
||||
/** CCW winding, rotate internal edge to new vertical state.
|
||||
* <pre>
|
||||
*
|
||||
* \code{.unparsed}
|
||||
* Before After
|
||||
* X X
|
||||
* / \ /|\
|
||||
@ -276,7 +277,7 @@ static void polyedge_rotate(
|
||||
* e2\ /e1 e2\ | /e1
|
||||
* \ / \|/
|
||||
* X X
|
||||
* </pre>
|
||||
* \endcode
|
||||
*/
|
||||
struct HalfEdge *ed[6];
|
||||
uint ed_index[6];
|
||||
|
@ -208,7 +208,7 @@ size_t BLI_strcpy_rlen(char *__restrict dst, const char *__restrict src)
|
||||
}
|
||||
|
||||
/**
|
||||
* Portable replacement for #vsnprintf
|
||||
* Portable replacement for `vsnprintf`.
|
||||
*/
|
||||
size_t BLI_vsnprintf(char *__restrict buffer, size_t maxncpy, const char *__restrict format, va_list arg)
|
||||
{
|
||||
@ -503,7 +503,7 @@ int BLI_strcaseeq(const char *a, const char *b)
|
||||
}
|
||||
|
||||
/**
|
||||
* Portable replacement for #strcasestr (not available in MSVC)
|
||||
* Portable replacement for `strcasestr` (not available in MSVC)
|
||||
*/
|
||||
char *BLI_strcasestr(const char *s, const char *find)
|
||||
{
|
||||
|
@ -1310,11 +1310,11 @@ static void parallel_mempool_func(
|
||||
/**
|
||||
* This function allows to parallelize for loops over Mempool items.
|
||||
*
|
||||
* \param pool The iterable BLI_mempool to loop over.
|
||||
* \param userdata Common userdata passed to all instances of \a func.
|
||||
* \param func Callback function.
|
||||
* \param use_threading If \a true, actually split-execute loop in threads, else just do a sequential forloop
|
||||
* (allows caller to use any kind of test to switch on parallelization or not).
|
||||
* \param mempool: The iterable BLI_mempool to loop over.
|
||||
* \param userdata: Common userdata passed to all instances of \a func.
|
||||
* \param func: Callback function.
|
||||
* \param use_threading: If \a true, actually split-execute loop in threads, else just do a sequential for loop
|
||||
* (allows caller to use any kind of test to switch on parallelization or not).
|
||||
*
|
||||
* \note There is no static scheduling here.
|
||||
*/
|
||||
|
@ -521,7 +521,7 @@ void BM_verts_calc_normal_vcos(BMesh *bm, const float (*fnos)[3], const float (*
|
||||
}
|
||||
|
||||
/**
|
||||
* Helpers for #BM_mesh_loop_normals_update and #BM_loops_calc_normals_vnos
|
||||
* Helpers for #BM_mesh_loop_normals_update and #BM_loops_calc_normal_vcos
|
||||
*/
|
||||
static void bm_mesh_edges_sharp_tag(
|
||||
BMesh *bm,
|
||||
|
@ -860,7 +860,7 @@ static void bvhtree_test_edges_isect_2d_ray_cb(
|
||||
/**
|
||||
* Store values for:
|
||||
* - #bm_face_split_edgenet_find_connection
|
||||
* - #test_edges_isect_2d
|
||||
* - #test_edges_isect_2d_vert
|
||||
* ... which don't change each call.
|
||||
*/
|
||||
struct EdgeGroup_FindConnection_Args {
|
||||
|
@ -1526,9 +1526,9 @@ float BM_loop_calc_face_angle(const BMLoop *l)
|
||||
*
|
||||
* Calculate the normal at this loop corner or fallback to the face normal on straight lines.
|
||||
*
|
||||
* \param l The loop to calculate the normal at
|
||||
* \param epsilon: Value to avoid numeric errors (1e-5f works well).
|
||||
* \param r_normal Resulting normal
|
||||
* \param l: The loop to calculate the normal at.
|
||||
* \param epsilon_sq: Value to avoid numeric errors (1e-5f works well).
|
||||
* \param r_normal: Resulting normal.
|
||||
*/
|
||||
float BM_loop_calc_face_normal_safe_ex(const BMLoop *l, const float epsilon_sq, float r_normal[3])
|
||||
{
|
||||
|
@ -314,7 +314,7 @@ typedef struct BoneFlipNameData {
|
||||
*
|
||||
* \param arm: Armature the bones belong to
|
||||
* \param bones_names: List of BoneConflict elems.
|
||||
* \param do_flip_numbers: if set, try to get rid of dot-numbers at end of bone names.
|
||||
* \param do_strip_numbers: if set, try to get rid of dot-numbers at end of bone names.
|
||||
*/
|
||||
void ED_armature_bones_flip_names(bArmature *arm, ListBase *bones_names, const bool do_strip_numbers)
|
||||
{
|
||||
|
@ -81,7 +81,7 @@ void EDBM_mesh_normals_update(struct BMEditMesh *em);
|
||||
void EDBM_mesh_clear(struct BMEditMesh *em);
|
||||
|
||||
void EDBM_selectmode_to_scene(struct bContext *C);
|
||||
void EDBM_mesh_make(struct ToolSettings *ts, struct Object *ob, const bool add_key_index);
|
||||
void EDBM_mesh_make(struct Object *ob, const int select_mode, const bool add_key_index);
|
||||
void EDBM_mesh_free(struct BMEditMesh *em);
|
||||
void EDBM_mesh_load(struct Object *ob);
|
||||
struct DerivedMesh *EDBM_mesh_deform_dm_get(struct BMEditMesh *em);
|
||||
|
@ -1320,7 +1320,7 @@ int UI_idcode_icon_get(const int idcode)
|
||||
{
|
||||
switch (idcode) {
|
||||
case ID_AC:
|
||||
return ICON_ANIM_DATA;
|
||||
return ICON_ACTION;
|
||||
case ID_AR:
|
||||
return ICON_ARMATURE_DATA;
|
||||
case ID_BR:
|
||||
|
@ -2452,10 +2452,10 @@ static bool select_linked_delimit_test(
|
||||
* Gets the default from the operator fallback to own last-used value
|
||||
* (selected based on mode)
|
||||
*/
|
||||
static int select_linked_delimit_default_from_op(wmOperator *op, BMEditMesh *em)
|
||||
static int select_linked_delimit_default_from_op(wmOperator *op, int select_mode)
|
||||
{
|
||||
static char delimit_last_store[2] = {0, BMO_DELIM_SEAM};
|
||||
int delimit_last_index = (em->selectmode & (SCE_SELECT_VERTEX | SCE_SELECT_EDGE)) == 0;
|
||||
int delimit_last_index = (select_mode & (SCE_SELECT_VERTEX | SCE_SELECT_EDGE)) == 0;
|
||||
char *delimit_last = &delimit_last_store[delimit_last_index];
|
||||
PropertyRNA *prop_delimit = RNA_struct_find_property(op->ptr, "delimit");
|
||||
int delimit;
|
||||
@ -2525,7 +2525,7 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op)
|
||||
BMWalker walker;
|
||||
|
||||
#ifdef USE_LINKED_SELECT_DEFAULT_HACK
|
||||
int delimit = select_linked_delimit_default_from_op(op, em);
|
||||
int delimit = select_linked_delimit_default_from_op(op, em->selectmode);
|
||||
#else
|
||||
int delimit = RNA_enum_get(op->ptr, "delimit");
|
||||
#endif
|
||||
@ -2859,7 +2859,7 @@ static int edbm_select_linked_pick_invoke(bContext *C, wmOperator *op, const wmE
|
||||
}
|
||||
|
||||
#ifdef USE_LINKED_SELECT_DEFAULT_HACK
|
||||
int delimit = select_linked_delimit_default_from_op(op, em);
|
||||
int delimit = select_linked_delimit_default_from_op(op, em->selectmode);
|
||||
#else
|
||||
int delimit = RNA_enum_get(op->ptr, "delimit");
|
||||
#endif
|
||||
@ -2896,7 +2896,7 @@ static int edbm_select_linked_pick_exec(bContext *C, wmOperator *op)
|
||||
BMElem *ele = EDBM_elem_from_index_any(em, index);
|
||||
|
||||
#ifdef USE_LINKED_SELECT_DEFAULT_HACK
|
||||
int delimit = select_linked_delimit_default_from_op(op, em);
|
||||
int delimit = select_linked_delimit_default_from_op(op, em->selectmode);
|
||||
#else
|
||||
int delimit = RNA_enum_get(op->ptr, "delimit");
|
||||
#endif
|
||||
|
@ -331,7 +331,7 @@ void EDBM_selectmode_to_scene(bContext *C)
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, scene);
|
||||
}
|
||||
|
||||
void EDBM_mesh_make(ToolSettings *ts, Object *ob, const bool add_key_index)
|
||||
void EDBM_mesh_make(Object *ob, const int select_mode, const bool add_key_index)
|
||||
{
|
||||
Mesh *me = ob->data;
|
||||
BMesh *bm;
|
||||
@ -358,7 +358,7 @@ void EDBM_mesh_make(ToolSettings *ts, Object *ob, const bool add_key_index)
|
||||
me->edit_btmesh = BKE_editmesh_create(bm, false);
|
||||
#endif
|
||||
|
||||
me->edit_btmesh->selectmode = me->edit_btmesh->bm->selectmode = ts->selectmode;
|
||||
me->edit_btmesh->selectmode = me->edit_btmesh->bm->selectmode = select_mode;
|
||||
me->edit_btmesh->mat_nr = (ob->actcol > 0) ? ob->actcol - 1 : 0;
|
||||
me->edit_btmesh->ob = ob;
|
||||
|
||||
|
@ -573,7 +573,7 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, const wmEvent *e
|
||||
obedit = base->object;
|
||||
me = obedit->data;
|
||||
if (me->edit_btmesh == NULL) {
|
||||
EDBM_mesh_make(scene->toolsettings, obedit, false);
|
||||
EDBM_mesh_make(obedit, scene->toolsettings->selectmode, false);
|
||||
exitmode = 1;
|
||||
}
|
||||
if (me->edit_btmesh == NULL)
|
||||
|
@ -375,7 +375,7 @@ void ED_object_editmode_enter(bContext *C, int flag)
|
||||
ok = 1;
|
||||
const bool use_key_index = mesh_needs_keyindex(ob->data);
|
||||
|
||||
EDBM_mesh_make(scene->toolsettings, ob, use_key_index);
|
||||
EDBM_mesh_make(ob, scene->toolsettings->selectmode, use_key_index);
|
||||
|
||||
em = BKE_editmesh_from_object(ob);
|
||||
if (LIKELY(em)) {
|
||||
|
@ -319,7 +319,7 @@ static bool object_hook_index_array(Scene *scene, Object *obedit,
|
||||
BMEditMesh *em;
|
||||
|
||||
EDBM_mesh_load(obedit);
|
||||
EDBM_mesh_make(scene->toolsettings, obedit, true);
|
||||
EDBM_mesh_make(obedit, scene->toolsettings->selectmode, true);
|
||||
|
||||
DEG_id_tag_update(obedit->data, 0);
|
||||
|
||||
|
@ -150,7 +150,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
|
||||
BMEditMesh *em;
|
||||
|
||||
EDBM_mesh_load(obedit);
|
||||
EDBM_mesh_make(scene->toolsettings, obedit, true);
|
||||
EDBM_mesh_make(obedit, scene->toolsettings->selectmode, true);
|
||||
|
||||
DEG_id_tag_update(obedit->data, 0);
|
||||
|
||||
|
@ -31,10 +31,10 @@
|
||||
*
|
||||
* Typical view-control usage:
|
||||
*
|
||||
* - acquire a view-control (#ED_view3d_control_acquire).
|
||||
* - acquire a view-control (#ED_view3d_cameracontrol_acquire).
|
||||
* - modify ``rv3d->ofs``, ``rv3d->viewquat``.
|
||||
* - update the view data (#ED_view3d_control_acquire) - within a loop which draws the viewport.
|
||||
* - finish and release the view-control (#ED_view3d_control_release),
|
||||
* - update the view data (#ED_view3d_cameracontrol_acquire) - within a loop which draws the viewport.
|
||||
* - finish and release the view-control (#ED_view3d_cameracontrol_release),
|
||||
* either keeping the current view or restoring the initial view.
|
||||
*
|
||||
* Notes:
|
||||
|
@ -62,6 +62,10 @@
|
||||
|
||||
#include "transform.h"
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** Internal Data Types
|
||||
* \{ */
|
||||
|
||||
enum eViewProj {
|
||||
VIEW_PROJ_NONE = -1,
|
||||
VIEW_PROJ_ORTHO = 0,
|
||||
@ -137,10 +141,8 @@ struct SnapObjectContext {
|
||||
|
||||
/** \} */
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
/** Common utilities
|
||||
/** Common Utilities
|
||||
* \{ */
|
||||
|
||||
|
||||
@ -260,9 +262,7 @@ static int dm_looptri_to_poly_index(DerivedMesh *dm, const MLoopTri *lt);
|
||||
|
||||
/** \} */
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
/** \name Ray Cast Funcs
|
||||
* \{ */
|
||||
|
||||
@ -789,7 +789,6 @@ static void raycast_obj_cb(SnapObjectContext *sctx, bool is_obedit, Object *ob,
|
||||
* Walks through all objects in the scene to find the `hit` on object surface.
|
||||
*
|
||||
* \param sctx: Snap context to store data.
|
||||
* \param snapdata: struct generated in `set_snapdata`.
|
||||
* \param snap_select : from enum eSnapSelect.
|
||||
* \param use_object_edit_cage : Uses the coordinates of BMesh(if any) to do the snapping.
|
||||
* \param obj_list: List with objects to snap (created in `create_object_list`).
|
||||
@ -846,9 +845,7 @@ static bool raycastObjects(
|
||||
|
||||
/** \} */
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
/** Snap Nearest utilities
|
||||
* \{ */
|
||||
|
||||
@ -1158,9 +1155,7 @@ static float dist_squared_to_projected_aabb_simple(
|
||||
|
||||
/** \} */
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
/** Walk DFS
|
||||
* \{ */
|
||||
|
||||
@ -1256,7 +1251,6 @@ static bool cb_nearest_walk_order(const BVHTreeAxisRange *UNUSED(bounds), char a
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
/** \name Internal Object Snapping API
|
||||
* \{ */
|
||||
|
||||
@ -2080,9 +2074,7 @@ static bool snapObjectsRay(
|
||||
|
||||
/** \} */
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
/** \name Public Object Snapping API
|
||||
* \{ */
|
||||
|
||||
|
@ -182,9 +182,6 @@ void undo_editmode_push(
|
||||
}
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
|
||||
/* helper to remove clean other objects from undo stack */
|
||||
static void undo_clean_stack(bContext *C)
|
||||
{
|
||||
|
@ -57,7 +57,7 @@
|
||||
* \section dna_genfile Overview
|
||||
*
|
||||
* - please note: no builtin security to detect input of double structs
|
||||
* - if you want a struct not to be in DNA file: add two hash marks above it (#<enter>#<enter>)
|
||||
* - if you want a struct not to be in DNA file: add two hash marks above it `(#<enter>#<enter>)`.
|
||||
*
|
||||
* Structure DNA data is added to each blender file and to each executable, this to detect
|
||||
* in .blend files new variables in structs, changed array sizes, etc. It's also used for
|
||||
|
@ -312,7 +312,7 @@ static void rna_Object_active_shape_update(bContext *C, PointerRNA *ptr)
|
||||
switch (ob->type) {
|
||||
case OB_MESH:
|
||||
EDBM_mesh_load(ob);
|
||||
EDBM_mesh_make(scene->toolsettings, ob, true);
|
||||
EDBM_mesh_make(ob, scene->toolsettings->selectmode, true);
|
||||
|
||||
DEG_id_tag_update(ob->data, 0);
|
||||
|
||||
|
@ -4066,6 +4066,7 @@ static const EnumPropertyItem *rna_id_itemf(
|
||||
|
||||
for (; id; id = id->next) {
|
||||
if ((filter_ids != NULL) && filter_ids(user_data, id) == false) {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if (local == false || !ID_IS_LINKED(id)) {
|
||||
|
@ -551,7 +551,7 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm, const char *title, wm
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize #wmWindows without ghostwin, open these and clear.
|
||||
* Initialize #wmWindow without ghostwin, open these and clear.
|
||||
*
|
||||
* window size is read from window, if 0 it uses prefsize
|
||||
* called in #WM_check, also inits stuff after file read.
|
||||
|
@ -243,7 +243,7 @@ void DRW_deferred_shader_remove(struct GPUMaterial *mat) RET_NONE
|
||||
/*new render funcs */
|
||||
void EDBM_selectmode_set(struct BMEditMesh *em) RET_NONE
|
||||
void EDBM_mesh_load(struct Object *ob) RET_NONE
|
||||
void EDBM_mesh_make(struct ToolSettings *ts, struct Object *ob, const bool use_key_index) RET_NONE
|
||||
void EDBM_mesh_make(struct Object *ob, const int select_mode, const bool use_key_index) RET_NONE
|
||||
void EDBM_mesh_normals_update(struct BMEditMesh *em) RET_NONE
|
||||
void *g_system;
|
||||
bool EDBM_uv_check(struct BMEditMesh *em) RET_ZERO
|
||||
|
Loading…
Reference in New Issue
Block a user