[Bf-committers] Console and Text editor proposals

2011-04-26 Thread Damir Prebeg
I like Python and I like ability to edit Python scripts in Blender
with built-in text editor. But in current state I find that editor
quite impractical for anything more than text entering and simple
debugging tasks.

1. Why in the world do we need undo for cursor movements? I mean, I
change something and I navigate through code by using arrow and page
keys. Finally I decide to undo my change, I have to undo 100 of cursor
moves first?!? Please, remove cursor movement from undo stack, and If
that's some future macro preparation, please disable it until a proper
implementation is created.

2. Current CTRL+F keyboard shortcut in text editor doesn't do anything
except showing and hiding of Properties bar. I suggest that default
shortcut for Properties should be changed to CTRL+T, and that CTRL+F
should be connected with function that will copy selected text (or
word in front of a cursor) into the Find field. If Properties bar
isn't already visible, the same function should show it, and then do
copy.

But Regardless to this proposal, I really don't see any reason why
Find-Replace should be located in Properties bar and not to have a
separated floating box like Jump.

3. Should I mention that I would like to see code completion reimplemented? :D

Regarding console:

1. I would like to be able to select text with Shift + Arrow keys
(Ctrl+Shift+Arrow, Shift+End, Shift+Home) as in regular text editor.

2. When creating some function or loop in console, I would like to be
able to edit already entered lines, including first one.
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] No more subsurf and mirror modifier with scupt mode?

2011-04-26 Thread Matt Ebb
Hi Sergey, sorry to drag this up again, but I wanted to respond (I've
been away the last few days).

On Thu, Apr 21, 2011 at 5:45 PM, Sergey I. Sharybin  wrote:
>  Looks like it was implemented in 2.49 exactly in the same way as it
> was before enabling sculpting on deformed mesh in 2.5 and i don't find
> it intuitive.

Well, for the purposes of poly modelling it's quite good - especially
when you have reference designs and you're tweaking it to fit shapes
from camera etc. Anyway I can't speak for Tristan, but he told me it
was the main reason he uses blender for poly modelling, even in high
end studios where he has access to many other tools.

Anyway, there was a big difference between the previous 2.5 situation
and 2.49, in that previously in 2.5 it would interpret the sculpt
strokes using the vertex locations of the original base level mesh. In
2.49 it allows you to actually sculpt on the subdivided surface and
even if you can't sculpt on the mirrored part of the mesh this is
usually fine for this purpose. If you're already using mirror modifier
when poly modelling you're probably only concentrating on one half of
the model anyway.

Check out this video of 2.49 - the setup is a base mesh, with mirror
and subsurf modifier - it shows how you can sculpt correctly on the
original vertices that are transformed to the limit surface, on one
side of the mirrored mesh.

http://mke3.net/blender/devel/2.5/sculpt_subsurf.mov

Anyway, I'm not the one that's been using this feature, perhaps I can
get him in touch with you. I just know he's been bugging me about it
every time I work with him ;)

cheers

Matt
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] operator for blender

2011-04-26 Thread bartius crouch
If you're talking about doing this in python, there is a very useful code
snippet at BA*.
It's using old api calls, but the math behind it is still sound. I've
successfully used it in Blender 2.5.

*
http://blenderartists.org/forum/showthread.php?70881-Screen-coordinates-to-World-coordinates&p=653327&viewfull=1#post653327

2011/4/26 Yuniel Castro González 

> Hi.
> I am programming an operator for blender.
> I have seen the example templates but it is not enough.
> With the events mouse_x and mouse_y I can capture the coordinates of a
> click of the mouse pointer, but with regard to the screen.
> How can I create a cube in the scene when giving a click with the mouse
> pointer and that it leaves exactly where the click was given?
> Thanks.
>
> --
>
>
>
>
>
>
>
>
> Yuniel
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Console and Text editor proposals

2011-04-26 Thread bartius crouch
>
> 1. Why in the world do we need undo for cursor movements?
>

Although this mailinglist isn't for feature requests, I'd like to stress the
first point Damir makes. I use the text-editor a lot and having cursor
movements in the undo stack almost feels like a bug to me.
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] recent commits after 36315 broke scons building with player

2011-04-26 Thread Campbell Barton
should work now r36335.

On Tue, Apr 26, 2011 at 6:41 AM, Nathan Letwory
 wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 26.4.2011 8:33, Yousef Hurfoush wrote:
>> hi i get this error after the commit 36315 to build blender:
>> -
>>    Creating library C:\Development\blender\build\win64-docs\bin\blender.lib 
>> and
>> object C:\Development\blender\build\win64-docs\bin\blender.exp
>> Generating code
>> Finished generating code
>> Trying to remove existing py bundle.
>> Unpacking '../lib/win64/release/python32.tar.gz' to 
>> '..\install\win64-docs-36331
>> \2.57\python\lib'
>> scons: building terminated because of errors.
>> -
>
> This is not the real error message, but indication that somewhere along
> the compiling/linking road there has been one. Check the output for the
> real error (often first occurrance of the word error, except for those
> where it is part of a file or directory name).
>
> /Nathan
>
> - --
> Nathan Letwory
> Letwory Interactive | Studio Lumikuu
> http://www.letworyinteractive.com | http://www.lumikuu.com
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJNtmk0AAoJEKtfN7KsE0TtJ7EH/0vijCLrVBQzQwO+/NX+BxsK
> lY25j0Hw0eENIK17oAQIWe5RXuHaKgLmIfTZAuAXcinLO9dtUyVfB6+WrFg8E2Cy
> 48wbQvqsRQJh35iYGK/B1wk3iyv2tUru7anQnGur0CJCRp3KjGpmYnYn5R6YrDHr
> 0QfFRF70cBjcjiBuo4SO2RbTReeVm2oFrMLTZC0soscY+yDCd7jX6iXDsAPMVkCU
> efuGDlZ3NZe+FpZc+UOTsIEtH1MGGrjCSseFncyriNisBux9Sfw+ah9kOELapyq8
> ADKu6agFnSJD7rtnlBnZuCLsIW8nZOdGhRxYVSx3wBRqYKoxWVM1ZqE7MsnAoPE=
> =ki1T
> -END PGP SIGNATURE-
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>



