Put the redo last panel into the Properties

Reiner's picture
Project: 
Bforartists Tracker

We don't have a new editor type where we could put the redo last panel in. But we have the Properties.

Task: try to move the redo last panel into the Properties editor. That's most probably Python. Then try to remove the redo last panel in the Tool Shelf. This one is C.

 

I am not so sure in what category we should put it. Best would be to have it in its own section. But i am not sure if i can manage to implement such a new section. So let's first try to move the redo last panel into the Properties section at all. Scene seems to be a good place for it.

Status: 
Closed (won't fix)
Priority: 
Normal
Category: 
Task
Component: 
User interface
Assigned: 
Unassigned
Images: 
Reporter: 
Created: 
Sat, 07/09/2016 - 11:23
Updated: 
Fri, 08/12/2016 - 11:13

Comments

12
Reiner's picture

Body: Old » New
Reiner's picture

We can call the redo last panel with a button. But it seems that we cannot display its content in the panel by python.

Let's have a look if we can find the C code for the one in the Tool Shelf ...

Reiner's picture

Not to find -.-

Reiner's picture

Assigned: Unassigned » Reiner
Reiner's picture

Another dead end. Python approach.

We can display some content by grabbing the operators.properties. But it just displays the values. And does not update the object when we change a value there. And that way we must sort everything case by case and object by object. Which ends in a monster script. And addons may bring their own keywords, and that was it already. We cannot reach the same functionality from the Redo Last panel that way.

We would need to go across the C code. But i cannot even find the panel in the tool shelf. And i guess that this was it. Another not to solve point at the list ...

import bpy

class HelloWorldPanel(bpy.types.Panel):
"""Creates a Panel in the Object properties window"""
bl_label = "Hello World Panel"
bl_idname = "OBJECT_PT_hello"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "object"

def draw(self, context):
layout = self.layout
column = layout.column()
column.prop(bpy.context.window_manager.operators[-1].properties, "value")
column.prop(bpy.context.window_manager.operators[-1].properties, "constraint_axis")
column.prop(bpy.context.window_manager.operators[-1].properties, "constraint_orientation")
column.prop(bpy.context.window_manager.operators[-1].properties, "mirror")
column.prop(bpy.context.window_manager.operators[-1].properties, "proportional")
column.prop(bpy.context.window_manager.operators[-1].properties, "proportional_edit_falloff")
column.prop(bpy.context.window_manager.operators[-1].properties, "proportional_size")
column.prop(bpy.context.window_manager.operators[-1].properties, "release_confirm")

def register():
#bpy.utils.register_class(HelloWorldPanel)
bpy.utils.register_module(__name__)

def unregister():
#bpy.utils.unregister_class(HelloWorldPanel)
bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
register()

 

Reiner's picture

There was another little evolution step. A loop finally shows the whole content, plus minus a few things. But the try across Python turned finally out to be impossible. We can call the panels. But changes at the values of those panels does still not update the object then. And i was told that Blender is not designed to do so. End of road.

Closing this issue as not solveable ...

 

import bpy

class HelloWorldPanel(bpy.types.Panel):
"""Creates a Panel in the Object properties window"""
bl_label = "Custom Redo Last"
bl_idname = "CUSTOM_redo_last"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'

def draw(self, context):
layout = self.layout
column = layout.column()
for element in bpy.context.window_manager.operators[-1].properties.keys():
#for element in dir (bpy.context.window_manager.operators[-1].properties):
column.prop(bpy.context.window_manager.operators[-1].properties, element)

def register():
bpy.utils.register_module(__name__)

def unregister():
bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
register()

 

Image: 
Reiner's picture

Status: Active » Closed (won't fix)
Reiner's picture

Reopening the issue. Maybe somebody *cough* will find the C code part for it so that we can probably move the whole baby to another location.

Reiner's picture

Status: Closed (won't fix) » Needs work
Reiner's picture

Assigned: Reiner » Unassigned
Reiner's picture

This "someone" is gone, better said did not arrive at all. Closing this issue as unsolveable.

Reiner's picture

Status: Needs work » Closed (won't fix)