2.5 Interface:
authorThomas Dinges <blender@dingto.org>
Sat, 6 Jun 2009 16:18:19 +0000 (16:18 +0000)
committerThomas Dinges <blender@dingto.org>
Sat, 6 Jun 2009 16:18:19 +0000 (16:18 +0000)
* Added a constraint tab in the buttons window.

* Added more sequencer buttons (effect strips).
Note: Sequencer buttons will go into the sequencer itself (n-key Panel) later.

* Particle button tweaks by William Reynish. Thanks!

* Some RNA fixes and new properties.

release/ui/buttons_particle.py
release/ui/buttons_sequencer.py
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_buttons/buttons_header.c
source/blender/editors/space_buttons/space_buttons.c
source/blender/makesdna/DNA_space_types.h
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_sequence.c
source/blender/makesrna/intern/rna_space.c

index 693b737e1aacca99f61dd86c53e7c15bdce92ba3..505114e3ac545f651a04c246d976cf0877ec3269 100644 (file)
@@ -43,8 +43,8 @@ class PARTICLE_PT_particles(ParticleButtonsPanel):
                
                row = layout.row()
                row.enabled = particle_panel_enabled(psys)
-               row.itemR(part, "type")
-               row.itemR(psys, "seed")
+               row.itemR(part, "type", expand=True)
+               
                
                row = layout.row()
                if part.type=='HAIR':
@@ -74,7 +74,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel):
                row = layout.row()
                #col.itemL(text="TODO: Rate instead of amount")
                row.itemR(part, "amount")
-               row.itemL(text="")
+               row.itemR(psys, "seed")
                
                split = layout.split()
                
@@ -86,6 +86,27 @@ class PARTICLE_PT_emission(ParticleButtonsPanel):
                col.itemR(part, "lifetime")
                col.itemR(part, "random_lifetime", slider=True)
                
+               layout.row().itemL(text="Emit From:")
+               
+               row = layout.row()
+               row.itemR(part, "emit_from", expand=True)
+               row = layout.row()
+               row.itemR(part, "trand")
+               if part.distribution!='GRID':
+                       row.itemR(part, "even_distribution")
+               
+               if part.emit_from=='FACE' or part.emit_from=='VOLUME':
+                       row = layout.row()
+                       row.itemR(part, "distribution", expand=True)
+                       
+                       row = layout.row()
+
+                       if part.distribution=='JIT':
+                               row.itemR(part, "userjit", text="Particles/Face")
+                               row.itemR(part, "jitter_factor", text="Jittering Amount", slider=True)
+                       elif part.distribution=='GRID':
+                               row.itemR(part, "grid_resolution")
+
 class PARTICLE_PT_cache(ParticleButtonsPanel):
        __idname__= "PARTICLE_PT_cache"
        __label__ = "Cache"
@@ -111,11 +132,10 @@ class PARTICLE_PT_cache(ParticleButtonsPanel):
                row.itemR(cache, "end_frame")
                        
                        #layout.row().itemL(text="No simulation frames in disk cache.")
-               
-               
+
 class PARTICLE_PT_initial(ParticleButtonsPanel):
        __idname__= "PARTICLE_PT_initial"
-       __label__ = "Initial values"
+       __label__ = "Velocity"
 
        def draw(self, context):
                layout = self.layout
@@ -125,82 +145,55 @@ class PARTICLE_PT_initial(ParticleButtonsPanel):
                
                layout.enabled = particle_panel_enabled(psys)
                
-               layout.row().itemL(text="Location from:")
-               
-               box = layout.box()
-               row = box.row()
-               row.itemR(part, "trand")
-               
-               col = row.column()
-               col.row().itemR(part, "emit_from", expand=True)
-               
-               if part.emit_from=='FACE' or part.emit_from=='VOLUME':
-                       row = box.row()
-
-                       if part.distribution!='GRID':
-                               row.itemR(part, "even_distribution")
-                       else:
-                               row.itemL(text="")
-                               
-                       row.itemR(part, "distribution", expand=True)
-                       
-                       row = box.row()
-
-                       if part.distribution=='JIT':
-                               row.itemR(part, "userjit", text="Particles/Face")
-                               row.itemR(part, "jitter_factor", text="Jittering Amount", slider=True)
-                       elif part.distribution=='GRID':
-                               row.itemR(part, "grid_resolution")
-
                #layout.row().itemL(text="")
                                