-- 
- Campbell
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Blender 2.57b AHOY!

2011-04-26 Thread Ton Roosendaal
Hi all,

We're all fallible human beings, and that's even more so for myself. :)
Fixing a quite obscure crash in a menu caused other more common menus  
to crash. That's been fixed now, and it's nicer for our users to also  
put that online.

Nathan & Campbell prepared the tag and a log for a 'b' update.

So - for the last 2.57 time - let the build systems go!

- revision 36339
- tagged as 2.57b-release
   https://svn.blender.org/svnroot/bf-blender/tags/blender-2.57b-release

Thanks!

-Ton-


Ton Roosendaal  Blender Foundation   t...@blender.orgwww.blender.org
Blender Institute   Entrepotdok 57A  1018AD Amsterdam   The Netherlands

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Blender 2.57b AHOY!

2011-04-26 Thread Campbell Barton
On Tue, Apr 26, 2011 at 12:39 PM, Ton Roosendaal  wrote:
> Hi all,
>
> We're all fallible human beings, and that's even more so for myself. :)
> Fixing a quite obscure crash in a menu caused other more common menus
> to crash. That's been fixed now, and it's nicer for our users to also
> put that online.
>
> Nathan & Campbell prepared the tag and a log for a 'b' update.
>
> So - for the last 2.57 time - let the build systems go!
>
> - revision 36339
> - tagged as 2.57b-release
>   https://svn.blender.org/svnroot/bf-blender/tags/blender-2.57b-release
>
> Thanks!
>
> -Ton-

28 bugs fixed!

heres the change log.
  http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/changelog_257b

feel free to edit the descriptions (node fixes are especially confusing).
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Camera view navigation rant

2011-04-26 Thread bartius crouch
> Also a lock camera to view option would be great so we can just move
> the camera like we move any other viewport

Like Campbell said, that isn't very hard to do in python. Below you can find
some code for it.
Copy the text below into the text-editor, Run Script (alt+P), go to 3d-view,
search (spacebar) for Lock camera to view.



import bpy
import mathutils


class ModalOperator(bpy.types.Operator):
'''Move camera along with the viewport'''
bl_idname = "view3d.lock_camera"
bl_label = "Lock camera to view"

@classmethod
def poll(cls, context):
camera = context.scene.camera
if not camera:
return(False)
return(camera.name in context.scene.objects)

def modal(self, context, event):
camera = context.scene.camera
rv3d = context.space_data.region_3d

# rotation + location
camera.matrix_world = rv3d.view_matrix.copy().inverted()

# override location to take view_distance into account
rotation = rv3d.view_matrix.copy().to_3x3().inverted()
z_normal = mathutils.Vector([0.0, 0.0, 1.0]) * rotation
camera.location = rv3d.view_location + (rv3d.view_distance *
z_normal)

# handle events
if event.type in ['LEFTMOUSE', 'NUMPAD_ENTER', 'RET']:
context.area.header_text_set()
return {'FINISHED'}
elif event.type == 'ESC':
camera.matrix_world = self.camera_matrix
context.area.header_text_set()
return {'CANCELLED'}

return {'PASS_THROUGH'}

def invoke(self, context, event):
context.window_manager.modal_handler_add(self)
self.camera_matrix = context.scene.camera.matrix_world.copy()
context.space_data.region_3d.view_perspective = 'PERSP'
context.area.header_text_set("ESC to cancel, ENTER or LMB to
confirm")
return {'RUNNING_MODAL'}


def register():
bpy.utils.register_class(ModalOperator)


def unregister():
bpy.utils.unregister_class(ModalOperator)


if __name__ == "__main__":
register()
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Blender 2.57b AHOY!

2011-04-26 Thread pete larabell
FreeBSD builds are up :)

On Tue, Apr 26, 2011 at 7:39 AM, Ton Roosendaal  wrote:
> Hi all,
>
> We're all fallible human beings, and that's even more so for myself. :)
> Fixing a quite obscure crash in a menu caused other more common menus
> to crash. That's been fixed now, and it's nicer for our users to also
> put that online.
>
> Nathan & Campbell prepared the tag and a log for a 'b' update.
>
> So - for the last 2.57 time - let the build systems go!
>
> - revision 36339
> - tagged as 2.57b-release
>   https://svn.blender.org/svnroot/bf-blender/tags/blender-2.57b-release
>
> Thanks!
>
> -Ton-
>
> 
> Ton Roosendaal  Blender Foundation   t...@blender.org    www.blender.org
> Blender Institute   Entrepotdok 57A  1018AD Amsterdam   The Netherlands
>
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Unlimited Clay update

2011-04-26 Thread raulf
Hi all :)

Now that I have leverage both UnlimietdClay and LiveClay implementations

http://farsthary.wordpress.com/2011/04/25/second-liveclay-video-test/

