Skip to main content
Tweeted twitter.com/#!/StackBlender/status/455263672399835136
added 3 characters in body
Source Link
CodeManX
  • 29.7k
  • 3
  • 92
  • 131

I'd like the contents of this custom editor panel to persist with the file.

I can't seem to get my propertygroupPropertyGroup or even a stringpropertyStringProperty to save with the blend file.

class PG_mypg(bpy.types.PropertyGroup):
    custString = bpy.props.StringProperty(name="custString")

bpy.utils.register_class(PG_mypg)

#this# this adds it but it doesn't persist in the file
bpy.types.WindowManager.myPanelSettings = bpy.props.PointerProperty(type = PG_mypgtype=PG_mypg)

#even# even this one doesn't save either
bpy.types.WindowManager.myCustString = bpy.props.StringProperty( name="customString")

Note that I want this to be set for my window, not per object.

I'd like the contents of this custom editor panel to persist with the file.

I can't seem to get my propertygroup or even a stringproperty to save with the blend file.

class PG_mypg(bpy.types.PropertyGroup):
    custString = bpy.props.StringProperty(name="custString")

bpy.utils.register_class(PG_mypg)

#this adds it but it doesn't persist in the file
bpy.types.WindowManager.myPanelSettings = bpy.props.PointerProperty(type = PG_mypg)

#even this one doesn't save either
bpy.types.WindowManager.myCustString = bpy.props.StringProperty( name="customString")

Note that I want this to be set for my window, not per object.

I'd like the contents of this custom editor panel to persist with the file.

I can't seem to get my PropertyGroup or even a StringProperty to save with the blend file.

class PG_mypg(bpy.types.PropertyGroup):
    custString = bpy.props.StringProperty(name="custString")

bpy.utils.register_class(PG_mypg)

# this adds it but it doesn't persist in the file
bpy.types.WindowManager.myPanelSettings = bpy.props.PointerProperty(type=PG_mypg)

# even this one doesn't save either
bpy.types.WindowManager.myCustString = bpy.props.StringProperty(name="customString")

Note that I want this to be set for my window, not per object.

Source Link
Ben L
  • 611
  • 6
  • 19

Trouble getting windowmanager properties to save it's contents with blend file

I'd like the contents of this custom editor panel to persist with the file.

I can't seem to get my propertygroup or even a stringproperty to save with the blend file.

class PG_mypg(bpy.types.PropertyGroup):
    custString = bpy.props.StringProperty(name="custString")

bpy.utils.register_class(PG_mypg)

#this adds it but it doesn't persist in the file
bpy.types.WindowManager.myPanelSettings = bpy.props.PointerProperty(type = PG_mypg)

#even this one doesn't save either
bpy.types.WindowManager.myCustString = bpy.props.StringProperty( name="customString")

Note that I want this to be set for my window, not per object.