-               layout.row().itemL(text="Velocity:")
-               box = layout.box()
-               row = box.row()
-               col = row.column()
-               col.itemR(part, "normal_factor")
+               layout.row().itemL(text="Direction:")
+       
+               split = layout.split()
+                       
+               sub = split.column()
+               sub.itemR(part, "normal_factor")
                if part.emit_from=='PARTICLE':
-                       col.itemR(part, "particle_factor")
+                       sub.itemR(part, "particle_factor")
                else:
-                       col.itemR(part, "object_factor", slider=True)
-               col.itemR(part, "random_factor")
+                       sub.itemR(part, "object_factor", slider=True)
+               sub.itemR(part, "random_factor")
+               sub.itemR(part, "tangent_factor")
+               sub.itemR(part, "tangent_phase", slider=True)
                
-               col = row.column(align=True)
-               col.itemL(text="TODO:")
-               col.itemL(text="Object aligned")
-               col.itemL(text="direction: X, Y, Z")
+               sub = split.column()
+               sub.itemL(text="TODO:")
+               sub.itemL(text="Object aligned")
+               sub.itemL(text="direction: X, Y, Z")
                
-               row = box.row()
-               col = row.column(align=True)
-               col.itemR(part, "tangent_factor")
-               col.itemR(part, "tangent_phase", slider=True)
-               
-               col = row.column(align=True)
                if part.type=='REACTOR':
-                       col.itemR(part, "reactor_factor")
-                       col.itemR(part, "reaction_shape", slider=True)
+                       sub.itemR(part, "reactor_factor")
+                       sub.itemR(part, "reaction_shape", slider=True)
                else:
-                       col.itemL(text="")
+                       sub.itemL(text="")
                
                layout.row().itemL(text="Rotation:")
-               box = layout.box()
-               box.row().itemR(part, "rotation_dynamic")
-               
-               row = box.row()
-               col = row.column(align=True)
-               col.itemR(part, "rotation_mode", text="")
-               col.itemR(part, "random_rotation_factor", slider=True)
-               col = row.column(align=True)
-               col.itemR(part, "phase_factor", slider=True)
-               col.itemR(part, "random_phase_factor", text="Random", slider=True)
-               
+               split = layout.split()
+                       
+               sub = split.column()
                
-               layout.row().itemL(text="Angular velocity:")
+               sub.itemR(part, "rotation_mode", text="Axis")
+               split = layout.split()
+                       
+               sub = split.column()
+               sub.itemR(part, "rotation_dynamic")
+               sub.itemR(part, "random_rotation_factor", slider=True)
+               sub = split.column()
+               sub.itemR(part, "phase_factor", slider=True)
+               sub.itemR(part, "random_phase_factor", text="Random", slider=True)
 
-               box = layout.box()
-               row = box.row()
-               row.itemR(part, "angular_velocity_mode", expand=True)
-               row.itemR(part, "angular_velocity_factor", text="")
+               layout.row().itemL(text="Angular velocity:")
+               layout.row().itemR(part, "angular_velocity_mode", expand=True)
+               split = layout.split()
+                       
+               sub = split.column()
+               
+               sub.itemR(part, "angular_velocity_factor", text="")
                
 class PARTICLE_PT_physics(ParticleButtonsPanel):
        __idname__= "PARTICLE_PT_physics"
@@ -213,56 +206,50 @@ class PARTICLE_PT_physics(ParticleButtonsPanel):
                part = psys.settings
                
                layout.enabled = layout.enabled = particle_panel_enabled(psys)
