how to in operator panel

can someone help to convert this to add the panel in operator panel below the tool panel instead of the tool panel


	
	
	
	
import bpy
import mathutils
from math import *
from bpy.props import *
	
	
	
	
	
	
	
bpy.types.Scene.StringProperty(name="file path",			# Define Text  Input   field
	attr="custompath",
	description="simple file path",
	maxlen= 1024,
    default= "")
	
class VIEW3D_PT_CustomMenuPanel(bpy.types.Panel): 	 	# Define the New Panel
	bl_space_type = "VIEW_3D"
	bl_region_type = "TOOLS"
	bl_label = "Subdivide Local"
	
	def draw(self, context):
		layout = self.layout
		layout.label(text="custom text")					# Add a new Text field on one line
		layout.label(text="ok salut")						# Add a new Text field on one line
		layout.operator("object.CustomButton")				# Add a new Label field on one line
	
class OBJECT_OT_CustomButton(bpy.types.Operator):		# Define First new button in  New Panel
	bl_idname = "OBJECT_OT_CustomButton"
	bl_label = "Execute Clay Local"
	__doc__ = "Execute Clay Local"
	
	def invoke(self, context, event):
		print("Execute Clay Local")
	
	
		maintain_resolution(.1,5)
	
	
	
	
	
	
		return{'FINISHED'}    
	
	
	
def register():
	bpy.types.register(VIEW3D_PT_CustomMenuPanel)
	bpy.types.register(OBJECT_OT_CustomButton)
	
	
def unregister():
	bpy.types.unregister(VIEW3D_PT_CustomMenuPanel)
	bpy.types.unregister(OBJECT_OT_CustomButton)
	
	
if __name__ == "__main__":
	register()
		


Thanks for any help

bl_region_type = "TOOL_PROPS"

tested by changing line and it does not work ?

and does not give any errors !

so what else has to be change ?

Thanks

anybody can help with theses problem !

also is there a way to add other properties like float or int vector
in the panel
how and where in the class i mean in the draw or execute part ?

cause i’d like to add some int or float values as field
but if possible without adding new class for defining new buttons if possible

Thanks and happy 2.5

Do not understand: can someone help to convert this to add the panel in operator panel below the tool panel instead of the tool panel
Give me a picture (where you circle the place you want)
Remark, you are not using the latest Blender, to be seen by:
registering classes, which is done in SVN >=31206 automatically!
So real help from me only possible for newer blender.exe (do not want to use not up to date version)

the little script is shown to add a new panel at the bottom of tool panel

whihc i would like to see work it’s a good example and might be usefull later on for other kind of script

but from another point of view i would prefer to have this script done using the operators panel below the tool panel!

so is there must a way to change the class and properties so that it will add the panel into the operator’s panel but how ?

and changing the name to tool=prop is not enough here !

and still missing how to add some scene properties like int float ect…
is there a API page shwing the differene properties yo can add and how

Thanks

To have your Operator display settings in the operator panel you need to add a draw method and set the following:

bl_options = {"REGISTER", "UNDO"}

You previously asked how to “add the panel in operator panel below the tool panel instead of the tool panel” which is what changing the bl_region_type does.

http://www.blender.org/documentation/250PythonDoc/bpy.props.html

http://wiki.blender.org/index.php/Doc:2.5/Manual/Extensions/Python/Properties

but does it also means taht i have to change the 2 class to use operator
for the panel and button ?

and don’t know if this will affected with the enxt changes to properties?

hope not
cause this is a nice little example on how it works!

Thanks