forked from bartvdbraak/blender
Cleanup: comment, RNA spelling
This commit is contained in:
parent
12da679fa0
commit
a1ef2e4b16
@ -1133,7 +1133,7 @@ void BlenderSync::sync_mesh_motion(BL::Depsgraph &b_depsgraph,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO(sergey): Perform preliminary check for number of verticies. */
|
/* TODO(sergey): Perform preliminary check for number of vertices. */
|
||||||
if (numverts) {
|
if (numverts) {
|
||||||
/* Find attributes. */
|
/* Find attributes. */
|
||||||
Attribute *attr_mP = mesh->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
|
Attribute *attr_mP = mesh->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
|
||||||
|
@ -38,7 +38,7 @@ class EdgeKey {
|
|||||||
int v2;
|
int v2;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Map from an edge defined by its verticies index to a custom tag value.
|
// Map from an edge defined by its vertices index to a custom tag value.
|
||||||
template<typename T> class EdgeTagMap {
|
template<typename T> class EdgeTagMap {
|
||||||
public:
|
public:
|
||||||
typedef EdgeKey key_type;
|
typedef EdgeKey key_type;
|
||||||
|
@ -378,7 +378,7 @@ bool compareCyclicBackward(const CyclicArray &array_a,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Utility function dedicated for checking whether whether verticies indices
|
// Utility function dedicated for checking whether whether vertices indices
|
||||||
// used by two faces match.
|
// used by two faces match.
|
||||||
// The tricky part here is that we can't trust 1:1 array match here, since it's
|
// The tricky part here is that we can't trust 1:1 array match here, since it's
|
||||||
// possible that OpenSubdiv oriented edges of a face to make it compatible with
|
// possible that OpenSubdiv oriented edges of a face to make it compatible with
|
||||||
@ -386,7 +386,7 @@ bool compareCyclicBackward(const CyclicArray &array_a,
|
|||||||
//
|
//
|
||||||
// TODO(sergey): Check whether this is needed, ot whether OpenSubdiv is only
|
// TODO(sergey): Check whether this is needed, ot whether OpenSubdiv is only
|
||||||
// creating edges in a proper orientation without modifying indices of face
|
// creating edges in a proper orientation without modifying indices of face
|
||||||
// verticies.
|
// vertices.
|
||||||
bool checkVerticesOfFacesMatch(const CyclicArray &indices_a, const CyclicArray &indices_b)
|
bool checkVerticesOfFacesMatch(const CyclicArray &indices_a, const CyclicArray &indices_b)
|
||||||
{
|
{
|
||||||
if (indices_a.size() != indices_a.size()) {
|
if (indices_a.size() != indices_a.size()) {
|
||||||
@ -503,7 +503,7 @@ bool checkEdgeTagsMatchAutoOrient(const OpenSubdiv::Far::TopologyRefiner *topolo
|
|||||||
using OpenSubdiv::Far::TopologyLevel;
|
using OpenSubdiv::Far::TopologyLevel;
|
||||||
const TopologyLevel &base_level = topology_refiner->GetLevel(0);
|
const TopologyLevel &base_level = topology_refiner->GetLevel(0);
|
||||||
const int num_edges = base_level.GetNumEdges();
|
const int num_edges = base_level.GetNumEdges();
|
||||||
// Create mapping for quick lookup of edge index from its verticies indices.
|
// Create mapping for quick lookup of edge index from its vertices indices.
|
||||||
//
|
//
|
||||||
// TODO(sergey): Consider caching it in some sort of wrapper around topology
|
// TODO(sergey): Consider caching it in some sort of wrapper around topology
|
||||||
// refiner.
|
// refiner.
|
||||||
@ -514,7 +514,7 @@ bool checkEdgeTagsMatchAutoOrient(const OpenSubdiv::Far::TopologyRefiner *topolo
|
|||||||
}
|
}
|
||||||
// Compare all edges.
|
// Compare all edges.
|
||||||
for (int converter_edge_index = 0; converter_edge_index < num_edges; ++converter_edge_index) {
|
for (int converter_edge_index = 0; converter_edge_index < num_edges; ++converter_edge_index) {
|
||||||
// Get edge verticies indices, and lookup corresponding edge index in the
|
// Get edge vertices indices, and lookup corresponding edge index in the
|
||||||
// base topology level.
|
// base topology level.
|
||||||
int edge_vertices[2];
|
int edge_vertices[2];
|
||||||
converter->getEdgeVertices(converter, converter_edge_index, edge_vertices);
|
converter->getEdgeVertices(converter, converter_edge_index, edge_vertices);
|
||||||
@ -546,7 +546,7 @@ bool checkvertexSharpnessMatch(const OpenSubdiv::Far::TopologyRefiner *topology_
|
|||||||
using OpenSubdiv::Far::TopologyLevel;
|
using OpenSubdiv::Far::TopologyLevel;
|
||||||
using OpenSubdiv::Sdc::Crease;
|
using OpenSubdiv::Sdc::Crease;
|
||||||
const TopologyLevel &base_level = topology_refiner->GetLevel(0);
|
const TopologyLevel &base_level = topology_refiner->GetLevel(0);
|
||||||
// Create mapping for quick lookup of edge index from its verticies indices.
|
// Create mapping for quick lookup of edge index from its vertices indices.
|
||||||
//
|
//
|
||||||
// TODO(sergey): Consider caching it in some sort of wrapper around topology
|
// TODO(sergey): Consider caching it in some sort of wrapper around topology
|
||||||
// refiner.
|
// refiner.
|
||||||
|
@ -107,7 +107,7 @@ typedef struct SubdivStats {
|
|||||||
double begin_timestamp_[NUM_SUBDIV_STATS_VALUES];
|
double begin_timestamp_[NUM_SUBDIV_STATS_VALUES];
|
||||||
} SubdivStats;
|
} SubdivStats;
|
||||||
|
|
||||||
/* Functor which evaluates dispalcement at a given (u, v) of given ptex face. */
|
/* Functor which evaluates displacement at a given (u, v) of given ptex face. */
|
||||||
typedef struct SubdivDisplacement {
|
typedef struct SubdivDisplacement {
|
||||||
/* Initialize displacement evaluator.
|
/* Initialize displacement evaluator.
|
||||||
*
|
*
|
||||||
@ -205,7 +205,7 @@ Subdiv *BKE_subdiv_new_from_mesh(const SubdivSettings *settings, const struct Me
|
|||||||
* new one is created from scratch.
|
* new one is created from scratch.
|
||||||
*
|
*
|
||||||
* NOTE: It is allowed to pass NULL as an existing subdivision surface
|
* NOTE: It is allowed to pass NULL as an existing subdivision surface
|
||||||
* descriptor. This will create enw descriptor without any extra checks.
|
* descriptor. This will create a new descriptor without any extra checks.
|
||||||
*/
|
*/
|
||||||
Subdiv *BKE_subdiv_update_from_converter(Subdiv *subdiv,
|
Subdiv *BKE_subdiv_update_from_converter(Subdiv *subdiv,
|
||||||
const SubdivSettings *settings,
|
const SubdivSettings *settings,
|
||||||
|
@ -73,8 +73,8 @@ void BKE_subdiv_eval_face_varying(struct Subdiv *subdiv,
|
|||||||
/* NOTE: Expects derivatives to be correct.
|
/* NOTE: Expects derivatives to be correct.
|
||||||
*
|
*
|
||||||
* TODO(sergey): This is currently used together with
|
* TODO(sergey): This is currently used together with
|
||||||
* BKE_subdiv_eval_final_point() which cas easily evaluate derivatives.
|
* BKE_subdiv_eval_final_point() which can easily evaluate derivatives.
|
||||||
* Would be nice to have dispalcement evaluation function which does not require
|
* Would be nice to have displacement evaluation function which does not require
|
||||||
* knowing derivatives ahead of a time. */
|
* knowing derivatives ahead of a time. */
|
||||||
void BKE_subdiv_eval_displacement(struct Subdiv *subdiv,
|
void BKE_subdiv_eval_displacement(struct Subdiv *subdiv,
|
||||||
const int ptex_face_index,
|
const int ptex_face_index,
|
||||||
|
@ -116,8 +116,8 @@ typedef struct SubdivForeachContext {
|
|||||||
SubdivForeachVertexFromCornerCb vertex_every_corner;
|
SubdivForeachVertexFromCornerCb vertex_every_corner;
|
||||||
SubdivForeachVertexFromEdgeCb vertex_every_edge;
|
SubdivForeachVertexFromEdgeCb vertex_every_edge;
|
||||||
/* Those callbacks are run once per subdivision vertex, ptex is undefined
|
/* Those callbacks are run once per subdivision vertex, ptex is undefined
|
||||||
* as in it will be whatever first ptex face happened to be tarversed in
|
* as in it will be whatever first ptex face happened to be traversed in
|
||||||
* the multi-threaded environment ahd which shares "emitting" vertex or
|
* the multi-threaded environment and which shares "emitting" vertex or
|
||||||
* edge.
|
* edge.
|
||||||
*/
|
*/
|
||||||
SubdivForeachVertexFromCornerCb vertex_corner;
|
SubdivForeachVertexFromCornerCb vertex_corner;
|
||||||
@ -159,7 +159,7 @@ typedef struct SubdivForeachContext {
|
|||||||
* Returns truth if the whole topology was traversed, without any early exits.
|
* Returns truth if the whole topology was traversed, without any early exits.
|
||||||
*
|
*
|
||||||
* TODO(sergey): Need to either get rid of subdiv or of coarse_mesh.
|
* TODO(sergey): Need to either get rid of subdiv or of coarse_mesh.
|
||||||
* The main point here is th be abel to get base level topology, which can be
|
* The main point here is to be able to get base level topology, which can be
|
||||||
* done with either of those. Having both of them is kind of redundant.
|
* done with either of those. Having both of them is kind of redundant.
|
||||||
*/
|
*/
|
||||||
bool BKE_subdiv_foreach_subdiv_geometry(struct Subdiv *subdiv,
|
bool BKE_subdiv_foreach_subdiv_geometry(struct Subdiv *subdiv,
|
||||||
|
@ -2363,7 +2363,7 @@ static void armdef_accumulate_bone(bConstraintTarget *ct,
|
|||||||
|
|
||||||
/* The target is a B-Bone:
|
/* The target is a B-Bone:
|
||||||
* FIRST: find the segment (see b_bone_deform in armature.c)
|
* FIRST: find the segment (see b_bone_deform in armature.c)
|
||||||
* Need to transform co back to bonespace, only need y. */
|
* Need to transform co back to bone-space, only need y. */
|
||||||
float y = iamat[0][1] * co[0] + iamat[1][1] * co[1] + iamat[2][1] * co[2] + iamat[3][1];
|
float y = iamat[0][1] * co[0] + iamat[1][1] * co[1] + iamat[2][1] * co[2] + iamat[3][1];
|
||||||
|
|
||||||
/* Blend the matrix. */
|
/* Blend the matrix. */
|
||||||
@ -5238,14 +5238,16 @@ static void con_extern_cb(bConstraint *UNUSED(con),
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* helper for BKE_constraints_copy(),
|
/**
|
||||||
* to be used for making sure that usercounts of copied ID's are fixed up */
|
* Helper for #BKE_constraints_copy(),
|
||||||
|
* to be used for making sure that user-counts of copied ID's are fixed up.
|
||||||
|
*/
|
||||||
static void con_fix_copied_refs_cb(bConstraint *UNUSED(con),
|
static void con_fix_copied_refs_cb(bConstraint *UNUSED(con),
|
||||||
ID **idpoin,
|
ID **idpoin,
|
||||||
bool is_reference,
|
bool is_reference,
|
||||||
void *UNUSED(userData))
|
void *UNUSED(userData))
|
||||||
{
|
{
|
||||||
/* increment usercount if this is a reference type */
|
/* Increment user-count if this is a reference type. */
|
||||||
if ((*idpoin) && (is_reference)) {
|
if ((*idpoin) && (is_reference)) {
|
||||||
id_us_plus(*idpoin);
|
id_us_plus(*idpoin);
|
||||||
}
|
}
|
||||||
|
@ -148,9 +148,8 @@ static void get_sequence_fname(const MovieClip *clip, const int framenr, char *n
|
|||||||
BLI_strncpy(name, clip->name, sizeof(clip->name));
|
BLI_strncpy(name, clip->name, sizeof(clip->name));
|
||||||
BLI_stringdec(name, head, tail, &numlen);
|
BLI_stringdec(name, head, tail, &numlen);
|
||||||
|
|
||||||
/* movieclips always points to first image from sequence,
|
/* Movie-clips always points to first image from sequence, auto-guess offset for now.
|
||||||
* autoguess offset for now. could be something smarter in the future
|
* Could be something smarter in the future. */
|
||||||
*/
|
|
||||||
offset = sequence_guess_offset(clip->name, strlen(head), numlen);
|
offset = sequence_guess_offset(clip->name, strlen(head), numlen);
|
||||||
|
|
||||||
if (numlen) {
|
if (numlen) {
|
||||||
|
@ -812,7 +812,7 @@ static bool multires_reshape_from_vertcos(struct Depsgraph *depsgraph,
|
|||||||
Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
|
Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
|
||||||
Mesh *coarse_mesh = object->data;
|
Mesh *coarse_mesh = object->data;
|
||||||
MDisps *mdisps = CustomData_get_layer(&coarse_mesh->ldata, CD_MDISPS);
|
MDisps *mdisps = CustomData_get_layer(&coarse_mesh->ldata, CD_MDISPS);
|
||||||
/* Pick maximum between multires level and dispalcement level.
|
/* Pick maximum between multires level and displacement level.
|
||||||
* This is because mesh can be used by objects with multires at different
|
* This is because mesh can be used by objects with multires at different
|
||||||
* levels.
|
* levels.
|
||||||
*
|
*
|
||||||
@ -1017,7 +1017,7 @@ bool multiresModifier_reshapeFromCCG(const int tot_level, Mesh *coarse_mesh, Sub
|
|||||||
}
|
}
|
||||||
GridPaintMask *grid_paint_mask = CustomData_get_layer(&coarse_mesh->ldata, CD_GRID_PAINT_MASK);
|
GridPaintMask *grid_paint_mask = CustomData_get_layer(&coarse_mesh->ldata, CD_GRID_PAINT_MASK);
|
||||||
Subdiv *subdiv = subdiv_ccg->subdiv;
|
Subdiv *subdiv = subdiv_ccg->subdiv;
|
||||||
/* Pick maximum between multires level and dispalcement level.
|
/* Pick maximum between multires level and displacement level.
|
||||||
* This is because mesh can be used by objects with multires at different
|
* This is because mesh can be used by objects with multires at different
|
||||||
* levels.
|
* levels.
|
||||||
*
|
*
|
||||||
|
@ -83,7 +83,8 @@ BLI_INLINE void sound_verify_evaluated_id(ID *id)
|
|||||||
* Additionally, we also allow data-blocks outside of main database. Those can not be "original"
|
* Additionally, we also allow data-blocks outside of main database. Those can not be "original"
|
||||||
* and could be used as a temporary evaluated result during operations like baking.
|
* and could be used as a temporary evaluated result during operations like baking.
|
||||||
*
|
*
|
||||||
* NOTE: We conder ID evaluated if ANY of those flags is set. We do NOT require ALL of them. */
|
* NOTE: We consider ID evaluated if ANY of those flags is set. We do NOT require ALL of them.
|
||||||
|
*/
|
||||||
BLI_assert(id->tag &
|
BLI_assert(id->tag &
|
||||||
(LIB_TAG_COPIED_ON_WRITE | LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT | LIB_TAG_NO_MAIN));
|
(LIB_TAG_COPIED_ON_WRITE | LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT | LIB_TAG_NO_MAIN));
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ typedef struct SubdivMeshContext {
|
|||||||
* Averaging is happening for vertices along the coarse edges and corners.
|
* Averaging is happening for vertices along the coarse edges and corners.
|
||||||
* This is needed for both displacement and normals.
|
* This is needed for both displacement and normals.
|
||||||
*
|
*
|
||||||
* Displacement is being accumulated to a verticies coordinates, since those
|
* Displacement is being accumulated to a vertices coordinates, since those
|
||||||
* are not needed during traversal of edge/corner vertices.
|
* are not needed during traversal of edge/corner vertices.
|
||||||
*
|
*
|
||||||
* For normals we are using dedicated array, since we can not use same
|
* For normals we are using dedicated array, since we can not use same
|
||||||
@ -169,7 +169,7 @@ static void loops_of_ptex_get(const SubdivMeshContext *ctx,
|
|||||||
typedef struct VerticesForInterpolation {
|
typedef struct VerticesForInterpolation {
|
||||||
/* This field points to a vertex data which is to be used for interpolation.
|
/* This field points to a vertex data which is to be used for interpolation.
|
||||||
* The idea is to avoid unnecessary allocations for regular faces, where
|
* The idea is to avoid unnecessary allocations for regular faces, where
|
||||||
* we can simply use corner verticies. */
|
* we can simply use corner vertices. */
|
||||||
const CustomData *vertex_data;
|
const CustomData *vertex_data;
|
||||||
/* Vertices data calculated for ptex corners. There are always 4 elements
|
/* Vertices data calculated for ptex corners. There are always 4 elements
|
||||||
* in this custom data, aligned the following way:
|
* in this custom data, aligned the following way:
|
||||||
@ -182,7 +182,7 @@ typedef struct VerticesForInterpolation {
|
|||||||
* Is allocated for non-regular faces (triangles and n-gons). */
|
* Is allocated for non-regular faces (triangles and n-gons). */
|
||||||
CustomData vertex_data_storage;
|
CustomData vertex_data_storage;
|
||||||
bool vertex_data_storage_allocated;
|
bool vertex_data_storage_allocated;
|
||||||
/* Infices within vertex_data to interpolate for. The indices are aligned
|
/* Indices within vertex_data to interpolate for. The indices are aligned
|
||||||
* with uv coordinates in a similar way as indices in loop_data_storage. */
|
* with uv coordinates in a similar way as indices in loop_data_storage. */
|
||||||
int vertex_indices[4];
|
int vertex_indices[4];
|
||||||
} VerticesForInterpolation;
|
} VerticesForInterpolation;
|
||||||
@ -302,7 +302,7 @@ static void vertex_interpolation_end(VerticesForInterpolation *vertex_interpolat
|
|||||||
typedef struct LoopsForInterpolation {
|
typedef struct LoopsForInterpolation {
|
||||||
/* This field points to a loop data which is to be used for interpolation.
|
/* This field points to a loop data which is to be used for interpolation.
|
||||||
* The idea is to avoid unnecessary allocations for regular faces, where
|
* The idea is to avoid unnecessary allocations for regular faces, where
|
||||||
* we can simply interpolate corner verticies. */
|
* we can simply interpolate corner vertices. */
|
||||||
const CustomData *loop_data;
|
const CustomData *loop_data;
|
||||||
/* Loops data calculated for ptex corners. There are always 4 elements
|
/* Loops data calculated for ptex corners. There are always 4 elements
|
||||||
* in this custom data, aligned the following way:
|
* in this custom data, aligned the following way:
|
||||||
@ -1092,7 +1092,7 @@ static void setup_foreach_callbacks(const SubdivMeshContext *subdiv_context,
|
|||||||
memset(foreach_context, 0, sizeof(*foreach_context));
|
memset(foreach_context, 0, sizeof(*foreach_context));
|
||||||
/* General information. */
|
/* General information. */
|
||||||
foreach_context->topology_info = subdiv_mesh_topology_info;
|
foreach_context->topology_info = subdiv_mesh_topology_info;
|
||||||
/* Every boundary geometry. Used for dispalcement and normals averaging. */
|
/* Every boundary geometry. Used for displacement and normals averaging. */
|
||||||
if (subdiv_context->can_evaluate_normals || subdiv_context->have_displacement) {
|
if (subdiv_context->can_evaluate_normals || subdiv_context->have_displacement) {
|
||||||
foreach_context->vertex_every_corner = subdiv_mesh_vertex_every_corner;
|
foreach_context->vertex_every_corner = subdiv_mesh_vertex_every_corner;
|
||||||
foreach_context->vertex_every_edge = subdiv_mesh_vertex_every_edge;
|
foreach_context->vertex_every_edge = subdiv_mesh_vertex_every_edge;
|
||||||
|
@ -577,7 +577,7 @@ void blo_split_main(ListBase *mainlist, Main *main)
|
|||||||
while (i--) {
|
while (i--) {
|
||||||
ID *id = lbarray[i]->first;
|
ID *id = lbarray[i]->first;
|
||||||
if (id == NULL || GS(id->name) == ID_LI) {
|
if (id == NULL || GS(id->name) == ID_LI) {
|
||||||
/* No ID_LI datablock should ever be linked anyway, but just in case, better be explicit. */
|
/* No ID_LI data-lock should ever be linked anyway, but just in case, better be explicit. */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
split_libdata(lbarray[i], lib_main_array, lib_main_array_len);
|
split_libdata(lbarray[i], lib_main_array, lib_main_array_len);
|
||||||
@ -1722,7 +1722,7 @@ static void *newdataadr_no_us(FileData *fd, const void *adr) /* only direct data
|
|||||||
return oldnewmap_lookup_and_inc(fd->datamap, adr, false);
|
return oldnewmap_lookup_and_inc(fd->datamap, adr, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *newglobadr(FileData *fd, const void *adr) /* direct datablocks with global linking */
|
static void *newglobadr(FileData *fd, const void *adr) /* direct data-locks with global linking */
|
||||||
{
|
{
|
||||||
return oldnewmap_lookup_and_inc(fd->globmap, adr, true);
|
return oldnewmap_lookup_and_inc(fd->globmap, adr, true);
|
||||||
}
|
}
|
||||||
@ -2657,9 +2657,9 @@ static void direct_link_id(FileData *fd, ID *id)
|
|||||||
}
|
}
|
||||||
id->py_instance = NULL;
|
id->py_instance = NULL;
|
||||||
|
|
||||||
/* That way datablock reading not going through main read_libblock()
|
/* That way data-lock reading not going through main read_libblock()
|
||||||
* function are still in a clear tag state.
|
* function are still in a clear tag state.
|
||||||
* (glowering at certain nodetree fake datablock here...). */
|
* (glowering at certain nodetree fake data-lock here...). */
|
||||||
id->tag = 0;
|
id->tag = 0;
|
||||||
|
|
||||||
/* Link direct data of overrides. */
|
/* Link direct data of overrides. */
|
||||||
@ -5033,8 +5033,8 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
|
|||||||
mesh->adt = newdataadr(fd, mesh->adt);
|
mesh->adt = newdataadr(fd, mesh->adt);
|
||||||
direct_link_animdata(fd, mesh->adt);
|
direct_link_animdata(fd, mesh->adt);
|
||||||
|
|
||||||
/* normally direct_link_dverts should be called in direct_link_customdata,
|
/* Normally direct_link_dverts should be called in direct_link_customdata,
|
||||||
* but for backwards compat in do_versions to work we do it here */
|
* but for backwards compatibility in do_versions to work we do it here. */
|
||||||
direct_link_dverts(fd, mesh->totvert, mesh->dvert);
|
direct_link_dverts(fd, mesh->totvert, mesh->dvert);
|
||||||
|
|
||||||
direct_link_customdata(fd, &mesh->vdata, mesh->totvert);
|
direct_link_customdata(fd, &mesh->vdata, mesh->totvert);
|
||||||
@ -6083,7 +6083,7 @@ static void direct_link_layer_collections(FileData *fd, ListBase *lb, bool maste
|
|||||||
lc->scene_collection = newdataadr(fd, lc->scene_collection);
|
lc->scene_collection = newdataadr(fd, lc->scene_collection);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Master collection is not a real datablock. */
|
/* Master collection is not a real data-lock. */
|
||||||
if (master) {
|
if (master) {
|
||||||
lc->collection = newdataadr(fd, lc->collection);
|
lc->collection = newdataadr(fd, lc->collection);
|
||||||
}
|
}
|
||||||
@ -6117,7 +6117,7 @@ static void lib_link_layer_collection(FileData *fd,
|
|||||||
LayerCollection *layer_collection,
|
LayerCollection *layer_collection,
|
||||||
bool master)
|
bool master)
|
||||||
{
|
{
|
||||||
/* Master collection is not a real datablock. */
|
/* Master collection is not a real data-lock. */
|
||||||
if (!master) {
|
if (!master) {
|
||||||
layer_collection->collection = newlibadr(fd, lib, layer_collection->collection);
|
layer_collection->collection = newlibadr(fd, lib, layer_collection->collection);
|
||||||
}
|
}
|
||||||
@ -6981,7 +6981,7 @@ static void direct_link_scene(FileData *fd, Scene *sce)
|
|||||||
/* relink's grease pencil data's refs */
|
/* relink's grease pencil data's refs */
|
||||||
static void lib_link_gpencil(FileData *fd, Main *main)
|
static void lib_link_gpencil(FileData *fd, Main *main)
|
||||||
{
|
{
|
||||||
/* Relink all datablock linked by GP datablock */
|
/* Relink all data-lock linked by GP data-lock */
|
||||||
for (bGPdata *gpd = main->gpencils.first; gpd; gpd = gpd->id.next) {
|
for (bGPdata *gpd = main->gpencils.first; gpd; gpd = gpd->id.next) {
|
||||||
if (gpd->id.tag & LIB_TAG_NEED_LINK) {
|
if (gpd->id.tag & LIB_TAG_NEED_LINK) {
|
||||||
/* Layers */
|
/* Layers */
|
||||||
@ -6990,7 +6990,7 @@ static void lib_link_gpencil(FileData *fd, Main *main)
|
|||||||
gpl->parent = newlibadr(fd, gpd->id.lib, gpl->parent);
|
gpl->parent = newlibadr(fd, gpd->id.lib, gpl->parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Datablock Stuff */
|
/* Data-block Stuff */
|
||||||
IDP_LibLinkProperty(gpd->id.properties, fd);
|
IDP_LibLinkProperty(gpd->id.properties, fd);
|
||||||
lib_link_animdata(fd, &gpd->id, gpd->adt);
|
lib_link_animdata(fd, &gpd->id, gpd->adt);
|
||||||
|
|
||||||
@ -9123,7 +9123,7 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, const int ta
|
|||||||
|
|
||||||
/* this case cannot be direct_linked: it's just the ID part */
|
/* this case cannot be direct_linked: it's just the ID part */
|
||||||
if (bhead->code == ID_LINK_PLACEHOLDER) {
|
if (bhead->code == ID_LINK_PLACEHOLDER) {
|
||||||
/* That way, we know which datablock needs do_versions (required currently for linking). */
|
/* That way, we know which data-lock needs do_versions (required currently for linking). */
|
||||||
id->tag = tag | LIB_TAG_NEED_LINK | LIB_TAG_NEW;
|
id->tag = tag | LIB_TAG_NEED_LINK | LIB_TAG_NEW;
|
||||||
|
|
||||||
return blo_bhead_next(fd, bhead);
|
return blo_bhead_next(fd, bhead);
|
||||||
@ -9138,7 +9138,7 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, const int ta
|
|||||||
/* init pointers direct data */
|
/* init pointers direct data */
|
||||||
direct_link_id(fd, id);
|
direct_link_id(fd, id);
|
||||||
|
|
||||||
/* That way, we know which datablock needs do_versions (required currently for linking). */
|
/* That way, we know which data-lock needs do_versions (required currently for linking). */
|
||||||
/* Note: doing this after driect_link_id(), which resets that field. */
|
/* Note: doing this after driect_link_id(), which resets that field. */
|
||||||
id->tag = tag | LIB_TAG_NEED_LINK | LIB_TAG_NEW;
|
id->tag = tag | LIB_TAG_NEED_LINK | LIB_TAG_NEW;
|
||||||
|
|
||||||
@ -9918,7 +9918,7 @@ static void expand_doit_library(void *fdhandle, Main *mainvar, void *old)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (bhead->code == ID_LINK_PLACEHOLDER) {
|
if (bhead->code == ID_LINK_PLACEHOLDER) {
|
||||||
/* Placeholder link to datablock in another library. */
|
/* Placeholder link to data-lock in another library. */
|
||||||
BHead *bheadlib = find_previous_lib(fd, bhead);
|
BHead *bheadlib = find_previous_lib(fd, bhead);
|
||||||
if (bheadlib == NULL) {
|
if (bheadlib == NULL) {
|
||||||
return;
|
return;
|
||||||
@ -9964,7 +9964,7 @@ static void expand_doit_library(void *fdhandle, Main *mainvar, void *old)
|
|||||||
*/
|
*/
|
||||||
oldnewmap_insert(fd->libmap, bhead->old, id, bhead->code);
|
oldnewmap_insert(fd->libmap, bhead->old, id, bhead->code);
|
||||||
|
|
||||||
/* If "id" is a real datablock and not a placeholder, we need to
|
/* If "id" is a real data-lock and not a placeholder, we need to
|
||||||
* update fd->libmap to replace ID_LINK_PLACEHOLDER with the real
|
* update fd->libmap to replace ID_LINK_PLACEHOLDER with the real
|
||||||
* ID_* code.
|
* ID_* code.
|
||||||
*
|
*
|
||||||
@ -9984,7 +9984,7 @@ static void expand_doit_library(void *fdhandle, Main *mainvar, void *old)
|
|||||||
MEM_freeN(lib);
|
MEM_freeN(lib);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Datablock in same library. */
|
/* Data-block in same library. */
|
||||||
/* In 2.50+ file identifier for screens is patched, forward compatibility. */
|
/* In 2.50+ file identifier for screens is patched, forward compatibility. */
|
||||||
if (bhead->code == ID_SCRN) {
|
if (bhead->code == ID_SCRN) {
|
||||||
bhead->code = ID_SCR;
|
bhead->code = ID_SCR;
|
||||||
@ -11811,11 +11811,11 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
|
|||||||
do_it = true;
|
do_it = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read linked datablocks for each link placeholder, and replace
|
/* Read linked data-locks for each link placeholder, and replace
|
||||||
* the placeholder with the real datablock. */
|
* the placeholder with the real data-lock. */
|
||||||
read_library_linked_ids(basefd, fd, mainlist, mainptr);
|
read_library_linked_ids(basefd, fd, mainlist, mainptr);
|
||||||
|
|
||||||
/* Test if linked datablocks need to read further linked datablocks
|
/* Test if linked data-locks need to read further linked data-locks
|
||||||
* and create link placeholders for them. */
|
* and create link placeholders for them. */
|
||||||
BLO_expand_main(fd, mainptr);
|
BLO_expand_main(fd, mainptr);
|
||||||
}
|
}
|
||||||
@ -11824,7 +11824,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
|
|||||||
|
|
||||||
Main *main_newid = BKE_main_new();
|
Main *main_newid = BKE_main_new();
|
||||||
for (Main *mainptr = mainl->next; mainptr; mainptr = mainptr->next) {
|
for (Main *mainptr = mainl->next; mainptr; mainptr = mainptr->next) {
|
||||||
/* Do versioning for newly added linked datablocks. If no datablocks
|
/* Do versioning for newly added linked data-locks. If no data-locks
|
||||||
* were read from a library versionfile will still be zero and we can
|
* were read from a library versionfile will still be zero and we can
|
||||||
* skip it. */
|
* skip it. */
|
||||||
if (mainptr->versionfile) {
|
if (mainptr->versionfile) {
|
||||||
|
@ -1659,8 +1659,8 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (tex = bmain->textures.first; tex; tex = tex->id.next) {
|
for (tex = bmain->textures.first; tex; tex = tex->id.next) {
|
||||||
/* if youre picky, this isn't correct until we do a version bump
|
/* If you're picky, this isn't correct until we do a version bump
|
||||||
* since you could set saturation to be 0.0*/
|
* since you could set saturation to be 0.0. */
|
||||||
if (tex->saturation == 0.0f) {
|
if (tex->saturation == 0.0f) {
|
||||||
tex->saturation = 1.0f;
|
tex->saturation = 1.0f;
|
||||||
}
|
}
|
||||||
@ -2030,8 +2030,8 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Externl group node socket need to adjust their own_index to point at
|
/* External group node socket need to adjust their own_index to point at
|
||||||
* associated ntree inputs/outputs internal sockets. This happens in
|
* associated 'ntree' inputs/outputs internal sockets. This happens in
|
||||||
* do_versions_after_linking_250, after lib linking. */
|
* do_versions_after_linking_250, after lib linking. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
#include "BLO_readfile.h"
|
#include "BLO_readfile.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override values in in-memory startup.blend, avoids resaving for small changes.
|
* Override values in in-memory startup.blend, avoids re-saving for small changes.
|
||||||
*/
|
*/
|
||||||
void BLO_update_defaults_userpref_blend(void)
|
void BLO_update_defaults_userpref_blend(void)
|
||||||
{
|
{
|
||||||
|
@ -369,7 +369,7 @@ class BoneExtended {
|
|||||||
typedef std::map<std::string, BoneExtended *> BoneExtensionMap;
|
typedef std::map<std::string, BoneExtended *> BoneExtensionMap;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A class to organise bone extendion data for multiple Armatures.
|
* A class to organize bone extension data for multiple Armatures.
|
||||||
* this is needed for the case where a Collada file contains 2 or more
|
* this is needed for the case where a Collada file contains 2 or more
|
||||||
* separate armatures.
|
* separate armatures.
|
||||||
*/
|
*/
|
||||||
|
@ -125,11 +125,11 @@ typedef enum eDepsObjectComponentType {
|
|||||||
/* Geometry Component (Mesh/Displist) */
|
/* Geometry Component (Mesh/Displist) */
|
||||||
DEG_OB_COMP_GEOMETRY,
|
DEG_OB_COMP_GEOMETRY,
|
||||||
|
|
||||||
/* Evaluation-Related Outer Types (with Subdata) */
|
/* Evaluation-Related Outer Types (with Sub-data) */
|
||||||
|
|
||||||
/* Pose Component - Owner/Container of Bones Eval */
|
/* Pose Component - Owner/Container of Bones Eval */
|
||||||
DEG_OB_COMP_EVAL_POSE,
|
DEG_OB_COMP_EVAL_POSE,
|
||||||
/* Bone Component - Child/Subcomponent of Pose */
|
/* Bone Component - Child/Sub-component of Pose */
|
||||||
DEG_OB_COMP_BONE,
|
DEG_OB_COMP_BONE,
|
||||||
|
|
||||||
/* Material Shading Component */
|
/* Material Shading Component */
|
||||||
@ -162,7 +162,7 @@ void DEG_add_generic_id_relation(struct DepsNodeHandle *node_handle,
|
|||||||
const char *description);
|
const char *description);
|
||||||
|
|
||||||
/* Special function which is used from modifiers' updateDepsgraph() callback
|
/* Special function which is used from modifiers' updateDepsgraph() callback
|
||||||
* to indicate that the modifietr needs to know transformation of the object
|
* to indicate that the modifier needs to know transformation of the object
|
||||||
* which that modifier belongs to.
|
* which that modifier belongs to.
|
||||||
* This function will take care of checking which operation is required to
|
* This function will take care of checking which operation is required to
|
||||||
* have transformation for the modifier, taking into account possible simulation
|
* have transformation for the modifier, taking into account possible simulation
|
||||||
|
@ -55,7 +55,7 @@ void DepsgraphNodeBuilder::build_scene_parameters(Scene *scene)
|
|||||||
add_operation_node(&scene->id, NodeType::PARAMETERS, OperationCode::PARAMETERS_EVAL);
|
add_operation_node(&scene->id, NodeType::PARAMETERS, OperationCode::PARAMETERS_EVAL);
|
||||||
/* NOTE: This is a bit overkill and can potentially pull a bit too much into the graph, but:
|
/* NOTE: This is a bit overkill and can potentially pull a bit too much into the graph, but:
|
||||||
*
|
*
|
||||||
* - We definitely need an ID node for the scene's compositor, othetrwise re-mapping will no
|
* - We definitely need an ID node for the scene's compositor, otherwise re-mapping will no
|
||||||
* happen correct and we will risk remapping pointers in the main database.
|
* happen correct and we will risk remapping pointers in the main database.
|
||||||
* - Alternatively, we should discard compositor tree, but this might cause other headache like
|
* - Alternatively, we should discard compositor tree, but this might cause other headache like
|
||||||
* drivers which are coming from the tree.
|
* drivers which are coming from the tree.
|
||||||
|
@ -867,7 +867,7 @@ void DepsgraphRelationBuilder::build_object_parent(Object *object)
|
|||||||
if (object->type == OB_MBALL && parent->transflag & OB_DUPLI) {
|
if (object->type == OB_MBALL && parent->transflag & OB_DUPLI) {
|
||||||
ComponentKey parent_geometry_key(parent_id, NodeType::GEOMETRY);
|
ComponentKey parent_geometry_key(parent_id, NodeType::GEOMETRY);
|
||||||
/* NOTE: Metaballs are evaluating geometry only after their transform,
|
/* NOTE: Metaballs are evaluating geometry only after their transform,
|
||||||
* so we onl;y hook up to transform channel here. */
|
* so we only hook up to transform channel here. */
|
||||||
add_relation(parent_geometry_key, ob_key, "Parent");
|
add_relation(parent_geometry_key, ob_key, "Parent");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1587,8 +1587,7 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
|
|||||||
&object->id, NodeType::TRANSFORM, OperationCode::RIGIDBODY_TRANSFORM_COPY);
|
&object->id, NodeType::TRANSFORM, OperationCode::RIGIDBODY_TRANSFORM_COPY);
|
||||||
/* Rigid body synchronization depends on the actual simulation. */
|
/* Rigid body synchronization depends on the actual simulation. */
|
||||||
add_relation(rb_simulate_key, rb_transform_copy_key, "Rigidbody Sim Eval -> RBO Sync");
|
add_relation(rb_simulate_key, rb_transform_copy_key, "Rigidbody Sim Eval -> RBO Sync");
|
||||||
/* Simulation uses object transformation after parenting and solving
|
/* Simulation uses object transformation after parenting and solving constraints. */
|
||||||
* contraints. */
|
|
||||||
OperationKey object_transform_simulation_init_key(
|
OperationKey object_transform_simulation_init_key(
|
||||||
&object->id, NodeType::TRANSFORM, OperationCode::TRANSFORM_SIMULATION_INIT);
|
&object->id, NodeType::TRANSFORM, OperationCode::TRANSFORM_SIMULATION_INIT);
|
||||||
OperationKey object_transform_eval_key(
|
OperationKey object_transform_eval_key(
|
||||||
|
@ -301,11 +301,11 @@ typedef struct ParticleSettings {
|
|||||||
} ParticleSettings;
|
} ParticleSettings;
|
||||||
|
|
||||||
typedef struct ParticleSystem {
|
typedef struct ParticleSystem {
|
||||||
/* note1: make sure all (runtime) are NULL's in 'copy_particlesystem' XXX,
|
/* note1: make sure all (run-time) are NULL's in 'copy_particlesystem' XXX,
|
||||||
* this function is no more! - need to invstigate */
|
* this function is no more! - need to investigate. */
|
||||||
|
|
||||||
/* note2: make sure any uses of this struct in DNA are
|
/* note2: make sure any uses of this struct in DNA are
|
||||||
* accounted for in 'BKE_object_copy_particlesystems' */
|
* accounted for in 'BKE_object_copy_particlesystems'. */
|
||||||
|
|
||||||
struct ParticleSystem *next, *prev;
|
struct ParticleSystem *next, *prev;
|
||||||
|
|
||||||
|
@ -5568,8 +5568,8 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
|
|||||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSAVE);
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSAVE);
|
||||||
RNA_def_property_ui_text(prop,
|
RNA_def_property_ui_text(prop,
|
||||||
"Auto Save Temporary Files",
|
"Auto Save Temporary Files",
|
||||||
"Automatic saving of temporary files in temp directory, uses process "
|
"Automatic saving of temporary files in temp directory, "
|
||||||
"ID (Sculpt or edit mode data won't be saved!')");
|
"uses process ID (sculpt & edit-mode data won't be saved!)");
|
||||||
RNA_def_property_update(prop, 0, "rna_userdef_autosave_update");
|
RNA_def_property_update(prop, 0, "rna_userdef_autosave_update");
|
||||||
|
|
||||||
prop = RNA_def_property(srna, "auto_save_time", PROP_INT, PROP_NONE);
|
prop = RNA_def_property(srna, "auto_save_time", PROP_INT, PROP_NONE);
|
||||||
|
Loading…
Reference in New Issue
Block a user