-               
-               layout.itemR(part, "effector_group")
-               
-               layout.itemL(text="General:")
-               box = layout.box()
-               row = box.row()
-               col = row.column(align=True)
-               col.itemR(part, "particle_size")
-               col.itemR(part, "random_size", slider=True)
-               col = row.column(align=True)
-               col.itemR(part, "mass")
-               col.itemR(part, "sizemass", text="Multiply mass with size")
-               
-               layout.row().itemL(text="")
-               
+
                row = layout.row()
-               row.itemL(text="Physics Type:")
                row.itemR(part, "physics_type", expand=True)
-               
                if part.physics_type != 'NO':
-                       box = layout.box()
-                       row = box.row()
+                       layout.itemR(part, "effector_group")
                
-               if part.physics_type == 'NEWTON':
-                       row.itemR(part, "integrator")
-                       row = box.row()
+                       row = layout.row()
                        col = row.column(align=True)
-                       col.itemL(text="Forces:")
-                       col.itemR(part, "brownian_factor")
-                       col.itemR(part, "drag_factor", slider=True)
-                       col.itemR(part, "damp_factor", slider=True)
+                       col.itemR(part, "particle_size")
+                       col.itemR(part, "random_size", slider=True)
+                       col = row.column(align=True)
+                       col.itemR(part, "mass")
+                       col.itemR(part, "sizemass", text="Multiply mass with size")
+                                                       
+                       split = layout.split()
+                       
+                       sub = split.column()
+                       
+               if part.physics_type == 'NEWTON':
+                       
+                       sub.itemL(text="Forces:")
+                       sub.itemR(part, "brownian_factor")
+                       sub.itemR(part, "drag_factor", slider=True)
+                       sub.itemR(part, "damp_factor", slider=True)
+                       sub.itemR(part, "integrator")
+                       sub = split.column()
+                       sub.itemR(part, "acceleration")
                        
-                       row.column().itemR(part, "acceleration")
                elif part.physics_type == 'KEYED':
-                       row.itemR(psys, "keyed_first")
+                       sub.itemR(psys, "keyed_first")
                        if psys.keyed_first==True:
-                               row.itemR(psys, "timed_keys", text="Key timing")
+                               sub.itemR(psys, "timed_keys", text="Key timing")
                        else:
-                               row.itemR(part, "keyed_time")
-                       
-                       row = box.row()
-                       row.itemL(text="Next key from object:")
-                       row.itemR(psys, "keyed_object", text="")
-                       row.itemR(psys, "keyed_particle_system")
+                               sub.itemR(part, "keyed_time")
+                       sub = split.column()
+                       sub.itemL(text="Next key from object:")
+                       sub.itemR(psys, "keyed_object", text="")
+                       sub.itemR(psys, "keyed_particle_system")
                
                if part.physics_type=='NEWTON' or part.physics_type=='BOIDS':
-                       row = box.row()
-                       row.itemR(part, "size_deflect")
-                       row.itemR(part, "die_on_collision")
-                       row.itemR(part, "sticky")
+
+                       sub.itemR(part, "size_deflect")
+                       sub.itemR(part, "die_on_collision")
+                       sub.itemR(part, "sticky")
 
 class PARTICLE_PT_render(ParticleButtonsPanel):
        __idname__= "PARTICLE_PT_render"
@@ -277,24 +264,29 @@ class PARTICLE_PT_render(ParticleButtonsPanel):
                psys = context.particle_system
                part = psys.settings
                
-               row = layout.row()
-               row.itemR(part, "material")
-               col = row.column()
-               col.itemR(part, "emitter");
-               col.itemR(part, "parent");
-               col = row.column()
-               col.itemR(part, "unborn");
-               col.itemR(part, "died");
+               layout.itemR(part, "material")
+               
+               split = layout.split()
+                       
+               sub = split.column()
+               sub.itemR(part, "emitter");
+               sub.itemR(part, "parent");
+               sub = split.column()
+               sub.itemR(part, "unborn");
+               sub.itemR(part, "died");
                
                row = layout.row()
                row.itemR(part, "ren_as", expand=True)
                