and since free time is a scarce resource for me I will rely on the true
power of open source: "release often, release early" and hopefully will
release by tomorrow my UnlimitedClay (Blender) patch.

Several awesome blender devs (Serguey and Joe) will aid to solve the main
pending issues with PBVH tree and porting to the modern BMesh data
structure instead of the old and slow editmesh, so consider this release
non production ready, unstable and only for further development purposes
:)


Cheers
Farsthary



>>>
- Participe en Universidad 2012, del 13 al 17 de febrero de 2012. Habana. Cuba. 
http://www.congresouniversidad.cu

- Consulte la Enciclopedia Colaborativa Cubana. http://www.ecured.cu
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] 2 points in blender 2.5

2011-04-26 Thread Yuniel Castro González

Hi.
I need a function that returns (in blender 2.5)the couples of coordinates of 
the screen (x,y) minimum and maximum that contain the scene, that is to say, 
the left inferior point and the right superior point of the scene, but in 2 
dimensions.
Thanks

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] 2.49 to 2.5

2011-04-26 Thread Yuniel Castro González
def getPixelDepth(x,y):
z = BGL.Buffer(BGL.GL_FLOAT, [1])
glReadPixels (x,y, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, z);
print "value from depth buffer is",z
return z[0]

in blender 2.49 this function returns the z coordinate since the pair (x, y), 
but what I can do it in 2.5 because those functions do not recognize them

Thanks.

-- 








Yuniel 
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Vector Separate/Combine

2011-04-26 Thread Knapp
On Thu, Apr 21, 2011 at 6:30 PM, Martin Poirier  wrote:

> They're still all dealing with 4-floats (or less), so there's not many
> reason to not have generic separate-combine nodes that can be reused for the
> different types (the genericity can be taken care of internally while users
> see specific types for all possible in/out).
>
> Martin
>

As one of the artist types around here, I would say I am always happy to
have more options provided the interface is good and there are good manual
entries with good examples of use, that I can understand.

-- 
Douglas E Knapp

Creative Commons Film Group, Helping people make open source movies
with open source software!
http://douglas.bespin.org/CommonsFilmGroup/phpBB3/index.php

Massage in Gelsenkirchen-Buer:
http://douglas.bespin.org/tcm/ztab1.htm
Please link to me and trade links with me!

Open Source Sci-Fi mmoRPG Game project.
http://sf-journey-creations.wikispot.org/Front_Page
http://code.google.com/p/perspectiveproject/
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Blender 2.57a AHOY!

2011-04-26 Thread Knapp
I just downloaded and installed 2.57a and started it up. I was at first
confused because it looks just like 2.57 right down to the 2.57.0 number. I
had to come to this thread and see the revision number to be sure I had even
installed it correctly. I would suggest that we change that splash screen to
at least say that it is 2.57a or 2.57.5 or something like that. Revision
numbers don't mean much to most of us normal artist types. :-)
-- 
Douglas E Knapp

Creative Commons Film Group, Helping people make open source movies
with open source software!
http://douglas.bespin.org/CommonsFilmGroup/phpBB3/index.php

Massage in Gelsenkirchen-Buer:
http://douglas.bespin.org/tcm/ztab1.htm
Please link to me and trade links with me!

Open Source Sci-Fi mmoRPG Game project.
http://sf-journey-creations.wikispot.org/Front_Page
http://code.google.com/p/perspectiveproject/
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Camera view navigation rant

2011-04-26 Thread Dalai Felinto
> Below you can find some code for (...) Lock camera to view.
Isn't this what Ctrl+Alt+Numpad0 do? (align camera to view -- which
even takes care of non-perspective views)

On my understanding what people are ranting is for the lack of options
to move while "inside" the camera mode.

--
Dalai

