forked from bartvdbraak/blender
Spelling fixes in comments and descriptions, patch by luzpaz
Differential Revision: https://developer.blender.org/D3744
This commit is contained in:
parent
136a7a7fe8
commit
604fdb6e85
@ -130,7 +130,7 @@ def function_parm_wash_tokens(parm):
|
|||||||
)
|
)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Return tolens without trailing commands and 'const'
|
Return tokens without trailing commands and 'const'
|
||||||
"""
|
"""
|
||||||
|
|
||||||
tokens = [t for t in parm.get_tokens()]
|
tokens = [t for t in parm.get_tokens()]
|
||||||
|
@ -238,7 +238,7 @@ def create_nb_project_main():
|
|||||||
|
|
||||||
f.write(' </makeTool>\n')
|
f.write(' </makeTool>\n')
|
||||||
f.write(' </makefileType>\n')
|
f.write(' </makefileType>\n')
|
||||||
# finishe makefle info
|
# finished makefile info
|
||||||
|
|
||||||
f.write(' \n')
|
f.write(' \n')
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Builds a debian package from SVN source.
|
# Builds a debian package from SVN source.
|
||||||
#
|
#
|
||||||
# For paralelle builds use:
|
# For parallel builds use:
|
||||||
# DEB_BUILD_OPTIONS="parallel=5" sh build_files/package_spec/build_debian.sh
|
# DEB_BUILD_OPTIONS="parallel=5" sh build_files/package_spec/build_debian.sh
|
||||||
|
|
||||||
# this needs to run in the root dir.
|
# this needs to run in the root dir.
|
||||||
|
@ -177,7 +177,7 @@ font:
|
|||||||
With the new truetype option in Blender, this is used for all font families
|
With the new truetype option in Blender, this is used for all font families
|
||||||
|
|
||||||
When a uiBlock is created, each uiButton that is defined gets the uiBlock properties.
|
When a uiBlock is created, each uiButton that is defined gets the uiBlock properties.
|
||||||
Changing Block properties in between will affact uiButtons defined thereafter.
|
Changing Block properties in between will effect uiButtons defined thereafter.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ In most cases you can figure out what context an operator needs
|
|||||||
simply be seeing how it's used in Blender and thinking about what it does.
|
simply be seeing how it's used in Blender and thinking about what it does.
|
||||||
|
|
||||||
Unfortunately if you're still stuck - the only way to **really** know
|
Unfortunately if you're still stuck - the only way to **really** know
|
||||||
whats going on is to read the source code for the poll function and see what its checking.
|
what's going on is to read the source code for the poll function and see what its checking.
|
||||||
|
|
||||||
For Python operators it's not so hard to find the source
|
For Python operators it's not so hard to find the source
|
||||||
since it's included with Blender and the source file/line is included in the operator reference docs.
|
since it's included with Blender and the source file/line is included in the operator reference docs.
|
||||||
@ -125,7 +125,7 @@ While a script executes Blender waits for it to finish and is effectively locked
|
|||||||
while in this state Blender won't redraw or respond to user input.
|
while in this state Blender won't redraw or respond to user input.
|
||||||
Normally this is not such a problem because scripts distributed with Blender
|
Normally this is not such a problem because scripts distributed with Blender
|
||||||
tend not to run for an extended period of time,
|
tend not to run for an extended period of time,
|
||||||
nevertheless scripts *can* take ages to execute and its nice to see whats going on in the view port.
|
nevertheless scripts *can* take ages to execute and its nice to see what's going on in the view port.
|
||||||
|
|
||||||
Tools that lock Blender in a loop and redraw are highly discouraged
|
Tools that lock Blender in a loop and redraw are highly discouraged
|
||||||
since they conflict with Blenders ability to run multiple operators
|
since they conflict with Blenders ability to run multiple operators
|
||||||
|
@ -239,7 +239,7 @@ Drop Into a Python Interpreter in Your Script
|
|||||||
=============================================
|
=============================================
|
||||||
|
|
||||||
In the middle of a script you may want to inspect some variables,
|
In the middle of a script you may want to inspect some variables,
|
||||||
run some function and generally dig about to see whats going on.
|
run some function and generally dig about to see what's going on.
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
|
@ -125,9 +125,9 @@ class IsoSurface :
|
|||||||
|
|
||||||
//! cutoff border area
|
//! cutoff border area
|
||||||
int mCutoff;
|
int mCutoff;
|
||||||
//! cutoff heigh values
|
//! cutoff height values
|
||||||
int *mCutArray;
|
int *mCutArray;
|
||||||
//! particle pointer
|
//! particle pointer
|
||||||
ParticleTracer *mpIsoParts;
|
ParticleTracer *mpIsoParts;
|
||||||
//! particle size
|
//! particle size
|
||||||
float mPartSize;
|
float mPartSize;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
// this serves as the main include file
|
// this serves as the main include file
|
||||||
// for all kinds of stuff that might be required
|
// for all kinds of stuff that might be required
|
||||||
// under windos there seem to be strange
|
// under windows there seem to be strange
|
||||||
// errors when including the STL header too
|
// errors when including the STL header too
|
||||||
// late...
|
// late...
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ using std::string;
|
|||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
#endif // __APPLE_CC__
|
#endif // __APPLE_CC__
|
||||||
|
|
||||||
// windos, hardcoded limits for now...
|
// windows, hardcoded limits for now...
|
||||||
// for e.g. MSVC compiler...
|
// for e.g. MSVC compiler...
|
||||||
// some of these defines can be needed
|
// some of these defines can be needed
|
||||||
// for linux systems as well (e.g. FLT_MAX)
|
// for linux systems as well (e.g. FLT_MAX)
|
||||||
|
@ -707,7 +707,7 @@ bool LbmFsgrSolver::initializeSolverMemory()
|
|||||||
noLimit = true;
|
noLimit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// restrict max. chunk of 1 mem block to 1GB for windos
|
// restrict max. chunk of 1 mem block to 1GB for windows
|
||||||
bool memBlockAllocProblem = false;
|
bool memBlockAllocProblem = false;
|
||||||
double maxDefaultMemChunk = 2.*1024.*1024.*1024.;
|
double maxDefaultMemChunk = 2.*1024.*1024.*1024.;
|
||||||
//std::cerr<<" memEstFine "<< memEstFine <<" maxWin:" <<maxWinMemChunk <<" maxMac:" <<maxMacMemChunk ; // DEBUG
|
//std::cerr<<" memEstFine "<< memEstFine <<" maxWin:" <<maxWinMemChunk <<" maxMac:" <<maxMacMemChunk ; // DEBUG
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#undef DUMP_FAILURE
|
#undef DUMP_FAILURE
|
||||||
|
|
||||||
/* define this to generate PNG images with content of search areas
|
/* define this to generate PNG images with content of search areas
|
||||||
on every itteration of tracking */
|
on every iteration of tracking */
|
||||||
#undef DUMP_ALWAYS
|
#undef DUMP_ALWAYS
|
||||||
|
|
||||||
using libmv::FloatImage;
|
using libmv::FloatImage;
|
||||||
|
@ -1340,7 +1340,7 @@ class I18n:
|
|||||||
def parse_from_py(self, src, langs=set()):
|
def parse_from_py(self, src, langs=set()):
|
||||||
"""
|
"""
|
||||||
src must be a valid path, either a py file or a module directory (in which case all py files inside it
|
src must be a valid path, either a py file or a module directory (in which case all py files inside it
|
||||||
will be checked, first file macthing will win!).
|
will be checked, first file matching will win!).
|
||||||
if langs set is void, all languages found are loaded.
|
if langs set is void, all languages found are loaded.
|
||||||
"""
|
"""
|
||||||
default_context = self.settings.DEFAULT_CONTEXT
|
default_context = self.settings.DEFAULT_CONTEXT
|
||||||
|
@ -129,7 +129,7 @@ def _kmi_attrs_or_none(level, kmi):
|
|||||||
|
|
||||||
|
|
||||||
def keyconfig_export_as_data(wm, kc, filepath, *, all_keymaps=False):
|
def keyconfig_export_as_data(wm, kc, filepath, *, all_keymaps=False):
|
||||||
# Alternate foramt
|
# Alternate format
|
||||||
|
|
||||||
# Generate a list of keymaps to export:
|
# Generate a list of keymaps to export:
|
||||||
#
|
#
|
||||||
|
@ -145,7 +145,7 @@ def object_data_add(context, obdata, operator=None, name=None):
|
|||||||
# layer.objects.active = obj_new
|
# layer.objects.active = obj_new
|
||||||
|
|
||||||
# Match up UV layers, this is needed so adding an object with UV's
|
# Match up UV layers, this is needed so adding an object with UV's
|
||||||
# doesn't create new layers when there happens to be a naming mis-match.
|
# doesn't create new layers when there happens to be a naming mismatch.
|
||||||
uv_new = obdata.uv_layers.active
|
uv_new = obdata.uv_layers.active
|
||||||
if uv_new is not None:
|
if uv_new is not None:
|
||||||
uv_act = obj_act.data.uv_layers.active
|
uv_act = obj_act.data.uv_layers.active
|
||||||
|
@ -270,7 +270,7 @@ def draw_filtered(display_keymaps, filter_type, filter_text, layout):
|
|||||||
filter_text_split.remove(kk)
|
filter_text_split.remove(kk)
|
||||||
kmi_test_dict[kv] = {True}
|
kmi_test_dict[kv] = {True}
|
||||||
|
|
||||||
# whats left should be the event type
|
# what's left should be the event type
|
||||||
def kmi_type_set_from_string(kmi_type):
|
def kmi_type_set_from_string(kmi_type):
|
||||||
kmi_type = kmi_type.upper()
|
kmi_type = kmi_type.upper()
|
||||||
kmi_type_set = set()
|
kmi_type_set = set()
|
||||||
|
@ -128,7 +128,7 @@ def point_cache_ui(self, cache, enabled, cachetype):
|
|||||||
|
|
||||||
is_saved = bpy.data.is_saved
|
is_saved = bpy.data.is_saved
|
||||||
|
|
||||||
# NOTE: TODO temporarly used until the animate properties are properly skipped.
|
# NOTE: TODO temporarily used until the animate properties are properly skipped.
|
||||||
layout.use_property_decorate = False # No animation (remove this later on).
|
layout.use_property_decorate = False # No animation (remove this later on).
|
||||||
|
|
||||||
if not cachetype == 'RIGID_BODY':
|
if not cachetype == 'RIGID_BODY':
|
||||||
@ -245,7 +245,7 @@ def effector_weights_ui(self, weights, weight_type):
|
|||||||
layout = self.layout
|
layout = self.layout
|
||||||
layout.use_property_split = True
|
layout.use_property_split = True
|
||||||
|
|
||||||
# NOTE: TODO temporarly used until the animate properties are properly skipped.
|
# NOTE: TODO temporarily used until the animate properties are properly skipped.
|
||||||
layout.use_property_decorate = False # No animation (remove this later on).
|
layout.use_property_decorate = False # No animation (remove this later on).
|
||||||
|
|
||||||
layout.prop(weights, "collection")
|
layout.prop(weights, "collection")
|
||||||
|
@ -1001,7 +1001,7 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel):
|
|||||||
sub.menu('CLIP_MT_stabilize_2d_context_menu', text="",
|
sub.menu('CLIP_MT_stabilize_2d_context_menu', text="",
|
||||||
icon='DOWNARROW_HLT')
|
icon='DOWNARROW_HLT')
|
||||||
|
|
||||||
# Usually we don't hide things from iterface, but here every pixel of
|
# Usually we don't hide things from interface, but here every pixel of
|
||||||
# vertical space is precious.
|
# vertical space is precious.
|
||||||
if stab.use_stabilize_rotation:
|
if stab.use_stabilize_rotation:
|
||||||
box.label(text="Tracks For Rotation / Scale")
|
box.label(text="Tracks For Rotation / Scale")
|
||||||
|
@ -84,7 +84,7 @@ ToolDef = namedtuple(
|
|||||||
# so internally we can swap the keymap function for the keymap it's self.
|
# so internally we can swap the keymap function for the keymap it's self.
|
||||||
# This isn't very nice and may change, tool definitions shouldn't care about this.
|
# This isn't very nice and may change, tool definitions shouldn't care about this.
|
||||||
"keymap",
|
"keymap",
|
||||||
# Optional data-block assosiated with this tool.
|
# Optional data-block associated with this tool.
|
||||||
# (Typically brush name, usage depends on mode, we could use for non-brush ID's in other modes).
|
# (Typically brush name, usage depends on mode, we could use for non-brush ID's in other modes).
|
||||||
"data_block",
|
"data_block",
|
||||||
# Optional primary operator (for introspection only).
|
# Optional primary operator (for introspection only).
|
||||||
@ -434,7 +434,7 @@ class ToolSelectPanelHelper:
|
|||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
# Layout Generators
|
# Layout Generators
|
||||||
#
|
#
|
||||||
# Meaning of recieved values:
|
# Meaning of received values:
|
||||||
# - Bool: True for a separator, otherwise False for regular tools.
|
# - Bool: True for a separator, otherwise False for regular tools.
|
||||||
# - None: Signal to finish (complete any final operations, e.g. add padding).
|
# - None: Signal to finish (complete any final operations, e.g. add padding).
|
||||||
|
|
||||||
|
@ -707,7 +707,7 @@ class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
|
|||||||
colsub.label(text="UV Layer")
|
colsub.label(text="UV Layer")
|
||||||
split.column().menu("VIEW3D_MT_tools_projectpaint_stencil", text=stencil_text, translate=False)
|
split.column().menu("VIEW3D_MT_tools_projectpaint_stencil", text=stencil_text, translate=False)
|
||||||
|
|
||||||
# todo this should be combinded into a single row
|
# todo this should be combined into a single row
|
||||||
split = col.split(factor=0.5)
|
split = col.split(factor=0.5)
|
||||||
colsub = split.column()
|
colsub = split.column()
|
||||||
colsub.alignment = 'RIGHT'
|
colsub.alignment = 'RIGHT'
|
||||||
@ -2062,7 +2062,7 @@ class VIEW3D_PT_tools_grease_pencil_weight_paint(View3DPanel, Panel):
|
|||||||
brush_basic_gpencil_weight_settings(col, context, brush)
|
brush_basic_gpencil_weight_settings(col, context, brush)
|
||||||
|
|
||||||
|
|
||||||
# Grease Pencil Brush Appeareance (one for each mode)
|
# Grease Pencil Brush Appearance (one for each mode)
|
||||||
class VIEW3D_PT_tools_grease_pencil_paint_appearance(GreasePencilAppearancePanel, View3DPanel, Panel):
|
class VIEW3D_PT_tools_grease_pencil_paint_appearance(GreasePencilAppearancePanel, View3DPanel, Panel):
|
||||||
bl_context = ".greasepencil_paint"
|
bl_context = ".greasepencil_paint"
|
||||||
bl_label = "Display"
|
bl_label = "Display"
|
||||||
|
@ -5273,7 +5273,7 @@ static void constraint_copy_data_ex(bConstraint *dst,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Allocate and duplicate a single constraint, ouside of any object/pose context. */
|
/** Allocate and duplicate a single constraint, outside of any object/pose context. */
|
||||||
bConstraint *BKE_constraint_duplicate_ex(bConstraint *src, const int flag, const bool do_extern)
|
bConstraint *BKE_constraint_duplicate_ex(bConstraint *src, const int flag, const bool do_extern)
|
||||||
{
|
{
|
||||||
bConstraint *dst = MEM_dupallocN(src);
|
bConstraint *dst = MEM_dupallocN(src);
|
||||||
|
@ -1744,7 +1744,7 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
|
|||||||
|
|
||||||
/* ......... */
|
/* ......... */
|
||||||
|
|
||||||
/* Table of Driver Varaiable Type Info Data */
|
/* Table of Driver Variable Type Info Data */
|
||||||
static DriverVarTypeInfo dvar_types[MAX_DVAR_TYPES] = {
|
static DriverVarTypeInfo dvar_types[MAX_DVAR_TYPES] = {
|
||||||
BEGIN_DVAR_TYPEDEF(DVAR_TYPE_SINGLE_PROP) dvar_eval_singleProp, /* eval callback */
|
BEGIN_DVAR_TYPEDEF(DVAR_TYPE_SINGLE_PROP) dvar_eval_singleProp, /* eval callback */
|
||||||
1, /* number of targets used */
|
1, /* number of targets used */
|
||||||
|
@ -376,7 +376,7 @@ static void library_foreach_ID_link(Main *bmain,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (flag & IDWALK_RECURSE) {
|
if (flag & IDWALK_RECURSE) {
|
||||||
/* For now, recusion implies read-only. */
|
/* For now, recursion implies read-only. */
|
||||||
flag |= IDWALK_READONLY;
|
flag |= IDWALK_READONLY;
|
||||||
|
|
||||||
data.ids_handled = BLI_gset_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, __func__);
|
data.ids_handled = BLI_gset_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, __func__);
|
||||||
|
@ -3810,7 +3810,7 @@ void BKE_ptcache_remove(void)
|
|||||||
closedir(dir);
|
closedir(dir);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rmdir = 0; /* path dosnt exist */
|
rmdir = 0; /* path doesn't exist */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rmdir) {
|
if (rmdir) {
|
||||||
|
@ -4645,7 +4645,7 @@ void BKE_sequence_tx_handle_xlimits(Sequence *seq, int leftflag, int rightflag)
|
|||||||
BKE_sequence_tx_set_final_left(seq, seq_tx_get_end(seq) - 1);
|
BKE_sequence_tx_set_final_left(seq, seq_tx_get_end(seq) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* dosnt work now - TODO */
|
/* doesn't work now - TODO */
|
||||||
#if 0
|
#if 0
|
||||||
if (seq_tx_get_start(seq) >= seq_tx_get_final_right(seq, 0)) {
|
if (seq_tx_get_start(seq) >= seq_tx_get_final_right(seq, 0)) {
|
||||||
int ofs;
|
int ofs;
|
||||||
|
@ -50,7 +50,7 @@ typedef struct AutoTrackOptions {
|
|||||||
|
|
||||||
/* TODO(sergey): A bit awkward to keep it in here, only used to
|
/* TODO(sergey): A bit awkward to keep it in here, only used to
|
||||||
* place a disabled marker once the tracking fails,
|
* place a disabled marker once the tracking fails,
|
||||||
* Wither find a more clear way to do it or call it track context
|
* Either find a clearer way to do it or call it track context
|
||||||
* or state, not options.
|
* or state, not options.
|
||||||
*/
|
*/
|
||||||
bool is_failed;
|
bool is_failed;
|
||||||
|
@ -561,7 +561,7 @@ static void bvhtree_verify(BVHTree *tree)
|
|||||||
|
|
||||||
/* Helper data and structures to build a min-leaf generalized implicit tree
|
/* Helper data and structures to build a min-leaf generalized implicit tree
|
||||||
* This code can be easily reduced
|
* This code can be easily reduced
|
||||||
* (basicly this is only method to calculate pow(k, n) in O(1).. and stuff like that) */
|
* (basically this is only method to calculate pow(k, n) in O(1).. and stuff like that) */
|
||||||
typedef struct BVHBuildHelper {
|
typedef struct BVHBuildHelper {
|
||||||
int tree_type;
|
int tree_type;
|
||||||
int totleafs;
|
int totleafs;
|
||||||
@ -626,7 +626,7 @@ static int implicit_leafs_index(const BVHBuildHelper *data, const int depth, con
|
|||||||
*
|
*
|
||||||
* An implicit tree is a tree where its structure is implied,
|
* An implicit tree is a tree where its structure is implied,
|
||||||
* thus there is no need to store child pointers or indexes.
|
* thus there is no need to store child pointers or indexes.
|
||||||
* Its possible to find the position of the child or the parent with simple maths
|
* It's possible to find the position of the child or the parent with simple maths
|
||||||
* (multiplication and addition).
|
* (multiplication and addition).
|
||||||
* This type of tree is for example used on heaps..
|
* This type of tree is for example used on heaps..
|
||||||
* where node N has its child at indices N*2 and N*2+1.
|
* where node N has its child at indices N*2 and N*2+1.
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
* matching chunks from this state are re-used in the new state.
|
* matching chunks from this state are re-used in the new state.
|
||||||
*
|
*
|
||||||
* First matches at either end of the array are detected.
|
* First matches at either end of the array are detected.
|
||||||
* For identical arrays this is all thats needed.
|
* For identical arrays this is all that's needed.
|
||||||
*
|
*
|
||||||
* De-duplication is performed on any remaining chunks, by hashing the first few bytes of the chunk
|
* De-duplication is performed on any remaining chunks, by hashing the first few bytes of the chunk
|
||||||
* (see: BCHUNK_HASH_TABLE_ACCUMULATE_STEPS).
|
* (see: BCHUNK_HASH_TABLE_ACCUMULATE_STEPS).
|
||||||
@ -301,7 +301,7 @@ typedef struct BChunkRef {
|
|||||||
* used for lookups.
|
* used for lookups.
|
||||||
*
|
*
|
||||||
* Point to the #BChunkRef, not the #BChunk,
|
* Point to the #BChunkRef, not the #BChunk,
|
||||||
* to allow talking down the chunks in-order until a mis-match is found,
|
* to allow talking down the chunks in-order until a mismatch is found,
|
||||||
* this avoids having to do so many table lookups.
|
* this avoids having to do so many table lookups.
|
||||||
*/
|
*/
|
||||||
typedef struct BTableRef {
|
typedef struct BTableRef {
|
||||||
|
@ -105,7 +105,7 @@ int BLI_file_gzip(const char *from, const char *to)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* gzip the file in from_file and write it to memory to_mem, at most size bytes.
|
/* gzip the file in from_file and write it to memory to_mem, at most size bytes.
|
||||||
* return the unziped size
|
* return the unzipped size
|
||||||
*/
|
*/
|
||||||
char *BLI_file_ungzip_to_mem(const char *from_file, int *r_size)
|
char *BLI_file_ungzip_to_mem(const char *from_file, int *r_size)
|
||||||
{
|
{
|
||||||
|
@ -780,7 +780,7 @@ static void polyfill_prepare(PolyFill *pf,
|
|||||||
coords_sign = (cross_poly_v2(coords, coords_tot) >= 0.0f) ? 1 : -1;
|
coords_sign = (cross_poly_v2(coords, coords_tot) >= 0.0f) ? 1 : -1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* check we're passing in correcty args */
|
/* check we're passing in correct args */
|
||||||
#ifdef USE_STRICT_ASSERT
|
#ifdef USE_STRICT_ASSERT
|
||||||
# ifndef NDEBUG
|
# ifndef NDEBUG
|
||||||
if (coords_sign == 1) {
|
if (coords_sign == 1) {
|
||||||
|
@ -285,12 +285,12 @@ bool BLI_rcti_isect_segment(const rcti *rect, const int s1[2], const int s2[2])
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if either points intersect then we definetly intersect */
|
/* if either points intersect then we definitely intersect */
|
||||||
if (BLI_rcti_isect_pt_v(rect, s1) || BLI_rcti_isect_pt_v(rect, s2)) {
|
if (BLI_rcti_isect_pt_v(rect, s1) || BLI_rcti_isect_pt_v(rect, s2)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* both points are outside but may insersect the rect */
|
/* both points are outside but may intersect the rect */
|
||||||
int tvec1[2];
|
int tvec1[2];
|
||||||
int tvec2[2];
|
int tvec2[2];
|
||||||
/* diagonal: [/] */
|
/* diagonal: [/] */
|
||||||
@ -332,12 +332,12 @@ bool BLI_rctf_isect_segment(const rctf *rect, const float s1[2], const float s2[
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if either points intersect then we definetly intersect */
|
/* if either points intersect then we definitely intersect */
|
||||||
if (BLI_rctf_isect_pt_v(rect, s1) || BLI_rctf_isect_pt_v(rect, s2)) {
|
if (BLI_rctf_isect_pt_v(rect, s1) || BLI_rctf_isect_pt_v(rect, s2)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* both points are outside but may insersect the rect */
|
/* both points are outside but may intersect the rect */
|
||||||
float tvec1[2];
|
float tvec1[2];
|
||||||
float tvec2[2];
|
float tvec2[2];
|
||||||
/* diagonal: [/] */
|
/* diagonal: [/] */
|
||||||
|
@ -487,7 +487,7 @@ static void bm_vert_attrs_copy(BMesh *source_mesh,
|
|||||||
uint64_t cd_mask)
|
uint64_t cd_mask)
|
||||||
{
|
{
|
||||||
if ((source_mesh == target_mesh) && (source_vertex == target_vertex)) {
|
if ((source_mesh == target_mesh) && (source_vertex == target_vertex)) {
|
||||||
BLI_assert(!"BMVert: source and targer match");
|
BLI_assert(!"BMVert: source and target match");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((cd_mask & CD_MASK_NORMAL) == 0) {
|
if ((cd_mask & CD_MASK_NORMAL) == 0) {
|
||||||
@ -507,7 +507,7 @@ static void bm_edge_attrs_copy(BMesh *source_mesh,
|
|||||||
uint64_t UNUSED(cd_mask))
|
uint64_t UNUSED(cd_mask))
|
||||||
{
|
{
|
||||||
if ((source_mesh == target_mesh) && (source_edge == target_edge)) {
|
if ((source_mesh == target_mesh) && (source_edge == target_edge)) {
|
||||||
BLI_assert(!"BMEdge: source and targer match");
|
BLI_assert(!"BMEdge: source and target match");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CustomData_bmesh_free_block_data(&target_mesh->edata, target_edge->head.data);
|
CustomData_bmesh_free_block_data(&target_mesh->edata, target_edge->head.data);
|
||||||
@ -522,7 +522,7 @@ static void bm_loop_attrs_copy(BMesh *source_mesh,
|
|||||||
uint64_t UNUSED(cd_mask))
|
uint64_t UNUSED(cd_mask))
|
||||||
{
|
{
|
||||||
if ((source_mesh == target_mesh) && (source_loop == target_loop)) {
|
if ((source_mesh == target_mesh) && (source_loop == target_loop)) {
|
||||||
BLI_assert(!"BMLoop: source and targer match");
|
BLI_assert(!"BMLoop: source and target match");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CustomData_bmesh_free_block_data(&target_mesh->ldata, target_loop->head.data);
|
CustomData_bmesh_free_block_data(&target_mesh->ldata, target_loop->head.data);
|
||||||
@ -537,7 +537,7 @@ static void bm_face_attrs_copy(BMesh *source_mesh,
|
|||||||
uint64_t cd_mask)
|
uint64_t cd_mask)
|
||||||
{
|
{
|
||||||
if ((source_mesh == target_mesh) && (source_face == target_face)) {
|
if ((source_mesh == target_mesh) && (source_face == target_face)) {
|
||||||
BLI_assert(!"BMFace: source and targer match");
|
BLI_assert(!"BMFace: source and target match");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((cd_mask & CD_MASK_NORMAL) == 0) {
|
if ((cd_mask & CD_MASK_NORMAL) == 0) {
|
||||||
|
@ -209,7 +209,7 @@ BMEdge *BM_edge_create(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \note In most cases a \a l_example should be NULL,
|
* \note In most cases a \a l_example should be NULL,
|
||||||
* since this is a low level API and we shouldn't attempt to be clever and guess whats intended.
|
* since this is a low level API and we shouldn't attempt to be clever and guess what's intended.
|
||||||
* In cases where copying adjacent loop-data is useful, see #BM_face_copy_shared.
|
* In cases where copying adjacent loop-data is useful, see #BM_face_copy_shared.
|
||||||
*/
|
*/
|
||||||
static BMLoop *bm_loop_create(BMesh *bm,
|
static BMLoop *bm_loop_create(BMesh *bm,
|
||||||
|
@ -884,8 +884,8 @@ void BM_editselection_plane(BMEditSelection *ese, float r_plane[3])
|
|||||||
sub_v3_v3v3(r_plane, vec, eve->co);
|
sub_v3_v3v3(r_plane, vec, eve->co);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* make a fake plane thats at rightangles to the normal
|
/* make a fake plane thats at rightangles to the normal
|
||||||
* we cant make a crossvec from a vec thats the same as the vec
|
* we can't make a crossvec from a vec that's the same as the vec
|
||||||
* unlikely but possible, so make sure if the normal is (0, 0, 1)
|
* unlikely but possible, so make sure if the normal is (0, 0, 1)
|
||||||
* that vec isn't the same or in the same direction even. */
|
* that vec isn't the same or in the same direction even. */
|
||||||
if (eve->no[0] < 0.5f) {
|
if (eve->no[0] < 0.5f) {
|
||||||
|
@ -1345,7 +1345,7 @@ void BM_normals_loops_edges_tag(BMesh *bm, const bool do_edges)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Auxillary function only used by rebuild to detect if any spaces were not marked as invalid.
|
* Auxiliary function only used by rebuild to detect if any spaces were not marked as invalid.
|
||||||
* Reports error if any of the lnor spaces change after rebuilding, meaning that all the possible
|
* Reports error if any of the lnor spaces change after rebuilding, meaning that all the possible
|
||||||
* lnor spaces to be rebuilt were not correctly marked.
|
* lnor spaces to be rebuilt were not correctly marked.
|
||||||
*/
|
*/
|
||||||
|
@ -1545,7 +1545,7 @@ static BMOpDefine bmo_split_edges_def = {
|
|||||||
"split_edges",
|
"split_edges",
|
||||||
/* slots_in */
|
/* slots_in */
|
||||||
{{"edges", BMO_OP_SLOT_ELEMENT_BUF, {BM_EDGE}}, /* input edges */
|
{{"edges", BMO_OP_SLOT_ELEMENT_BUF, {BM_EDGE}}, /* input edges */
|
||||||
/* needed for vertex rip so we can rip only half an edge at a boundary wich would otherwise split off */
|
/* needed for vertex rip so we can rip only half an edge at a boundary which would otherwise split off */
|
||||||
{"verts", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT}}, /* optional tag verts, use to have greater control of splits */
|
{"verts", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT}}, /* optional tag verts, use to have greater control of splits */
|
||||||
{"use_verts", BMO_OP_SLOT_BOOL}, /* use 'verts' for splitting, else just find verts to split from edges */
|
{"use_verts", BMO_OP_SLOT_BOOL}, /* use 'verts' for splitting, else just find verts to split from edges */
|
||||||
{{'\0'}},
|
{{'\0'}},
|
||||||
|
@ -100,7 +100,7 @@ BLI_INLINE BMFlagLayer *BMO_elem_flag_from_header(BMHeader *ele_head)
|
|||||||
_bmo_elem_flag_toggle( \
|
_bmo_elem_flag_toggle( \
|
||||||
bm, (BM_CHECK_TYPE_ELEM_NONCONST(ele), BMO_elem_flag_from_header(&(ele)->head)), oflag)
|
bm, (BM_CHECK_TYPE_ELEM_NONCONST(ele), BMO_elem_flag_from_header(&(ele)->head)), oflag)
|
||||||
|
|
||||||
/* take care not to instansiate args multiple times */
|
/* take care not to instantiate args multiple times */
|
||||||
#ifdef __GNUC___
|
#ifdef __GNUC___
|
||||||
# define _BMO_CAST_V_CONST(e) \
|
# define _BMO_CAST_V_CONST(e) \
|
||||||
({ \
|
({ \
|
||||||
|
@ -765,7 +765,7 @@ struct EdgeGroupIsland {
|
|||||||
|
|
||||||
/* Set the following vars once we have >1 groups */
|
/* Set the following vars once we have >1 groups */
|
||||||
|
|
||||||
/* when when an edge in a previous group connects to this one,
|
/* when an edge in a previous group connects to this one,
|
||||||
* so theres no need to create one pointing back. */
|
* so theres no need to create one pointing back. */
|
||||||
uint has_prev_edge : 1;
|
uint has_prev_edge : 1;
|
||||||
|
|
||||||
@ -1481,7 +1481,7 @@ bool BM_face_split_edgenet_connect_islands(BMesh *bm,
|
|||||||
if (!BM_elem_flag_test(v_iter, VERT_IN_ARRAY)) {
|
if (!BM_elem_flag_test(v_iter, VERT_IN_ARRAY)) {
|
||||||
BM_elem_flag_enable(v_iter, VERT_IN_ARRAY);
|
BM_elem_flag_enable(v_iter, VERT_IN_ARRAY);
|
||||||
|
|
||||||
/* not nice, but alternatives arent much better :S */
|
/* not nice, but alternatives aren't much better :S */
|
||||||
{
|
{
|
||||||
copy_v3_v3(vert_coords_backup[v_index], v_iter->co);
|
copy_v3_v3(vert_coords_backup[v_index], v_iter->co);
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
/* LOOP CYCLE MANAGEMENT */
|
/* LOOP CYCLE MANAGEMENT */
|
||||||
bool bmesh_loop_validate(BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
|
bool bmesh_loop_validate(BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
|
||||||
|
|
||||||
/* DISK CYCLE MANAGMENT */
|
/* DISK CYCLE MANAGEMENT */
|
||||||
void bmesh_disk_edge_append(BMEdge *e, BMVert *v) ATTR_NONNULL();
|
void bmesh_disk_edge_append(BMEdge *e, BMVert *v) ATTR_NONNULL();
|
||||||
void bmesh_disk_edge_remove(BMEdge *e, BMVert *v) ATTR_NONNULL();
|
void bmesh_disk_edge_remove(BMEdge *e, BMVert *v) ATTR_NONNULL();
|
||||||
BLI_INLINE BMEdge *bmesh_disk_edge_next_safe(const BMEdge *e,
|
BLI_INLINE BMEdge *bmesh_disk_edge_next_safe(const BMEdge *e,
|
||||||
@ -60,7 +60,7 @@ BMLoop *bmesh_disk_faceloop_find_first_visible(const BMEdge *e,
|
|||||||
BMEdge *bmesh_disk_faceedge_find_next(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT
|
BMEdge *bmesh_disk_faceedge_find_next(const BMEdge *e, const BMVert *v) ATTR_WARN_UNUSED_RESULT
|
||||||
ATTR_NONNULL();
|
ATTR_NONNULL();
|
||||||
|
|
||||||
/* RADIAL CYCLE MANAGMENT */
|
/* RADIAL CYCLE MANAGEMENT */
|
||||||
void bmesh_radial_loop_append(BMEdge *e, BMLoop *l) ATTR_NONNULL();
|
void bmesh_radial_loop_append(BMEdge *e, BMLoop *l) ATTR_NONNULL();
|
||||||
void bmesh_radial_loop_remove(BMEdge *e, BMLoop *l) ATTR_NONNULL();
|
void bmesh_radial_loop_remove(BMEdge *e, BMLoop *l) ATTR_NONNULL();
|
||||||
void bmesh_radial_loop_unlink(BMLoop *l) ATTR_NONNULL();
|
void bmesh_radial_loop_unlink(BMLoop *l) ATTR_NONNULL();
|
||||||
|
@ -805,7 +805,7 @@ static void *bmw_IslandWalker_step_ex(BMWalker *walker, bool only_manifold)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* saves checking BLI_gset_haskey below (manifold edges theres a 50% chance) */
|
/* saves checking BLI_gset_haskey below (manifold edges there's a 50% chance) */
|
||||||
if (f == iwalk->cur) {
|
if (f == iwalk->cur) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ static void bm_bridge_splice_loops(BMesh *bm,
|
|||||||
|
|
||||||
/* get the 2 loops matching 2 verts.
|
/* get the 2 loops matching 2 verts.
|
||||||
* first attempt to get the face corners that use the edge defined by v1 & v2,
|
* first attempt to get the face corners that use the edge defined by v1 & v2,
|
||||||
* if that fails just get any loop thats on the vert (the first one) */
|
* if that fails just get any loop that's on the vert (the first one) */
|
||||||
static void bm_vert_loop_pair(BMesh *bm, BMVert *v1, BMVert *v2, BMLoop **l1, BMLoop **l2)
|
static void bm_vert_loop_pair(BMesh *bm, BMVert *v1, BMVert *v2, BMLoop **l1, BMLoop **l2)
|
||||||
{
|
{
|
||||||
BMEdge *e = BM_edge_exists(v1, v2);
|
BMEdge *e = BM_edge_exists(v1, v2);
|
||||||
|
@ -449,7 +449,7 @@ void bmo_split_exec(BMesh *bm, BMOperator *op)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* connect outputs of dupe to delete, exluding keep geometry */
|
/* connect outputs of dupe to delete, excluding keep geometry */
|
||||||
BMO_mesh_delete_oflag_context(bm, SPLIT_INPUT, DEL_FACES);
|
BMO_mesh_delete_oflag_context(bm, SPLIT_INPUT, DEL_FACES);
|
||||||
|
|
||||||
/* now we make our outputs by copying the dupe output */
|
/* now we make our outputs by copying the dupe output */
|
||||||
|
@ -132,7 +132,7 @@ void bmo_edgenet_prepare_exec(BMesh *bm, BMOperator *op)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we don't have valid edge layouts, retur */
|
/* we don't have valid edge layouts, return */
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -549,7 +549,7 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op)
|
|||||||
SplitEdgeInfo *es;
|
SplitEdgeInfo *es;
|
||||||
|
|
||||||
/* Interpolation Vars */
|
/* Interpolation Vars */
|
||||||
/* an array alligned with faces but only fill items which are used. */
|
/* an array aligned with faces but only fill items which are used. */
|
||||||
InterpFace **iface_array = NULL;
|
InterpFace **iface_array = NULL;
|
||||||
int iface_array_len;
|
int iface_array_len;
|
||||||
MemArena *interp_arena = NULL;
|
MemArena *interp_arena = NULL;
|
||||||
|
@ -138,7 +138,7 @@ static BMEdge *connect_smallest_face(BMesh *bm, BMVert *v_a, BMVert *v_b, BMFace
|
|||||||
* multiple faces yet. that might require a convexity test to figure out which
|
* multiple faces yet. that might require a convexity test to figure out which
|
||||||
* face is "best" and who knows what for non-manifold conditions.
|
* face is "best" and who knows what for non-manifold conditions.
|
||||||
*
|
*
|
||||||
* note: we allow adjacent here, since theres no chance this happens.
|
* note: we allow adjacent here, since there's no chance this happens.
|
||||||
*/
|
*/
|
||||||
f = BM_vert_pair_share_face_by_len(v_a, v_b, &l_a, &l_b, true);
|
f = BM_vert_pair_share_face_by_len(v_a, v_b, &l_a, &l_b, true);
|
||||||
|
|
||||||
|
@ -698,7 +698,7 @@ static void bm_edge_collapse_loop_customdata(
|
|||||||
const bool is_manifold = BM_edge_is_manifold(l->e);
|
const bool is_manifold = BM_edge_is_manifold(l->e);
|
||||||
int side;
|
int side;
|
||||||
|
|
||||||
/* first find the loop of 'v_other' thats attached to the face of 'l' */
|
/* first find the loop of 'v_other' that's attached to the face of 'l' */
|
||||||
if (l->v == v_clear) {
|
if (l->v == v_clear) {
|
||||||
l_clear = l;
|
l_clear = l;
|
||||||
l_other = l->next;
|
l_other = l->next;
|
||||||
@ -882,7 +882,7 @@ static bool bm_edge_collapse_is_degenerate_topology(BMEdge *e_first)
|
|||||||
bm_edge_tag_enable(e_iter);
|
bm_edge_tag_enable(e_iter);
|
||||||
} while ((e_iter = bmesh_disk_edge_next(e_iter, e_first->v1)) != e_first);
|
} while ((e_iter = bmesh_disk_edge_next(e_iter, e_first->v1)) != e_first);
|
||||||
|
|
||||||
/* ... except for the edge we will collapse, we know thats shared,
|
/* ... except for the edge we will collapse, we know that's shared,
|
||||||
* disable this to avoid false positive. We could be smart and never enable these
|
* disable this to avoid false positive. We could be smart and never enable these
|
||||||
* face/edge tags in the first place but easier to do this */
|
* face/edge tags in the first place but easier to do this */
|
||||||
// bm_edge_tag_disable(e_first);
|
// bm_edge_tag_disable(e_first);
|
||||||
|
@ -224,7 +224,7 @@ static LinkNode *mesh_calc_path_region_elem(BMesh *bm,
|
|||||||
#endif /* USE_EDGE_CHAIN */
|
#endif /* USE_EDGE_CHAIN */
|
||||||
|
|
||||||
/* Keep walking over connected geometry until we find all the vertices in
|
/* Keep walking over connected geometry until we find all the vertices in
|
||||||
* `ele_verts[side_other]`, or exit the loop when theres no connection. */
|
* `ele_verts[side_other]`, or exit the loop when there's no connection. */
|
||||||
found_all = false;
|
found_all = false;
|
||||||
for (pass = 1; (STACK_SIZE(stack) != 0); pass++) {
|
for (pass = 1; (STACK_SIZE(stack) != 0); pass++) {
|
||||||
while (STACK_SIZE(stack) != 0) {
|
while (STACK_SIZE(stack) != 0) {
|
||||||
@ -268,7 +268,7 @@ static LinkNode *mesh_calc_path_region_elem(BMesh *bm,
|
|||||||
} while ((e = BM_DISK_EDGE_NEXT(e, v_a)) != v_a->e);
|
} while ((e = BM_DISK_EDGE_NEXT(e, v_a)) != v_a->e);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stop searching once theres none left.
|
/* Stop searching once there's none left.
|
||||||
* Note that this looks in-efficient, however until the target elements reached,
|
* Note that this looks in-efficient, however until the target elements reached,
|
||||||
* it will exit immediately.
|
* it will exit immediately.
|
||||||
* After that, it takes as many passes as the element has edges to finish off. */
|
* After that, it takes as many passes as the element has edges to finish off. */
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
#include "bmesh.h"
|
#include "bmesh.h"
|
||||||
|
|
||||||
#include "tools/bmesh_region_match.h" /* own incldue */
|
#include "tools/bmesh_region_match.h" /* own include */
|
||||||
|
|
||||||
/* avoid re-creating ghash and pools for each search */
|
/* avoid re-creating ghash and pools for each search */
|
||||||
#define USE_WALKER_REUSE
|
#define USE_WALKER_REUSE
|
||||||
@ -95,13 +95,13 @@ typedef struct UUIDWalk {
|
|||||||
BLI_mempool *step_pool;
|
BLI_mempool *step_pool;
|
||||||
BLI_mempool *step_pool_items;
|
BLI_mempool *step_pool_items;
|
||||||
|
|
||||||
/* Optionaly use face-tag to isolate search */
|
/* Optionally use face-tag to isolate search */
|
||||||
bool use_face_isolate;
|
bool use_face_isolate;
|
||||||
|
|
||||||
/* Increment for each pass added */
|
/* Increment for each pass added */
|
||||||
UUID_Int pass;
|
UUID_Int pass;
|
||||||
|
|
||||||
/* runtime vars, aviod re-creating each pass */
|
/* runtime vars, avoid re-creating each pass */
|
||||||
struct {
|
struct {
|
||||||
GHash *verts_uuid; /* BMVert -> UUID */
|
GHash *verts_uuid; /* BMVert -> UUID */
|
||||||
GSet *faces_step; /* BMFace */
|
GSet *faces_step; /* BMFace */
|
||||||
|
@ -751,7 +751,7 @@ float AnimationImporter::convert_to_focal_length(float in_xfov,
|
|||||||
float aspect,
|
float aspect,
|
||||||
float sensorx)
|
float sensorx)
|
||||||
{
|
{
|
||||||
/* NOTE: Needs more testing (As we curretnly have no official test data for this) */
|
/* NOTE: Needs more testing (As we currently have no official test data for this) */
|
||||||
float xfov = (fov_type == CAMERA_YFOV) ?
|
float xfov = (fov_type == CAMERA_YFOV) ?
|
||||||
(2.0f * atanf(aspect * tanf(DEG2RADF(in_xfov) * 0.5f))) :
|
(2.0f * atanf(aspect * tanf(DEG2RADF(in_xfov) * 0.5f))) :
|
||||||
DEG2RADF(in_xfov);
|
DEG2RADF(in_xfov);
|
||||||
|
@ -917,7 +917,7 @@ bool DocumentImporter::writeCamera(const COLLADAFW::Camera *camera)
|
|||||||
double yfov = camera->getYFov().getValue();
|
double yfov = camera->getYFov().getValue();
|
||||||
double aspect = camera->getAspectRatio().getValue();
|
double aspect = camera->getAspectRatio().getValue();
|
||||||
|
|
||||||
/* NOTE: Needs more testing (As we curretnly have no official test data for this) */
|
/* NOTE: Needs more testing (As we currently have no official test data for this) */
|
||||||
|
|
||||||
double xfov = 2.0f * atanf(aspect * tanf(DEG2RADF(yfov) * 0.5f));
|
double xfov = 2.0f * atanf(aspect * tanf(DEG2RADF(yfov) * 0.5f));
|
||||||
cam->lens = fov_to_focallength(xfov, cam->sensor_x);
|
cam->lens = fov_to_focallength(xfov, cam->sensor_x);
|
||||||
|
@ -268,7 +268,7 @@ def main():
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--name_style", dest="name_style", metavar='ENUM', type=str,
|
"--name_style", dest="name_style", metavar='ENUM', type=str,
|
||||||
choices=('', 'UI_ICONS'),
|
choices=('', 'UI_ICONS'),
|
||||||
help="The metod used for naming output data",
|
help="The method used for naming output data",
|
||||||
)
|
)
|
||||||
|
|
||||||
# Options for dicing up the image
|
# Options for dicing up the image
|
||||||
|
@ -121,7 +121,7 @@ void main(void)
|
|||||||
/* Circle Dof */
|
/* Circle Dof */
|
||||||
float dist = length(particlecoord);
|
float dist = length(particlecoord);
|
||||||
|
|
||||||
/* Ouside of bokeh shape */
|
/* Outside of bokeh shape */
|
||||||
if (dist > 1.0) {
|
if (dist > 1.0) {
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
@ -141,7 +141,7 @@ void main(void)
|
|||||||
* Giving us the new linear radius to the shape edge. */
|
* Giving us the new linear radius to the shape edge. */
|
||||||
dist /= r;
|
dist /= r;
|
||||||
|
|
||||||
/* Ouside of bokeh shape */
|
/* Outside of bokeh shape */
|
||||||
if (dist > 1.0) {
|
if (dist > 1.0) {
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ void prepare_raycast(vec3 ray_origin,
|
|||||||
ss_start.w = project_point(ProjectionMatrix, ray_origin).z;
|
ss_start.w = project_point(ProjectionMatrix, ray_origin).z;
|
||||||
ss_end.w = project_point(ProjectionMatrix, ray_end).z;
|
ss_end.w = project_point(ProjectionMatrix, ray_end).z;
|
||||||
|
|
||||||
/* XXX This is a hack a better method is welcome ! */
|
/* XXX This is a hack. A better method is welcome! */
|
||||||
/* We take the delta between the offseted depth and the depth and substract it from the ray
|
/* We take the delta between the offseted depth and the depth and substract it from the ray
|
||||||
* depth. This will change the world space thickness appearance a bit but we can have negative
|
* depth. This will change the world space thickness appearance a bit but we can have negative
|
||||||
* values without worries. We cannot do this in viewspace because of the perspective division. */
|
* values without worries. We cannot do this in viewspace because of the perspective division. */
|
||||||
|
@ -335,7 +335,7 @@ static void EDIT_CURVE_draw_scene(void *vedata)
|
|||||||
MULTISAMPLE_SYNC_DISABLE_NO_DEPTH(dfbl, dtxl);
|
MULTISAMPLE_SYNC_DISABLE_NO_DEPTH(dfbl, dtxl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Thoses passes don't write to depth and are AA'ed using other tricks. */
|
/* These passes don't write to depth and are AA'ed using other tricks. */
|
||||||
DRW_draw_pass(psl->overlay_edge_pass);
|
DRW_draw_pass(psl->overlay_edge_pass);
|
||||||
DRW_draw_pass(psl->overlay_vert_pass);
|
DRW_draw_pass(psl->overlay_vert_pass);
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Library to create hairs dynamically from control points.
|
* Library to create hairs dynamically from control points.
|
||||||
* This is less bandwidth intensive than fetching the vertex attributes
|
* This is less bandwidth intensive than fetching the vertex attributes
|
||||||
* but does more ALU work per vertex. This also reduce the number
|
* but does more ALU work per vertex. This also reduces the amount
|
||||||
* of data the CPU has to precompute and transfert for each update.
|
* of data the CPU has to precompute and transfer for each update.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -278,7 +278,7 @@ void ED_mesh_mirrtopo_init(Mesh *me,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((tot_unique <= tot_unique_prev) && (tot_unique_edges <= tot_unique_edges_prev)) {
|
if ((tot_unique <= tot_unique_prev) && (tot_unique_edges <= tot_unique_edges_prev)) {
|
||||||
/* Finish searching for unique values when 1 loop dosn't give a
|
/* Finish searching for unique values when 1 loop doesn't give a
|
||||||
* higher number of unique values compared to the previous loop. */
|
* higher number of unique values compared to the previous loop. */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -252,7 +252,7 @@ static void pe_update_hair_particle_edit_pointers(PTCacheEdit *edit)
|
|||||||
|
|
||||||
/* always gets at least the first particlesystem even if PSYS_CURRENT flag is not set
|
/* always gets at least the first particlesystem even if PSYS_CURRENT flag is not set
|
||||||
*
|
*
|
||||||
* note: this function runs on poll, therefor it can runs many times a second
|
* note: this function runs on poll, therefore it can runs many times a second
|
||||||
* keep it fast! */
|
* keep it fast! */
|
||||||
static PTCacheEdit *pe_get_current(Depsgraph *depsgraph, Scene *scene, Object *ob, int create)
|
static PTCacheEdit *pe_get_current(Depsgraph *depsgraph, Scene *scene, Object *ob, int create)
|
||||||
{
|
{
|
||||||
|
@ -1771,7 +1771,7 @@ static float project_paint_uvpixel_mask(const ProjPaintState *ps,
|
|||||||
}
|
}
|
||||||
else if (angle_cos < ps->normal_angle_inner__cos) {
|
else if (angle_cos < ps->normal_angle_inner__cos) {
|
||||||
mask *= (ps->normal_angle - acosf(angle_cos)) / ps->normal_angle_range;
|
mask *= (ps->normal_angle - acosf(angle_cos)) / ps->normal_angle_range;
|
||||||
} /* otherwise no mask normal is needed, were within the limit */
|
} /* otherwise no mask normal is needed, we're within the limit */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This only works when the opacity doesn't change while painting, stylus pressure messes with
|
/* This only works when the opacity doesn't change while painting, stylus pressure messes with
|
||||||
@ -3159,7 +3159,7 @@ static void project_paint_face_init(const ProjPaintState *ps,
|
|||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 /* TODO - investigate why this dosnt work sometimes! it should! */
|
#if 0 /* TODO - investigate why this doesn't work sometimes! it should! */
|
||||||
/* no intersection for this entire row,
|
/* no intersection for this entire row,
|
||||||
* after some intersection above means we can quit now */
|
* after some intersection above means we can quit now */
|
||||||
if (has_x_isect == 0 && has_isect) {
|
if (has_x_isect == 0 && has_isect) {
|
||||||
@ -3395,12 +3395,12 @@ static void project_paint_face_init(const ProjPaintState *ps,
|
|||||||
}
|
}
|
||||||
else if (has_x_isect) {
|
else if (has_x_isect) {
|
||||||
/* assuming the face is not a bow-tie - we know
|
/* assuming the face is not a bow-tie - we know
|
||||||
* we cant intersect again on the X */
|
* we can't intersect again on the X */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# if 0 /* TODO - investigate why this dosnt work sometimes! it should! */
|
# if 0 /* TODO - investigate why this doesn't work sometimes! it should! */
|
||||||
/* no intersection for this entire row,
|
/* no intersection for this entire row,
|
||||||
* after some intersection above means we can quit now */
|
* after some intersection above means we can quit now */
|
||||||
if (has_x_isect == 0 && has_isect) {
|
if (has_x_isect == 0 && has_isect) {
|
||||||
@ -4388,7 +4388,7 @@ static void project_paint_prepare_all_faces(ProjPaintState *ps,
|
|||||||
image_index = BLI_linklist_index(image_LinkList.list, tpage);
|
image_index = BLI_linklist_index(image_LinkList.list, tpage);
|
||||||
|
|
||||||
if (image_index == -1 && BKE_image_has_ibuf(tpage, NULL)) {
|
if (image_index == -1 && BKE_image_has_ibuf(tpage, NULL)) {
|
||||||
/* MemArena dosnt have an append func */
|
/* MemArena doesn't have an append func */
|
||||||
BLI_linklist_append(&image_LinkList, tpage);
|
BLI_linklist_append(&image_LinkList, tpage);
|
||||||
image_index = ps->image_tot;
|
image_index = ps->image_tot;
|
||||||
ps->image_tot++;
|
ps->image_tot++;
|
||||||
|
@ -840,7 +840,7 @@ static void draw_fcurve_curve_bezts(
|
|||||||
v1[1] = prevbezt->vec[1][1];
|
v1[1] = prevbezt->vec[1][1];
|
||||||
}
|
}
|
||||||
else if (prevbezt->ipo == BEZT_IPO_LIN) {
|
else if (prevbezt->ipo == BEZT_IPO_LIN) {
|
||||||
/* extrapolate linear dosnt use the handle, use the previous points center instead */
|
/* extrapolate linear doesn't use the handle, use the previous points center instead */
|
||||||
bezt = prevbezt - 1;
|
bezt = prevbezt - 1;
|
||||||
fac = (prevbezt->vec[1][0] - bezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]);
|
fac = (prevbezt->vec[1][0] - bezt->vec[1][0]) / (prevbezt->vec[1][0] - v1[0]);
|
||||||
if (fac) {
|
if (fac) {
|
||||||
|
@ -2886,7 +2886,7 @@ static int sequencer_view_all_preview_exec(bContext *C, wmOperator *UNUSED(op))
|
|||||||
imgwidth = (scene->r.size * scene->r.xsch) / 100;
|
imgwidth = (scene->r.size * scene->r.xsch) / 100;
|
||||||
imgheight = (scene->r.size * scene->r.ysch) / 100;
|
imgheight = (scene->r.size * scene->r.ysch) / 100;
|
||||||
|
|
||||||
/* Apply aspect, dosnt need to be that accurate */
|
/* Apply aspect, doesn't need to be that accurate */
|
||||||
imgwidth = (int)(imgwidth * (scene->r.xasp / scene->r.yasp));
|
imgwidth = (int)(imgwidth * (scene->r.xasp / scene->r.yasp));
|
||||||
|
|
||||||
if (((imgwidth >= width) || (imgheight >= height)) && ((width > 0) && (height > 0))) {
|
if (((imgwidth >= width) || (imgheight >= height)) && ((width > 0) && (height > 0))) {
|
||||||
|
@ -3585,7 +3585,7 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op)
|
|||||||
float mval_f[2];
|
float mval_f[2];
|
||||||
float zfac;
|
float zfac;
|
||||||
|
|
||||||
/* We cant use the depth, fallback to the old way that dosnt set the center depth */
|
/* We can't use the depth, fallback to the old way that doesn't set the center depth */
|
||||||
copy_v3_v3(new_ofs, rv3d->ofs);
|
copy_v3_v3(new_ofs, rv3d->ofs);
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -102,7 +102,7 @@ typedef struct TransSnap {
|
|||||||
* Get the transform distance between two points (used by Closest snap)
|
* Get the transform distance between two points (used by Closest snap)
|
||||||
*
|
*
|
||||||
* \note Return value can be anything,
|
* \note Return value can be anything,
|
||||||
* where the smallest absolute value defines whats closest.
|
* where the smallest absolute value defines what's closest.
|
||||||
*/
|
*/
|
||||||
float (*distance)(struct TransInfo *t, const float p1[3], const float p2[3]);
|
float (*distance)(struct TransInfo *t, const float p1[3], const float p2[3]);
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class FastGrid : public Grid {
|
|||||||
*/
|
*/
|
||||||
virtual void configure(const Vec3r &orig, const Vec3r &size, unsigned nb);
|
virtual void configure(const Vec3r &orig, const Vec3r &size, unsigned nb);
|
||||||
|
|
||||||
/*! returns the cell whose coordinates are pased as argument */
|
/*! returns the cell whose coordinates are passed as argument */
|
||||||
Cell *getCell(const Vec3u &p);
|
Cell *getCell(const Vec3u &p);
|
||||||
|
|
||||||
/*! Fills the case p with the cell iCell */
|
/*! Fills the case p with the cell iCell */
|
||||||
|
@ -488,7 +488,7 @@ bool intersectRayTriangle(const Vec3r &orig,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return false; // ray is parallell to the plane of the triangle
|
return false; // ray is parallel to the plane of the triangle
|
||||||
}
|
}
|
||||||
|
|
||||||
u *= inv_det;
|
u *= inv_det;
|
||||||
|
@ -243,7 +243,7 @@ class Grid {
|
|||||||
/*! Fills the case corresponding to coord with the cell */
|
/*! Fills the case corresponding to coord with the cell */
|
||||||
virtual void fillCell(const Vec3u &coord, Cell &cell) = 0;
|
virtual void fillCell(const Vec3u &coord, Cell &cell) = 0;
|
||||||
|
|
||||||
/*! returns the cell whose coordinates are pased as argument */
|
/*! returns the cell whose coordinates are passed as argument */
|
||||||
virtual Cell *getCell(const Vec3u &coord) = 0;
|
virtual Cell *getCell(const Vec3u &coord) = 0;
|
||||||
|
|
||||||
/*! returns the cell containing the point passed as argument.
|
/*! returns the cell containing the point passed as argument.
|
||||||
|
@ -81,7 +81,7 @@ class HashGrid : public Grid {
|
|||||||
*/
|
*/
|
||||||
virtual void configure(const Vec3r &orig, const Vec3r &size, unsigned nb);
|
virtual void configure(const Vec3r &orig, const Vec3r &size, unsigned nb);
|
||||||
|
|
||||||
/*! returns the cell whose coordinates are pased as argument */
|
/*! returns the cell whose coordinates are passed as argument */
|
||||||
virtual Cell *getCell(const Vec3u &p)
|
virtual Cell *getCell(const Vec3u &p)
|
||||||
{
|
{
|
||||||
Cell *found_cell = NULL;
|
Cell *found_cell = NULL;
|
||||||
|
@ -474,7 +474,7 @@ template<class T> class HVec3 : public Vec<T, 4> {
|
|||||||
return this->_coord[3];
|
return this->_coord[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Acces to non-homogeneous coordinates in 3D
|
// Access to non-homogeneous coordinates in 3D
|
||||||
inline value_type x() const
|
inline value_type x() const
|
||||||
{
|
{
|
||||||
return this->_coord[0] / this->_coord[3];
|
return this->_coord[0] / this->_coord[3];
|
||||||
|
@ -39,7 +39,7 @@ namespace Freestyle {
|
|||||||
|
|
||||||
class GaussianFilter {
|
class GaussianFilter {
|
||||||
protected:
|
protected:
|
||||||
/* The mask is a symetrical 2d array (with respect to the middle point).
|
/* The mask is a symmetrical 2d array (with respect to the middle point).
|
||||||
* Thus, M(i,j) = M(-i,j) = M(i,-j) = M(-i,-j).
|
* Thus, M(i,j) = M(-i,j) = M(i,-j) = M(-i,-j).
|
||||||
* For this reason, to represent a NxN array (N odd), we only store a ((N+1)/2)x((N+1)/2) array.
|
* For this reason, to represent a NxN array (N odd), we only store a ((N+1)/2)x((N+1)/2) array.
|
||||||
*/
|
*/
|
||||||
|
@ -197,7 +197,7 @@ static PyObject *Iterator_name_get(BPy_Iterator *self, void *UNUSED(closure))
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(Iterator_is_begin_doc,
|
PyDoc_STRVAR(Iterator_is_begin_doc,
|
||||||
"True if the interator points the first element.\n"
|
"True if the iterator points to the first element.\n"
|
||||||
"\n"
|
"\n"
|
||||||
":type: bool");
|
":type: bool");
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ static PyObject *Iterator_is_begin_get(BPy_Iterator *self, void *UNUSED(closure)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(Iterator_is_end_doc,
|
PyDoc_STRVAR(Iterator_is_end_doc,
|
||||||
"True if the interator points the last element.\n"
|
"True if the iterator points to the last element.\n"
|
||||||
"\n"
|
"\n"
|
||||||
":type: bool");
|
":type: bool");
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ static PyObject *Interface0DIterator_u_get(BPy_Interface0DIterator *self, void *
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(Interface0DIterator_at_last_doc,
|
PyDoc_STRVAR(Interface0DIterator_at_last_doc,
|
||||||
"True if the interator points to the last valid element.\n"
|
"True if the iterator points to the last valid element.\n"
|
||||||
"For its counterpart (pointing to the first valid element), use it.is_begin.\n"
|
"For its counterpart (pointing to the first valid element), use it.is_begin.\n"
|
||||||
"\n"
|
"\n"
|
||||||
":type: bool");
|
":type: bool");
|
||||||
|
@ -254,7 +254,7 @@ static PyObject *StrokeVertexIterator_u_get(BPy_StrokeVertexIterator *self, void
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(StrokeVertexIterator_at_last_doc,
|
PyDoc_STRVAR(StrokeVertexIterator_at_last_doc,
|
||||||
"True if the interator points to the last valid element.\n"
|
"True if the iterator points to the last valid element.\n"
|
||||||
"For its counterpart (pointing to the first valid element), use it.is_begin.\n"
|
"For its counterpart (pointing to the first valid element), use it.is_begin.\n"
|
||||||
"\n"
|
"\n"
|
||||||
":type: bool");
|
":type: bool");
|
||||||
|
@ -42,7 +42,7 @@ class IndexedFaceSet : public Rep {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*! User-specified face and edge marks for feature edge detection */
|
/*! User-specified face and edge marks for feature edge detection */
|
||||||
/* XXX Why in hel not use an enum here too? */
|
/* XXX Why in hell not use an enum here too? */
|
||||||
typedef unsigned char FaceEdgeMark;
|
typedef unsigned char FaceEdgeMark;
|
||||||
static const FaceEdgeMark FACE_MARK = 1 << 0;
|
static const FaceEdgeMark FACE_MARK = 1 << 0;
|
||||||
static const FaceEdgeMark EDGE_MARK_V1V2 = 1 << 1;
|
static const FaceEdgeMark EDGE_MARK_V1V2 = 1 << 1;
|
||||||
@ -167,8 +167,8 @@ class IndexedFaceSet : public Rep {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Desctructor
|
/*! Destructor
|
||||||
* desallocates all the resources
|
* deallocates all the resources
|
||||||
*/
|
*/
|
||||||
virtual ~IndexedFaceSet();
|
virtual ~IndexedFaceSet();
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ class NodeGroup : public Node {
|
|||||||
/*! Detaches all the children */
|
/*! Detaches all the children */
|
||||||
virtual void DetachChildren();
|
virtual void DetachChildren();
|
||||||
|
|
||||||
/*! Detached the sepcified child */
|
/*! Detached the specified child */
|
||||||
virtual void DetachChild(Node *iChild);
|
virtual void DetachChild(Node *iChild);
|
||||||
|
|
||||||
/*! Retrieve children */
|
/*! Retrieve children */
|
||||||
|
@ -57,7 +57,7 @@ int ConstantThicknessShader::shade(Stroke &stroke) const
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
int size = stroke.strokeVerticesSize();
|
int size = stroke.strokeVerticesSize();
|
||||||
for (v = stroke.strokeVerticesBegin(), vend = stroke.strokeVerticesEnd(); v != vend; ++v) {
|
for (v = stroke.strokeVerticesBegin(), vend = stroke.strokeVerticesEnd(); v != vend; ++v) {
|
||||||
// XXX What's the use of i here? And is not the thickness always overriden by the last line of
|
// XXX What's the use of i here? And is not the thickness always overridden by the last line of
|
||||||
// the loop?
|
// the loop?
|
||||||
if ((1 == i) || (size - 2 == i)) {
|
if ((1 == i) || (size - 2 == i)) {
|
||||||
v->attribute().setThickness(_thickness / 4.0, _thickness / 4.0);
|
v->attribute().setThickness(_thickness / 4.0, _thickness / 4.0);
|
||||||
@ -77,7 +77,7 @@ int ConstantExternThicknessShader::shade(Stroke &stroke) const
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
int size = stroke.strokeVerticesSize();
|
int size = stroke.strokeVerticesSize();
|
||||||
for (v = stroke.strokeVerticesBegin(), vend = stroke.strokeVerticesEnd(); v != vend; ++v) {
|
for (v = stroke.strokeVerticesBegin(), vend = stroke.strokeVerticesEnd(); v != vend; ++v) {
|
||||||
// XXX What's the use of i here? And is not the thickness always overriden by the last line of
|
// XXX What's the use of i here? And is not the thickness always overridden by the last line of
|
||||||
// the loop?
|
// the loop?
|
||||||
if ((1 == i) || (size - 2 == i)) {
|
if ((1 == i) || (size - 2 == i)) {
|
||||||
v->attribute().setThickness(_thickness / 2.0, 0);
|
v->attribute().setThickness(_thickness / 2.0, 0);
|
||||||
@ -156,7 +156,7 @@ int LengthDependingThicknessShader::shade(Stroke &stroke) const
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
int size = stroke.strokeVerticesSize();
|
int size = stroke.strokeVerticesSize();
|
||||||
for (v = stroke.strokeVerticesBegin(), vend = stroke.strokeVerticesEnd(); v != vend; ++v) {
|
for (v = stroke.strokeVerticesBegin(), vend = stroke.strokeVerticesEnd(); v != vend; ++v) {
|
||||||
// XXX What's the use of i here? And is not the thickness always overriden by the last line of
|
// XXX What's the use of i here? And is not the thickness always overridden by the last line of
|
||||||
// the loop?
|
// the loop?
|
||||||
if ((1 == i) || (size - 2 == i)) {
|
if ((1 == i) || (size - 2 == i)) {
|
||||||
v->attribute().setThickness(thickness / 4.0, thickness / 4.0);
|
v->attribute().setThickness(thickness / 4.0, thickness / 4.0);
|
||||||
@ -427,7 +427,7 @@ int BezierCurveShader::shade(Stroke &stroke) const
|
|||||||
int newsize = stroke.strokeVerticesSize();
|
int newsize = stroke.strokeVerticesSize();
|
||||||
int nExtraVertex = 0;
|
int nExtraVertex = 0;
|
||||||
if (newsize < originalSize) {
|
if (newsize < originalSize) {
|
||||||
cerr << "Warning: unsufficient resampling" << endl;
|
cerr << "Warning: insufficient resampling" << endl;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nExtraVertex = newsize - originalSize;
|
nExtraVertex = newsize - originalSize;
|
||||||
|
@ -39,7 +39,7 @@ class Chain : public Curve {
|
|||||||
_fedgeB; // the last FEdge of the ViewEdge passed to the last call for push_viewedge_back().
|
_fedgeB; // the last FEdge of the ViewEdge passed to the last call for push_viewedge_back().
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Defult constructor. */
|
/*! Default constructor. */
|
||||||
Chain() : Curve()
|
Chain() : Curve()
|
||||||
{
|
{
|
||||||
_splittingId = 0;
|
_splittingId = 0;
|
||||||
|
@ -205,7 +205,7 @@ class CurvePoint : public Interface0D {
|
|||||||
Vec3r _Point3d;
|
Vec3r _Point3d;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Defult Constructor. */
|
/*! Default Constructor. */
|
||||||
CurvePoint();
|
CurvePoint();
|
||||||
|
|
||||||
/*! Builds a CurvePoint from two SVertex and an interpolation parameter.
|
/*! Builds a CurvePoint from two SVertex and an interpolation parameter.
|
||||||
|
@ -50,8 +50,8 @@ class CurvePoint_nonconst_traits : public Nonconst_traits<CurvePoint *> {
|
|||||||
/* */
|
/* */
|
||||||
/**********************************/
|
/**********************************/
|
||||||
|
|
||||||
/*! iterator on a curve. Allows an iterating outside initial vertices. A CurvePoint is
|
/*! iterator on a curve. Allows an iterating outside initial vertices. A CurvePoint is
|
||||||
* instanciated an returned when the iterator is dereferenced.
|
* instantiated and returned when the iterator is dereferenced.
|
||||||
*/
|
*/
|
||||||
template<class Traits>
|
template<class Traits>
|
||||||
class __point_iterator : public IteratorBase<Traits, BidirectionalIteratorTag_Traits> {
|
class __point_iterator : public IteratorBase<Traits, BidirectionalIteratorTag_Traits> {
|
||||||
|
@ -30,7 +30,7 @@ namespace Freestyle {
|
|||||||
namespace CurveInternal {
|
namespace CurveInternal {
|
||||||
|
|
||||||
/*! iterator on a curve. Allows an iterating outside
|
/*! iterator on a curve. Allows an iterating outside
|
||||||
* initial vertices. A CurvePoint is instanciated an returned
|
* initial vertices. A CurvePoint is instantiated an returned
|
||||||
* when the iterator is dereferenced.
|
* when the iterator is dereferenced.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -653,7 +653,7 @@ class Stroke : public Interface1D {
|
|||||||
return _textureId;
|
return _textureId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Returns the spacing of texture coordinates along the stroke lenght */
|
/*! Returns the spacing of texture coordinates along the stroke length */
|
||||||
inline float getTextureStep()
|
inline float getTextureStep()
|
||||||
{
|
{
|
||||||
return _textureStep;
|
return _textureStep;
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
namespace Freestyle {
|
namespace Freestyle {
|
||||||
|
|
||||||
// use for iterators defintions
|
// use for iterators definitions
|
||||||
template<class Element> class Nonconst_traits;
|
template<class Element> class Nonconst_traits;
|
||||||
|
|
||||||
template<class Element> class Const_traits {
|
template<class Element> class Const_traits {
|
||||||
|
@ -131,7 +131,7 @@ void CulledOccluderSource::cullViewEdges(ViewMap &viewMap, bool extensiveFEdgeSe
|
|||||||
GridHelpers::getDefaultViewProscenium(occluderProscenium);
|
GridHelpers::getDefaultViewProscenium(occluderProscenium);
|
||||||
|
|
||||||
// XXX Freestyle is inconsistent in its use of ViewMap::viewedges_container and
|
// XXX Freestyle is inconsistent in its use of ViewMap::viewedges_container and
|
||||||
// vector<ViewEdge*>::iterator. Probably all occurences of vector<ViewEdge*>::iterator should be
|
// vector<ViewEdge*>::iterator. Probably all occurrences of vector<ViewEdge*>::iterator should be
|
||||||
// replaced ViewMap::viewedges_container throughout the code. For each view edge
|
// replaced ViewMap::viewedges_container throughout the code. For each view edge
|
||||||
ViewMap::viewedges_container::iterator ve, veend;
|
ViewMap::viewedges_container::iterator ve, veend;
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ void CulledOccluderSource::cullViewEdges(ViewMap &viewMap, bool extensiveFEdgeSe
|
|||||||
// If none exists, find the feature edge with center point closest to viewport origin.
|
// If none exists, find the feature edge with center point closest to viewport origin.
|
||||||
// Expand occluder proscenium to enclose center point.
|
// Expand occluder proscenium to enclose center point.
|
||||||
|
|
||||||
// For each feature edge, while bestOccluderTarget not found and view edge not visibile
|
// For each feature edge, while bestOccluderTarget not found and view edge not visible
|
||||||
bool bestOccluderTargetFound = false;
|
bool bestOccluderTargetFound = false;
|
||||||
FEdge *bestOccluderTarget = NULL;
|
FEdge *bestOccluderTarget = NULL;
|
||||||
real bestOccluderDistance = 0.0;
|
real bestOccluderDistance = 0.0;
|
||||||
|
@ -132,7 +132,7 @@ void FEdgeXDetector::preProcessShape(WXShape *iWShape)
|
|||||||
|
|
||||||
vector<WFace *> &wfaces = iWShape->GetFaceList();
|
vector<WFace *> &wfaces = iWShape->GetFaceList();
|
||||||
vector<WFace *>::iterator f, fend;
|
vector<WFace *>::iterator f, fend;
|
||||||
// view dependant stuff
|
// view dependent stuff
|
||||||
for (f = wfaces.begin(), fend = wfaces.end(); f != fend; ++f) {
|
for (f = wfaces.begin(), fend = wfaces.end(); f != fend; ++f) {
|
||||||
preProcessFace((WXFace *)(*f));
|
preProcessFace((WXFace *)(*f));
|
||||||
}
|
}
|
||||||
@ -226,7 +226,7 @@ void FEdgeXDetector::computeCurvatures(WXVertex *vertex)
|
|||||||
_minK1 = absK1;
|
_minK1 = absK1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// view dependant
|
// view dependent
|
||||||
C = vertex->curvatures();
|
C = vertex->curvatures();
|
||||||
if (C == 0) {
|
if (C == 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -168,7 +168,7 @@ class SVertex : public Interface0D {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/*! A field that can be used by the user to store any data.
|
/*! A field that can be used by the user to store any data.
|
||||||
* This field must be reseted afterwards using ResetUserData().
|
* This field must be reset afterwards using ResetUserData().
|
||||||
*/
|
*/
|
||||||
void *userdata;
|
void *userdata;
|
||||||
|
|
||||||
@ -535,7 +535,7 @@ class FEdge : public Interface1D {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/*! A field that can be used by the user to store any data.
|
/*! A field that can be used by the user to store any data.
|
||||||
* This field must be reseted afterwards using ResetUserData().
|
* This field must be reset afterwards using ResetUserData().
|
||||||
*/
|
*/
|
||||||
void *userdata;
|
void *userdata;
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ void ViewEdgeXBuilder::Init(ViewShape *oVShape)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// for design conveniance, we store the current SShape.
|
// for design convenience, we store the current SShape.
|
||||||
_pCurrentSShape = oVShape->sshape();
|
_pCurrentSShape = oVShape->sshape();
|
||||||
if (0 == _pCurrentSShape) {
|
if (0 == _pCurrentSShape) {
|
||||||
return;
|
return;
|
||||||
@ -627,12 +627,12 @@ OWXEdge ViewEdgeXBuilder::FindNextWEdge(const OWXEdge &iEdge)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (wxe->GetaVertex() == v) {
|
if (wxe->GetaVertex() == v) {
|
||||||
// That means that the face necesarily lies on the edge left.
|
// That means that the face necessarily lies on the edge left.
|
||||||
// So the vertex order is OK.
|
// So the vertex order is OK.
|
||||||
return OWXEdge(wxe, true);
|
return OWXEdge(wxe, true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// That means that the face necesarily lies on the edge left.
|
// That means that the face necessarily lies on the edge left.
|
||||||
// So the vertex order is OK.
|
// So the vertex order is OK.
|
||||||
return OWXEdge(wxe, false);
|
return OWXEdge(wxe, false);
|
||||||
}
|
}
|
||||||
|
@ -272,11 +272,11 @@ class ViewEdgeXBuilder {
|
|||||||
FEdge *BuildSharpFEdge(FEdge *feprevious, const OWXEdge &iwe);
|
FEdge *BuildSharpFEdge(FEdge *feprevious, const OWXEdge &iwe);
|
||||||
|
|
||||||
// GENERAL //
|
// GENERAL //
|
||||||
/*! Instanciate a SVertex */
|
/*! Instantiate a SVertex */
|
||||||
SVertex *MakeSVertex(Vec3r &iPoint);
|
SVertex *MakeSVertex(Vec3r &iPoint);
|
||||||
/*! Instanciate a SVertex if it hasn't been already created */
|
/*! Instantiate a SVertex if it hasn't been already created */
|
||||||
SVertex *MakeSVertex(Vec3r &iPoint, bool shared);
|
SVertex *MakeSVertex(Vec3r &iPoint, bool shared);
|
||||||
/*! instanciate a ViewVertex from a SVertex, if it doesn't exist yet */
|
/*! instantiate a ViewVertex from a SVertex, if it doesn't exist yet */
|
||||||
ViewVertex *MakeViewVertex(SVertex *iSVertex);
|
ViewVertex *MakeViewVertex(SVertex *iSVertex);
|
||||||
|
|
||||||
// oldtmp values
|
// oldtmp values
|
||||||
|
@ -81,7 +81,7 @@ class ViewMap {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/*! A field that can be used by the user to store any data.
|
/*! A field that can be used by the user to store any data.
|
||||||
* This field must be reseted afterwards using ResetUserData().
|
* This field must be reset afterwards using ResetUserData().
|
||||||
*/
|
*/
|
||||||
void *userdata;
|
void *userdata;
|
||||||
|
|
||||||
@ -292,7 +292,7 @@ class ViewVertex : public Interface0D {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/*! A field that can be used by the user to store any data.
|
/*! A field that can be used by the user to store any data.
|
||||||
* This field must be reseted afterwards using ResetUserData().
|
* This field must be reset afterwards using ResetUserData().
|
||||||
*/
|
*/
|
||||||
void *userdata;
|
void *userdata;
|
||||||
|
|
||||||
@ -962,7 +962,7 @@ class ViewEdge : public Interface1D {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/*! A field that can be used by the user to store any data.
|
/*! A field that can be used by the user to store any data.
|
||||||
* This field must be reseted afterwards using ResetUserData().
|
* This field must be reset afterwards using ResetUserData().
|
||||||
*/
|
*/
|
||||||
void *userdata;
|
void *userdata;
|
||||||
|
|
||||||
@ -1414,7 +1414,7 @@ class ViewShape {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/*! A field that can be used by the user to store any data.
|
/*! A field that can be used by the user to store any data.
|
||||||
* This field must be reseted afterwards using ResetUserData().
|
* This field must be reset afterwards using ResetUserData().
|
||||||
*/
|
*/
|
||||||
void *userdata;
|
void *userdata;
|
||||||
|
|
||||||
|
@ -1137,7 +1137,7 @@ void ViewMapBuilder::CullViewEdges(ViewMap *ioViewMap,
|
|||||||
// If none exists, find the feature edge with center point closest to viewport origin.
|
// If none exists, find the feature edge with center point closest to viewport origin.
|
||||||
// Expand occluder proscenium to enclose center point.
|
// Expand occluder proscenium to enclose center point.
|
||||||
|
|
||||||
// For each feature edge, while bestOccluderTarget not found and view edge not visibile
|
// For each feature edge, while bestOccluderTarget not found and view edge not visible
|
||||||
bool bestOccluderTargetFound = false;
|
bool bestOccluderTargetFound = false;
|
||||||
FEdge *bestOccluderTarget = NULL;
|
FEdge *bestOccluderTarget = NULL;
|
||||||
real bestOccluderDistance = 0.0;
|
real bestOccluderDistance = 0.0;
|
||||||
|
@ -546,7 +546,7 @@ void gts_vertex_principal_directions(WVertex *v, Vec3r Kh, real Kg, Vec3r &e1, V
|
|||||||
e1[2] = eig[0] * basis1[2] + eig[1] * basis2[2];
|
e1[2] = eig[0] * basis1[2] + eig[1] * basis2[2];
|
||||||
e1.normalize();
|
e1.normalize();
|
||||||
|
|
||||||
/* make N,e1,e2 a right handed coordinate sytem */
|
/* make N,e1,e2 a right handed coordinate system */
|
||||||
e2 = N ^ e1;
|
e2 = N ^ e1;
|
||||||
e2.normalize();
|
e2.normalize();
|
||||||
}
|
}
|
||||||
|
@ -303,7 +303,7 @@ static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *co
|
|||||||
/* create a target */
|
/* create a target */
|
||||||
target = (PoseTarget *)MEM_callocN(sizeof(PoseTarget), "posetarget");
|
target = (PoseTarget *)MEM_callocN(sizeof(PoseTarget), "posetarget");
|
||||||
target->con = con;
|
target->con = con;
|
||||||
// by contruction there can be only one tree per channel
|
// by construction there can be only one tree per channel
|
||||||
// and each channel can be part of at most one tree.
|
// and each channel can be part of at most one tree.
|
||||||
tree = (PoseTree *)pchan_root->iktree.first;
|
tree = (PoseTree *)pchan_root->iktree.first;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ creating an openexr read/writer use openexr.c
|
|||||||
It should contain functions to match the following prototypes:
|
It should contain functions to match the following prototypes:
|
||||||
|
|
||||||
struct ImBuf *imb_loadopenexr(unsigned char *mem,int size,int flags);
|
struct ImBuf *imb_loadopenexr(unsigned char *mem,int size,int flags);
|
||||||
/* Use one of the following depending on whats easyer for your file format */
|
/* Use one of the following depending on what's easier for your file format */
|
||||||
short imb_saveopenexr(struct ImBuf *ibuf, FILE myfile, int flags);
|
short imb_saveopenexr(struct ImBuf *ibuf, FILE myfile, int flags);
|
||||||
short imb_saveopenexr(struct ImBuf *ibuf, char *myfile, int flags);
|
short imb_saveopenexr(struct ImBuf *ibuf, char *myfile, int flags);
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ static void cryptomatte_add(NodeCryptomatte *n, float f)
|
|||||||
++start;
|
++start;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find the next seprator. */
|
/* Find the next separator. */
|
||||||
char *token_end = strchr(n->matte_id + start, ',');
|
char *token_end = strchr(n->matte_id + start, ',');
|
||||||
if (token_end == NULL || token_end == n->matte_id + start) {
|
if (token_end == NULL || token_end == n->matte_id + start) {
|
||||||
token_end = n->matte_id + end;
|
token_end = n->matte_id + end;
|
||||||
@ -142,7 +142,7 @@ static void cryptomatte_remove(NodeCryptomatte *n, float f)
|
|||||||
++start;
|
++start;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find the next seprator. */
|
/* Find the next separator. */
|
||||||
char *token_end = strchr(n->matte_id + start + 1, ',');
|
char *token_end = strchr(n->matte_id + start + 1, ',');
|
||||||
if (token_end == NULL || token_end == n->matte_id + start) {
|
if (token_end == NULL || token_end == n->matte_id + start) {
|
||||||
token_end = n->matte_id + end;
|
token_end = n->matte_id + end;
|
||||||
|
@ -39,7 +39,7 @@ static void node_composit_init_vecblur(bNodeTree *UNUSED(ntree), bNode *node)
|
|||||||
nbd->fac = 1.0f;
|
nbd->fac = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* custom1: itterations, custom2: maxspeed (0 = nolimit) */
|
/* custom1: iterations, custom2: maxspeed (0 = nolimit) */
|
||||||
void register_node_type_cmp_vecblur(void)
|
void register_node_type_cmp_vecblur(void)
|
||||||
{
|
{
|
||||||
static bNodeType ntype;
|
static bNodeType ntype;
|
||||||
|
@ -2566,7 +2566,7 @@ void RE_RenderAnim(Render *re,
|
|||||||
for (nfra = sfra, scene->r.cfra = sfra; scene->r.cfra <= efra; scene->r.cfra++) {
|
for (nfra = sfra, scene->r.cfra = sfra; scene->r.cfra <= efra; scene->r.cfra++) {
|
||||||
char name[FILE_MAX];
|
char name[FILE_MAX];
|
||||||
|
|
||||||
/* Here is a feedback loop exists -- render initialization requires updated
|
/* A feedback loop exists here -- render initialization requires updated
|
||||||
* render layers settings which could be animated, but scene evaluation for
|
* render layers settings which could be animated, but scene evaluation for
|
||||||
* the frame happens later because it depends on what layers are visible to
|
* the frame happens later because it depends on what layers are visible to
|
||||||
* render engine.
|
* render engine.
|
||||||
@ -2582,8 +2582,8 @@ void RE_RenderAnim(Render *re,
|
|||||||
AnimData *adt = BKE_animdata_from_id(&scene->id);
|
AnimData *adt = BKE_animdata_from_id(&scene->id);
|
||||||
/* TODO(sergey): Currently depsgraph is only used to check whether it is an active
|
/* TODO(sergey): Currently depsgraph is only used to check whether it is an active
|
||||||
* edit window or not to deal with unkeyed changes. We don't have depsgraph here yet,
|
* edit window or not to deal with unkeyed changes. We don't have depsgraph here yet,
|
||||||
* but we also dont' deal with unkeyed changes. But still nice to get proper depsgraph
|
* but we also don't deal with unkeyed changes. But still nice to get proper depsgraph
|
||||||
* within tjhe render pipeline, somehow.
|
* within the render pipeline, somehow.
|
||||||
*/
|
*/
|
||||||
BKE_animsys_evaluate_animdata(NULL, scene, &scene->id, adt, ctime, ADT_RECALC_ALL);
|
BKE_animsys_evaluate_animdata(NULL, scene, &scene->id, adt, ctime, ADT_RECALC_ALL);
|
||||||
}
|
}
|
||||||
|
@ -311,7 +311,7 @@ void main_signal_setup(void)
|
|||||||
|
|
||||||
void main_signal_setup_background(void)
|
void main_signal_setup_background(void)
|
||||||
{
|
{
|
||||||
/* for all platforms, even windos has it! */
|
/* for all platforms, even windows has it! */
|
||||||
BLI_assert(G.background);
|
BLI_assert(G.background);
|
||||||
|
|
||||||
# if !defined(WITH_HEADLESS)
|
# if !defined(WITH_HEADLESS)
|
||||||
|
Loading…
Reference in New Issue
Block a user