-               row = layout.row(align=True)
+               split = layout.split()
+                       
+               sub = split.column()
                
                if part.ren_as == 'LINE':
-                       row.itemR(part, "line_length_tail")
-                       row.itemR(part, "line_length_head")
-                       row.itemR(part, "velocity_length")
+                       sub.itemR(part, "line_length_tail")
+                       sub.itemR(part, "line_length_head")
+                       sub = split.column()
+                       sub.itemR(part, "velocity_length")
                elif part.ren_as == 'PATH':
                
                        if (part.type!='HAIR' and psys.point_cache.baked==False):
@@ -302,14 +294,23 @@ class PARTICLE_PT_render(ParticleButtonsPanel):
                                box.itemL(text="Baked or keyed particles needed for correct rendering.")
                                return
                                
-                       row.itemR(part, "hair_bspline")
-                       row.itemR(part, "render_step", text="Steps")
-                       
-                       row = layout.row()
-                       row.itemR(part, "abs_length")
-                       col = row.column(align=True)
-                       col.itemR(part, "absolute_length")
-                       col.itemR(part, "random_length", slider=True)
+                       sub.itemR(part, "render_strand")
+                       colsub = sub.column()
+                       colsub.active = part.render_strand == False
+                       colsub.itemR(part, "render_adaptive")
+                       colsub = sub.column()
+                       colsub.active = part.render_adaptive or part.render_strand == True
+                       colsub.itemR(part, "adaptive_angle")
+                       colsub = sub.column()
+                       colsub.active = part.render_adaptive == True and part.render_strand == False
+                       colsub.itemR(part, "adaptive_pix")
+                       sub.itemR(part, "hair_bspline")
+                       sub.itemR(part, "render_step", text="Steps")
+                       sub = split.column()
+                       sub.itemL(text="Length:")
+                       sub.itemR(part, "abs_length", text="Absolute")
+                       sub.itemR(part, "absolute_length", text="Maximum")
+                       sub.itemR(part, "random_length", text="Random", slider=True)
                        
                        #row = layout.row()
                        #row.itemR(part, "timed_path")
@@ -320,18 +321,18 @@ class PARTICLE_PT_render(ParticleButtonsPanel):
                        
                        row = layout.row()
                        col = row.column()
-                       col.itemR(part, "render_strand")
                        
-                       subrow = col.row()
-                       subrow.active = part.render_strand == False
-                       subrow.itemR(part, "render_adaptive")
-                       col = row.column(align=True)
-                       subrow = col.row()
-                       subrow.active = part.render_adaptive or part.render_strand == True
-                       subrow.itemR(part, "adaptive_angle")
-                       subrow = col.row()
-                       subrow.active = part.render_adaptive == True and part.render_strand == False
-                       subrow.itemR(part, "adaptive_pix")
+                       
+#                      subrow = col.row()
+#                      subrow.active = part.render_strand == False
+#                      subrow.itemR(part, "render_adaptive")
+#                      col = row.column(align=True)
+#                      subrow = col.row()
+#                      subrow.active = part.render_adaptive or part.render_strand == True
+#                      subrow.itemR(part, "adaptive_angle")
+#                      subrow = col.row()
+#                      subrow.active = part.render_adaptive == True and part.render_strand == False
+#                      subrow.itemR(part, "adaptive_pix")
                        
                        if part.type=='HAIR' and part.render_strand==True and part.child_type=='FACES':
                                layout.itemR(part, "enable_simplify")
@@ -349,21 +350,24 @@ class PARTICLE_PT_render(ParticleButtonsPanel):
                        
 
                elif part.ren_as == 'OBJECT':
-                       row.itemR(part, "dupli_object")
+                       #sub = split.column()
+                       sub.itemR(part, "dupli_object")
                elif part.ren_as == 'GROUP':
+                       sub.itemR(part, "dupli_group")
                        split = layout.split()