2011/4/26 bartius crouch :
>> Also a lock camera to view option would be great so we can just move
>> the camera like we move any other viewport
>
> Like Campbell said, that isn't very hard to do in python. Below you can find
> some code for it.
> Copy the text below into the text-editor, Run Script (alt+P), go to 3d-view,
> search (spacebar) for Lock camera to view.
>
>
>
> import bpy
> import mathutils
>
>
> class ModalOperator(bpy.types.Operator):
>    '''Move camera along with the viewport'''
>    bl_idname = "view3d.lock_camera"
>    bl_label = "Lock camera to view"
>
>    @classmethod
>    def poll(cls, context):
>        camera = context.scene.camera
>        if not camera:
>            return(False)
>        return(camera.name in context.scene.objects)
>
>    def modal(self, context, event):
>        camera = context.scene.camera
>        rv3d = context.space_data.region_3d
>
>        # rotation + location
>        camera.matrix_world = rv3d.view_matrix.copy().inverted()
>
>        # override location to take view_distance into account
>        rotation = rv3d.view_matrix.copy().to_3x3().inverted()
>        z_normal = mathutils.Vector([0.0, 0.0, 1.0]) * rotation
>        camera.location = rv3d.view_location + (rv3d.view_distance *
> z_normal)
>
>        # handle events
>        if event.type in ['LEFTMOUSE', 'NUMPAD_ENTER', 'RET']:
>            context.area.header_text_set()
>            return {'FINISHED'}
>        elif event.type == 'ESC':
>            camera.matrix_world = self.camera_matrix
>            context.area.header_text_set()
>            return {'CANCELLED'}
>
>        return {'PASS_THROUGH'}
>
>    def invoke(self, context, event):
>        context.window_manager.modal_handler_add(self)
>        self.camera_matrix = context.scene.camera.matrix_world.copy()
>        context.space_data.region_3d.view_perspective = 'PERSP'
>        context.area.header_text_set("ESC to cancel, ENTER or LMB to
> confirm")
>        return {'RUNNING_MODAL'}
>
>
> def register():
>    bpy.utils.register_class(ModalOperator)
>
>
> def unregister():
>    bpy.utils.unregister_class(ModalOperator)
>
>
> if __name__ == "__main__":
>    register()
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Sensor Size

2011-04-26 Thread Ejner Fergo
Hola,

I am of course hopeful to see this get some attention from the
developers, and appreciate you guys seeing the importance of this. I
just don't know how to proceed with this to make an inclusion in trunk
more likely. It would be really nice to hear some opinions from those
with authority.

With the BF being serious about camera tracking features and later
VFX, the basic functionality this patch provides is pretty essential
for any further work (gsoc) in this area. Better exporters also need
this. I realize the devs are busy, but don't understand why they are
quiet on this issue. There are still issues that need to be looked at,
like resolution gate (cameras having separate resolution from the
render output) and making the unit system work with DoF (for correct
focus-distance-affects-fov), but as a base I feel the patch is good to
go. Easy for me to say so I need a devs eye on this.

/Ejner

On Tue, Apr 26, 2011 at 8:25 AM, Daniel Salazar - 3Developer.com
 wrote:
> Thumbs up, very helpful for VFX
>
> Daniel Salazar
> 3Developer.com
>
>
>
> On Tue, Apr 26, 2011 at 12:07 AM, Troy Sobotka  wrote:
>> Long time coming, but with recent patch upgrades from Ejner Fergo I'm
>> wondering what the percentage chance we can see this appear in trunk?
>>
>> http://projects.blender.org/tracker/?func=detail&atid=127&aid=24427&group_id=9
>> ___
>> Bf-committers mailing list
>> Bf-committers@blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Camera view navigation rant

2011-04-26 Thread Daniel Salazar - 3Developer.com
Well that's a start :)

Daniel Salazar
3Developer.com



On Tue, Apr 26, 2011 at 7:43 AM, bartius crouch
 wrote:
>> Also a lock camera to view option would be great so we can just move
>> the camera like we move any other viewport
>
> Like Campbell said, that isn't very hard to do in python. Below you can find
> some code for it.
> Copy the text below into the text-editor, Run Script (alt+P), go to 3d-view,
> search (spacebar) for Lock camera to view.
>
>
>
> import bpy
> import mathutils
>
>
> class ModalOperator(bpy.types.Operator):
>    '''Move camera along with the viewport'''
>    bl_idname = "view3d.lock_camera"
>    bl_label = "Lock camera to view"
>
>    @classmethod
>    def poll(cls, context):
>        camera = context.scene.camera
>        if not camera:
>            return(False)
>        return(camera.name in context.scene.objects)
>
>    def modal(self, context, event):
>        camera = context.scene.camera
>        rv3d = context.space_data.region_3d
>
>        # rotation + location
>        camera.matrix_world = rv3d.view_matrix.copy().inverted()
>
>        # override location to take view_distance into account
>        rotation = rv3d.view_matrix.copy().to_3x3().inverted()
>        z_normal = mathutils.Vector([0.0, 0.0, 1.0]) * rotation
>        camera.location = rv3d.view_location + (rv3d.view_distance *
> z_normal)
>
>        # handle events
>        if event.type in ['LEFTMOUSE', 'NUMPAD_ENTER', 'RET']:
>            context.area.header_text_set()
>            return {'FINISHED'}
>        elif event.type == 'ESC':
>            camera.matrix_world = self.camera_matrix
>            context.area.header_text_set()
>            return {'CANCELLED'}
>
>        return {'PASS_THROUGH'}
>
>    def invoke(self, context, event):
>        context.window_manager.modal_handler_add(self)
>        self.camera_matrix = context.scene.camera.matrix_world.copy()
>        context.space_data.region_3d.view_perspective = 'PERSP'
>        context.area.header_text_set("ESC to cancel, ENTER or LMB to
> confirm")
>        return {'RUNNING_MODAL'}
>
>
> def register():
>    bpy.utils.register_class(ModalOperator)
>
>
> def unregister():
>    bpy.utils.unregister_class(ModalOperator)
>
>
> if __name__ == "__main__":
>    register()
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Camera view navigation rant

2011-04-26 Thread Daniel Salazar - 3Developer.com
@dfelinto(pto): nope, it would need to *stay* in camera view when panning
and dollying around :)

Daniel Salazar
3Developer.com



On Tue, Apr 26, 2011 at 12:58 PM, Dalai Felinto  wrote:
>> Below you can find some code for (...) Lock camera to view.
> Isn't this what Ctrl+Alt+Numpad0 do? (align camera to view -- which
> even takes care of non-perspective views)
>
> On my understanding what people are ranting is for the lack of options
> to move while "inside" the camera mode.
>
> --
> Dalai
>
> 2011/4/26 bartius crouch :
>>> Also a lock camera to view option would be great so we can just move
>>> the camera like we move any other viewport
>>
>> Like Campbell said, that isn't very hard to do in python. Below you can find
>> some code for it.
>> Copy the text below into the text-editor, Run Script (alt+P), go to 3d-view,
>> search (spacebar) for Lock camera to view.
>>
>>
>>
>> import bpy
>> import mathutils
>>
>>
>> class ModalOperator(bpy.types.Operator):
>>    '''Move camera along with the viewport'''
>>    bl_idname = "view3d.lock_camera"
>>    bl_label = "Lock camera to view"
>>
>>    @classmethod
>>    def poll(cls, context):
>>        camera = context.scene.camera
>>        if not camera:
>>            return(False)
>>        return(camera.name in context.scene.objects)
>>
>>    def modal(self, context, event):
>>        camera = context.scene.camera
>>        rv3d = context.space_data.region_3d
>>
>>        # rotation + location
>>        camera.matrix_world = rv3d.view_matrix.copy().inverted()
>>
>>        # override location to take view_distance into account
>>        rotation = rv3d.view_matrix.copy().to_3x3().inverted()
>>        z_normal = mathutils.Vector([0.0, 0.0, 1.0]) * rotation
>>        camera.location = rv3d.view_location + (rv3d.view_distance *
>> z_normal)
>>
>>        # handle events
>>        if event.type in ['LEFTMOUSE', 'NUMPAD_ENTER', 'RET']:
>>            context.area.header_text_set()
>>            return {'FINISHED'}
>>        elif event.type == 'ESC':
>>            camera.matrix_world = self.camera_matrix
>>            context.area.header_text_set()
>>            return {'CANCELLED'}
>>
>>        return {'PASS_THROUGH'}
>>
>>    def invoke(self, context, event):
>>        context.window_manager.modal_handler_add(self)
>>        self.camera_matrix = context.scene.camera.matrix_world.copy()
>>        context.space_data.region_3d.view_perspective = 'PERSP'
>>        context.area.header_text_set("ESC to cancel, ENTER or LMB to
>> confirm")
>>        return {'RUNNING_MODAL'}
>>
>>
>> def register():
>>    bpy.utils.register_class(ModalOperator)
>>
>>
>> def unregister():
>>    bpy.utils.unregister_class(ModalOperator)
>>
>>
>> if __name__ == "__main__":
>>    register()
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Bug #27167 : blender crash with "illegal hardware instruction" on amd x86 + call for testers

2011-04-26 Thread Kevin Roy
Hi everyone,

Some Debian users reported [1] a crash with blender (from 2.53 to
early 2.57) on amd 32bit computer because of some SSE2 instructions
enabled.
I've already reported this on #27167 and I give a shot in the ML.

One user sent the following patch that seems to fix both build and
execution on this kind of architecture :
 Start of patch **
diff -ru blender-2.56.1-beta-svn34076.orig/build_files/cmake/macros.cmake
blender-2.56.1-beta-svn34076/build_files/cmake/macros.cmake
--- blender-2.56.1-beta-svn34076.orig/build_files/cmake/macros.cmake
2010-12-23
00:09:30.0 +0100
+++ blender-2.56.1-beta-svn34076/build_files/cmake/macros.cmake 2011-04-23
19:45:14.297633657 +0200
@@ -220,7 +220,7 @@

# message(STATUS "Detecting SSE support")
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-   set(CMAKE_REQUIRED_FLAGS "-msse -msse2")
+   set(CMAKE_REQUIRED_FLAGS "-msse -msse2 -O0")
elseif(MSVC)
set(CMAKE_REQUIRED_FLAGS "/arch:SSE2") # TODO, SSE 1 ?
endif()
* End of patch ***

>From what I've investigate so far, SSE2 is tested only for
RAY_OPTIMIZATION however execution failed in RNA_def_property_range().

Program received signal SIGILL, Illegal instruction.
0x08b78c4d in RNA_def_property_range ()
(gdb) disassemble
-- snip --
   0x08b78c44 <+116>:   lea0x0(%esi,%eiz,1),%esi
   0x08b78c48 <+120>:   fxch   %st(1)
   0x08b78c4a <+122>:   fstpl  -0x20(%ebp)
=> 0x08b78c4d <+125>:   cvttsd2si -0x20(%ebp),%ecx
   0x08b78c52 <+130>:   mov%ecx,0x78(%eax)
   0x08b78c55 <+133>:   fstpl  -0x20(%ebp)
   0x08b78c58 <+136>:   cvttsd2si -0x20(%ebp),%edx
-- snip --

I'm suspecting a gcc bug but I'm maybe completely wrong :) and I'm not
familiar with this kind of bug involving specific hardware
instructions.
I can't reproduce the bug because I don't own any amd computer and it
makes my investigations harder. Therefore I'm looking for testers or
builders which are running a Debian Sid or are familiar with -msse(2)
in gcc.

