svn merge ^/trunk/blender -r49757:49763
This commit is contained in:
@@ -247,8 +247,11 @@ void BlenderSync::sync_object(BL::Object b_parent, int b_index, BL::Object b_ob,
|
||||
scene->object_manager->tag_update(scene);
|
||||
}
|
||||
|
||||
/* updated dupli objects require particle sync */
|
||||
bool need_particle_update = object_need_particle_update(b_ob);
|
||||
|
||||
/* object sync */
|
||||
if(object_updated || (object->mesh && object->mesh->need_update)) {
|
||||
if(object_updated || (object->mesh && object->mesh->need_update) || need_particle_update) {
|
||||
object->name = b_ob.name().c_str();
|
||||
object->pass_id = b_ob.pass_index();
|
||||
object->tfm = tfm;
|
||||
@@ -275,7 +278,7 @@ void BlenderSync::sync_object(BL::Object b_parent, int b_index, BL::Object b_ob,
|
||||
object->particle_id = particle_id;
|
||||
|
||||
/* particle sync */
|
||||
if (object_use_particles(b_ob))
|
||||
if (need_particle_update)
|
||||
sync_particles(object, b_ob);
|
||||
|
||||
object->tag_update(scene);
|
||||
|
||||
@@ -31,7 +31,7 @@ CCL_NAMESPACE_BEGIN
|
||||
|
||||
/* Particles Sync */
|
||||
|
||||
bool BlenderSync::object_use_particles(BL::Object b_ob)
|
||||
bool BlenderSync::object_need_particle_update(BL::Object b_ob)
|
||||
{
|
||||
/* Particle data is only needed for
|
||||
* a) Billboard render mode if object's own material uses particle info
|
||||
@@ -39,7 +39,7 @@ bool BlenderSync::object_use_particles(BL::Object b_ob)
|
||||
*
|
||||
* Note: Meshes have to be synced at this point!
|
||||
*/
|
||||
bool use_particles = false;
|
||||
bool need_update = false;
|
||||
|
||||
BL::Object::particle_systems_iterator b_psys;
|
||||
for (b_ob.particle_systems.begin(b_psys); b_psys != b_ob.particle_systems.end(); ++b_psys) {
|
||||
@@ -54,7 +54,7 @@ bool BlenderSync::object_use_particles(BL::Object b_ob)
|
||||
BL::ID key = (BKE_object_is_modified(b_ob))? b_ob: b_ob.data();
|
||||
Mesh *mesh = mesh_map.find(key);
|
||||
if (mesh) {
|
||||
use_particles |= mesh->need_attribute(scene, ATTR_STD_PARTICLE);
|
||||
need_update |= mesh->need_attribute(scene, ATTR_STD_PARTICLE) && mesh->need_update;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -66,7 +66,7 @@ bool BlenderSync::object_use_particles(BL::Object b_ob)
|
||||
BL::ID key = (BKE_object_is_modified(b_dupli_ob))? b_dupli_ob: b_dupli_ob.data();
|
||||
Mesh *mesh = mesh_map.find(key);
|
||||
if (mesh) {
|
||||
use_particles |= mesh->need_attribute(scene, ATTR_STD_PARTICLE);
|
||||
need_update |= mesh->need_attribute(scene, ATTR_STD_PARTICLE) && mesh->need_update;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -80,7 +80,7 @@ bool BlenderSync::object_use_particles(BL::Object b_ob)
|
||||
BL::ID key = (BKE_object_is_modified(*b_gob))? *b_gob: b_gob->data();
|
||||
Mesh *mesh = mesh_map.find(key);
|
||||
if (mesh) {
|
||||
use_particles |= mesh->need_attribute(scene, ATTR_STD_PARTICLE);
|
||||
need_update |= mesh->need_attribute(scene, ATTR_STD_PARTICLE) && mesh->need_update;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -93,7 +93,7 @@ bool BlenderSync::object_use_particles(BL::Object b_ob)
|
||||
}
|
||||
}
|
||||
|
||||
return use_particles;
|
||||
return need_update;
|
||||
}
|
||||
|
||||
static bool use_particle_system(BL::ParticleSystem b_psys)
|
||||
|
||||
@@ -92,7 +92,7 @@ private:
|
||||
bool BKE_object_is_modified(BL::Object b_ob);
|
||||
bool object_is_mesh(BL::Object b_ob);
|
||||
bool object_is_light(BL::Object b_ob);
|
||||
bool object_use_particles(BL::Object b_ob);
|
||||
bool object_need_particle_update(BL::Object b_ob);
|
||||
int object_count_particles(BL::Object b_ob);
|
||||
|
||||
/* variables */
|
||||
|
||||
@@ -107,7 +107,7 @@ static void downsampleNeumann(const float *from, float *to, int n, int stride)
|
||||
// if these values are not local incorrect results are generated
|
||||
float downCoeffs[32] = { DOWNCOEFFS };
|
||||
const float *const aCoCenter= &downCoeffs[16];
|
||||
for (int i = 0; i < ceil((float)n / 2); i++) {
|
||||
for (int i = 0; i <= n / 2; i++) {
|
||||
to[i * stride] = 0;
|
||||
for (int k = 2 * i - 16; k < 2 * i + 16; k++) {
|
||||
// handle boundary
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# Configuration Blender
|
||||
import bpy
|
||||
|
||||
bpy.context.user_preferences.view.use_mouse_auto_depth = False
|
||||
bpy.context.user_preferences.view.use_mouse_depth_cursor = False
|
||||
bpy.context.user_preferences.view.use_mouse_depth_navigate = False
|
||||
bpy.context.user_preferences.view.use_zoom_to_mouse = False
|
||||
bpy.context.user_preferences.view.use_rotate_around_active = False
|
||||
bpy.context.user_preferences.edit.use_drag_immediately = False
|
||||
|
||||
@@ -782,12 +782,11 @@ class ConstraintButtonsPanel():
|
||||
row.prop(con, "frame_method", expand=True)
|
||||
|
||||
if clip:
|
||||
col.prop_search(con, "object", clip.tracking, "objects", icon='OBJECT_DATA')
|
||||
tracking = clip.tracking
|
||||
|
||||
if con.object in clip.tracking.objects:
|
||||
tracking_object = clip.tracking.objects[con.object]
|
||||
else:
|
||||
tracking_object = clip.tracking
|
||||
col.prop_search(con, "object", tracking, "objects", icon='OBJECT_DATA')
|
||||
|
||||
tracking_object = tracking.objects.get(con.object, tracking.objects[0])
|
||||
|
||||
col.prop_search(con, "track", tracking_object, "tracks", icon='ANIM_DATA')
|
||||
|
||||
|
||||
@@ -197,7 +197,8 @@ class USERPREF_PT_interface(Panel):
|
||||
|
||||
col = row.column()
|
||||
col.label(text="View Manipulation:")
|
||||
col.prop(view, "use_mouse_auto_depth")
|
||||
col.prop(view, "use_mouse_depth_cursor")
|
||||
col.prop(view, "use_mouse_depth_navigate")
|
||||
col.prop(view, "use_zoom_to_mouse")
|
||||
col.prop(view, "use_rotate_around_active")
|
||||
col.prop(view, "use_global_pivot")
|
||||
|
||||
@@ -66,13 +66,8 @@ void BokehBlurOperation::initExecution()
|
||||
int width = this->m_inputBokehProgram->getWidth();
|
||||
int height = this->m_inputBokehProgram->getHeight();
|
||||
|
||||
float dimension;
|
||||
if (width < height) {
|
||||
dimension = width;
|
||||
}
|
||||
else {
|
||||
dimension = height;
|
||||
}
|
||||
float dimension = min(width, height);
|
||||
|
||||
this->m_bokehMidX = width / 2.0f;
|
||||
this->m_bokehMidY = height / 2.0f;
|
||||
this->m_bokehDimension = dimension / 2.0f;
|
||||
@@ -93,7 +88,8 @@ void BokehBlurOperation::executePixel(float *color, int x, int y, void *data)
|
||||
int bufferwidth = inputBuffer->getWidth();
|
||||
int bufferstartx = inputBuffer->getRect()->xmin;
|
||||
int bufferstarty = inputBuffer->getRect()->ymin;
|
||||
int pixelSize = this->m_size * this->getWidth() / 100.0f;
|
||||
const float max_dim = max(this->getWidth(), this->getHeight());
|
||||
int pixelSize = this->m_size * max_dim / 100.0f;
|
||||
zero_v4(color_accum);
|
||||
|
||||
if (pixelSize<2) {
|
||||
@@ -150,18 +146,19 @@ bool BokehBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBuffe
|
||||
{
|
||||
rcti newInput;
|
||||
rcti bokehInput;
|
||||
const float max_dim = max(this->getWidth(), this->getHeight());
|
||||
|
||||
if (this->m_sizeavailable) {
|
||||
newInput.xmax = input->xmax + (this->m_size * this->getWidth() / 100.0f);
|
||||
newInput.xmin = input->xmin - (this->m_size * this->getWidth() / 100.0f);
|
||||
newInput.ymax = input->ymax + (this->m_size * this->getWidth() / 100.0f);
|
||||
newInput.ymin = input->ymin - (this->m_size * this->getWidth() / 100.0f);
|
||||
newInput.xmax = input->xmax + (this->m_size * max_dim / 100.0f);
|
||||
newInput.xmin = input->xmin - (this->m_size * max_dim / 100.0f);
|
||||
newInput.ymax = input->ymax + (this->m_size * max_dim / 100.0f);
|
||||
newInput.ymin = input->ymin - (this->m_size * max_dim / 100.0f);
|
||||
}
|
||||
else {
|
||||
newInput.xmax = input->xmax + (10.0f * this->getWidth() / 100.0f);
|
||||
newInput.xmin = input->xmin - (10.0f * this->getWidth() / 100.0f);
|
||||
newInput.ymax = input->ymax + (10.0f * this->getWidth() / 100.0f);
|
||||
newInput.ymin = input->ymin - (10.0f * this->getWidth() / 100.0f);
|
||||
newInput.xmax = input->xmax + (10.0f * max_dim / 100.0f);
|
||||
newInput.xmin = input->xmin - (10.0f * max_dim / 100.0f);
|
||||
newInput.ymax = input->ymax + (10.0f * max_dim / 100.0f);
|
||||
newInput.ymin = input->ymin - (10.0f * max_dim / 100.0f);
|
||||
}
|
||||
|
||||
NodeOperation *operation = getInputOperation(1);
|
||||
@@ -203,7 +200,8 @@ void BokehBlurOperation::executeOpenCL(OpenCLDevice *device,
|
||||
if (!this->m_sizeavailable) {
|
||||
updateSize();
|
||||
}
|
||||
cl_int radius = this->getWidth() * this->m_size / 100.0f;
|
||||
const float max_dim = max(this->getWidth(), this->getHeight());
|
||||
cl_int radius = this->m_size * max_dim / 100.0f;
|
||||
cl_int step = this->getStep();
|
||||
|
||||
device->COM_clAttachMemoryBufferToKernelParameter(kernel, 0, -1, clMemToCleanUp, inputMemoryBuffers, this->m_inputBoundingBoxReader);
|
||||
|
||||
@@ -434,7 +434,7 @@ static void viewops_data_create(bContext *C, wmOperator *op, wmEvent *event)
|
||||
calculateTransformCenter(C, V3D_CENTROID, lastofs, NULL);
|
||||
negate_v3_v3(vod->dyn_ofs, lastofs);
|
||||
}
|
||||
else if (U.uiflag & USER_ORBIT_ZBUF) {
|
||||
else if (U.uiflag & USER_ZBUF_ORBIT) {
|
||||
|
||||
view3d_operator_needs_opengl(C); /* needed for zbuf drawing */
|
||||
|
||||
@@ -3402,7 +3402,7 @@ static int set_3dcursor_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *eve
|
||||
if (mval[0] != IS_CLIPPED) {
|
||||
short depth_used = 0;
|
||||
|
||||
if (U.uiflag & USER_ORBIT_ZBUF) { /* maybe this should be accessed some other way */
|
||||
if (U.uiflag & USER_ZBUF_CURSOR) { /* maybe this should be accessed some other way */
|
||||
view3d_operator_needs_opengl(C);
|
||||
if (ED_view3d_autodist(scene, ar, v3d, event->mval, fp))
|
||||
depth_used = 1;
|
||||
|
||||
@@ -503,13 +503,12 @@ extern UserDef U; /* from blenkernel blender.c */
|
||||
/*#define USER_FLIPFULLSCREEN (1 << 7)*/ /* deprecated */
|
||||
#define USER_ALLWINCODECS (1 << 8)
|
||||
#define USER_MENUOPENAUTO (1 << 9)
|
||||
/*#define USER_PANELPINNED (1 << 10) deprecated */
|
||||
#define USER_ZBUF_CURSOR (1 << 10)
|
||||
#define USER_AUTOPERSP (1 << 11)
|
||||
#define USER_LOCKAROUND (1 << 12)
|
||||
#define USER_GLOBALUNDO (1 << 13)
|
||||
#define USER_ORBIT_SELECTION (1 << 14)
|
||||
// old flag for #define USER_KEYINSERTAVAI (1 << 15)
|
||||
#define USER_ORBIT_ZBUF (1 << 15)
|
||||
#define USER_ZBUF_ORBIT (1 << 15)
|
||||
#define USER_HIDE_DOT (1 << 16)
|
||||
#define USER_SHOW_ROTVIEWICON (1 << 17)
|
||||
#define USER_SHOW_VIEWPORTNAME (1 << 18)
|
||||
|
||||
@@ -2542,11 +2542,16 @@ static void rna_def_userdef_view(BlenderRNA *brna)
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCKAROUND);
|
||||
RNA_def_property_ui_text(prop, "Global Pivot", "Lock the same rotation/scaling pivot in all 3D Views");
|
||||
|
||||
prop = RNA_def_property(srna, "use_mouse_auto_depth", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_ZBUF);
|
||||
prop = RNA_def_property(srna, "use_mouse_depth_navigate", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZBUF_ORBIT);
|
||||
RNA_def_property_ui_text(prop, "Auto Depth",
|
||||
"Use the depth under the mouse to improve view pan/rotate/zoom functionality");
|
||||
|
||||
prop = RNA_def_property(srna, "use_mouse_depth_cursor", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZBUF_CURSOR);
|
||||
RNA_def_property_ui_text(prop, "Cursor Depth",
|
||||
"Use the depth under the mouse when placing the cursor");
|
||||
|
||||
prop = RNA_def_property(srna, "use_camera_lock_parent", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_CAM_LOCK_NO_PARENT);
|
||||
RNA_def_property_ui_text(prop, "Camera Parent Lock",
|
||||
|
||||
Reference in New Issue
Block a user