Age | Commit message (Collapse) | Author |
|
Added four new functions as shortcuts to creating GHashes that use the
standard ptr/str/int/pair hash and compare functions.
GHash *BLI_ghash_ptr_new(const char *info);
GHash *BLI_ghash_str_new(const char *info);
GHash *BLI_ghash_int_new(const char *info);
GHash *BLI_ghash_pair_new(const char *info);
Replaced almost all occurrences of BLI_ghash_new() with one of the
above functions.
|
|
Patch provided by Matteo F. Vescovi, thanks!
|
|
|
|
functions
|
|
** I did not update rst docs. I will post on the quick-hack list. If no one volunteers to do it, I have it done before next release. **
this patch add the barebone functions to do glsl shaders in an addon.
For simplicity sakes it supports old GLSL, but not all the new modern methods (glBindFragDataLocation, ...).
It should be enough to make an addon to help with bge 2d filters.
I'm using this with a 3dview callback and it's working nicely:
self._handle = context.region.callback_add(draw_callback_px, (self, context), 'POST_VIEW')
I was considering not to commit this patch due to it not covering all OpenGL new methods.
But frankly it's not the first time bgl is expanded upon individual needs (guilty of that myself).
If a python developer knows enough to use OpenGL and need new functions, s/he should also be able to patch Blender for that,
so I see no problems here.
Another solution is to move to PyOpenGL or similar any soon.
glShaderSource implemented differently than opengl standards. It's taking one source at a time (instead of an array of sources).
This is similar with PyOpenGL solution.
glActiveTexture
glAttachShader
glCompileShader
glCreateProgram
glCreateShader
glDeleteProgram
glDeleteShader
glDetachShader
glGetAttachedShaders
glGetProgramInfoLog
glGetProgramiv
glGetShaderInfoLog
glGetShaderiv
glGetShaderSource
glGetUniformLocation
glIsProgram
glIsShader
glLinkProgram
glShaderSource
glUniform1f
glUniform2f
glUniform3f
glUniform4f
glUniform1fv
glUniform2fv
glUniform3fv
glUniform4fv
glUniform1i
glUniform2i
glUniform3i
glUniform4i
glUniform1iv
glUniform2iv
glUniform3iv
glUniform4iv
glUniformMatrix2fv
glUniformMatrix3fv
glUniformMatrix4fv
glUniformMatrix2x3fv
glUniformMatrix3x2fv
glUniformMatrix2x4fv
glUniformMatrix4x2fv
glUniformMatrix3x4fv
glUniformMatrix4x3fv
glUseProgram
glValidateProgram
|
|
undo.
The way this got updated from the context is a bit unreliable, and for handlers
the update couldn't happen because there is no context passed in. Now it's
updated from setup_app_data, which is where the change actually happens. I left
in the other updates to be sure but they should not be needed anymore.
|
|
|
|
|
|
items from python)
Thanks Philipp Oeser (lichtwerk)
|
|
|
|
add mtexpoly image access
|
|
- bm.*.layers.*.verify()
- bm.*.layers.*.is_singleton
- bm.*.layers.*.copy_from(other)
also added api functons
- BM_data_layer_copy(...)
- CustomData_layertype_is_singleton(type)
|
|
http://wiki.blender.org/index.php/Dev:Doc/CodeStyle#Braces_with_Macros
|
|
|
|
- added select similar direction (Y axis)
|
|
- Make sure functions are named in way BKE_<object>_<action> (same way as RNA callbacks)
- Make functions which are used by mball.c only static and remove their prototypes
from public header file.
Further cleanup is coming.
|
|
to BLI_array macros.
|
|
wrong (own fault)
also add check so layer.name won't crash incase the layer becomes invalid.
|
|
slight modifications.
Thanks!
|
|
blender - http://www.viva64.com/en/b/0145/
|
|
bm.loops.layers.color.new("Testing")
|
|
C: BM_face_calc_area(f), Py: BMFace.calc_area()
|
|
|
|
face_fill(..., coords=(v1, v2, ...))
This is the same function the knife tool uses. should be handy for dicing up geometry in py.
|
|
|
|
|
|
noticed.
|
|
|
|
|
|
maceros had unused args in both cases).
|
|
|
|
was used by inset but make into an api function since scripts can use this too.
|
|
generator has no access to ID Property types.
|
|
|
|
* Compile fix for r45609, pthreads include was missing.
|
|
while. This may not fix all cases but should at least solve the issue when
rendering with cycles.
The cause was a race condition on C->data.recursion, with multiple threads
accessing context at the same time. Cycles itself does not access context
from the render thread, but the bpy api would do a context update for any
callback in case e.g. a new file got loaded. Disabled that now in non-main
threads.
The ideal solution would be to not allow any context access at all from threads
but that's not so simple to implement, especially not this close to release.
|
|
revert r34885,
The hack was to fix poselib UI but is REALLY BAD - don't modify properties when accessing them.
This bug must be fixed some other way.
|
|
collection property types.
|
|
PropertyGroup
the ID of a python ID property can be NULL.
|
|
in some other cases to at least show these are not accurate.
|
|
|
|
- memset(..., -1) is used incorrectly even though it worked: MOD_solidify.c - thanks Halley from IRC for noticing this. use fill_vn_i() instead.
- quiet warnings in editmesh_slide.c
- cleanup comments in bmesh and some other minor comment additions.
|
|
loop over edges and join them without having to check if they have been removed.
|
|
- is_orthogonal now checks matrix in the same way as it's defined
by linear algebra, meaning that it'll use is_orhonormal C check
- Added is_orthogonal_axis_vectors to check if vectors which defines
axises are orthogonal
|
|
|
|
Separated it into two functions so now it'll be clear if check happens for
orthonormal or just orthogonal.
|
|
function.
|
|
--debug
--debug-ffmpeg
--debug-python
--debug-events
--debug-wm
This makes debug output easier to read - event debug prints would flood output too much before.
For convenience:
--debug-all turns all debug flags on (works as --debug did before).
also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
|
|
__copy__, except some py utilities expect __deepcopy__ to exist, so better have them.
|
|
the text editor.
- filename comparison was invalid
- was stopping on the first traceback, which would reference the caller but not the error line (when the error was in a function).
|