Meanwhile, I will take a look at the wiki page about buildbot
configuration from Sergey.

Regards,

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599680
---
Kevin Roy
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] equivalent in 2.5

2011-04-26 Thread Yuniel Castro González
Hi.
Which is the expression equivalent to:

for Win3D in Window.GetScreenInfo (Window.Types.VIEW3D)

in blender 2.5??

-- 








Yuniel 
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] equivalent in 2.5

2011-04-26 Thread Campbell Barton
In blender 2.5 normally this is not needed, rather then looping over
all views generally operators are set to only run in that view type.
then they can access context.area, context.region.

But there are still times this is handy, Demo Mode Addon for eg checks
all spaces to auto detect if the screen setup should play an animation
or render.

Heres an example of looping over 3d views in the active window.

import bpy
for area in bpy.context.window.screen.areas:
space = area.active_space
if space.type == 'VIEW_3D':
rv3d = space.region_3d
print(space, rv3d)


... or as a generator to loop over different types.

import bpy
def space_iter_type(view_type):
for area in bpy.context.window.screen.areas:
space = area.active_space
if space.type == view_type:
yield space

for view in space_iter_type('VIEW_3D'):
print(view)

2011/4/27 Yuniel Castro González :
> Hi.
> Which is the expression equivalent to:
>
> for Win3D in Window.GetScreenInfo (Window.Types.VIEW3D)
>
> in blender 2.5??
>
> --
>
>
>
>
>
>
>
>
> Yuniel
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>