-                       col = split.column()
-                       row = col.row()
-                       row.itemR(part, "whole_group")
-                       subcol = row.column()
-                       subcol.active = part.whole_group == False
-                       subcol.itemR(part, "rand_group")
-                       split.column().itemR(part, "dupli_group", text="")
+                       sub = split.column()
+                       sub.itemR(part, "whole_group")
+                       sub = split.column()
+                       colsub = sub.column()
+                       colsub.active = part.whole_group == False
+                       colsub.itemR(part, "rand_group")
+                       
                elif part.ren_as == 'BILLBOARD':
-                       row.itemL(text="Align:")
-                       row.itemR(part, "billboard_lock", text="Lock")
+                       sub.itemL(text="Align:")
+                       
                        row = layout.row()
                        row.itemR(part, "billboard_align", expand=True)
+                       row.itemR(part, "billboard_lock", text="Lock")
                        row = layout.row()
                        row.itemR(part, "billboard_object")
                
@@ -393,7 +397,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel):
                
 class PARTICLE_PT_draw(ParticleButtonsPanel):
        __idname__= "PARTICLE_PT_draw"
-       __label__ = "Draw"
+       __label__ = "Display"
        
        def poll(self, context):
                return (context.particle_system != None)
@@ -442,7 +446,6 @@ class PARTICLE_PT_draw(ParticleButtonsPanel):
                        subcol.active = part.material_color==False
                        #subcol.itemL(text="color")
                        #subcol.itemL(text="Override material color")
-                       
 
 class PARTICLE_PT_children(ParticleButtonsPanel):
        __idname__= "PARTICLE_PT_children"
@@ -462,7 +465,7 @@ class PARTICLE_PT_children(ParticleButtonsPanel):
                row = layout.row()
                
                col = row.column(align=True)
-               col.itemR(part, "child_nbr", text="Draw")
+               col.itemR(part, "child_nbr", text="Display")
                col.itemR(part, "rendered_child_nbr", text="Render")
                
                col = row.column(align=True)
@@ -503,13 +506,14 @@ class PARTICLE_PT_children(ParticleButtonsPanel):
                layout.row().itemL(text="Kink:")
                layout.row().itemR(part, "kink", expand=True)
                
-               row = layout.row()
-               row.itemR(part, "kink_amplitude")
-               row.itemR(part, "kink_frequency")
-               row.itemR(part, "kink_shape", slider=True)
-
-                               
+               split = layout.split()
                
+               sub = split.column()
+               sub.itemR(part, "kink_amplitude")
+               sub.itemR(part, "kink_frequency")
+               sub = split.column()
+               sub.itemR(part, "kink_shape", slider=True)
+
 class PARTICLE_PT_vertexgroups(ParticleButtonsPanel):
        __idname__= "PARTICLE_PT_vertexgroups"
        __label__ = "Vertexgroups"
@@ -583,5 +587,4 @@ bpy.types.register(PARTICLE_PT_physics)
 bpy.types.register(PARTICLE_PT_render)
 bpy.types.register(PARTICLE_PT_draw)
 bpy.types.register(PARTICLE_PT_children)
-bpy.types.register(PARTICLE_PT_vertexgroups)
-
+bpy.types.register(PARTICLE_PT_vertexgroups)
\ No newline at end of file
index 61f780c541da78a44f1fab61dc2090a499b1bd0f..bbb118f61d7de113919764bb288fef1369d965ed 100644 (file)
@@ -5,7 +5,6 @@ def act_strip(context):
        try:            return context.scene.sequence_editor.active_strip
        except: return None
 
-
 class SequencerButtonsPanel(bpy.types.Panel):
        __space_type__ = "BUTTONS_WINDOW"
        __region_type__ = "WINDOW"
@@ -23,14 +22,11 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel):
                
                strip = act_strip(context)
                
-               row = layout.row()
-               row.itemR(strip, "name")
+               layout.itemR(strip, "name")
                
-               row = layout.row()
-               row.itemR(strip, "blend_mode")
+               layout.itemR(strip, "blend_mode")
                
