# AddOn: Target Camera

**URL:** <https://blenderartists.org/t/addon-target-camera/558369>\
**Category:** Released Add-ons and Extensions\
**Created:** [December 1, 2012, 9:54am UTC](https://blenderartists.org/t/addon-target-camera/558369 "2012-12-01T09:54:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![My-Key](https://blenderartists.org/letter_avatar_proxy/v4/letter/m/e19adc/32.png) [@My-Key](https://blenderartists.org/u/My-Key)\
**Post date:** [December 1, 2012, 9:54am UTC](https://blenderartists.org/t/addon-target-camera/558369/1 "2012-12-01T09:54:25Z")

</div>

Hi everyone 🙂

This is my first post and first script 🙂  
I’ve created simple script that adds camera with target, adds target to camera and ranames target to camera’s name. First two have options to change shape and size of target, the second one also have option where to place target (in front of camera or at 3D cursor).  
Hope it will be usefull 😃

If you have any requests don’t be shy and write 🙂

**Download:**  
[http://adf.ly/FUEHR](http://adf.ly/FUEHR) or you can click here [http://www.mediafire.com/?a1qtlgh1t9naf0i](http://www.mediafire.com/?a1qtlgh1t9naf0i) if you don’t like adf.ly 🙂

![http://i.imgur.com/hBBFz.png](http://i.imgur.com/hBBFz.png)

![http://i.imgur.com/4ix2n.png](http://i.imgur.com/4ix2n.png)

![http://i.imgur.com/w0mgl.png](http://i.imgur.com/w0mgl.png)

![http://i.imgur.com/TM2kI.png](http://i.imgur.com/TM2kI.png)

Also I’d like to know if this is good way to add operators to specials menu for specific type of object (in this case for camera)? It works but I supose there can be nicer way to do it.

```auto
def Add_target_to_camera_menu_draw(self, context):
    if context.object.type == 'CAMERA' :
        self.layout.operator_context = 'INVOKE_REGION_WIN'
        self.layout.operator(Add_target_to_camera.bl_idname, "Add target to camera")

```

---

<div class="post-metadata">

**Author:** ![Uncle\_Entity](https://blenderartists.org/user_avatar/blenderartists.org/uncle_entity/32/8856_2.png) [@Uncle\_Entity](https://blenderartists.org/u/Uncle_Entity)\
**Post date:** [December 1, 2012, 11:22am UTC](https://blenderartists.org/t/addon-target-camera/558369/2 "2012-12-01T11:22:06Z")

</div>

> [@My-Key"](#):
>
> Also I’d like to know if this is good way to add operators to specials menu for specific type of object (in this case for camera)? It works but I supose there can be nicer way to do it.

Use the poll() function maybe?

---

<div class="post-metadata">

**Author:** ![My-Key](https://blenderartists.org/letter_avatar_proxy/v4/letter/m/e19adc/32.png) [@My-Key](https://blenderartists.org/u/My-Key)\
**Post date:** [December 1, 2012, 11:48am UTC](https://blenderartists.org/t/addon-target-camera/558369/3 "2012-12-01T11:48:58Z")

</div>

> [@Uncle Entity](#):
>
> Use the poll() function maybe?

Unfortunetely poll() makes those operators visible in specials for every object and active only for camera. Maybe I’m doing something wrong.

---

<div class="post-metadata">

**Author:** ![RoN43](https://blenderartists.org/user_avatar/blenderartists.org/ron43/32/698086_2.png) [@RoN43](https://blenderartists.org/u/RoN43)\
**Post date:** [December 2, 2012, 10:20am UTC](https://blenderartists.org/t/addon-target-camera/558369/4 "2012-12-02T10:20:25Z")

</div>

how rotate camera?

---

<div class="post-metadata">

**Author:** ![My-Key](https://blenderartists.org/letter_avatar_proxy/v4/letter/m/e19adc/32.png) [@My-Key](https://blenderartists.org/u/My-Key)\
**Post date:** [December 2, 2012, 11:10am UTC](https://blenderartists.org/t/addon-target-camera/558369/5 "2012-12-02T11:10:11Z")

</div>

> [@RoN43](#):
>
> how rotate camera?

You have to click on Camera, click on Object Contraints and in TargetTo tick “Target Z”. Then click on target empty and rotate it - camera should rotate too. Unfortunetelly it doesnt work very good. I tried couple times to do it better but I failed.

---

<div class="post-metadata">

**Author:** ![My-Key](https://blenderartists.org/letter_avatar_proxy/v4/letter/m/e19adc/32.png) [@My-Key](https://blenderartists.org/u/My-Key)\
**Post date:** [December 4, 2012, 5:44am UTC](https://blenderartists.org/t/addon-target-camera/558369/6 "2012-12-04T05:44:55Z")

</div>

I’ve made rig of camera to make possible rotation of camera indepedent of target rotation (used for defining axis of rotation). It’s a bit buggy (camera flips upsidedown if you rotate target too much). Please, test it and if you like it I’ll try to implemet it 🙂

> **[stabilisation\_camera\_test.blend](http://www.mediafire.com/file/qysaeuhim4y45a7/stabilisation_camera_test.blend)**
>
> MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.

---

<div class="post-metadata">

**Author:** ![RoN43](https://blenderartists.org/user_avatar/blenderartists.org/ron43/32/698086_2.png) [@RoN43](https://blenderartists.org/u/RoN43)\
**Post date:** [December 6, 2012, 1:31am UTC](https://blenderartists.org/t/addon-target-camera/558369/7 "2012-12-06T01:31:04Z")

</div>

bugs with animations to add keys both to camera and target positions and rotations

---

<div class="post-metadata">

**Author:** ![My-Key](https://blenderartists.org/letter_avatar_proxy/v4/letter/m/e19adc/32.png) [@My-Key](https://blenderartists.org/u/My-Key)\
**Post date:** [December 6, 2012, 3:38am UTC](https://blenderartists.org/t/addon-target-camera/558369/8 "2012-12-06T03:38:16Z")

</div>

> [@RoN43](#):
>
> bugs with animations to add keys both to camera and target positions and rotations

Would you like to be more precise what happens? Those bugs are in script or test rig?