-- 
- Campbell
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Camera view navigation rant

2011-04-26 Thread Mats Holmberg
And if this would work for the camera, then it should also work for anything 
else (lamps mainly). The script didn't work for me on osx - the view is not 
locked to the camera view and trackballing around loses the camera lock 
alltogether =)

Cheers,
-mats

On 27.4.2011, at 1.39, Daniel Salazar - 3Developer.com wrote:

> @dfelinto(pto): nope, it would need to *stay* in camera view when panning
> and dollying around :)
> 
> Daniel Salazar
> 3Developer.com
> 
> 
> 
> On Tue, Apr 26, 2011 at 12:58 PM, Dalai Felinto  wrote:
>>> Below you can find some code for (...) Lock camera to view.
>> Isn't this what Ctrl+Alt+Numpad0 do? (align camera to view -- which
>> even takes care of non-perspective views)
>> 
>> On my understanding what people are ranting is for the lack of options
>> to move while "inside" the camera mode.
>> 
>> --
>> Dalai
>> 
>> 2011/4/26 bartius crouch :
 Also a lock camera to view option would be great so we can just move
 the camera like we move any other viewport
>>> 
>>> Like Campbell said, that isn't very hard to do in python. Below you can find
>>> some code for it.
>>> Copy the text below into the text-editor, Run Script (alt+P), go to 3d-view,
>>> search (spacebar) for Lock camera to view.
>>> 
>>> 
>>> 
>>> import bpy
>>> import mathutils
>>> 
>>> 
>>> class ModalOperator(bpy.types.Operator):
>>>'''Move camera along with the viewport'''
>>>bl_idname = "view3d.lock_camera"
>>>bl_label = "Lock camera to view"
>>> 
>>>@classmethod
>>>def poll(cls, context):
>>>camera = context.scene.camera
>>>if not camera:
>>>return(False)
>>>return(camera.name in context.scene.objects)
>>> 
>>>def modal(self, context, event):
>>>camera = context.scene.camera
>>>rv3d = context.space_data.region_3d
>>> 
>>># rotation + location
>>>camera.matrix_world = rv3d.view_matrix.copy().inverted()
>>> 
>>># override location to take view_distance into account
>>>rotation = rv3d.view_matrix.copy().to_3x3().inverted()
>>>z_normal = mathutils.Vector([0.0, 0.0, 1.0]) * rotation
>>>camera.location = rv3d.view_location + (rv3d.view_distance *
>>> z_normal)
>>> 
>>># handle events
>>>if event.type in ['LEFTMOUSE', 'NUMPAD_ENTER', 'RET']:
>>>context.area.header_text_set()
>>>return {'FINISHED'}
>>>elif event.type == 'ESC':
>>>camera.matrix_world = self.camera_matrix
>>>context.area.header_text_set()
>>>return {'CANCELLED'}
>>> 
>>>return {'PASS_THROUGH'}
>>> 
>>>def invoke(self, context, event):
>>>context.window_manager.modal_handler_add(self)
>>>self.camera_matrix = context.scene.camera.matrix_world.copy()
>>>context.space_data.region_3d.view_perspective = 'PERSP'
>>>context.area.header_text_set("ESC to cancel, ENTER or LMB to
>>> confirm")
>>>return {'RUNNING_MODAL'}
>>> 
>>> 
>>> def register():
>>>bpy.utils.register_class(ModalOperator)
>>> 
>>> 
>>> def unregister():
>>>bpy.utils.unregister_class(ModalOperator)
>>> 
>>> 
>>> if __name__ == "__main__":
>>>register()
>> ___
>> Bf-committers mailing list
>> Bf-committers@blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>> 
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Camera view navigation rant

2011-04-26 Thread Damir Prebeg
How bout a pin icon in one corner of camera view so when activated,
cam view (or any object view) would act as regular view?
And ALT could be a shortcut key that would temporary glue cam to the
view (Alt+MMB would rotate cam, CTRL+ALT+MMB would move camera forward
or backward and SHIFT+ALT+MMB would pan camera?)

On 27 April 2011 07:36, Mats Holmberg  wrote:
> And if this would work for the camera, then it should also work for anything 
> else (lamps mainly). The script didn't work for me on osx - the view is not 
> locked to the camera view and trackballing around loses the camera lock 
> alltogether =)
>
> Cheers,
> -mats
>
> On 27.4.2011, at 1.39, Daniel Salazar - 3Developer.com wrote:
>
>> @dfelinto(pto): nope, it would need to *stay* in camera view when panning
>> and dollying around :)
>>
>> Daniel Salazar
>> 3Developer.com
>>
>>
>>
>> On Tue, Apr 26, 2011 at 12:58 PM, Dalai Felinto  wrote:
 Below you can find some code for (...) Lock camera to view.