-               row = layout.row()
-               row.itemR(strip, "blend_opacity")
+               layout.itemR(strip, "blend_opacity")
                
                row = layout.row()
                row.itemR(strip, "mute")
@@ -54,18 +50,86 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel):
                if not strip:
                        return False
                
-               # This is a crummy way to detect effects
-               return strip.type in ('REPLACE', 'CROSS', 'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER', 'GAMMA_ACROSS', 'MULTIPLY', 'OVER_DROP', 'PLUGIN', 'WIPE', 'GLOW', 'COLOR', 'SPEED')
-               
+               return strip.type in ('COLOR', 'WIPE', 'GLOW', 'SPEED', 'TRANSFORM')
+
        def draw(self, context):
                layout = self.layout
                
                strip = act_strip(context)
                
                if strip.type == 'COLOR':
+                       layout.itemR(strip, "color")
+                       
+               elif strip.type == 'WIPE':
+                       row = layout.row()
+                       row.itemL(text="Transition Type:")
+                       row.itemL(text="Direction:")
+                       
+                       row = layout.row()
+                       row.itemR(strip, "transition_type", text="")
+                       row.itemR(strip, "direction", text="")
+                       
+                       row = layout.row()
+                       row.itemR(strip, "blur_width")
+                       if strip.transition_type in ('SINGLE', 'DOUBLE'):
+                               row.itemR(strip, "angle")
+                               
+               elif strip.type == 'GLOW':
+                       flow = layout.column_flow()
+                       flow.itemR(strip, "threshold")
+                       flow.itemR(strip, "clamp")
+                       flow.itemR(strip, "boost_factor")
+                       flow.itemR(strip, "blur_distance")
+                       
+                       row = layout.row()
+                       row.itemR(strip, "quality", slider=True)
+                       row.itemR(strip, "only_boost")
+                       
+               elif strip.type == 'SPEED':
+                       layout.itemR(strip, "global_speed")
+                       
+                       flow = layout.column_flow()
+                       flow.itemR(strip, "curve_velocity")
+                       flow.itemR(strip, "curve_compress_y")
+                       flow.itemR(strip, "frame_blending")
+                       
+               elif strip.type == 'TRANSFORM':
                        row = layout.row()
-                       row.itemR(strip, "color")
-               # More Todo - maybe give each its own panel?
+                       row.itemL(text="Interpolation:")
+                       row.itemL(text="Translation Unit:")
+                       
+                       row = layout.row()
+                       row.itemR(strip, "interpolation", text="")
+                       row.itemR(strip, "translation_unit", text="")
+                       
+                       split = layout.split()
+                       
+                       col = split.column()
+                       sub = col.column(align=True) 
+                       sub.itemL(text="Position X:")
+                       sub.itemR(strip, "translate_start_x", text="Start")
+                       sub.itemR(strip, "translate_end_x", text="End")
+                       
+                       sub = col.column(align=True) 
+                       sub.itemL(text="Scale X:")
+                       sub.itemR(strip, "scale_start_x", text="Start")
+                       sub.itemR(strip, "scale_end_x", text="End")
+                       
+                       sub = col.column(align=True) 
+                       sub.itemL(text="Rotation:")
+                       sub.itemR(strip, "rotation_start", text="Start")
+                       sub.itemR(strip, "rotation_end", text="End")
+                       
+                       col = split.column()
+                       sub = col.column(align=True) 
+                       sub.itemL(text="Position Y:")
+                       sub.itemR(strip, "translate_start_y", text="Start")
+                       sub.itemR(strip, "translate_end_y", text="End")
+                       
+                       sub = col.column(align=True) 
+                       sub.itemL(text="Scale Y:")
+                       sub.itemR(strip, "scale_start_y", text="Start")
+                       sub.itemR(strip, "scale_end_y", text="End")
 
 class SEQUENCER_PT_input(SequencerButtonsPanel):
        __label__ = "Strip Input"
@@ -83,14 +147,22 @@ class SEQUENCER_PT_input(SequencerButtonsPanel):
                
                strip = act_strip(context)
                
