fix for [#8236] Lens Change by driver won't update in 3d View
Lamps would not update either.
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
#include "DNA_effect_types.h"
|
||||
#include "DNA_group_types.h"
|
||||
#include "DNA_lattice_types.h"
|
||||
#include "DNA_lamp_types.h"
|
||||
#include "DNA_key_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_modifier_types.h"
|
||||
@@ -494,11 +495,20 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int
|
||||
}
|
||||
if (ob->type==OB_CAMERA) {
|
||||
Camera *cam = (Camera *)ob->data;
|
||||
if (cam->ipo) {
|
||||
dag_add_driver_relation(cam->ipo, dag, node, 1);
|
||||
}
|
||||
if (cam->dof_ob) {
|
||||
node2 = dag_get_node(dag, cam->dof_ob);
|
||||
dag_add_relation(dag,node2,node,DAG_RL_OB_OB, "Camera DoF");
|
||||
}
|
||||
}
|
||||
if (ob->type==OB_LAMP) {
|
||||
Lamp *la = (Lamp *)ob->data;
|
||||
if (la->ipo) {
|
||||
dag_add_driver_relation(la->ipo, dag, node, 1);
|
||||
}
|
||||
}
|
||||
if (ob->transflag & OB_DUPLI) {
|
||||
if((ob->transflag & OB_DUPLIGROUP) && ob->dup_group) {
|
||||
GroupObject *go;
|
||||
|
||||
@@ -2224,6 +2224,16 @@ void object_handle_update(Object *ob)
|
||||
else if(ob->type==OB_LATTICE) {
|
||||
lattice_calc_modifiers(ob);
|
||||
}
|
||||
else if(ob->type==OB_CAMERA) {
|
||||
Camera *cam = (Camera *)ob->data;
|
||||
calc_ipo(cam->ipo, frame_to_float(G.scene->r.cfra));
|
||||
execute_ipo(&cam->id, cam->ipo);
|
||||
}
|
||||
else if(ob->type==OB_LAMP) {
|
||||
Lamp *la = (Lamp *)ob->data;
|
||||
calc_ipo(la->ipo, frame_to_float(G.scene->r.cfra));
|
||||
execute_ipo(&la->id, la->ipo);
|
||||
}
|
||||
else if(ob->type==OB_ARMATURE) {
|
||||
/* this happens for reading old files and to match library armatures with poses */
|
||||
if(ob->pose==NULL || (ob->pose->flag & POSE_RECALC))
|
||||
|
||||
@@ -459,11 +459,7 @@ void RE_SetCamera(Render *re, Object *camera)
|
||||
|
||||
if(cam->type==CAM_ORTHO) re->r.mode |= R_ORTHO;
|
||||
|
||||
/* solve this too... all time depending stuff is in convertblender.c? */
|
||||
if(cam->ipo) {
|
||||
calc_ipo(cam->ipo, frame_to_float(re->r.cfra));
|
||||
execute_ipo(&cam->id, cam->ipo);
|
||||
}
|
||||
/* updating these values from ipo's/drivers is handeled by the depgraph */
|
||||
lens= cam->lens;
|
||||
shiftx=cam->shiftx;
|
||||
shifty=cam->shifty;
|
||||
|
||||
Reference in New Issue
Block a user