>>> Isn't this what Ctrl+Alt+Numpad0 do? (align camera to view -- which
>>> even takes care of non-perspective views)
>>>
>>> On my understanding what people are ranting is for the lack of options
>>> to move while "inside" the camera mode.
>>>
>>> --
>>> Dalai
>>>
>>> 2011/4/26 bartius crouch :
> Also a lock camera to view option would be great so we can just move
> the camera like we move any other viewport

 Like Campbell said, that isn't very hard to do in python. Below you can 
 find
 some code for it.
 Copy the text below into the text-editor, Run Script (alt+P), go to 
 3d-view,
 search (spacebar) for Lock camera to view.



 import bpy
 import mathutils


 class ModalOperator(bpy.types.Operator):
    '''Move camera along with the viewport'''
    bl_idname = "view3d.lock_camera"
    bl_label = "Lock camera to view"

    @classmethod
    def poll(cls, context):
        camera = context.scene.camera
        if not camera:
            return(False)
        return(camera.name in context.scene.objects)

    def modal(self, context, event):
        camera = context.scene.camera
        rv3d = context.space_data.region_3d

        # rotation + location
        camera.matrix_world = rv3d.view_matrix.copy().inverted()

        # override location to take view_distance into account
        rotation = rv3d.view_matrix.copy().to_3x3().inverted()
        z_normal = mathutils.Vector([0.0, 0.0, 1.0]) * rotation
        camera.location = rv3d.view_location + (rv3d.view_distance *
 z_normal)

        # handle events
        if event.type in ['LEFTMOUSE', 'NUMPAD_ENTER', 'RET']:
            context.area.header_text_set()
            return {'FINISHED'}
        elif event.type == 'ESC':
            camera.matrix_world = self.camera_matrix
            context.area.header_text_set()
            return {'CANCELLED'}

        return {'PASS_THROUGH'}

    def invoke(self, context, event):
        context.window_manager.modal_handler_add(self)
        self.camera_matrix = context.scene.camera.matrix_world.copy()
        context.space_data.region_3d.view_perspective = 'PERSP'
        context.area.header_text_set("ESC to cancel, ENTER or LMB to
 confirm")
        return {'RUNNING_MODAL'}


 def register():
    bpy.utils.register_class(ModalOperator)


 def unregister():
    bpy.utils.unregister_class(ModalOperator)


 if __name__ == "__main__":
    register()
>>> ___
>>> Bf-committers mailing list
>>> Bf-committers@blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>>
>> ___
>> Bf-committers mailing list
>> Bf-committers@blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Camera view navigation rant

2011-04-26 Thread Daniel Salazar - 3Developer.com
Yes Ive been thinking in something like that, I think the navigation
is overall too hard and hotkey oriented, lots of local rotations and
grabs without the widgets there to help. I wonder if we could design a
set of in camera view widgets?

Daniel Salazar
3Developer.com



On Tue, Apr 26, 2011 at 11:59 PM, Damir Prebeg  wrote:
> How bout a pin icon in one corner of camera view so when activated,
> cam view (or any object view) would act as regular view?
> And ALT could be a shortcut key that would temporary glue cam to the
> view (Alt+MMB would rotate cam, CTRL+ALT+MMB would move camera forward
> or backward and SHIFT+ALT+MMB would pan camera?)
>
> On 27 April 2011 07:36, Mats Holmberg  wrote:
>> And if this would work for the camera, then it should also work for anything 
>> else (lamps mainly). The script didn't work for me on osx - the view is not 
>> locked to the camera view and trackballing around loses the camera lock 
>> alltogether =)
>>
>> Cheers,
>> -mats
>>
>> On 27.4.2011, at 1.39, Daniel Salazar - 3Developer.com wrote:
>>
>>> @dfelinto(pto): nope, it would need to *stay* in camera view when panning
>>> and dollying around :)
>>>
>>> Daniel Salazar
>>> 3Developer.com
>>>
>>>
>>>
>>> On Tue, Apr 26, 2011 at 12:58 PM, Dalai Felinto  wrote:
> Below you can find some code for (...) Lock camera to view.
 Isn't this what Ctrl+Alt+Numpad0 do? (align camera to view -- which
 even takes care of non-perspective views)

 On my understanding what people are ranting is for the lack of options
 to move while "inside" the camera mode.

 --
 Dalai

 2011/4/26 bartius crouch :