-               row = layout.row()
-               row.itemR(strip, "directory")
+               layout.itemR(strip, "directory")
                
                # TODO - get current element!
-               row = layout.row()
-               row.itemR(strip.elements[0], "filename")
-               
-               
+               layout.itemR(strip.elements[0], "filename")
+               
+               """
+               layout.itemR(strip, "use_crop")
+               
+               flow = layout.column_flow()
+               flow.active = strip.use_crop
+               flow.itemR(strip, "top")
+               flow.itemR(strip, "left")
+               flow.itemR(strip, "bottom")
+               flow.itemR(strip, "right")
+               """
+
 class SEQUENCER_PT_filter(SequencerButtonsPanel):
        __label__ = "Filter"
        __idname__ = "SEQUENCER_PT_filter"
@@ -121,10 +193,8 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel):
                row.itemR(strip, "multiply_colors")
                row.itemR(strip, "strobe")
                
-               row = layout.row()
-               row.itemR(strip, "use_color_balance")
-                       
-       
+               layout.itemR(strip, "use_color_balance")
+
 class SEQUENCER_PT_proxy(SequencerButtonsPanel):
        __label__ = "Proxy"
        __idname__ = "SEQUENCER_PT_proxy"
index 029fc75f0aee3eb91bd28a1f4f65b9fc48a83d1f..9ad54361ef8afd47fdc62de0f3a3ad64dd96e3a3 100644 (file)
@@ -317,6 +317,7 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path)
                        break;
                case BCONTEXT_OBJECT:
                case BCONTEXT_PHYSICS:
+               case BCONTEXT_CONSTRAINT:
                case BCONTEXT_MODIFIER:
                        found= buttons_context_path_object(path);
                        break;
index 316cb0e08b59cccdc4ef4b9c65b12be7d5c2bd1f..444db92265d0732862bd790b60491dace5fdd517 100644 (file)
@@ -195,6 +195,7 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
        // Specific panels, check on active object seletion
        if(ob) {
                uiDefIconButS(block, ROW, B_CONTEXT_SWITCH,     ICON_OBJECT_DATA,       xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_OBJECT, 0, 0, "Object");
+               uiDefIconButS(block, ROW, B_CONTEXT_SWITCH,     ICON_CONSTRAINT,        xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_CONSTRAINT, 0, 0, "Constraint");
                
                if(ELEM5(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_LATTICE))
                        uiDefIconButS(block, ROW, B_CONTEXT_SWITCH,     ICON_MODIFIER,  xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_MODIFIER, 0, 0, "Modifier");
index 35b398fbbb74ee7a524095d8e8b76e6029bde39e..c8724cae9e649158846506957508d7228561c573 100644 (file)
@@ -194,6 +194,8 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar)
                ED_region_panels(C, ar, vertical, "bone");
        else if(sbuts->mainb == BCONTEXT_MODIFIER)
                ED_region_panels(C, ar, vertical, "modifier");
+       else if (sbuts->mainb == BCONTEXT_CONSTRAINT)
+               ED_region_panels(C, ar, vertical, "constraint");
 
     sbuts->re_align= 0;
        sbuts->mainbo= sbuts->mainb;
