2.5: Render
* UI layout for scene buttons has quite some changes, I tried to better organize things according to the pipeline, and also showing important properties by default, and collapsing less important ones. Some changes compared to 2.4x: * Panorama is now a Camera property. * Sequence and Compositing are now enabled by default, but will only do something when there is a node tree using nodes, or a strip in the sequence editor. * Enabling Full Sample now automatically enables Save Buffers too. * Stamp option to include info in file is removed, it now simply always does this if one of the stamp infos is enabled. * Xvid, H.264 and Ogg Theora are now directly in the file format menu, but still using FFMPEG. Unfortunately Ogg is broken at the moment (also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux, maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes it work. * Organized file format menu by image/movie types. Added: * Render layers RNA wrapped, operatorized, layouted. * FFMPEG format/codec options are now working. Defaults changed: * Compositing & Sequencer enabled. * Tiles set to 8x8. * Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "DNA_curve_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_material_types.h"
|
||||
#include "DNA_node_types.h"
|
||||
#include "DNA_texture_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
#include "DNA_world_types.h"
|
||||
@@ -43,7 +44,9 @@
|
||||
#include "BKE_library.h"
|
||||
#include "BKE_main.h"
|
||||
#include "BKE_material.h"
|
||||
#include "BKE_node.h"
|
||||
#include "BKE_particle.h"
|
||||
#include "BKE_scene.h"
|
||||
#include "BKE_texture.h"
|
||||
#include "BKE_utildefines.h"
|
||||
#include "BKE_world.h"
|
||||
@@ -689,3 +692,74 @@ void PARTICLE_OT_keyed_target_move_down(wmOperatorType *ot)
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
/********************** render layer operators *********************/
|
||||
|
||||
static int render_layer_add_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
|
||||
scene_add_render_layer(scene);
|
||||
scene->r.actlay= BLI_countlist(&scene->r.layers) - 1;
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void SCENE_OT_render_layer_add(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Add Render Layer";
|
||||
ot->idname= "SCENE_OT_render_layer_add";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= render_layer_add_exec;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
static int render_layer_remove_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SceneRenderLayer *rl;
|
||||
int act= scene->r.actlay;
|
||||
|
||||
if(BLI_countlist(&scene->r.layers) <= 1)
|
||||
return OPERATOR_CANCELLED;
|
||||
|
||||
rl= BLI_findlink(&scene->r.layers, scene->r.actlay);
|
||||
BLI_remlink(&scene->r.layers, rl);
|
||||
MEM_freeN(rl);
|
||||
|
||||
scene->r.actlay= 0;
|
||||
|
||||
if(scene->nodetree) {
|
||||
bNode *node;
|
||||
for(node= scene->nodetree->nodes.first; node; node= node->next) {
|
||||
if(node->type==CMP_NODE_R_LAYERS && node->id==NULL) {
|
||||
if(node->custom1==act)
|
||||
node->custom1= 0;
|
||||
else if(node->custom1>act)
|
||||
node->custom1--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void SCENE_OT_render_layer_remove(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Remove Render Layer";
|
||||
ot->idname= "SCENE_OT_render_layer_remove";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= render_layer_remove_exec;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user