forked from bartvdbraak/blender
Cleanup: spelling in comments & minor cleanup
Also hyphenate 'mouse-move' use doxy sections in render_update.c & move function comment from the header to the source.
This commit is contained in:
parent
aed5a27755
commit
c671bfe14e
@ -32,10 +32,10 @@ class GHOST_IWindow;
|
||||
/**
|
||||
* Interface class for events received from GHOST.
|
||||
* You should not need to inherit this class. The system will pass these events
|
||||
* to the GHOST_IEventConsumer::processEvent() method of event consumers.<br>
|
||||
* Use the getType() method to retrieve the type of event and the getData()
|
||||
* to the #GHOST_IEventConsumer::processEvent() method of event consumers.<br>
|
||||
* Use the #getType() method to retrieve the type of event and the #getData()
|
||||
* method to get the event data out. Using the event type you can cast the
|
||||
* event data to the correct event dat structure.
|
||||
* event data to the correct event data structure.
|
||||
* \see GHOST_IEventConsumer#processEvent
|
||||
* \see GHOST_TEventType
|
||||
*/
|
||||
|
@ -61,11 +61,6 @@ void BKE_cachefile_reader_open(struct CacheFile *cache_file,
|
||||
const char *object_path);
|
||||
void BKE_cachefile_reader_free(struct CacheFile *cache_file, struct CacheReader **reader);
|
||||
|
||||
/* Determine whether the CacheFile should use a render engine procedural. If so, data is not read
|
||||
* from the file and bouding boxes are used to represent the objects in the Scene. Render engines
|
||||
* will receive the bounding box as a placeholder but can instead load the data directly if they
|
||||
* support it.
|
||||
*/
|
||||
bool BKE_cache_file_uses_render_procedural(const struct CacheFile *cache_file,
|
||||
struct Scene *scene,
|
||||
const int dag_eval_mode);
|
||||
|
@ -368,7 +368,7 @@ void BKE_cachefile_eval(Main *bmain, Depsgraph *depsgraph, CacheFile *cache_file
|
||||
#endif
|
||||
|
||||
if (DEG_is_active(depsgraph)) {
|
||||
/* Flush object paths back to original datablock for UI. */
|
||||
/* Flush object paths back to original data-block for UI. */
|
||||
CacheFile *cache_file_orig = (CacheFile *)DEG_get_original_id(&cache_file->id);
|
||||
BLI_freelistN(&cache_file_orig->object_paths);
|
||||
BLI_duplicatelist(&cache_file_orig->object_paths, &cache_file->object_paths);
|
||||
@ -411,6 +411,12 @@ float BKE_cachefile_time_offset(const CacheFile *cache_file, const float time, c
|
||||
return cache_file->is_sequence ? frame : frame / fps - time_offset;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the #CacheFile should use a render engine procedural. If so, data is not read
|
||||
* from the file and bounding boxes are used to represent the objects in the Scene.
|
||||
* Render engines will receive the bounding box as a placeholder but can instead
|
||||
* load the data directly if they support it.
|
||||
*/
|
||||
bool BKE_cache_file_uses_render_procedural(const CacheFile *cache_file,
|
||||
Scene *scene,
|
||||
const int dag_eval_mode)
|
||||
|
@ -246,7 +246,7 @@ void EEVEE_lookdev_cache_init(EEVEE_Data *vedata,
|
||||
DRW_shgroup_uniform_float_copy(grp, "studioLightIntensity", shading->studiolight_intensity);
|
||||
BKE_studiolight_ensure_flag(sl, STUDIOLIGHT_EQUIRECT_RADIANCE_GPUTEXTURE);
|
||||
DRW_shgroup_uniform_texture_ex(grp, "studioLight", sl->equirect_radiance_gputexture, state);
|
||||
/* Do not fadeout when doing probe rendering, only when drawing the background */
|
||||
/* Do not fade-out when doing probe rendering, only when drawing the background. */
|
||||
DRW_shgroup_uniform_float_copy(grp, "backgroundAlpha", 1.0f);
|
||||
}
|
||||
else {
|
||||
|
@ -890,9 +890,9 @@ static int gpencil_interpolate_modal(bContext *C, wmOperator *op, const wmEvent
|
||||
}
|
||||
case MOUSEMOVE: /* calculate new position */
|
||||
{
|
||||
/* only handle mousemove if not doing numinput */
|
||||
/* Only handle mouse-move if not doing numeric-input. */
|
||||
if (has_numinput == false) {
|
||||
/* update shift based on position of mouse */
|
||||
/* Update shift based on position of mouse. */
|
||||
gpencil_mouse_update_shift(tgpi, op, event);
|
||||
|
||||
/* update screen */
|
||||
|
@ -1944,9 +1944,9 @@ static int gpencil_primitive_modal(bContext *C, wmOperator *op, const wmEvent *e
|
||||
if (ELEM(tgpi->flag, IN_CURVE_EDIT)) {
|
||||
break;
|
||||
}
|
||||
/* only handle mousemove if not doing numinput */
|
||||
/* Only handle mouse-move if not doing numeric-input. */
|
||||
if (has_numinput == false) {
|
||||
/* update position of mouse */
|
||||
/* Update position of mouse. */
|
||||
copy_v2_v2(tgpi->end, tgpi->mval);
|
||||
copy_v2_v2(tgpi->start, tgpi->origin);
|
||||
if (tgpi->flag == IDLE) {
|
||||
|
@ -6025,7 +6025,7 @@ static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, co
|
||||
* the slot menu fails to switch a second time.
|
||||
*
|
||||
* The active state of the button could be maintained some other way
|
||||
* and remove this mousemove event.
|
||||
* and remove this mouse-move event.
|
||||
*/
|
||||
WM_event_add_mousemove(data->window);
|
||||
|
||||
@ -8364,7 +8364,7 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
|
||||
}
|
||||
}
|
||||
|
||||
/* wait for mousemove to enable drag */
|
||||
/* Wait for mouse-move to enable drag. */
|
||||
if (state == BUTTON_STATE_WAIT_DRAG) {
|
||||
but->flag &= ~UI_SELECT;
|
||||
}
|
||||
@ -8631,9 +8631,9 @@ static void button_activate_exit(
|
||||
ui_but_update(but);
|
||||
}
|
||||
|
||||
/* adds empty mousemove in queue for re-init handler, in case mouse is
|
||||
/* Adds empty mouse-move in queue for re-initialize handler, in case mouse is
|
||||
* still over a button. We cannot just check for this ourselves because
|
||||
* at this point the mouse may be over a button in another region */
|
||||
* at this point the mouse may be over a button in another region. */
|
||||
if (mousemove) {
|
||||
WM_event_add_mousemove(CTX_wm_window(C));
|
||||
}
|
||||
|
@ -8627,7 +8627,7 @@ static int edbm_point_normals_modal(bContext *C, wmOperator *op, const wmEvent *
|
||||
RNA_enum_set(op->ptr, "mode", mode);
|
||||
}
|
||||
|
||||
/* Only handle mousemove event in case we are in mouse mode. */
|
||||
/* Only handle mouse-move event in case we are in mouse mode. */
|
||||
if (event->type == MOUSEMOVE || force_mousemove) {
|
||||
if (mode == EDBM_CLNOR_POINTTO_MODE_MOUSE) {
|
||||
ARegion *region = CTX_wm_region(C);
|
||||
|
@ -4667,7 +4667,7 @@ typedef struct BrushEdit {
|
||||
int lastmouse[2];
|
||||
float zfac;
|
||||
|
||||
/* optional cached view settings to avoid setting on every mousemove */
|
||||
/** Optional cached view settings to avoid setting on every mouse-move. */
|
||||
PEData data;
|
||||
} BrushEdit;
|
||||
|
||||
|
@ -64,7 +64,9 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/***************************** Render Engines ********************************/
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Render Engines
|
||||
* \{ */
|
||||
|
||||
/* Update 3D viewport render or draw engine on changes to the scene or view settings. */
|
||||
void ED_render_view3d_update(Depsgraph *depsgraph,
|
||||
@ -206,15 +208,15 @@ void ED_render_engine_changed(Main *bmain, const bool update_scene_data)
|
||||
}
|
||||
}
|
||||
|
||||
/* Update CacheFiles to ensure that procedurals are properly taken into account. */
|
||||
/* Update #CacheFiles to ensure that procedurals are properly taken into account. */
|
||||
LISTBASE_FOREACH (CacheFile *, cachefile, &bmain->cachefiles) {
|
||||
/* Only update cachefiles which are set to use a render procedural. We do not use
|
||||
* BKE_cachefile_uses_render_procedural here as we need to update regardless of the current
|
||||
* engine or its settings. */
|
||||
/* Only update cache-files which are set to use a render procedural.
|
||||
* We do not use #BKE_cachefile_uses_render_procedural here as we need to update regardless of
|
||||
* the current engine or its settings. */
|
||||
if (cachefile->use_render_procedural) {
|
||||
DEG_id_tag_update(&cachefile->id, ID_RECALC_COPY_ON_WRITE);
|
||||
/* Rebuild relations so that modifiers are reconnected to or disconnected from the cachefile.
|
||||
*/
|
||||
/* Rebuild relations so that modifiers are reconnected to or disconnected from the
|
||||
* cache-file. */
|
||||
DEG_relations_tag_update(bmain);
|
||||
}
|
||||
}
|
||||
@ -227,10 +229,16 @@ void ED_render_view_layer_changed(Main *bmain, bScreen *screen)
|
||||
}
|
||||
}
|
||||
|
||||
/***************************** Updates ***********************************
|
||||
* ED_render_id_flush_update gets called from DEG_id_tag_update, to do *
|
||||
* editor level updates when the ID changes. when these ID blocks are in *
|
||||
* the dependency graph, we can get rid of the manual dependency checks. */
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Updates
|
||||
*
|
||||
* #ED_render_id_flush_update gets called from #DEG_id_tag_update,
|
||||
* to do editor level updates when the ID changes.
|
||||
* When these ID blocks are in the dependency graph,
|
||||
* we can get rid of the manual dependency checks.
|
||||
* \{ */
|
||||
|
||||
static void material_changed(Main *UNUSED(bmain), Material *ma)
|
||||
{
|
||||
@ -336,3 +344,5 @@ void ED_render_id_flush_update(const DEGEditorUpdateContext *update_ctx, ID *id)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
@ -299,7 +299,9 @@ static void view3d_ruler_item_project(RulerInfo *ruler_info, float r_co[3], cons
|
||||
ED_view3d_win_to_3d_int(ruler_info->area->spacedata.first, ruler_info->region, r_co, xy, r_co);
|
||||
}
|
||||
|
||||
/* use for mousemove events */
|
||||
/**
|
||||
* Use for mouse-move events.
|
||||
*/
|
||||
static bool view3d_ruler_item_mousemove(struct Depsgraph *depsgraph,
|
||||
RulerInfo *ruler_info,
|
||||
RulerItem *ruler_item,
|
||||
|
@ -131,12 +131,12 @@ static void autokeyframe_pose(
|
||||
|
||||
ListBase dsources = {NULL, NULL};
|
||||
|
||||
/* add datasource override for the camera object */
|
||||
/* Add data-source override for the camera object. */
|
||||
ANIM_relative_keyingset_add_source(&dsources, id, &RNA_PoseBone, pchan);
|
||||
|
||||
/* only insert into active keyingset? */
|
||||
if (IS_AUTOKEY_FLAG(scene, ONLYKEYINGSET) && (active_ks)) {
|
||||
/* run the active Keying Set on the current datasource */
|
||||
/* Run the active Keying Set on the current data-source. */
|
||||
ANIM_apply_keyingset(
|
||||
C, &dsources, NULL, active_ks, MODIFYKEY_MODE_INSERT, anim_eval_context.eval_time);
|
||||
}
|
||||
|
@ -749,7 +749,7 @@ static void autokeyframe_object(
|
||||
/* Get flags used for inserting keyframes. */
|
||||
flag = ANIM_get_keyframing_flags(scene, true);
|
||||
|
||||
/* add datasource override for the object */
|
||||
/* Add data-source override for the object. */
|
||||
ANIM_relative_keyingset_add_source(&dsources, id, NULL, NULL);
|
||||
|
||||
if (IS_AUTOKEY_FLAG(scene, ONLYKEYINGSET) && (active_ks)) {
|
||||
|
@ -35,14 +35,14 @@
|
||||
#include "transform_snap.h"
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Snappint in Anim Editors
|
||||
/** \name Snapping in Anim Editors
|
||||
* \{ */
|
||||
|
||||
/**
|
||||
* This function returns the snapping 'mode' for Animation Editors only.
|
||||
* We cannot use the standard snapping due to NLA-strip scaling complexities.
|
||||
*
|
||||
* TODO: these modifier checks should be key-mappable.
|
||||
* TODO: these modifier checks should be accessible from the key-map.
|
||||
*/
|
||||
short getAnimEdit_SnapMode(TransInfo *t)
|
||||
{
|
||||
|
@ -162,7 +162,7 @@ void UnitConverter::calculate_scale(Scene &sce)
|
||||
* Translation map.
|
||||
* Used to translate every COLLADA id to a valid id, no matter what "wrong" letters may be
|
||||
* included. Look at the IDREF XSD declaration for more.
|
||||
* Follows strictly the COLLADA XSD declaration which explicitly allows non-english chars,
|
||||
* Follows strictly the COLLADA XSD declaration which explicitly allows non-English chars,
|
||||
* like special chars (e.g. micro sign), umlauts and so on.
|
||||
* The COLLADA spec also allows additional chars for member access ('.'), these
|
||||
* must obviously be removed too, otherwise they would be heavily misinterpreted.
|
||||
|
@ -3471,8 +3471,8 @@ void wm_event_do_handlers(bContext *C)
|
||||
}
|
||||
CTX_wm_area_set(C, NULL);
|
||||
|
||||
/* NOTE: do not escape on WM_HANDLER_BREAK,
|
||||
* mousemove needs handled for previous area. */
|
||||
/* NOTE: do not escape on #WM_HANDLER_BREAK,
|
||||
* mouse-move needs handled for previous area. */
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user