index b32be6cb369eed1b3a411172d2353467ed16df96..eccaf318e9c65f807d7aa4f2f19a9ea7422babd1 100644 (file)
@@ -478,6 +478,7 @@ typedef struct SpaceImaSel {
 #define BCONTEXT_BONE          9
 #define BCONTEXT_MODIFIER      10
 #define BCONTEXT_SEQUENCER     11
+#define BCONTEXT_CONSTRAINT 12
 
 
 /* sbuts->flag */
index c3e1931c439953ddce3679766dca892aa202e028..afa45834eb0d0c8e886ccdac3945140f032faf22 100644 (file)
@@ -223,6 +223,16 @@ static void rna_def_field(BlenderRNA *brna)
        RNA_def_property_range(prop, 0.0f, 10.0f);
        RNA_def_property_ui_text(prop, "Radial Falloff Power", "Radial falloff power (real gravitational falloff = 2)");
 
+       prop= RNA_def_property(srna, "texture_nabla", PROP_FLOAT, PROP_NONE);
+       RNA_def_property_float_sdna(prop, NULL, "tex_nabla");
+       RNA_def_property_range(prop, 0.0001f, 1.0f);
+       RNA_def_property_ui_text(prop, "Nabla", "Defines size of derivative offset used for calculating gradient and curl");
+       
+       prop= RNA_def_property(srna, "noise", PROP_FLOAT, PROP_NONE);
+       RNA_def_property_float_sdna(prop, NULL, "f_noise");
+       RNA_def_property_range(prop, 0.0f, 10.0f);
+       RNA_def_property_ui_text(prop, "Noise", "Noise of the wind force");
+
        /* Boolean */
        
        prop= RNA_def_property(srna, "use_min_distance", PROP_BOOLEAN, PROP_NONE);
@@ -267,9 +277,16 @@ static void rna_def_field(BlenderRNA *brna)
        RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_TEX_2D);
        RNA_def_property_ui_text(prop, "2D", "Apply force only in 2d");
        
-       prop= RNA_def_property(srna, "root_coords", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "root_coordinates", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_TEX_ROOTCO);
        RNA_def_property_ui_text(prop, "Root Texture Coordinates", "Texture coordinates from root particle locations");
+       
+       /* Pointer */
+       
+       prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
+       RNA_def_property_pointer_sdna(prop, NULL, "tex");
+       RNA_def_property_flag(prop, PROP_EDITABLE);
+       RNA_def_property_ui_text(prop, "Texture", "Texture to use as force");
 }
 
 static void rna_def_game_softbody(BlenderRNA *brna)
index 813a3bf39e8e4d9fdb71f63da4c8c89c46d0ad23..fc42c4f3f735100b718d076ee9ae3fc0aecb19fd 100644 (file)
@@ -839,17 +839,17 @@ static void rna_def_speed_control(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Global Speed", "");
        RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, 0);
        
-       prop= RNA_def_property(srna, "ipo_velocity", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "curve_velocity", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_INTEGRATE);
-       RNA_def_property_ui_text(prop, "IPO Velocity", "Interpret the IPO value as a velocity instead of a frame number.");
+       RNA_def_property_ui_text(prop, "F-Curve Velocity", "Interpret the F-Curve value as a velocity instead of a frame number.");
 
        prop= RNA_def_property(srna, "frame_blending", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_BLEND);
        RNA_def_property_ui_text(prop, "Frame Blending", "Blend two frames into the target for a smoother result.");
 
-       prop= RNA_def_property(srna, "ipo_compress_y", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "curve_compress_y", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_COMPRESS_IPO_Y);
-       RNA_def_property_ui_text(prop, "IPO Compress Y", "Scale IPO value to get the target frame number, IPO value runs from 0.0 to 1.0.");
+       RNA_def_property_ui_text(prop, "F-Curve Compress Y", "Scale F-Curve value to get the target frame number, F-Curve value runs from 0.0 to 1.0.");
 }
 
 void RNA_def_sequence(BlenderRNA *brna)
index fc0cd36c1adac8afe2dc4ffbf74bd14f0e779314..e9c6ce8156f87f64d7afd818b167824f55577edc 100644 (file)
@@ -489,6 +489,7 @@ static void rna_def_space_buttons(BlenderRNA *brna)
                {BCONTEXT_BONE, "BONE", "Bone", ""},
                {BCONTEXT_MODIFIER, "MODIFIER", "Modifier", ""},
                {BCONTEXT_SEQUENCER, "SEQUENCER", "Sequencer", ""},
+               {BCONTEXT_CONSTRAINT, "CONSTRAINT", "Constraint", ""},
                {0, NULL, NULL, NULL}};
                
        static EnumPropertyItem panel_alignment_items[] = {