Ejemplo n.º 1
0
def next3(user=UserProxy, ob=BlenderProxy):
    print('next click callback3')
    w = api_gen.get_wrapped_objects()[ob]
    view = w(user)
    view['color'] = Animations(
        Animation(seconds=2.0, x=0.5, y=0.5, z=0.1),
        Animation(seconds=2.0, x=1.0, y=0.1, z=0.5),
        Animation(seconds=2.0, z=1.0),
        Animation(seconds=2.0, z=-1.0),
    )
Ejemplo n.º 2
0
def next3( user=UserProxy, ob=BlenderProxy ):
	print('next click callback3')
	w = api_gen.get_wrapped_objects()[ ob ]
	view = w( user )
	view['color'] = Animations(
		Animation( seconds=2.0, x=0.5, y=0.5, z=0.1),
		Animation( seconds=2.0, x=1.0, y=0.1, z=0.5),
		Animation( seconds=2.0, z=1.0),
		Animation( seconds=2.0, z=-1.0),
	)
Ejemplo n.º 3
0
def default_input_callback( user=UserProxy, ob=BlenderProxy, input_string=ctypes.c_char_p ):
	print( 'default INPUT CALLBACK', user, ob, input_string )
	#if ob.name == 'login':
	#	if 'login.input' not in bpy.data.objects:
	#		a = bpy.data.objects.new(
	#			name="[data] %s"%name, 
	#			object_data= a.data 
	#		)
	#		bpy.context.scene.objects.link( a )
	#		a.parent = ob
	w = api_gen.get_wrapped_objects()[ ob ]
	view = w( user )
Ejemplo n.º 4
0
def default_input_callback(user=UserProxy,
                           ob=BlenderProxy,
                           input_string=ctypes.c_char_p):
    print('default INPUT CALLBACK', user, ob, input_string)
    #if ob.name == 'login':
    #	if 'login.input' not in bpy.data.objects:
    #		a = bpy.data.objects.new(
    #			name="[data] %s"%name,
    #			object_data= a.data
    #		)
    #		bpy.context.scene.objects.link( a )
    #		a.parent = ob
    w = api_gen.get_wrapped_objects()[ob]
    view = w(user)
Ejemplo n.º 5
0
def default_click_callback( user=UserProxy, ob=BlenderProxy ):
	print('select callback', user, ob)
	w = api_gen.get_wrapped_objects()[ ob ]
	view = w( user )
	view['selected'] = time.time()  ## allow multiple selections, the server can filter to most recent to.
	if 0:
		view['location'] = list( ob.location.to_tuple() )
		#view['location'] = Animation( seconds=3.0, y=-5.0) # TODO relative and absolute
		view['location'] = Animations(
			Animation( seconds=3.0, y=-5.0),
			Animation( seconds=3.0, y=5.0),
			Animation( seconds=3.0, z=1.0),
			Animation( seconds=3.0, z=-1.0),
		)
		view['rotation_euler'] = list( ob.rotation_euler )
		view['rotation_euler'] = Animations(
			Animation( seconds=3.0, x=-5.0),
			Animation( seconds=3.0, x=5.0),
		)
		view().on_click = api_gen.get_callback( 'next1')
Ejemplo n.º 6
0
def default_click_callback(user=UserProxy, ob=BlenderProxy):
    print('select callback', user, ob)
    w = api_gen.get_wrapped_objects()[ob]
    view = w(user)
    view['selected'] = time.time(
    )  ## allow multiple selections, the server can filter to most recent to.
    if 0:
        view['location'] = list(ob.location.to_tuple())
        #view['location'] = Animation( seconds=3.0, y=-5.0) # TODO relative and absolute
        view['location'] = Animations(
            Animation(seconds=3.0, y=-5.0),
            Animation(seconds=3.0, y=5.0),
            Animation(seconds=3.0, z=1.0),
            Animation(seconds=3.0, z=-1.0),
        )
        view['rotation_euler'] = list(ob.rotation_euler)
        view['rotation_euler'] = Animations(
            Animation(seconds=3.0, x=-5.0),
            Animation(seconds=3.0, x=5.0),
        )
        view().on_click = api_gen.get_callback('next1')
Ejemplo n.º 7
0
def next2(user=UserProxy, ob=BlenderProxy):
    print('next click callback2')
    w = api_gen.get_wrapped_objects()[ob]
    view = w(user)
    view['color'] = [0, 1, 1, 1]
    view().on_click = api_gen.get_callback('next3')
Ejemplo n.º 8
0
def next2( user=UserProxy, ob=BlenderProxy ):
	print('next click callback2')
	w = api_gen.get_wrapped_objects()[ ob ]
	view = w( user )
	view['color'] = [0,1,1, 1]
	view().on_click = api_gen.get_callback( 'next3')
Ejemplo n.º 9
0
def default_input_callback( ob=BlenderProxy, input_string=ctypes.c_char_p ):
	print( 'INPUT CALLBACK', input_string )
	w = api_gen.get_wrapped_objects()[ ob ]
	print(w)