Page Menu
Home
Search
Configure Global Search
Log In
Files
F3101
vcselector4.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Onur Yalazı (onuryalazi)
Nov 13 2013, 1:08 PM
Size
6 KB
Subscribers
None
vcselector4.patch
View Options
Index: release/scripts/hotkeys.py
===================================================================
RCS file: /cvsroot/bf-blender/blender/release/scripts/hotkeys.py,v
retrieving revision 1.12
diff -u -r1.12 hotkeys.py
--- release/scripts/hotkeys.py 29 Jul 2006 17:22:56 -0000 1.12
+++ release/scripts/hotkeys.py 11 Nov 2006 21:02:06 -0000
@@ -427,6 +427,7 @@
"N":[
['N', 'Transform Properties panel'] ,
['N', 'OOPS window: Rename object/linked objects'] ,
+['Alt-N', 'View/Camera Selector panel'],
['Alt-N', 'Text Editor : New text '],
['Ctrl-N', 'Armature: Recalculate bone roll angles'] ,
['Ctrl-N', 'Edit Mode: Recalculate normals to outside'] ,
Index: source/blender/blenkernel/BKE_global.h
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/blenkernel/BKE_global.h,v
retrieving revision 1.44
diff -u -r1.44 BKE_global.h
--- source/blender/blenkernel/BKE_global.h 7 Nov 2006 05:32:39 -0000 1.44
+++ source/blender/blenkernel/BKE_global.h 11 Nov 2006 21:02:09 -0000
@@ -148,6 +148,8 @@
/* confusing... G.f and G.flags */
int flags;
+ /* Flag for any selecting any object as camera */
+ int anyobjectascamera;
} Global;
/* **************** GLOBAL ********************* */
Index: source/blender/include/BSE_drawview.h
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/include/BSE_drawview.h,v
retrieving revision 1.17
diff -u -r1.17 BSE_drawview.h
--- source/blender/include/BSE_drawview.h 12 Aug 2006 11:26:59 -0000 1.17
+++ source/blender/include/BSE_drawview.h 11 Nov 2006 21:02:20 -0000
@@ -78,5 +78,7 @@
void make_axis_color(char *col, char *col2, char axis);
+void select_next_camera(void);
+void select_prev_camera(void);
#endif /* BSE_DRAWVIEW_H */
Index: source/blender/src/header_view3d.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/header_view3d.c,v
retrieving revision 1.198
diff -u -r1.198 header_view3d.c
--- source/blender/src/header_view3d.c 11 Nov 2006 17:15:42 -0000 1.198
+++ source/blender/src/header_view3d.c 11 Nov 2006 21:02:47 -0000
@@ -506,6 +506,19 @@
case 18: /* render preview */
toggle_blockhandler(curarea, VIEW3D_HANDLER_PREVIEW, 0);
break;
+ case 20: /* Set active object as camera */
+ G.qual=LR_CTRLKEY;
+ persptoetsen(PAD0);
+ G.qual=0;
+ break;
+ case 21: /* Select next camera */
+ select_next_camera();
+ break;
+ case 22: /* Select previus camera */
+ select_prev_camera();
+ break;
+ case 23: /* Select any object as camera */
+ G.anyobjectascamera = !G.anyobjectascamera;
}
allqueue(REDRAWVIEW3D, 1);
}
@@ -524,7 +537,14 @@
uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Background Image...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 15, "");
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-
+ if (G.anyobjectascamera) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Select Any Object as Camera", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 23, "");
+ else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Select Any Object as Camera", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 23, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Active Object as Camera|Ctrl NumPad 0", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 20, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select Previous Camera", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 22, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select Next Camera", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 21, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
if ((G.vd->viewbut == 0) && !(G.vd->persp == 2)) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "User", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "User", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
if (G.vd->persp == 2) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Camera|NumPad 0", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
Index: source/blender/src/cameraopr.c
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "DNA_view3d_types.h"
#include "BKE_global.h"
#include "BKE_scene.h"
#include "BKE_main.h"
#include "BSE_drawview.h"
void select_next_camera()
{
Scene *sc = G.scene;
Base *base;
Object *camera = G.scene->camera;
int c=0;
for (base = sc->base.first; base; base=base->next) {
if (!c) {
if (base->object == camera ) {
c = 1;
}
} else {
if (G.anyobjectascamera || (base->object->type == OB_CAMERA)) {
G.vd->camera= base->object;
handle_view3d_lock();
return;
}
}
}
for (base = sc->base.first; base && base->object != camera; base=base->next){
if (G.anyobjectascamera || (base->object->type == OB_CAMERA)) {
G.vd->camera= base->object;
handle_view3d_lock();
return;
}
}
}
void select_prev_camera()
{
Scene *sc = G.scene;
Base *base;
Object *camera = G.scene->camera;
int c = 0;
for (base = sc->base.last; base; base=base->prev) {
if (!c) {
if (base->object == camera ) {
c = 1;
}
} else {
if (G.anyobjectascamera || (base->object->type == OB_CAMERA)) {
G.vd->camera= base->object;
handle_view3d_lock();
return;
}
}
}
for (base=sc->base.last; base && base->object != camera; base = base->prev) {
if (G.anyobjectascamera || (base->object->type == OB_CAMERA)) {
G.vd->camera= base->object;
handle_view3d_lock();
return;
}
}
}
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
11/ac/ceb4abcf1e67f46392a82b3c06ff
Event Timeline
Log In to Comment