[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43110] branches/asset-browser: Asset-Browser Branch:
Thomas Dinges
blender at dingto.org
Wed Jan 4 01:45:40 CET 2012
Revision: 43110
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43110
Author: dingto
Date: 2012-01-04 00:45:35 +0000 (Wed, 04 Jan 2012)
Log Message:
-----------
Asset-Browser Branch:
* Merge in changes from Trunk, svn 43077-43109
Modified Paths:
--------------
branches/asset-browser/intern/cycles/blender/blender_object.cpp
branches/asset-browser/intern/cycles/blender/blender_sync.cpp
branches/asset-browser/release/scripts/startup/bl_operators/anim.py
branches/asset-browser/release/scripts/startup/bl_ui/properties_data_mesh.py
branches/asset-browser/release/scripts/startup/bl_ui/properties_object_constraint.py
branches/asset-browser/release/scripts/startup/bl_ui/space_userpref_keymap.py
branches/asset-browser/release/scripts/startup/bl_ui/space_view3d.py
branches/asset-browser/source/blender/blenfont/intern/blf.c
branches/asset-browser/source/blender/blenfont/intern/blf_glyph.c
branches/asset-browser/source/blender/blenkernel/intern/object.c
branches/asset-browser/source/blender/editors/animation/anim_ipo_utils.c
branches/asset-browser/source/blender/editors/armature/editarmature.c
branches/asset-browser/source/blender/editors/armature/poselib.c
branches/asset-browser/source/blender/editors/armature/poseobject.c
branches/asset-browser/source/blender/editors/include/ED_object.h
branches/asset-browser/source/blender/editors/mesh/mesh_data.c
branches/asset-browser/source/blender/editors/object/object_edit.c
branches/asset-browser/source/blender/editors/object/object_group.c
branches/asset-browser/source/blender/editors/object/object_shapekey.c
branches/asset-browser/source/blender/editors/object/object_vgroup.c
branches/asset-browser/source/blender/editors/physics/dynamicpaint_ops.c
branches/asset-browser/source/blender/editors/physics/particle_object.c
branches/asset-browser/source/blender/editors/render/render_shading.c
branches/asset-browser/source/blender/gpu/GPU_buffers.h
branches/asset-browser/source/blender/gpu/intern/gpu_buffers.c
branches/asset-browser/source/blender/gpu/intern/gpu_material.c
branches/asset-browser/source/blender/modifiers/SConscript
branches/asset-browser/source/blender/python/mathutils/mathutils_Vector.c
branches/asset-browser/source/blender/render/intern/source/external_engine.c
branches/asset-browser/source/blender/render/intern/source/imagetexture.c
branches/asset-browser/source/blender/render/intern/source/render_texture.c
Property Changed:
----------------
branches/asset-browser/
branches/asset-browser/source/blender/editors/space_outliner/
Property changes on: branches/asset-browser
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,42997-42998
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
+ /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,42997-42998
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
/trunk/blender:43077-43109
Modified: branches/asset-browser/intern/cycles/blender/blender_object.cpp
===================================================================
--- branches/asset-browser/intern/cycles/blender/blender_object.cpp 2012-01-04 00:23:34 UTC (rev 43109)
+++ branches/asset-browser/intern/cycles/blender/blender_object.cpp 2012-01-04 00:45:35 UTC (rev 43110)
@@ -234,13 +234,20 @@
object_free_duplilist(*b_ob);
- /* check if we should render duplicator */
hide = true;
- BL::Object::particle_systems_iterator b_psys;
+ }
- for(b_ob->particle_systems.begin(b_psys); b_psys != b_ob->particle_systems.end(); ++b_psys)
- if(b_psys->settings().use_render_emitter())
- hide = false;
+ /* check if we should render or hide particle emitter */
+ BL::Object::particle_systems_iterator b_psys;
+ bool render_emitter = false;
+
+ for(b_ob->particle_systems.begin(b_psys); b_psys != b_ob->particle_systems.end(); ++b_psys) {
+ if(b_psys->settings().use_render_emitter()) {
+ hide = false;
+ render_emitter = true;
+ }
+ else if(!render_emitter)
+ hide = true;
}
if(!hide) {
Modified: branches/asset-browser/intern/cycles/blender/blender_sync.cpp
===================================================================
--- branches/asset-browser/intern/cycles/blender/blender_sync.cpp 2012-01-04 00:23:34 UTC (rev 43109)
+++ branches/asset-browser/intern/cycles/blender/blender_sync.cpp 2012-01-04 00:45:35 UTC (rev 43110)
@@ -69,13 +69,13 @@
BL::BlendData::materials_iterator b_mat;
for(b_data.materials.begin(b_mat); b_mat != b_data.materials.end(); ++b_mat)
- if(b_mat->is_updated())
+ if(b_mat->is_updated() || (b_mat->node_tree() && b_mat->node_tree().is_updated()))
shader_map.set_recalc(*b_mat);
BL::BlendData::lamps_iterator b_lamp;
for(b_data.lamps.begin(b_lamp); b_lamp != b_data.lamps.end(); ++b_lamp)
- if(b_lamp->is_updated())
+ if(b_lamp->is_updated() || (b_lamp->node_tree() && b_lamp->node_tree().is_updated()))
shader_map.set_recalc(*b_lamp);
BL::BlendData::objects_iterator b_ob;
@@ -107,7 +107,8 @@
BL::BlendData::worlds_iterator b_world;
for(b_data.worlds.begin(b_world); b_world != b_data.worlds.end(); ++b_world)
- if(world_map == b_world->ptr.data && b_world->is_updated())
+ if(world_map == b_world->ptr.data &&
+ (b_world->is_updated() || (b_world->node_tree() && b_world->node_tree().is_updated())))
world_recalc = true;
bool recalc =
Modified: branches/asset-browser/release/scripts/startup/bl_operators/anim.py
===================================================================
--- branches/asset-browser/release/scripts/startup/bl_operators/anim.py 2012-01-04 00:23:34 UTC (rev 43109)
+++ branches/asset-browser/release/scripts/startup/bl_operators/anim.py 2012-01-04 00:45:35 UTC (rev 43110)
@@ -239,7 +239,7 @@
@classmethod
def poll(cls, context):
- return len(bpy.data.actions) != 0
+ return bool(bpy.data.actions)
def execute(self, context):
removed = 0
Modified: branches/asset-browser/release/scripts/startup/bl_ui/properties_data_mesh.py
===================================================================
--- branches/asset-browser/release/scripts/startup/bl_ui/properties_data_mesh.py 2012-01-04 00:23:34 UTC (rev 43109)
+++ branches/asset-browser/release/scripts/startup/bl_ui/properties_data_mesh.py 2012-01-04 00:45:35 UTC (rev 43110)
@@ -158,7 +158,7 @@
row = layout.row()
row.prop(group, "name")
- if ob.mode == 'EDIT' and len(ob.vertex_groups) > 0:
+ if ob.vertex_groups and (ob.mode == 'EDIT' or (ob.mode == 'WEIGHT_PAINT' and ob.type == 'MESH' and ob.data.use_paint_mask_vertex)):
row = layout.row()
sub = row.row(align=True)
Modified: branches/asset-browser/release/scripts/startup/bl_ui/properties_object_constraint.py
===================================================================
--- branches/asset-browser/release/scripts/startup/bl_ui/properties_object_constraint.py 2012-01-04 00:23:34 UTC (rev 43109)
+++ branches/asset-browser/release/scripts/startup/bl_ui/properties_object_constraint.py 2012-01-04 00:45:35 UTC (rev 43110)
@@ -774,7 +774,7 @@
if clip:
layout.prop_search(con, "object", clip.tracking, "objects", icon='OBJECT_DATA')
- layout.prop_search(con, "track", clip.tracking, "tracks", icon='ANIMATION_DATA')
+ layout.prop_search(con, "track", clip.tracking, "tracks", icon='ANIM_DATA')
layout.prop(con, "camera")
Modified: branches/asset-browser/release/scripts/startup/bl_ui/space_userpref_keymap.py
===================================================================
--- branches/asset-browser/release/scripts/startup/bl_ui/space_userpref_keymap.py 2012-01-04 00:23:34 UTC (rev 43109)
+++ branches/asset-browser/release/scripts/startup/bl_ui/space_userpref_keymap.py 2012-01-04 00:45:35 UTC (rev 43110)
@@ -219,7 +219,7 @@
filtered_items = [kmi for kmi in km.keymap_items if filter_text in kmi.name.lower()]
- if len(filtered_items) != 0:
+ if filtered_items:
col = layout.column()
row = col.row()
Modified: branches/asset-browser/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- branches/asset-browser/release/scripts/startup/bl_ui/space_view3d.py 2012-01-04 00:23:34 UTC (rev 43109)
+++ branches/asset-browser/release/scripts/startup/bl_ui/space_view3d.py 2012-01-04 00:45:35 UTC (rev 43110)
@@ -1052,7 +1052,7 @@
layout.operator("object.vertex_group_assign", text="Assign to New Group").new = True
ob = context.active_object
- if ob.mode == 'EDIT':
+ if ob.mode == 'EDIT' or (ob.mode == 'WEIGHT_PAINT' and ob.type == 'MESH' and ob.data.use_paint_mask_vertex):
if ob.vertex_groups.active:
layout.separator()
layout.operator("object.vertex_group_assign", text="Assign to Active Group")
Modified: branches/asset-browser/source/blender/blenfont/intern/blf.c
===================================================================
--- branches/asset-browser/source/blender/blenfont/intern/blf.c 2012-01-04 00:23:34 UTC (rev 43109)
+++ branches/asset-browser/source/blender/blenfont/intern/blf.c 2012-01-04 00:45:35 UTC (rev 43110)
@@ -479,7 +479,7 @@
}
}
-static void blf_draw__start(FontBLF *font)
+static void blf_draw__start(FontBLF *font, GLint *mode)
{
/*
* The pixmap alignment hack is handle
@@ -490,8 +490,16 @@
glEnable(GL_TEXTURE_2D);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ /* Save the current matrix mode. */
+ glGetIntegerv(GL_MATRIX_MODE, mode);
+
+ glMatrixMode(GL_TEXTURE);
glPushMatrix();
+ glLoadIdentity();
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+
if (font->flags & BLF_MATRIX)
glMultMatrixd((GLdouble *)&font->m);
@@ -508,12 +516,19 @@
/* always bind the texture for the first glyph */
font->tex_bind_state= -1;
-
}
-static void blf_draw__end(void)
+static void blf_draw__end(GLint mode)
{
+ glMatrixMode(GL_TEXTURE);
glPopMatrix();
+
+ glMatrixMode(GL_MODELVIEW);
+ glPopMatrix();
+
+ if (mode != GL_MODELVIEW)
+ glMatrixMode(mode);
+
glDisable(GL_BLEND);
glDisable(GL_TEXTURE_2D);
}
@@ -521,22 +536,24 @@
void BLF_draw(int fontid, const char *str, size_t len)
{
FontBLF *font= BLF_get(fontid);
+ GLint mode;
if (font && font->glyph_cache) {
- blf_draw__start(font);
+ blf_draw__start(font, &mode);
blf_font_draw(font, str, len);
- blf_draw__end();
+ blf_draw__end(mode);
}
}
void BLF_draw_ascii(int fontid, const char *str, size_t len)
{
FontBLF *font= BLF_get(fontid);
+ GLint mode;
if (font && font->glyph_cache) {
- blf_draw__start(font);
+ blf_draw__start(font, &mode);
blf_font_draw_ascii(font, str, len);
- blf_draw__end();
+ blf_draw__end(mode);
}
}
Modified: branches/asset-browser/source/blender/blenfont/intern/blf_glyph.c
===================================================================
--- branches/asset-browser/source/blender/blenfont/intern/blf_glyph.c 2012-01-04 00:23:34 UTC (rev 43109)
+++ branches/asset-browser/source/blender/blenfont/intern/blf_glyph.c 2012-01-04 00:45:35 UTC (rev 43110)
@@ -368,6 +368,7 @@
float dx, dx1;
float y1, y2;
float xo, yo;
+ GLint param;
if ((!g->width) || (!g->height))
return 1;
@@ -449,6 +450,11 @@
glBindTexture(GL_TEXTURE_2D, (font->tex_bind_state= g->tex));
}
+ /* Save the current parameter to restore it later. */
+ glGetTexEnviv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, ¶m);
+ if (param != GL_MODULATE)
+ glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+
if (font->flags & BLF_SHADOW) {
switch(font->shadow) {
@@ -487,5 +493,9 @@
break;
}
+ /* and restore the original value. */
+ if (param != GL_MODULATE)
+ glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, param);
+
return 1;
}
Modified: branches/asset-browser/source/blender/blenkernel/intern/object.c
===================================================================
--- branches/asset-browser/source/blender/blenkernel/intern/object.c 2012-01-04 00:23:34 UTC (rev 43109)
+++ branches/asset-browser/source/blender/blenkernel/intern/object.c 2012-01-04 00:45:35 UTC (rev 43110)
@@ -430,7 +430,8 @@
if(pchan->custom==ob)
pchan->custom= NULL;
}
- } else if(ELEM(OB_MBALL, ob->type, obt->type)) {
+ }
+ else if(ELEM(OB_MBALL, ob->type, obt->type)) {
if(is_mball_basis_for(obt, ob))
obt->recalc|= OB_RECALC_DATA;
}
@@ -608,21 +609,6 @@
sce= sce->id.next;
}
-#if 0 // XXX old animation system
- /* ipos */
- ipo= bmain->ipo.first;
- while(ipo) {
- if(ipo->id.lib==NULL) {
- IpoCurve *icu;
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list