>> Also a lock camera to view option would be great so we can just move
>> the camera like we move any other viewport
>
> Like Campbell said, that isn't very hard to do in python. Below you can 
> find
> some code for it.
> Copy the text below into the text-editor, Run Script (alt+P), go to 
> 3d-view,
> search (spacebar) for Lock camera to view.
>
>
>
> import bpy
> import mathutils
>
>
> class ModalOperator(bpy.types.Operator):
>    '''Move camera along with the viewport'''
>    bl_idname = "view3d.lock_camera"
>    bl_label = "Lock camera to view"
>
>    @classmethod
>    def poll(cls, context):
>        camera = context.scene.camera
>        if not camera:
>            return(False)
>        return(camera.name in context.scene.objects)
>
>    def modal(self, context, event):
>        camera = context.scene.camera
>        rv3d = context.space_data.region_3d
>
>        # rotation + location
>        camera.matrix_world = rv3d.view_matrix.copy().inverted()
>
>        # override location to take view_distance into account
>        rotation = rv3d.view_matrix.copy().to_3x3().inverted()
>        z_normal = mathutils.Vector([0.0, 0.0, 1.0]) * rotation
>        camera.location = rv3d.view_location + (rv3d.view_distance *
> z_normal)
>
>        # handle events
>        if event.type in ['LEFTMOUSE', 'NUMPAD_ENTER', 'RET']:
>            context.area.header_text_set()
>            return {'FINISHED'}
>        elif event.type == 'ESC':
>            camera.matrix_world = self.camera_matrix
>            context.area.header_text_set()
>            return {'CANCELLED'}
>
>        return {'PASS_THROUGH'}
>
>    def invoke(self, context, event):
>        context.window_manager.modal_handler_add(self)
>        self.camera_matrix = context.scene.camera.matrix_world.copy()
>        context.space_data.region_3d.view_perspective = 'PERSP'
>        context.area.header_text_set("ESC to cancel, ENTER or LMB to
> confirm")
>        return {'RUNNING_MODAL'}
>
>
> def register():
>    bpy.utils.register_class(ModalOperator)
>
>
> def unregister():
>    bpy.utils.unregister_class(ModalOperator)
>
>
> if __name__ == "__main__":
>    register()
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

>>> ___
>>> Bf-committers mailing list
>>> Bf-committers@blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
>> ___
>> Bf-committers mailing list
>> Bf-committers@blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Camera view navigation rant

2011-04-26 Thread Damir Prebeg
Actually, IMHO Blender has the best 3D view navigation on the market
and I simply love it. I realize that and I cry every time when I have
to manipulate some other 3D App views.
I don't mind to have a set of widgets that would help, but current
shortcut key based navigation is priceless.
Only thing that I would like to have is ability to manipulate with cam
(or object) view in the same way as I manipulate with every other
view.

On 27 April 2011 08:01, Daniel Salazar - 3Developer.com
 wrote:
> Yes Ive been thinking in something like that, I think the navigation
> is overall too hard and hotkey oriented, lots of local rotations and
> grabs without the widgets there to help. I wonder if we could design a
> set of in camera view widgets?
>
> Daniel Salazar
> 3Developer.com
>
>
>
> On Tue, Apr 26, 2011 at 11:59 PM, Damir Prebeg  
> wrote:
>> How bout a pin icon in one corner of camera view so when activated,
>> cam view (or any object view) would act as regular view?
>> And ALT could be a shortcut key that would temporary glue cam to the
>> view (Alt+MMB would rotate cam, CTRL+ALT+MMB would move camera forward
>> or backward and SHIFT+ALT+MMB would pan camera?)
>>
>> On 27 April 2011 07:36, Mats Holmberg  wrote:
>>> And if this would work for the camera, then it should also work for 
>>> anything else (lamps mainly). The script didn't work for me on osx - the 
>>> view is not locked to the camera view and trackballing around loses the 
>>> camera lock alltogether =)
>>>
>>> Cheers,
>>> -mats
>>>
>>> On 27.4.2011, at 1.39, Daniel Salazar - 3Developer.com wrote:
>>>
 @dfelinto(pto): nope, it would need to *stay* in camera view when panning
 and dollying around :)

 Daniel Salazar
 3Developer.com



 On Tue, Apr 26, 2011 at 12:58 PM, Dalai Felinto  wrote:
>> Below you can find some code for (...) Lock camera to view.
> Isn't this what Ctrl+Alt+Numpad0 do? (align camera to view -- which
> even takes care of non-perspective views)
>
> On my understanding what people are ranting is for the lack of options
> to move while "inside" the camera mode.
>
> --
> Dalai
>
> 2011/4/26 bartius crouch :
>>> Also a lock camera to view option would be great so we can just move
>>> the camera like we move any other viewport
>>
>> Like Campbell said, that isn't very hard to do in python. Below you can 
>> find
>> some code for it.
>> Copy the text below into the text-editor, Run Script (alt+P), go to 
>> 3d-view,
>> search (spacebar) for Lock camera to view.
>>
>>
>>
>> import bpy
>> import mathutils
>>
>>
>> class ModalOperator(bpy.types.Operator):
>>    '''Move camera along with the viewport'''
>>    bl_idname = "view3d.lock_camera"
>>    bl_label = "Lock camera to view"
>>
>>    @classmethod
>>    def poll(cls, context):
>>        camera = context.scene.camera
>>        if not camera:
>>            return(False)
>>        return(camera.name in context.scene.objects)
>>
>>    def modal(self, context, event):
>>        camera = context.scene.camera
>>        rv3d = context.space_data.region_3d
>>
>>        # rotation + location
>>        camera.matrix_world = rv3d.view_matrix.copy().inverted()
>>
>>        # override location to take view_distance into account
>>        rotation = rv3d.view_matrix.copy().to_3x3().inverted()
>>        z_normal = mathutils.Vector([0.0, 0.0, 1.0]) * rotation
>>        camera.location = rv3d.view_location + (rv3d.view_distance *
>> z_normal)
>>
>>        # handle events
>>        if event.type in ['LEFTMOUSE', 'NUMPAD_ENTER', 'RET']:
>>            context.area.header_text_set()
>>            return {'FINISHED'}
>>        elif event.type == 'ESC':
>>            camera.matrix_world = self.camera_matrix
>>            context.area.header_text_set()
>>            return {'CANCELLED'}
>>
>>        return {'PASS_THROUGH'}
>>
>>    def invoke(self, context, event):
>>        context.window_manager.modal_handler_add(self)
>>        self.camera_matrix = context.scene.camera.matrix_world.copy()
>>        context.space_data.region_3d.view_perspective = 'PERSP'
>>        context.area.header_text_set("ESC to cancel, ENTER or LMB to
>> confirm")
>>        return {'RUNNING_MODAL'}
>>
>>
>> def register():
>>    bpy.utils.register_class(ModalOperator)
>>
>>
>> def unregister():
>>    bpy.utils.unregister_class(ModalOperator)
>>
>>
>> if __name__ == "__main__":
>>    register()
> ___
> Bf-committers mailing list
> Bf-committers@blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
 ___
 Bf-committers mailing list
 Bf-committer