forked from bartvdbraak/blender
Cleanup: comment blocks
This commit is contained in:
parent
39dee8a201
commit
8343518272
@ -184,7 +184,7 @@ void Object::apply_transform(bool apply_to_motion)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* tfm is not reset to identity, all code that uses it needs to check the
|
/* tfm is not reset to identity, all code that uses it needs to check the
|
||||||
transform_applied boolean */
|
* transform_applied boolean */
|
||||||
}
|
}
|
||||||
|
|
||||||
void Object::tag_update(Scene *scene)
|
void Object::tag_update(Scene *scene)
|
||||||
|
@ -1985,9 +1985,8 @@ GHOST_TSuccess GHOST_SystemX11::pushDragDropEvent(GHOST_TEventType eventType,
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/*
|
/**
|
||||||
* These callbacks can be used for debugging, so we can breakpoint on an X11 error.
|
* These callbacks can be used for debugging, so we can breakpoint on an X11 error.
|
||||||
|
|
||||||
*
|
*
|
||||||
* Dummy function to get around IO Handler exiting if device invalid
|
* Dummy function to get around IO Handler exiting if device invalid
|
||||||
* Basically it will not crash blender now if you have a X device that
|
* Basically it will not crash blender now if you have a X device that
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
* Copyright (C) 2001 NaN Technologies B.V.
|
* Copyright (C) 2001 NaN Technologies B.V.
|
||||||
* Simple test of memory.
|
* Simple test of memory.
|
||||||
*/
|
*/
|
||||||
|
@ -3472,7 +3472,7 @@ static void ccgDM_drawFacesTex_common(DerivedMesh *dm,
|
|||||||
|
|
||||||
if (!flush && compareDrawOptions) {
|
if (!flush && compareDrawOptions) {
|
||||||
/* also compare draw options and flush buffer if they're different
|
/* also compare draw options and flush buffer if they're different
|
||||||
* need for face selection highlight in edit mode */
|
* need for face selection highlight in edit mode */
|
||||||
flush |= compareDrawOptions(userData, actualFace, next_actualFace) == 0;
|
flush |= compareDrawOptions(userData, actualFace, next_actualFace) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ typedef struct PathLinkState {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
\name Min Dist Dir Util
|
\name Min Dist Dir Util
|
||||||
|
*
|
||||||
* Simply getting the closest intersecting vert/edge is _not_ good enough. see T43792
|
* Simply getting the closest intersecting vert/edge is _not_ good enough. see T43792
|
||||||
* we need to get the closest in both directions since the absolute closest may be a dead-end.
|
* we need to get the closest in both directions since the absolute closest may be a dead-end.
|
||||||
*
|
*
|
||||||
|
@ -539,8 +539,8 @@ void BoneExtended::set_bone_layers(std::string layerString, std::vector<std::str
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If numeric layers and labeled layers are used in parallel (unlikely),
|
/* If numeric layers and labeled layers are used in parallel (unlikely),
|
||||||
we get a potential mixup. Just leave as is for now.
|
* we get a potential mixup. Just leave as is for now.
|
||||||
*/
|
*/
|
||||||
this->bone_layers = bc_set_layer(this->bone_layers, pos);
|
this->bone_layers = bc_set_layer(this->bone_layers, pos);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
* Copyright 2012, Blender Foundation.
|
* Copyright 2012, Blender Foundation.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -1138,7 +1138,7 @@ static bool ui_but_event_property_operator_string(const bContext *C, uiBut *but,
|
|||||||
* as new items are added to the menu later on. It also optimises efficiency -
|
* as new items are added to the menu later on. It also optimises efficiency -
|
||||||
* a radial menu is best kept symmetrical, with as large an angle between
|
* a radial menu is best kept symmetrical, with as large an angle between
|
||||||
* items as possible, so that the gestural mouse movements can be fast and inexact.
|
* items as possible, so that the gestural mouse movements can be fast and inexact.
|
||||||
|
*
|
||||||
* It starts off with two opposite sides for the first two items
|
* It starts off with two opposite sides for the first two items
|
||||||
* then joined by the one below for the third (this way, even with three items,
|
* then joined by the one below for the third (this way, even with three items,
|
||||||
* the menu seems to still be 'in order' reading left to right). Then the fourth is
|
* the menu seems to still be 'in order' reading left to right). Then the fourth is
|
||||||
|
@ -3538,8 +3538,10 @@ static int vgroup_sort_name(const void *def_a_ptr, const void *def_b_ptr)
|
|||||||
return BLI_natstrcmp(def_a->name, def_b->name);
|
return BLI_natstrcmp(def_a->name, def_b->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sorts the weight groups according to the bone hierarchy of the
|
/**
|
||||||
associated armature (similar to how bones are ordered in the Outliner) */
|
* Sorts the weight groups according to the bone hierarchy of the
|
||||||
|
* associated armature (similar to how bones are ordered in the Outliner)
|
||||||
|
*/
|
||||||
static void vgroup_sort_bone_hierarchy(Object *ob, ListBase *bonebase)
|
static void vgroup_sort_bone_hierarchy(Object *ob, ListBase *bonebase)
|
||||||
{
|
{
|
||||||
if (bonebase == NULL) {
|
if (bonebase == NULL) {
|
||||||
|
@ -537,7 +537,7 @@ void ED_view3d_win_to_delta(const ARegion *ar, const float mval[2], float out[3]
|
|||||||
* \note Orthographic views have a less obvious origin,
|
* \note Orthographic views have a less obvious origin,
|
||||||
* Since far clip can be a very large value resulting in numeric precision issues,
|
* Since far clip can be a very large value resulting in numeric precision issues,
|
||||||
* the origin in this case is close to zero coordinate.
|
* the origin in this case is close to zero coordinate.
|
||||||
|
*
|
||||||
* \param ar The region (used for the window width and height).
|
* \param ar The region (used for the window width and height).
|
||||||
* \param mval The area relative 2d location (such as event->mval converted to floats).
|
* \param mval The area relative 2d location (such as event->mval converted to floats).
|
||||||
* \param out The resulting normalized world-space direction vector.
|
* \param out The resulting normalized world-space direction vector.
|
||||||
|
@ -219,12 +219,12 @@ static void raycast_all_cb(void *userdata, int index, const BVHTreeRay *ray, BVH
|
|||||||
/* -------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
/** \Common utilities
|
/** \Common utilities
|
||||||
* \{ */
|
* \{ */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct that kepts basic information about a BVHTree build from a editmesh
|
* Struct that kepts basic information about a BVHTree build from a editmesh.
|
||||||
*/
|
*/
|
||||||
typedef struct BVHTreeFromMeshType {
|
typedef struct BVHTreeFromMeshType {
|
||||||
void *userdata;
|
void *userdata;
|
||||||
char type;
|
char type;
|
||||||
@ -253,11 +253,11 @@ static void precalc_project(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* From a threshold (maximum distance to snap in pixels) returns:
|
* From a threshold (maximum distance to snap in pixels) returns:
|
||||||
*
|
*
|
||||||
* - The *real* distance (3D) if you are in orthographic-view.
|
* - The *real* distance (3D) if you are in orthographic-view.
|
||||||
* - The *tangent* (view cone radius at distance 1.0) if you are in perspective-view.
|
* - The *tangent* (view cone radius at distance 1.0) if you are in perspective-view.
|
||||||
*/
|
*/
|
||||||
static float dist_px_to_dist3d_or_tangent(const ARegion *ar, const float dist_px)
|
static float dist_px_to_dist3d_or_tangent(const ARegion *ar, const float dist_px)
|
||||||
{
|
{
|
||||||
const RegionView3D *rv3d = ar->regiondata;
|
const RegionView3D *rv3d = ar->regiondata;
|
||||||
@ -470,7 +470,7 @@ static bool test_projected_edge_dist(
|
|||||||
/* -------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
/** \Walk DFS
|
/** \Walk DFS
|
||||||
* \{ */
|
* \{ */
|
||||||
typedef struct Object_Nearest2dPrecalc {
|
typedef struct Object_Nearest2dPrecalc {
|
||||||
float ray_origin_local[3];
|
float ray_origin_local[3];
|
||||||
float ray_direction_local[3];
|
float ray_direction_local[3];
|
||||||
@ -1562,9 +1562,9 @@ static bool snapEditMesh(
|
|||||||
mul_m4_v3(imat, ray_org_local);
|
mul_m4_v3(imat, ray_org_local);
|
||||||
|
|
||||||
/* We pass a temp ray_start, set from object's boundbox,
|
/* We pass a temp ray_start, set from object's boundbox,
|
||||||
* to avoid precision issues with very far away ray_start values
|
* to avoid precision issues with very far away ray_start values
|
||||||
* (as returned in case of ortho view3d), see T38358.
|
* (as returned in case of ortho view3d), see T38358.
|
||||||
*/
|
*/
|
||||||
len_diff -= local_scale; /* make temp start point a bit away from bbox hit point. */
|
len_diff -= local_scale; /* make temp start point a bit away from bbox hit point. */
|
||||||
madd_v3_v3v3fl(ray_start_local, ray_org_local, ray_normal_local, len_diff + depth_range[0]);
|
madd_v3_v3v3fl(ray_start_local, ray_org_local, ray_normal_local, len_diff + depth_range[0]);
|
||||||
local_depth -= len_diff;
|
local_depth -= len_diff;
|
||||||
|
@ -916,7 +916,7 @@ void GPU_buffer_unlock(GPUBuffer *UNUSED(buffer), GPUBindingType binding)
|
|||||||
{
|
{
|
||||||
int bindtypegl = gpu_binding_type_gl[binding];
|
int bindtypegl = gpu_binding_type_gl[binding];
|
||||||
/* note: this operation can fail, could return
|
/* note: this operation can fail, could return
|
||||||
* an error code from this function? */
|
* an error code from this function? */
|
||||||
glUnmapBuffer(bindtypegl);
|
glUnmapBuffer(bindtypegl);
|
||||||
glBindBuffer(bindtypegl, 0);
|
glBindBuffer(bindtypegl, 0);
|
||||||
}
|
}
|
||||||
|
@ -803,7 +803,7 @@ static void **gpu_gen_cube_map(unsigned int *rect, float *frect, int rectw, int
|
|||||||
* | | | |
|
* | | | |
|
||||||
* | NegZ | PosZ | PosY |
|
* | NegZ | PosZ | PosY |
|
||||||
* |______|______|______|
|
* |______|______|______|
|
||||||
*/
|
*/
|
||||||
if (use_high_bit_depth) {
|
if (use_high_bit_depth) {
|
||||||
float (*frectb)[4] = (float(*)[4])frect;
|
float (*frectb)[4] = (float(*)[4])frect;
|
||||||
float (**fsides)[4] = (float(**)[4])sides;
|
float (**fsides)[4] = (float(**)[4])sides;
|
||||||
|
@ -77,9 +77,10 @@ static struct GPUGlobal {
|
|||||||
GPUDeviceType device;
|
GPUDeviceType device;
|
||||||
GPUOSType os;
|
GPUOSType os;
|
||||||
GPUDriverType driver;
|
GPUDriverType driver;
|
||||||
float dfdyfactors[2]; /* workaround for different calculation of dfdy factors on GPUs. Some GPUs/drivers
|
/* workaround for different calculation of dfdy factors on GPUs. Some GPUs/drivers
|
||||||
calculate dfdy in shader differently when drawing to an offscreen buffer. First
|
* calculate dfdy in shader differently when drawing to an offscreen buffer. First
|
||||||
number is factor on screen and second is off-screen */
|
* number is factor on screen and second is off-screen */
|
||||||
|
float dfdyfactors[2];
|
||||||
float max_anisotropy;
|
float max_anisotropy;
|
||||||
} GG = {1, 0};
|
} GG = {1, 0};
|
||||||
|
|
||||||
|
@ -3127,8 +3127,11 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
|
|||||||
RNA_parameter_list_free(¶ms);
|
RNA_parameter_list_free(¶ms);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*else
|
#if 0
|
||||||
printf("%s %s.%s: not implemented for this property.\n", __func__, ptr->type->identifier, prop->identifier);*/
|
else {
|
||||||
|
printf("%s %s.%s: not implemented for this property.\n", __func__, ptr->type->identifier, prop->identifier);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (r_ptr) {
|
if (r_ptr) {
|
||||||
@ -3187,8 +3190,11 @@ bool RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key)
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/*else
|
#if 0
|
||||||
printf("%s %s.%s: only supported for id properties.\n", __func__, ptr->type->identifier, prop->identifier);*/
|
else {
|
||||||
|
printf("%s %s.%s: only supported for id properties.\n", __func__, ptr->type->identifier, prop->identifier);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1033,7 +1033,7 @@ static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value)
|
|||||||
ob->gameflag &= ~(OB_SENSOR | OB_OCCLUDER | OB_DYNAMIC | OB_RIGID_BODY | OB_SOFT_BODY | OB_ACTOR |
|
ob->gameflag &= ~(OB_SENSOR | OB_OCCLUDER | OB_DYNAMIC | OB_RIGID_BODY | OB_SOFT_BODY | OB_ACTOR |
|
||||||
OB_ANISOTROPIC_FRICTION | OB_DO_FH | OB_ROT_FH | OB_COLLISION_RESPONSE | OB_NAVMESH);
|
OB_ANISOTROPIC_FRICTION | OB_DO_FH | OB_ROT_FH | OB_COLLISION_RESPONSE | OB_NAVMESH);
|
||||||
/* When we switch to character physics and the collision bounds is set to triangle mesh
|
/* When we switch to character physics and the collision bounds is set to triangle mesh
|
||||||
we have to change collision bounds because triangle mesh is not supported by Characters*/
|
* we have to change collision bounds because triangle mesh is not supported by Characters */
|
||||||
if ((ob->gameflag & OB_BOUNDS) && ob->collision_boundtype == OB_BOUND_TRIANGLE_MESH) {
|
if ((ob->gameflag & OB_BOUNDS) && ob->collision_boundtype == OB_BOUND_TRIANGLE_MESH) {
|
||||||
ob->boundtype = ob->collision_boundtype = OB_BOUND_BOX;
|
ob->boundtype = ob->collision_boundtype = OB_BOUND_BOX;
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ static ImBuf *nsImageToiBuf(NSImage *sourceImage, int width, int height)
|
|||||||
|
|
||||||
/* Convert the image in a RGBA 32bit format */
|
/* Convert the image in a RGBA 32bit format */
|
||||||
/* As Core Graphics does not support contextes with non premutliplied alpha,
|
/* As Core Graphics does not support contextes with non premutliplied alpha,
|
||||||
we need to get alpha key values in a separate batch */
|
* we need to get alpha key values in a separate batch */
|
||||||
|
|
||||||
/* First get RGB values w/o Alpha to avoid pre-multiplication, 32bit but last byte is unused */
|
/* First get RGB values w/o Alpha to avoid pre-multiplication, 32bit but last byte is unused */
|
||||||
blBitmapFormatImageRGB = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL
|
blBitmapFormatImageRGB = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL
|
||||||
|
@ -355,7 +355,7 @@ Scene *RE_GetScene(Render *re)
|
|||||||
* Same as #RE_AcquireResultImage but creating the necessary views to store the result
|
* Same as #RE_AcquireResultImage but creating the necessary views to store the result
|
||||||
* fill provided result struct with a copy of thew views of what is done so far the
|
* fill provided result struct with a copy of thew views of what is done so far the
|
||||||
* #RenderResult.views #ListBase needs to be freed after with #RE_ReleaseResultImageViews
|
* #RenderResult.views #ListBase needs to be freed after with #RE_ReleaseResultImageViews
|
||||||
*/
|
*/
|
||||||
void RE_AcquireResultImageViews(Render *re, RenderResult *rr)
|
void RE_AcquireResultImageViews(Render *re, RenderResult *rr)
|
||||||
{
|
{
|
||||||
memset(rr, 0, sizeof(RenderResult));
|
memset(rr, 0, sizeof(RenderResult));
|
||||||
|
@ -279,13 +279,19 @@ static void build_Rd_table(ScatterSettings *ss)
|
|||||||
|
|
||||||
for (i= 0; i < size; i++) {
|
for (i= 0; i < size; i++) {
|
||||||
r= i*(RD_TABLE_RANGE/RD_TABLE_SIZE);
|
r= i*(RD_TABLE_RANGE/RD_TABLE_SIZE);
|
||||||
/*if (r < ss->invsigma_t_*ss->invsigma_t_)
|
#if 0
|
||||||
r= ss->invsigma_t_*ss->invsigma_t_;*/
|
if (r < ss->invsigma_t_*ss->invsigma_t_) {
|
||||||
|
r= ss->invsigma_t_*ss->invsigma_t_;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
ss->tableRd[i]= Rd(ss, sqrtf(r));
|
ss->tableRd[i]= Rd(ss, sqrtf(r));
|
||||||
|
|
||||||
r= i*(RD_TABLE_RANGE_2/RD_TABLE_SIZE);
|
r= i*(RD_TABLE_RANGE_2/RD_TABLE_SIZE);
|
||||||
/*if (r < ss->invsigma_t_)
|
#if 0
|
||||||
r= ss->invsigma_t_;*/
|
if (r < ss->invsigma_t_) {
|
||||||
|
r= ss->invsigma_t_;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
ss->tableRd2[i]= Rd(ss, r);
|
ss->tableRd2[i]= Rd(ss, r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user